/* KitchenHome – WooCommerce layout (RTL/LTR safe) */
.woocommerce-page .site-main{padding-top:24px}
.shop-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:32px;align-items:start}
.shop-sidebar .widget{margin-bottom:18px}
.woocommerce-products-header__title,.page-title{margin-bottom:.5em}
.woocommerce-result-count{float:none;margin:0 0 14px;color:var(--kh-muted);font-size:.9rem}
.woocommerce-ordering{float:none;margin:-6px 0 18px}
.woocommerce-ordering select{width:auto;min-width:200px}

/* Product grid */
.woocommerce ul.products,.woocommerce-page ul.products{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;margin:0 0 30px;padding:0;list-style:none}
.woocommerce ul.products.columns-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.woocommerce ul.products.columns-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.woocommerce ul.products.columns-5{grid-template-columns:repeat(5,minmax(0,1fr))}
.woocommerce ul.products::before,.woocommerce ul.products::after{display:none}
.woocommerce ul.products li.product,.woocommerce-page ul.products li.product{position:relative;float:none;width:auto;margin:0;display:flex;flex-direction:column;background:#fff;border:1px solid var(--kh-border);border-radius:var(--kh-radius);padding:12px;transition:.25s}
.woocommerce ul.products li.product:hover{box-shadow:var(--kh-shadow);transform:translateY(-3px)}
.woocommerce ul.products li.product a img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:calc(var(--kh-radius) - 4px);margin:0 0 12px}
.woocommerce ul.products li.product .woocommerce-loop-product__title{font-size:.98rem;line-height:1.7;padding:0;margin:0 0 6px;min-height:3.4em;color:var(--kh-dark)}
.woocommerce ul.products li.product .price{display:block;margin:auto 0 10px;color:var(--kh-primary-dark);font-weight:800}
.woocommerce ul.products li.product .price del{color:var(--kh-muted);font-weight:400;font-size:.85em;margin-inline-end:6px}
.woocommerce ul.products li.product .price ins{text-decoration:none}
.woocommerce ul.products li.product .button{width:100%;margin:0}
.woocommerce ul.products li.product .star-rating{margin:0 0 6px}
.woocommerce span.onsale{position:absolute;top:18px;inset-inline-start:18px;inset-inline-end:auto;left:auto;right:auto;min-height:0;min-width:0;margin:0;padding:2px 12px;line-height:1.8;border-radius:999px;background:#e03131;color:#fff;font-size:.8rem;font-weight:700;z-index:2}
[dir=rtl] .woocommerce span.onsale{right:18px;left:auto}
[dir=ltr] .woocommerce span.onsale{left:18px;right:auto}
.stock-label{display:inline-block;background:#f1f3f5;color:#495057;border-radius:999px;font-size:.78rem;padding:1px 10px;margin-bottom:8px;align-self:flex-start}

/* Buttons (override Woo general) */
.woocommerce a.button,.woocommerce button.button,.woocommerce input.button,.woocommerce #respond input#submit,.woocommerce a.button.alt,.woocommerce button.button.alt,.woocommerce input.button.alt,.woocommerce #respond input#submit.alt{display:inline-flex;align-items:center;justify-content:center;padding:.7em 1.4em;border-radius:999px;background:var(--kh-primary);color:#fff;font:inherit;font-weight:700;border:0;line-height:1.5;transition:.2s}
.woocommerce a.button:hover,.woocommerce button.button:hover,.woocommerce input.button:hover,.woocommerce a.button.alt:hover,.woocommerce button.button.alt:hover{background:var(--kh-primary-dark);color:#fff}
.woocommerce a.button.disabled,.woocommerce button.button:disabled,.woocommerce button.button.disabled{opacity:.5}
.woocommerce a.added_to_cart{display:block;text-align:center;margin-top:8px;font-size:.85rem}

/* Single product */
.woocommerce div.product{position:relative;display:grid;grid-template-columns:var(--pl-gal,50%) minmax(0,1fr);gap:40px;align-items:start}
.woocommerce div.product div.images,.woocommerce div.product div.summary{float:none;width:100%;margin:0}
.woocommerce div.product .woocommerce-tabs,.woocommerce div.product .related,.woocommerce div.product .upsells,.woocommerce div.product>.up-sells{grid-column:1/-1}
.woocommerce div.product div.images{position:relative}
.woocommerce div.product div.images img{border-radius:var(--kh-radius);width:100%;height:auto}
.woocommerce div.product .flex-control-thumbs{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;list-style:none;padding:0;margin:10px 0 0}
.woocommerce div.product .flex-control-thumbs li{float:none;width:auto}
.woocommerce div.product .flex-control-thumbs img{opacity:.6;cursor:pointer;border-radius:10px}
.woocommerce div.product .flex-control-thumbs img.flex-active,.woocommerce div.product .flex-control-thumbs img:hover{opacity:1}
.woocommerce-product-gallery__trigger{position:absolute;top:12px;inset-inline-end:12px;z-index:5;width:40px;height:40px;border-radius:50%;background:#fff;box-shadow:var(--kh-shadow);text-indent:-999px;overflow:hidden}
.woocommerce div.product .product_title{font-size:clamp(1.4rem,3vw,2rem)}
.woocommerce div.product p.price,.woocommerce div.product span.price{color:var(--kh-primary-dark);font-weight:900;font-size:1.5rem}
.woocommerce div.product p.price del{color:var(--kh-muted);font-weight:400;font-size:.7em}
.woocommerce div.product p.price ins{text-decoration:none}
.woocommerce div.product form.cart{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin:20px 0}
.woocommerce div.product form.cart .variations{width:100%}
.woocommerce div.product form.cart .variations td,.woocommerce div.product form.cart .variations th{display:block;padding:4px 0}
.woocommerce .quantity .qty{width:84px;text-align:center;padding:.6em .4em}
.woocommerce div.product .product_meta{font-size:.88rem;color:var(--kh-muted);border-top:1px solid var(--kh-border);padding-top:14px;margin-top:20px}
.woocommerce div.product .product_meta>span{display:block}
.woocommerce div.product .woocommerce-tabs ul.tabs{display:flex;gap:6px;flex-wrap:wrap;list-style:none;margin:0 0 20px;padding:0;border-bottom:2px solid var(--kh-border)}
.woocommerce div.product .woocommerce-tabs ul.tabs::before,.woocommerce div.product .woocommerce-tabs ul.tabs li::before,.woocommerce div.product .woocommerce-tabs ul.tabs li::after{display:none}
.woocommerce div.product .woocommerce-tabs ul.tabs li{border:0;background:transparent;margin:0;padding:0;border-radius:0}
.woocommerce div.product .woocommerce-tabs ul.tabs li a{display:block;padding:10px 18px;color:var(--kh-muted);font-weight:700}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a{color:var(--kh-primary-dark);box-shadow:inset 0 -3px 0 var(--kh-primary)}
.woocommerce div.product .woocommerce-tabs .panel{max-width:900px}
.woocommerce .related>h2,.woocommerce .upsells>h2{margin-top:30px}

/* Notices */
.woocommerce-message,.woocommerce-info,.woocommerce-error{border:0;border-inline-start:5px solid var(--kh-primary);background:var(--kh-cream);border-radius:12px;padding:14px 20px;margin:0 0 22px;list-style:none;display:flex;gap:12px;flex-wrap:wrap;align-items:center;justify-content:space-between}
.woocommerce-error{border-color:#e03131;background:#fff5f5}
.woocommerce-message::before,.woocommerce-info::before,.woocommerce-error::before{display:none}

/* Cart & checkout (classic) */
.woocommerce table.shop_table{border:1px solid var(--kh-border);border-radius:var(--kh-radius);border-collapse:separate;border-spacing:0;overflow:hidden;width:100%}
.woocommerce table.shop_table th,.woocommerce table.shop_table td{padding:14px;border-top:1px solid var(--kh-border);text-align:start}
.woocommerce table.shop_table thead th{background:var(--kh-cream);border-top:0}
.woocommerce-cart-form img{width:70px;border-radius:10px}
.woocommerce .cart-collaterals{display:flex;justify-content:flex-end;margin-top:24px}
.woocommerce .cart-collaterals .cart_totals{float:none;width:100%;max-width:440px}
.woocommerce a.remove{color:#e03131!important;font-size:1.4rem}
.woocommerce a.remove:hover{background:#e03131;color:#fff!important}
.woocommerce .col2-set{display:grid;grid-template-columns:1fr 1fr;gap:30px}
.woocommerce .col2-set .col-1,.woocommerce .col2-set .col-2{float:none;width:100%}
.woocommerce form .form-row{margin:0 0 14px;padding:0;display:block;float:none;width:100%}
.woocommerce form .form-row label{display:block;margin-bottom:4px;font-weight:600;font-size:.92rem}
.woocommerce form .form-row-first,.woocommerce form .form-row-last{width:48.5%;display:inline-block}
.woocommerce form .form-row-first{float:inline-start}
.woocommerce form .form-row-last{float:inline-end}
.woocommerce form .form-row-wide{clear:both}
.woocommerce-checkout #order_review,.woocommerce-checkout #order_review_heading{float:none;width:100%}
.woocommerce-checkout #payment{background:var(--kh-cream);border-radius:var(--kh-radius)}
.woocommerce-checkout #payment ul.payment_methods{border-bottom:1px solid var(--kh-border);padding:16px}
.woocommerce-checkout #payment div.payment_box{background:#fff;border-radius:10px}
.woocommerce-checkout #payment div.payment_box::before{display:none}
.woocommerce-checkout #place_order{width:100%;font-size:1.05rem}

/* My account */
.woocommerce-account .woocommerce{display:grid;grid-template-columns:240px minmax(0,1fr);gap:32px;align-items:start}
.woocommerce-account .woocommerce-MyAccount-navigation,.woocommerce-account .woocommerce-MyAccount-content{float:none;width:100%}
.woocommerce-MyAccount-navigation ul{list-style:none;margin:0;padding:8px;background:#fff;border:1px solid var(--kh-border);border-radius:var(--kh-radius)}
.woocommerce-MyAccount-navigation a{display:block;padding:10px 14px;border-radius:10px;color:var(--kh-dark);font-weight:600}
.woocommerce-MyAccount-navigation .is-active a,.woocommerce-MyAccount-navigation a:hover{background:var(--kh-cream);color:var(--kh-primary-dark)}
.woocommerce-account:not(.logged-in) .woocommerce{display:block}

/* Reviews & stars */
.woocommerce .star-rating{color:#f59f00}
.woocommerce #reviews #comments ol.commentlist{padding:0;list-style:none}
.woocommerce #reviews #comments ol.commentlist li img.avatar{position:static;float:none;width:48px;border-radius:50%;margin-inline-end:12px;padding:0;border:0;background:none}
.woocommerce #reviews #comments ol.commentlist li .comment-text{margin:0;border:1px solid var(--kh-border);border-radius:var(--kh-radius);padding:14px}

@media (max-width:1024px){
 .woocommerce ul.products,.woocommerce ul.products.columns-5,.woocommerce ul.products.columns-4{grid-template-columns:repeat(3,minmax(0,1fr))}
 .shop-layout{grid-template-columns:1fr}
}
@media (max-width:820px){
 .woocommerce div.product{grid-template-columns:1fr;gap:24px}
 .woocommerce .col2-set,.woocommerce-account .woocommerce{grid-template-columns:1fr}
}
@media (max-width:600px){
 .woocommerce ul.products,.woocommerce ul.products[class*=columns-]{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .woocommerce ul.products li.product{padding:8px}
 .woocommerce form .form-row-first,.woocommerce form .form-row-last{width:100%;float:none}
 .woocommerce table.shop_table_responsive tr td::before{font-weight:700}
}

/* ---- Single product: customiser options ---- */
body.pl-swap.woocommerce div.product{grid-template-columns:minmax(0,1fr) var(--pl-gal,50%)}
body.pl-swap.woocommerce div.product div.images{grid-column:2;grid-row:1}
body.pl-swap.woocommerce div.product div.summary{grid-column:1;grid-row:1}

/* Thumbnails beside the main image.
   NOTE: do not change direction / flex on the gallery itself – FlexSlider (RTL mode) measures it.
   We reserve space with padding and pin the thumbnail column with absolute positioning. */
body.pl-thumbs-left.woocommerce div.product div.images.woocommerce-product-gallery,
body.pl-thumbs-right.woocommerce div.product div.images.woocommerce-product-gallery{position:relative}
body.pl-thumbs-left.woocommerce div.product div.images.woocommerce-product-gallery{padding-left:104px;padding-right:0}
body.pl-thumbs-right.woocommerce div.product div.images.woocommerce-product-gallery{padding-right:104px;padding-left:0}
body.pl-thumbs-left.woocommerce div.product .flex-control-thumbs,
body.pl-thumbs-right.woocommerce div.product .flex-control-thumbs{position:absolute;top:0;bottom:0;width:88px;margin:0;display:grid;grid-template-columns:1fr;grid-auto-rows:min-content;gap:8px;align-content:start;overflow-y:auto}
body.pl-thumbs-left.woocommerce div.product .flex-control-thumbs{left:0;right:auto}
body.pl-thumbs-right.woocommerce div.product .flex-control-thumbs{right:0;left:auto}
body.pl-thumbs-left.woocommerce div.product .woocommerce-product-gallery__trigger{inset-inline-end:auto;left:auto;right:12px}
body.pl-thumbs-right.woocommerce div.product .woocommerce-product-gallery__trigger{inset-inline-end:auto;left:auto;right:116px}

/* Main image frame ratio */
body.pl-ratio-1-1.woocommerce div.product .woocommerce-product-gallery__image img:not(.zoomImg){aspect-ratio:1/1;object-fit:cover;height:auto}
body.pl-ratio-4-3.woocommerce div.product .woocommerce-product-gallery__image img:not(.zoomImg){aspect-ratio:4/3;object-fit:cover;height:auto}
body.pl-ratio-3-4.woocommerce div.product .woocommerce-product-gallery__image img:not(.zoomImg){aspect-ratio:3/4;object-fit:cover;height:auto}

/* Text alignment of summary & tabs */
body.pl-ta-right.woocommerce div.product div.summary,body.pl-ta-right.woocommerce div.product .woocommerce-tabs .panel{text-align:right}
body.pl-ta-left.woocommerce div.product div.summary,body.pl-ta-left.woocommerce div.product .woocommerce-tabs .panel{text-align:left}
body.pl-ta-center.woocommerce div.product div.summary,body.pl-ta-center.woocommerce div.product .woocommerce-tabs .panel{text-align:center}
body.pl-ta-right.woocommerce div.product form.cart{justify-content:right}
body.pl-ta-left.woocommerce div.product form.cart{justify-content:left}
body.pl-ta-center.woocommerce div.product form.cart{justify-content:center}

/* Sticky summary (desktop) */
@media (min-width:821px){body.pl-sticky.woocommerce div.product div.summary{position:sticky;top:calc(var(--kh-header-h) + 20px);align-self:start}}

@media (max-width:820px){
 body.pl-swap.woocommerce div.product{grid-template-columns:1fr}
 body.pl-swap.woocommerce div.product div.images,body.pl-swap.woocommerce div.product div.summary{grid-column:1;grid-row:auto}
}
@media (max-width:600px){
 body.pl-thumbs-left.woocommerce div.product div.images.woocommerce-product-gallery,
 body.pl-thumbs-right.woocommerce div.product div.images.woocommerce-product-gallery{padding-left:0;padding-right:0}
 body.pl-thumbs-left.woocommerce div.product .flex-control-thumbs,
 body.pl-thumbs-right.woocommerce div.product .flex-control-thumbs{position:static;width:auto;display:grid;grid-template-columns:repeat(5,1fr);margin:10px 0 0;overflow:visible}
 body.pl-thumbs-left.woocommerce div.product .woocommerce-product-gallery__trigger,
 body.pl-thumbs-right.woocommerce div.product .woocommerce-product-gallery__trigger{inset-inline-end:12px;left:auto;right:auto}
}
