/* Product Box Style – modern product & category boxes */
:root{--pbs-c:#6366f1;--pbs-accent:#111827;--pbs-radius:18px;--pbs-ink:#111827;--pbs-muted:#6b7280;--pbs-ease:cubic-bezier(.2,.8,.2,1)}

/* ---------- grid gap (classic loops) ---------- */
body ul.products:has(> li.pbs-box){display:grid!important;grid-template-columns:repeat(var(--pbs-cols,4),minmax(0,1fr));gap:24px!important;margin-left:0!important;margin-right:0!important}
body ul.products:has(> li.pbs-box)::before,body ul.products:has(> li.pbs-box)::after{display:none!important}
body ul.products.columns-1{--pbs-cols:1}body ul.products.columns-2{--pbs-cols:2}body ul.products.columns-3{--pbs-cols:3}body ul.products.columns-4{--pbs-cols:4}body ul.products.columns-5{--pbs-cols:5}body ul.products.columns-6{--pbs-cols:6}
@media (max-width:1024px){body ul.products:has(> li.pbs-box){--pbs-cols:3!important;gap:18px!important}}
@media (max-width:768px){body ul.products:has(> li.pbs-box){--pbs-cols:2!important;gap:14px!important}}
@media (max-width:380px){body ul.products:has(> li.pbs-box){gap:10px!important}}

/* ---------- the box ---------- */
body ul.products li.product.pbs-box,
body .wc-block-product.pbs-box,
body .wc-block-grid__product.pbs-box{
	position:relative;display:flex!important;flex-direction:column;
	width:auto!important;max-width:none!important;float:none!important;margin:0!important;padding:0 0 16px!important;
	background:#fff;border:1px solid rgba(17,24,39,.06);border-radius:var(--pbs-radius)!important;overflow:hidden;
	box-shadow:0 1px 2px rgba(17,24,39,.04),0 6px 20px -8px rgba(17,24,39,.12);
	text-align:left;
	transition:transform .45s var(--pbs-ease),box-shadow .45s var(--pbs-ease),border-color .45s var(--pbs-ease);
}
/* always: picture on top, text under it – even when the theme puts them side by side */
body ul.products li.product.pbs-box,
body .wc-block-product.pbs-box{flex-direction:column!important;flex-wrap:nowrap!important;align-items:stretch!important;justify-content:flex-start!important;grid-template-columns:none!important}
body ul.products li.product.pbs-box > *,
body .pbs-box .astra-shop-thumbnail-wrap,
body .pbs-box .astra-shop-summary-wrap,
body .pbs-box .product-thumbnail,
body .pbs-box .product-details,
body .pbs-box .product-inner,
body .pbs-box .product-content,
body .pbs-box .box-image,
body .pbs-box .box-text{
	width:100%!important;max-width:100%!important;flex:0 0 auto!important;float:none!important;margin-left:0!important;margin-right:0!important;
	display:block;padding-left:0!important;padding-right:0!important;text-align:left!important
}
body .pbs-box .astra-shop-summary-wrap,body .pbs-box .product-details,body .pbs-box .box-text{display:flex!important;flex-direction:column;flex:1 1 auto!important;padding-top:0!important}
body ul.products li.product.pbs-box > .product-inner,body ul.products li.product.pbs-box > div:only-of-type{display:flex!important;flex-direction:column!important;flex:1 1 auto!important}
body .pbs-box .astra-shop-thumbnail-wrap{margin-bottom:0!important}
body .pbs-box > a.woocommerce-LoopProduct-link,
body .pbs-box > a.woocommerce-loop-category__link{display:flex;flex-direction:column;flex:1 1 auto;color:inherit;text-decoration:none!important}

/* lift on hover */
@media (hover:hover){
	body .pbs-box.pbs-hover-lift:hover{transform:translateY(-6px);box-shadow:0 2px 4px rgba(17,24,39,.04),0 22px 40px -14px color-mix(in srgb,var(--pbs-c) 45%,rgba(17,24,39,.35));border-color:color-mix(in srgb,var(--pbs-c) 35%,transparent)}
}

/* ---------- picture area (category colour behind the product) ---------- */
body .pbs-box .pbs-media,
body .wc-block-product.pbs-box .wc-block-components-product-image,
body .wc-block-grid__product.pbs-box .wc-block-grid__product-image{
	position:relative;display:block;margin:0 0 14px!important;aspect-ratio:1/1;overflow:hidden;
	background:
		radial-gradient(120% 90% at 50% 100%,color-mix(in srgb,var(--pbs-c) 30%,#fff) 0%,transparent 70%),
		linear-gradient(160deg,color-mix(in srgb,var(--pbs-c) 10%,#fff) 0%,color-mix(in srgb,var(--pbs-c) 22%,#fff) 100%);
	border-radius:calc(var(--pbs-radius) - 6px) calc(var(--pbs-radius) - 6px) 0 0;
}
body .pbs-box .pbs-media::after,
body .wc-block-product.pbs-box .wc-block-components-product-image::after{
	content:"";position:absolute;left:0;right:0;bottom:0;height:4px;background:var(--pbs-c);opacity:.9;
	transform:scaleX(.18);transform-origin:left;transition:transform .6s var(--pbs-ease)
}


body .pbs-box .pbs-media img,
body .wc-block-product.pbs-box .wc-block-components-product-image img,
body .wc-block-grid__product.pbs-box .wc-block-grid__product-image img{
	display:block;width:100%!important;height:100%!important;max-width:none!important;margin:0!important;
	object-fit:var(--pbs-fit,contain)!important;padding:0;box-shadow:none!important;border-radius:0!important;background:transparent!important;
	transition:transform .7s var(--pbs-ease),filter .7s var(--pbs-ease);will-change:transform;
}
body.pbs-fit-contain .pbs-box .pbs-media img,body.pbs-fit-contain .wc-block-product.pbs-box .wc-block-components-product-image img{padding:8%!important}


body .wc-block-product.pbs-box .wc-block-components-product-image > a,
body .wc-block-grid__product.pbs-box .wc-block-grid__product-image > a{display:block;width:100%;height:100%}
body .wc-block-product.pbs-box{padding-bottom:16px!important}

/* category label on the picture */
body .pbs-chip{
	position:absolute;left:12px;top:12px;z-index:2;max-width:calc(100% - 24px);
	padding:5px 11px;border-radius:999px;background:var(--pbs-c);color:#fff;
	font:600 11px/1.2 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;letter-spacing:.03em;text-transform:uppercase;
	white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:0 4px 12px -4px color-mix(in srgb,var(--pbs-c) 70%,transparent)
}
/* sale badge */
body .pbs-box .onsale,
body .pbs-box .wc-block-components-product-sale-badge{
	position:absolute!important;top:12px!important;right:12px!important;left:auto!important;z-index:2;margin:0!important;
	min-width:0!important;min-height:0!important;padding:5px 11px!important;line-height:1.2!important;border-radius:999px!important;
	background:#ef4444!important;color:#fff!important;font-size:11px!important;font-weight:700!important;border:0!important
}

/* ---------- text ---------- */
body .pbs-box .ast-woo-product-category,
body .pbs-box .product-cat,
body .pbs-box .category,
body .pbs-box .posted_in{
	display:block!important;margin:0 16px 4px!important;padding:0!important;
	font:600 11px/1.3 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif!important;letter-spacing:.06em;text-transform:uppercase;
	color:color-mix(in srgb,var(--pbs-c) 75%,#111827)!important;opacity:1!important
}
body.pbs-chip-on .pbs-box .ast-woo-product-category{display:none!important}   /* already shown on the picture */
body .pbs-box .woocommerce-loop-product__title,
body .pbs-box .woocommerce-loop-category__title,
body .wc-block-product.pbs-box .wp-block-post-title,
body .wc-block-grid__product.pbs-box .wc-block-grid__product-title{
	margin:0 16px 6px!important;padding:0!important;font-size:15px!important;line-height:1.35!important;font-weight:600!important;color:var(--pbs-ink)!important;
	display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-align:left!important
}
body .pbs-box .woocommerce-loop-product__title a,body .wc-block-product.pbs-box .wp-block-post-title a{color:inherit!important;text-decoration:none!important}
body .pbs-box .star-rating{margin:0 16px 6px!important;float:none!important}
body .pbs-box .price,
body .wc-block-product.pbs-box .wc-block-components-product-price,
body .wc-block-grid__product.pbs-box .wc-block-grid__product-price{
	display:block;margin:0 16px 12px!important;color:var(--pbs-ink)!important;font-size:16px!important;font-weight:700!important;text-align:left!important
}
body .pbs-box .price del{color:var(--pbs-muted)!important;font-weight:500;opacity:.8;margin-right:6px}
body .pbs-box .price ins{text-decoration:none;color:#ef4444!important}

/* ---------- button ---------- */
body .pbs-box .button,
body .pbs-box .add_to_cart_button,
body .wc-block-product.pbs-box .wp-block-button__link,
body .wc-block-product.pbs-box .wc-block-components-product-button__button,
body .wc-block-grid__product.pbs-box .wp-block-button__link{
	position:relative;overflow:hidden;
	margin:auto 16px 0!important;align-self:stretch;display:flex!important;align-items:center;justify-content:center;gap:8px;
	width:auto!important;min-width:0!important;max-width:none!important;height:auto!important;min-height:44px;padding:11px 16px!important;
	border:0!important;outline:0!important;border-radius:12px!important;
	background:var(--pbs-accent)!important;color:#fff!important;
	font:600 14px/1.2 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif!important;letter-spacing:.01em;text-transform:none!important;text-align:center;text-decoration:none!important;white-space:normal!important;word-break:normal;
	box-shadow:0 6px 14px -8px rgba(17,24,39,.55)!important;
	transition:background-color .35s var(--pbs-ease),box-shadow .35s var(--pbs-ease),transform .2s var(--pbs-ease)!important
}
/* small cart icon in front of the text */
body .pbs-box .button.add_to_cart_button::before,
body .pbs-box .button.product_type_simple::before,
body .pbs-box .button.product_type_variable::before,
body .wc-block-product.pbs-box .wc-block-components-product-button__button::before{
	content:"";flex:0 0 16px;width:16px;height:16px;background:currentColor;
	-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='20' r='1.5'/%3E%3Ccircle cx='18' cy='20' r='1.5'/%3E%3Cpath d='M2.5 3h2.6l2.4 11.2a1.5 1.5 0 0 0 1.5 1.2h8.7a1.5 1.5 0 0 0 1.5-1.1L21 7H6'/%3E%3C/svg%3E") center/contain no-repeat;
	mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='20' r='1.5'/%3E%3Ccircle cx='18' cy='20' r='1.5'/%3E%3Cpath d='M2.5 3h2.6l2.4 11.2a1.5 1.5 0 0 0 1.5 1.2h8.7a1.5 1.5 0 0 0 1.5-1.1L21 7H6'/%3E%3C/svg%3E") center/contain no-repeat;
	position:static!important;border:0!important;margin:0!important;transform:none!important;opacity:1!important;display:block!important
}
body .pbs-box .button::after{display:none!important}
body .pbs-box .button:focus,body .pbs-box .button:focus-visible{outline:0!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--pbs-c) 45%,transparent)!important}
@media (hover:hover){
	body .pbs-box .button:hover,
	body .wc-block-product.pbs-box .wp-block-button__link:hover,
	body .wc-block-product.pbs-box .wc-block-components-product-button__button:hover{
		background:var(--pbs-c)!important;color:#fff!important;box-shadow:0 10px 20px -10px var(--pbs-c)!important;transform:translateY(-1px)
	}
}
body .pbs-box .button:active{transform:scale(.97)!important}
body .pbs-box .button.loading{opacity:.75}
body .pbs-box .button.added::before{
	-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/contain no-repeat;
	mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/contain no-repeat
}
body .pbs-box a.added_to_cart{
	display:block!important;margin:8px 16px 0!important;padding:0!important;min-height:0;background:none!important;border:0!important;box-shadow:none!important;
	color:var(--pbs-c)!important;font:600 13px/1.3 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif!important;text-align:center;text-decoration:underline!important;text-underline-offset:3px
}
body .wc-block-product.pbs-box .wp-block-woocommerce-product-button,body .wc-block-product.pbs-box .wc-block-components-product-button{margin-top:auto!important;display:flex;flex-direction:column;align-items:stretch!important}

/* ---------- category boxes ---------- */
body ul.products li.product-category.pbs-catbox{padding-bottom:0!important}
body .pbs-catbox .pbs-media{margin:0!important;border-radius:0}
body .pbs-catbox .pbs-media::before{
	content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
	background:linear-gradient(180deg,transparent 35%,color-mix(in srgb,var(--pbs-c) 75%,#000 10%) 100%);opacity:.55;transition:opacity .5s var(--pbs-ease)
}

body .pbs-catbox .woocommerce-loop-category__title{
	position:relative;margin:0!important;padding:14px 16px 16px!important;font-size:16px!important;
	background:color-mix(in srgb,var(--pbs-c) 12%,#fff);border-top:3px solid var(--pbs-c);-webkit-line-clamp:unset;display:block
}
body .pbs-catbox .woocommerce-loop-category__title .count{background:var(--pbs-c)!important;color:#fff!important;border-radius:999px;padding:2px 8px;font-size:11px;font-weight:700;margin-left:6px;vertical-align:middle}
body .pbs-cat-arrow{
	position:absolute;right:14px;bottom:14px;z-index:2;width:38px;height:38px;border-radius:50%;
	display:flex;align-items:center;justify-content:center;background:#fff;color:var(--pbs-c);font:700 18px/1 system-ui,sans-serif;
	box-shadow:0 6px 16px -6px rgba(0,0,0,.35);transform:translateX(-6px);opacity:0;transition:transform .45s var(--pbs-ease),opacity .45s var(--pbs-ease)
}
@media (hover:hover){body .pbs-catbox:hover .pbs-cat-arrow{transform:none;opacity:1}}
@media (hover:none){body .pbs-cat-arrow{opacity:1;transform:none}}

/* ---------- entrance animation ---------- */
.pbs-anim .pbs-box.pbs-wait{opacity:0;transform:translateY(22px) scale(.98)}
.pbs-anim .pbs-box.pbs-in{opacity:1;transform:none;transition:opacity .7s var(--pbs-ease) var(--pbs-delay,0ms),transform .7s var(--pbs-ease) var(--pbs-delay,0ms),box-shadow .45s var(--pbs-ease),border-color .45s var(--pbs-ease)}
.pbs-anim .pbs-box.pbs-in.pbs-done{transition:transform .45s var(--pbs-ease),box-shadow .45s var(--pbs-ease),border-color .45s var(--pbs-ease)}

/* ---------- phones ---------- */
@media (max-width:768px){
	body .pbs-box .woocommerce-loop-product__title,body .wc-block-product.pbs-box .wp-block-post-title{margin:0 12px 4px!important;font-size:14px!important}
	body .pbs-box .price,body .wc-block-product.pbs-box .wc-block-components-product-price{margin:0 12px 10px!important;font-size:15px!important}
	body .pbs-box .button,body .wc-block-product.pbs-box .wp-block-button__link,body .wc-block-product.pbs-box .wc-block-components-product-button__button{margin:auto 10px 0!important;min-height:40px;font-size:13px!important;padding:8px 8px!important;gap:6px;border-radius:10px!important}
	body .pbs-box .ast-woo-product-category,body .pbs-box .product-cat{margin:0 12px 4px!important}
	body .pbs-chip{left:8px;top:8px;font-size:10px;padding:4px 8px}
	body ul.products li.product.pbs-box{padding-bottom:12px!important}
}

@media (prefers-reduced-motion:reduce){
	.pbs-anim .pbs-box.pbs-wait{opacity:1;transform:none}
	body .pbs-box,body .pbs-box *{transition:none!important}
}

/* category label and sale badge never overlap */
body .pbs-box:has(.onsale) .pbs-chip,
body .pbs-box:has(.wc-block-components-product-sale-badge) .pbs-chip{max-width:calc(100% - 92px)}

/* narrow boxes (2 columns on phones): compact button, never wider than the box.
   Plain media queries – no container-type, which put every card in its own layout-containment box. */
@media (max-width:480px){
	body .pbs-box .button,body .pbs-box .wc-block-components-product-button__button{font-size:12.5px!important;padding:9px 8px!important;min-height:38px;margin-left:10px!important;margin-right:10px!important;gap:5px}
	body .pbs-box .button::before,body .pbs-box .wc-block-components-product-button__button::before{flex-basis:14px!important;width:14px!important;height:14px!important}
	body .pbs-box .woocommerce-loop-product__title,body .pbs-box .price,body .pbs-box .ast-woo-product-category{margin-left:10px!important;margin-right:10px!important}
}
@media (max-width:320px){
	body .pbs-box .button::before,body .pbs-box .wc-block-components-product-button__button::before{display:none!important}
}

/* the text part fills the box, so every button sits at the bottom in one line */
body ul.products li.product.pbs-box > .astra-shop-summary-wrap,
body ul.products li.product.pbs-box > .product-details,
body ul.products li.product.pbs-box > .box-text,
body ul.products li.product.pbs-box > .product-inner,
body ul.products li.product.pbs-box > a.woocommerce-LoopProduct-link:only-of-type{flex:1 1 auto!important;display:flex!important;flex-direction:column!important}

/* picture stays still on hover – only the box moves */
body .pbs-box .pbs-media img,body .wc-block-product.pbs-box .wc-block-components-product-image img{transform:none!important;filter:none!important}
body .pbs-box .pbs-media::after,body .wc-block-product.pbs-box .wc-block-components-product-image::after{transform:scaleX(.18)!important}

/* full picture: fills the whole picture area, no inner padding */
body.pbs-fit-cover .pbs-box .pbs-media img,
body.pbs-fit-cover .wc-block-product.pbs-box .wc-block-components-product-image img{object-fit:cover!important;padding:0!important}

/* theme extras that pop up over the picture on hover (add-to-cart / quick view icons) – removed */
body .pbs-box :is(.astra-shop-thumbnail-wrap,.pbs-media,.product-thumbnail,.box-image,.wc-block-components-product-image,.woocommerce-LoopProduct-link) :is(.button,.add_to_cart_button,.ajax_add_to_cart,.ast-on-card-button,.ast-quick-view-button,.ast-quick-view-trigger,.yith-wcqv-button,.quick-view,.xoo-qv-button,.product-buttons,.ast-card-action-tooltip),
body .pbs-box .astra-shop-thumbnail-wrap > a.button,
body .pbs-box .ast-on-card-button,
body .pbs-box .ast-quick-view-button,
body .pbs-box .ast-quick-view-trigger{display:none!important}

/* box lift is the only hover effect */
@media (hover:hover){
	body .pbs-box.pbs-hover-zoom:hover{transform:translateY(-6px);box-shadow:0 2px 4px rgba(17,24,39,.04),0 22px 40px -14px color-mix(in srgb,var(--pbs-c) 45%,rgba(17,24,39,.35))}
}

/* no coloured line under the picture */
body .pbs-box .pbs-media::after,
body .wc-block-product.pbs-box .wc-block-components-product-image::after{display:none!important;content:none!important}

/* ---------- layout safety (v1.2.2) ----------
   - every box is its own stacking context: the category label / sale badge (z-index) can never
     float above a section that comes later on the page (newsletter, footer …)
   - the product list always takes the full height of its rows, so the section after it can't slide up over it */
body .pbs-box{isolation:isolate}
body ul.products:has(> li.pbs-box),
body ul.wc-block-grid__products:has(> .pbs-box),
body ul.wc-block-product-template:has(> .pbs-box){
	position:relative;z-index:0;isolation:isolate;
	height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important;
	clear:both;
}
body ul.wc-block-grid__products:has(> .pbs-box),
body ul.wc-block-product-template:has(> .pbs-box){display:grid!important;grid-template-columns:repeat(var(--pbs-bcols,4),minmax(0,1fr));gap:24px!important;margin-left:0!important;margin-right:0!important;padding-left:0!important;list-style:none}
body .wc-block-grid.has-2-columns ul.wc-block-grid__products,body ul.wc-block-product-template.columns-2{--pbs-bcols:2}
body .wc-block-grid.has-3-columns ul.wc-block-grid__products,body ul.wc-block-product-template.columns-3{--pbs-bcols:3}
@media (max-width:1024px){body ul.wc-block-grid__products:has(> .pbs-box),body ul.wc-block-product-template:has(> .pbs-box){--pbs-bcols:3!important;gap:18px!important}}
@media (max-width:768px){body ul.wc-block-grid__products:has(> .pbs-box),body ul.wc-block-product-template:has(> .pbs-box){--pbs-bcols:2!important;gap:14px!important}}
body ul.wc-block-grid__products > .pbs-box,body ul.wc-block-product-template > .pbs-box{width:auto!important;max-width:none!important;flex:none!important;margin:0!important}
