/*
 * Kushi Child - Storefront layout (Shopify / Sagacity style)
 * Scope: page content only. No header or footer selectors in this file.
 * Tweak the look from the variables below.
 * Switch everything off by removing the "kon-storefront" body class (inc/storefront.php).
 */
body.kon-storefront {
	/* LIGHT SITE colours (change these to restyle) */
	--kon-bg: #fff;       /* page background */
	--kon-ink: #111;      /* main text */
	--kon-inv: #fff;      /* text on top of --kon-ink (buttons) */
	--kon-muted: #6b6b6b;
	--kon-line: #e4e4e4;
	--kon-soft: #f7f7f7;  /* boxes / panels */
	--kon-radius: 0px;          /* 0 = square like Sagacity, 6px for softer */
	--kon-sticky-top: 120px;    /* gap under your sticky header */
	--kon-gap: 56px;
	--kon-title-size: 24px;   /* product page title */
	--kon-price-size: 18px;  /* product page price */
}

/* DARK SITE colours: used automatically when the body has class "kon-dark" (default).
   Turn off with: add_filter( 'kushi_child_dark_mode', '__return_false' ); */
body.kon-storefront.kon-dark {
	--kon-bg: #000;
	--kon-ink: #fff;
	--kon-inv: #000;
	--kon-muted: #a8a8a8;
	--kon-line: #2e2e2e;
	--kon-soft: #111;
}

/* ------------------------------------------------------------------
 * 0. WIDER CONTENT: the theme's .container is a fixed 1080 / 900 / 710 / 420px box,
 *    which leaves big empty side bands. Inside #main only (header and footer are outside it)
 *    use the full screen with a slim gutter, like a Shopify store.
 * ------------------------------------------------------------------ */
body.kon-storefront #main .container {
	width: 100% !important;
	max-width: 1760px !important;
	padding-left: 40px !important;
	padding-right: 40px !important;
	box-sizing: border-box;
}
body.kon-storefront #main { overflow-x: clip; }
@media (max-width: 767px)  { body.kon-storefront { --kon-title-size: 18px; --kon-price-size: 16px; } }
@media (max-width: 1024px) { body.kon-storefront #main .container { padding-left: 24px !important; padding-right: 24px !important; } }
@media (max-width: 767px)  { body.kon-storefront #main .container { padding-left: 12px !important; padding-right: 12px !important; } }

/* ------------------------------------------------------------------
 * 1. SINGLE PRODUCT
 * ------------------------------------------------------------------ */

/* The title now lives in the summary, so drop the big title in the banner and keep the breadcrumb trail */
body.kon-storefront.single-product .main-title-section-wrapper .main-title-section { display: none; }
body.kon-storefront.single-product .main-title-section-wrapper .main-title-section-container { padding-top: 14px; padding-bottom: 14px; }

/* Two columns: gallery | summary. Tabs, upsells and related products span full width. */
body.kon-storefront.single-product div[id^="product-"].product {
	display: grid !important;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	column-gap: var(--kon-gap);
	align-items: start;
}
body.kon-storefront.single-product div[id^="product-"].product > * { grid-column: 1 / -1; min-width: 0; }
body.kon-storefront.single-product div[id^="product-"].product > .woocommerce-product-gallery { grid-column: 1; grid-row: 1; }
body.kon-storefront.single-product div[id^="product-"].product > .summary { grid-column: 2; grid-row: 1; }
body.kon-storefront.single-product div[id^="product-"].product > .onsale { position: absolute; }

/* Gallery: vertical thumbnails on the left, large image on the right */
body.kon-storefront.single-product .woocommerce-product-gallery {
	width: 100% !important;
	float: none !important;
	margin: 0 !important;
	position: relative;
}
body.kon-storefront.single-product .woocommerce-product-gallery:has(.flex-control-thumbs) {
	display: grid;
	grid-template-columns: 84px minmax(0, 1fr);
	gap: 12px;
	align-items: start;
}
body.kon-storefront.single-product .woocommerce-product-gallery .flex-viewport { grid-column: 2; grid-row: 1; width: 100%; }
body.kon-storefront.single-product .woocommerce-product-gallery .flex-control-thumbs {
	grid-column: 1;
	grid-row: 1;
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
	max-height: 640px;
	overflow-y: auto;
	scrollbar-width: none;
}
body.kon-storefront.single-product .woocommerce-product-gallery .flex-control-thumbs::-webkit-scrollbar { display: none; }
body.kon-storefront.single-product .woocommerce-product-gallery .flex-control-thumbs li {
	width: 100% !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
}
body.kon-storefront.single-product .woocommerce-product-gallery .flex-control-thumbs img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	opacity: .55;
	border: 1px solid transparent;
	border-radius: var(--kon-radius);
	cursor: pointer;
	transition: opacity .2s, border-color .2s;
}
body.kon-storefront.single-product .woocommerce-product-gallery .flex-control-thumbs img.flex-active,
body.kon-storefront.single-product .woocommerce-product-gallery .flex-control-thumbs img:hover { opacity: 1; border-color: var(--kon-ink); }
body.kon-storefront.single-product .woocommerce-product-gallery__image img { width: 100%; height: auto; border-radius: var(--kon-radius); }

/* Summary: sticky while the long gallery scrolls */
body.kon-storefront.single-product div.summary.entry-summary {
	width: 100% !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
	position: sticky;
	top: var(--kon-sticky-top);
}
body.kon-storefront.single-product .summary .product_title {
	margin: 0 0 8px;
	font-size: var(--kon-title-size) !important;
	line-height: 1.3 !important;
	font-weight: 500 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
}
body.kon-storefront.single-product .summary .woocommerce-product-rating { margin: 0 0 12px; }
body.kon-storefront.single-product .summary p.price { margin: 0; font-size: var(--kon-price-size); font-weight: 600; color: var(--kon-ink); }
body.kon-storefront.single-product .summary p.price del { color: var(--kon-muted); font-weight: 400; font-size: .8em; margin-right: 8px; }
body.kon-storefront.single-product .summary p.price ins { text-decoration: none; }
body.kon-storefront.single-product .kon-tax-note { margin: 4px 0 22px; font-size: 13px; font-style: italic; color: var(--kon-muted); }

/* Size / option buttons (the original <select> stays in the DOM, hidden, so WooCommerce keeps working) */
body.kon-storefront.single-product table.variations,
body.kon-storefront.single-product table.variations tbody,
body.kon-storefront.single-product table.variations tr,
body.kon-storefront.single-product table.variations th,
body.kon-storefront.single-product table.variations td { display: block; width: 100%; padding: 0; border: 0; background: none; }
body.kon-storefront.single-product table.variations { margin: 0 0 18px; }
body.kon-storefront.single-product table.variations tr { margin-bottom: 16px; }
body.kon-storefront.single-product table.variations th.label,
body.kon-storefront.single-product table.variations .label { margin-bottom: 8px; }
body.kon-storefront.single-product table.variations label {
	font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--kon-ink);
}
body.kon-storefront.single-product .kon-swatch-selected { margin-left: 6px; font-weight: 400; color: var(--kon-muted); letter-spacing: 0; text-transform: none; }
body.kon-storefront.single-product td.value.kon-swatch-ready select { display: none !important; }
body.kon-storefront.single-product td.value.kon-swatch-ready .select2-container { display: none !important; }
.kon-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.kon-swatch {
	min-width: 52px; height: 46px; padding: 0 16px;
	background: var(--kon-bg); color: var(--kon-ink);
	border: 1px solid var(--kon-line); border-radius: var(--kon-radius);
	font-size: 14px; line-height: 1; cursor: pointer;
	transition: border-color .15s, background .15s, color .15s;
}
.kon-swatches .kon-swatch { background: var(--kon-bg) !important; color: var(--kon-ink) !important; -webkit-text-fill-color: var(--kon-ink); text-shadow: none; box-shadow: none; }
.kon-swatches .kon-swatch:hover { border-color: var(--kon-ink); background: var(--kon-bg) !important; color: var(--kon-ink) !important; }
.kon-swatches .kon-swatch.is-selected,
.kon-swatches .kon-swatch.is-selected:hover { background: var(--kon-ink) !important; color: var(--kon-inv) !important; -webkit-text-fill-color: var(--kon-inv); border-color: var(--kon-ink); }
.kon-swatches .kon-swatch.is-disabled { color: var(--kon-muted) !important; -webkit-text-fill-color: var(--kon-muted); cursor: not-allowed; border-style: dashed;
	background: linear-gradient(to top right, transparent calc(50% - 1px), var(--kon-line) 50%, transparent calc(50% + 1px)), var(--kon-bg) !important; }
body.kon-storefront.single-product .reset_variations { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--kon-muted); text-decoration: underline; }

/* Buttons: [qty][Add to cart] then a full-width black "Buy it now" */
body.kon-storefront.single-product form.cart:not(.variations_form),
body.kon-storefront.single-product .woocommerce-variation-add-to-cart {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 10px;
	align-items: stretch;
	margin: 0 0 18px;
}
body.kon-storefront.single-product form.cart .quantity { margin: 0; }
body.kon-storefront.single-product form.cart .single_add_to_cart_button,
body.kon-storefront.single-product form.cart .kon-buy-now-button {
	height: 52px; min-height: 52px; margin: 0; padding: 0 24px;
	border-radius: var(--kon-radius);
	font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
	cursor: pointer; width: 100%;
}
body.kon-storefront.single-product form.cart .single_add_to_cart_button {
	background: transparent; color: var(--kon-ink); border: 1px solid var(--kon-ink);
}
body.kon-storefront.single-product form.cart .single_add_to_cart_button:hover { background: var(--kon-ink); color: var(--kon-inv); }
body.kon-storefront.single-product form.cart .kon-buy-now-button {
	grid-column: 1 / -1;
	background: var(--kon-ink); color: var(--kon-inv); border: 1px solid var(--kon-ink);
}
body.kon-storefront.single-product form.cart .kon-buy-now-button:hover { background: var(--kon-ink); color: var(--kon-inv); opacity: .85; }
body.kon-storefront.single-product form.cart .kon-buy-now-button.loading,
body.kon-storefront.single-product form.cart .single_add_to_cart_button.loading { opacity: .6; pointer-events: none; }
body.kon-storefront.single-product form.cart .single_add_to_cart_button.disabled,
body.kon-storefront.single-product form.cart .kon-buy-now-button.kon-is-disabled { opacity: .45; cursor: not-allowed; }
/* Pro "Buy Now" module (goes to cart) would double up; ours replaces it */
body.kon-storefront.single-product .product-buy-now { display: none !important; }

/* Short text + meta */
body.kon-storefront.single-product .summary .woocommerce-product-details__short-description { margin: 18px 0; color: var(--kon-muted); font-size: 15px; line-height: 1.7; }
body.kon-storefront.single-product .summary .product_meta {
	margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--kon-line);
	display: grid; gap: 6px; font-size: 13px; color: var(--kon-muted);
}
body.kon-storefront.single-product .summary .product_meta > span { display: block; }
body.kon-storefront.single-product .summary .product_meta a { color: var(--kon-ink); }

/* Tabs (Description | Reviews): clean underline tabs, full width under the product */
body.kon-storefront.single-product .wdt-product-tabs { margin-top: 64px; }
body.kon-storefront.single-product .woocommerce-tabs ul.wc-tabs {
	display: flex !important; flex-wrap: wrap; gap: 28px; margin: 0 0 28px; padding: 0;
	list-style: none; border-bottom: 1px solid var(--kon-line);
}
body.kon-storefront.single-product .woocommerce-tabs ul.wc-tabs li { margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; }
body.kon-storefront.single-product .woocommerce-tabs ul.wc-tabs li a {
	display: block; padding: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--kon-muted);
	border-bottom: 2px solid transparent; margin-bottom: -1px;
}
body.kon-storefront.single-product .woocommerce-tabs ul.wc-tabs li.active a { color: var(--kon-ink); border-bottom-color: var(--kon-ink); }

/* Related / upsell headings */
body.kon-storefront.single-product .related > h2,
body.kon-storefront.single-product .upsells > h2 {
	margin: 64px 0 28px; text-align: center; font-size: 15px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
}

/* ------------------------------------------------------------------
 * 2. SHOP / CATEGORY GRID (4 / 3 / 2 columns, portrait images)
 * ------------------------------------------------------------------ */
body.kon-storefront.post-type-archive-product ul.products:not(.swiper-wrapper),
body.kon-storefront.tax-product_cat ul.products:not(.swiper-wrapper),
body.kon-storefront.tax-product_tag ul.products:not(.swiper-wrapper) {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px 12px;
	height: auto !important;   /* isotope sets an inline height */
	margin: 0 0 40px;
	padding: 0;
}
body.kon-storefront.post-type-archive-product ul.products:not(.swiper-wrapper) > li.product,
body.kon-storefront.tax-product_cat ul.products:not(.swiper-wrapper) > li.product,
body.kon-storefront.tax-product_tag ul.products:not(.swiper-wrapper) > li.product {
	width: auto !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
	position: static !important;
	left: auto !important;
	top: auto !important;
	transform: none !important;
}
body.kon-storefront ul.products li.product img.wp-post-image,
body.kon-storefront ul.products li.product img.attachment-woocommerce_thumbnail {
	width: 100%; height: auto; aspect-ratio: 351.15 / 527.01; object-fit: cover; border-radius: var(--kon-radius);
}
@media (max-width: 767px) {
	body.kon-storefront ul.products li.product img.wp-post-image,
	body.kon-storefront ul.products li.product img.attachment-woocommerce_thumbnail { aspect-ratio: 191.8 / 289.3; }
	body.kon-storefront.post-type-archive-product ul.products:not(.swiper-wrapper),
	body.kon-storefront.tax-product_cat ul.products:not(.swiper-wrapper),
	body.kon-storefront.tax-product_tag ul.products:not(.swiper-wrapper) { margin: -10px -5px 0 !important; }
}
body.kon-storefront ul.products li.product .woocommerce-loop-product__title,
body.kon-storefront ul.products li.product h2,
body.kon-storefront ul.products li.product h3 { font-size: 14px; font-weight: 500; line-height: 1.4; }
body.kon-storefront ul.products li.product .price { font-size: 14px; font-weight: 600; }

/* ------------------------------------------------------------------
 * 3. CHECKOUT: details left, sticky order summary right
 * ------------------------------------------------------------------ */
body.kon-storefront.woocommerce-checkout form.checkout {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
	column-gap: var(--kon-gap);
	align-items: start;
}
body.kon-storefront.woocommerce-checkout form.checkout > * { min-width: 0; }
body.kon-storefront.woocommerce-checkout form.checkout #customer_details { grid-column: 1; width: 100%; float: none; }
body.kon-storefront.woocommerce-checkout form.checkout #customer_details .col-1,
body.kon-storefront.woocommerce-checkout form.checkout #customer_details .col-2 { float: none; width: 100%; max-width: 100%; }
body.kon-storefront.woocommerce-checkout form.checkout .woocommerce-checkout-order-review-wrap {
	grid-column: 2; grid-row: 1 / span 5; width: 100%; float: none;
	position: sticky; top: var(--kon-sticky-top);
	padding: 28px; background: var(--kon-soft); border: 1px solid var(--kon-line); border-radius: var(--kon-radius);
}
body.kon-storefront.woocommerce-checkout #order_review_heading { margin-top: 0; font-size: 18px; font-weight: 600; }
body.kon-storefront.woocommerce-checkout #place_order { width: 100%; height: 54px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; border-radius: var(--kon-radius); }

/* ------------------------------------------------------------------
 * 4. RESPONSIVE
 * ------------------------------------------------------------------ */
@media (max-width: 1024px) {
	body.kon-storefront { --kon-gap: 32px; }
	body.kon-storefront.post-type-archive-product ul.products:not(.swiper-wrapper),
	body.kon-storefront.tax-product_cat ul.products:not(.swiper-wrapper),
	body.kon-storefront.tax-product_tag ul.products:not(.swiper-wrapper) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
	body.kon-storefront.single-product div[id^="product-"].product { grid-template-columns: minmax(0, 1fr); }
	body.kon-storefront.single-product div[id^="product-"].product > .woocommerce-product-gallery,
	body.kon-storefront.single-product div[id^="product-"].product > .summary { grid-column: 1; }
	body.kon-storefront.single-product div[id^="product-"].product > .summary { grid-row: 2; position: static; margin-top: 24px !important; }

	/* thumbnails move under the image as a swipe row */
	body.kon-storefront.single-product .woocommerce-product-gallery:has(.flex-control-thumbs) { grid-template-columns: minmax(0, 1fr); }
	body.kon-storefront.single-product .woocommerce-product-gallery .flex-viewport { grid-column: 1; }
	body.kon-storefront.single-product .woocommerce-product-gallery .flex-control-thumbs {
		grid-column: 1; grid-row: 2; flex-direction: row; max-height: none; overflow-x: auto; overflow-y: hidden;
	}
	body.kon-storefront.single-product .woocommerce-product-gallery .flex-control-thumbs li { flex: 0 0 64px; width: 64px !important; }

	body.kon-storefront.woocommerce-checkout form.checkout { grid-template-columns: minmax(0, 1fr); }
	body.kon-storefront.woocommerce-checkout form.checkout #customer_details,
	body.kon-storefront.woocommerce-checkout form.checkout .woocommerce-checkout-order-review-wrap { grid-column: 1; grid-row: auto; position: static; }
	body.kon-storefront.woocommerce-checkout form.checkout .woocommerce-checkout-order-review-wrap { margin-top: 28px; padding: 20px; }
}
@media (max-width: 600px) {
	body.kon-storefront.post-type-archive-product ul.products:not(.swiper-wrapper),
	body.kon-storefront.tax-product_cat ul.products:not(.swiper-wrapper),
	body.kon-storefront.tax-product_tag ul.products:not(.swiper-wrapper) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 10px; }
}

/* Smooth hover on shop/category cards */
body.kon-storefront ul.products li.product img { transition: transform 1.4s cubic-bezier(.16,.84,.3,1), opacity .7s cubic-bezier(.4,0,.2,1); }
body.kon-storefront ul.products li.product:hover img.wp-post-image:not(.kon-no-zoom) { transform: scale(1.04); }
body.kon-storefront ul.products li.product a:has(> img.wp-post-image),
body.kon-storefront ul.products li.product .product-thumb { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { body.kon-storefront ul.products li.product img { transition: none; } body.kon-storefront ul.products li.product:hover img.wp-post-image { transform: none; } }

/* ------------------------------------------------------------------
 * DARK SITE: checkout / cart / shop text must stay readable on black
 * ------------------------------------------------------------------ */
body.kon-storefront.kon-dark.woocommerce-checkout,
body.kon-storefront.kon-dark.woocommerce-cart { color: #fff; }
body.kon-storefront.kon-dark.woocommerce-checkout form.checkout,
body.kon-storefront.kon-dark.woocommerce-checkout #customer_details,
body.kon-storefront.kon-dark.woocommerce-checkout .woocommerce-billing-fields,
body.kon-storefront.kon-dark.woocommerce-checkout .woocommerce-shipping-fields,
body.kon-storefront.kon-dark.woocommerce-checkout .woocommerce-additional-fields,
body.kon-storefront.kon-dark.woocommerce-checkout #order_review,
body.kon-storefront.kon-dark.woocommerce-checkout #payment,
body.kon-storefront.kon-dark.woocommerce-checkout #payment ul.payment_methods,
body.kon-storefront.kon-dark.woocommerce-checkout #payment ul.payment_methods li,
body.kon-storefront.kon-dark.woocommerce-checkout table.shop_table,
body.kon-storefront.kon-dark.woocommerce-checkout table.shop_table th,
body.kon-storefront.kon-dark.woocommerce-checkout table.shop_table td,
body.kon-storefront.kon-dark.woocommerce-cart table.shop_table,
body.kon-storefront.kon-dark.woocommerce-cart table.shop_table th,
body.kon-storefront.kon-dark.woocommerce-cart table.shop_table td,
body.kon-storefront.kon-dark.woocommerce-cart .cart_totals {
	background-color: transparent !important; color: #fff !important; border-color: #2e2e2e !important;
}
body.kon-storefront.kon-dark.woocommerce-checkout .woocommerce-checkout-order-review-wrap { background: #111 !important; border-color: #2e2e2e; color: #fff; }
body.kon-storefront.kon-dark.woocommerce-checkout h1,
body.kon-storefront.kon-dark.woocommerce-checkout h2,
body.kon-storefront.kon-dark.woocommerce-checkout h3,
body.kon-storefront.kon-dark.woocommerce-checkout label,
body.kon-storefront.kon-dark.woocommerce-checkout p,
body.kon-storefront.kon-dark.woocommerce-checkout .woocommerce-form-coupon-toggle,
body.kon-storefront.kon-dark.woocommerce-checkout .woocommerce-info,
body.kon-storefront.kon-dark.woocommerce-checkout .woocommerce-privacy-policy-text { color: #fff !important; }
body.kon-storefront.kon-dark.woocommerce-checkout .woocommerce-info { background: #111 !important; border-color: #2e2e2e !important; }
body.kon-storefront.kon-dark.woocommerce-checkout a:not(.button) { color: #fff; text-decoration: underline; }
body.kon-storefront.kon-dark.woocommerce-checkout input.input-text,
body.kon-storefront.kon-dark.woocommerce-checkout input[type="text"],
body.kon-storefront.kon-dark.woocommerce-checkout input[type="tel"],
body.kon-storefront.kon-dark.woocommerce-checkout input[type="email"],
body.kon-storefront.kon-dark.woocommerce-checkout input[type="password"],
body.kon-storefront.kon-dark.woocommerce-checkout textarea,
body.kon-storefront.kon-dark.woocommerce-checkout select,
body.kon-storefront.kon-dark.woocommerce-checkout .select2-container--default .select2-selection--single,
body.kon-storefront.kon-dark.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__rendered {
	background-color: #111 !important; color: #fff !important; border-color: #3a3a3a !important; -webkit-text-fill-color: #fff;
}
body.kon-storefront.kon-dark.woocommerce-checkout ::placeholder { color: #8a8a8a !important; opacity: 1; -webkit-text-fill-color: #8a8a8a; }
body.kon-storefront.kon-dark.woocommerce-checkout input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px #111 inset !important; -webkit-text-fill-color: #fff !important; }
body.kon-storefront.kon-dark.woocommerce-checkout #payment div.payment_box { background: #181818 !important; color: #ddd !important; }
body.kon-storefront.kon-dark.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: #181818 !important; }
body.kon-storefront.kon-dark.woocommerce-checkout #place_order { background: #fff !important; color: #000 !important; border: 1px solid #fff; }
body.kon-storefront.kon-dark.woocommerce-checkout #place_order:hover { background: transparent !important; color: #fff !important; }
/* the dropdown list of the country/state picker is attached to <body> */
body.kon-dark .select2-dropdown { background: #111; color: #fff; border-color: #3a3a3a; }
body.kon-dark .select2-container--default .select2-results__option { color: #fff; }
body.kon-dark .select2-container--default .select2-results__option--highlighted[aria-selected],
body.kon-dark .select2-container--default .select2-results__option--highlighted[data-selected] { background: #fff; color: #000; }
body.kon-dark .select2-search--dropdown .select2-search__field { background: #000; color: #fff; border-color: #3a3a3a; }

/* shop / category cards on a black site */
body.kon-storefront.kon-dark ul.products li.product .woocommerce-loop-product__title,
body.kon-storefront.kon-dark ul.products li.product h2,
body.kon-storefront.kon-dark ul.products li.product h3,
body.kon-storefront.kon-dark ul.products li.product .price,
body.kon-storefront.kon-dark ul.products li.product a { color: #fff; }

/* ------------------------------------------------------------------
 * PRODUCT PAGE: image zoom (hover magnifier) + fullscreen lightbox
 * ------------------------------------------------------------------ */
body.kon-storefront.single-product .woocommerce-product-gallery__image { position: relative; overflow: hidden; cursor: zoom-in; }
body.kon-storefront.single-product .woocommerce-product-gallery__image a { display: block; cursor: zoom-in; }
body.kon-storefront.single-product .kon-zoom-pane {
	position: absolute; inset: 0; z-index: 2; pointer-events: none;
	background-repeat: no-repeat; background-size: 220%; background-position: 50% 50%;
	opacity: 0; transition: opacity .35s ease;
}
body.kon-storefront.single-product .kon-zoom-pane.is-on { opacity: 1; }
body.kon-storefront.single-product .woocommerce-product-gallery__trigger { display: none !important; } /* the old magnifier icon */
body.kon-storefront.single-product .woocommerce-product-gallery span.onsale,
body.kon-storefront.single-product div[id^="product-"].product > span.onsale { position: absolute; top: 14px; left: 14px; z-index: 5; margin: 0; }

.kon-lb {
	position: fixed; inset: 0; z-index: 100000;
	background: rgba(0, 0, 0, .96);
	opacity: 0; transition: opacity .3s ease;
	display: flex; align-items: center; justify-content: center;
}
.kon-lb.is-open { opacity: 1; }
.kon-lb__stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: pan-y; }
.kon-lb__img {
	max-width: 94vw; max-height: 92vh; width: auto; height: auto; object-fit: contain;
	cursor: zoom-in; user-select: none; -webkit-user-drag: none;
	transition: transform .45s cubic-bezier(.16, .84, .3, 1), opacity .3s ease;
}
.kon-lb__img.is-zoomed { transform: scale(2.4); cursor: zoom-out; }
.kon-lb__close, .kon-lb__nav {
	position: absolute; z-index: 3; border: 0; background: transparent; color: #fff; cursor: pointer;
	display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1;
	transition: opacity .2s ease; opacity: .8;
}
.kon-lb__close:hover, .kon-lb__nav:hover { opacity: 1; }
.kon-lb__close { top: 14px; right: 18px; width: 44px; height: 44px; font-size: 38px; }
.kon-lb__nav { top: 50%; width: 54px; height: 54px; margin-top: -27px; font-size: 54px; }
.kon-lb__prev { left: 10px; }
.kon-lb__next { right: 10px; }
.kon-lb.is-single .kon-lb__nav, .kon-lb.is-single .kon-lb__count { display: none; }
.kon-lb__count { position: absolute; z-index: 3; bottom: 16px; left: 0; right: 0; text-align: center; color: #bdbdbd; font-size: 13px; letter-spacing: .12em; }
html.kon-lb-open, html.kon-lb-open body { overflow: hidden; }
@media (max-width: 767px) {
	.kon-lb__nav { display: none; }   /* swipe on phones */
	.kon-lb__img { max-width: 100vw; }
}

/* ------------------------------------------------------------------
 * PRODUCT PAGE: Description / Reviews as an accordion
 * ------------------------------------------------------------------ */
body.kon-storefront.single-product .woocommerce-tabs.kon-acc-ready { max-width: 960px; margin-left: auto; margin-right: auto; }
body.kon-storefront.single-product .kon-acc-ready ul.wc-tabs { display: none !important; }
body.kon-storefront.single-product .kon-acc__panel { display: none !important; padding: 0 0 26px !important; border: 0 !important; background: none !important; }
body.kon-storefront.single-product .kon-acc__panel.is-open { display: block !important; }
body.kon-storefront.single-product .kon-acc__panel > h2:first-child { display: none; }
body.kon-storefront.single-product .kon-acc__head {
	display: flex; align-items: center; justify-content: space-between; width: 100%;
	margin: 0; padding: 20px 0; background: none !important; border: 0; border-top: 1px solid var(--kon-line);
	color: var(--kon-ink) !important; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; text-align: left; cursor: pointer; border-radius: 0;
}
body.kon-storefront.single-product .kon-acc__head:last-of-type { border-bottom: 1px solid var(--kon-line); }
body.kon-storefront.single-product .kon-acc__head i { position: relative; width: 14px; height: 14px; flex: 0 0 14px; }
body.kon-storefront.single-product .kon-acc__head i::before,
body.kon-storefront.single-product .kon-acc__head i::after { content: ""; position: absolute; left: 0; top: 50%; width: 100%; height: 1px; background: var(--kon-ink); transition: transform .3s ease; }
body.kon-storefront.single-product .kon-acc__head i::after { transform: rotate(90deg); }
body.kon-storefront.single-product .kon-acc__head.is-open i::after { transform: rotate(0deg); }
body.kon-storefront.single-product .kon-acc__panel,
body.kon-storefront.single-product .kon-acc__panel p { color: var(--kon-muted); font-size: 15px; line-height: 1.8; }

/* ------------------------------------------------------------------
 * PRODUCT PAGE: "You may also like" (same cards as home), theme carousel hidden
 * ------------------------------------------------------------------ */
body.kon-storefront.single-product section.related.products,
body.kon-storefront.single-product .related.products { display: none !important; }
body.kon-storefront.single-product .kon-related { margin-top: 72px; }
body.kon-storefront.single-product .kon-related__title { margin: 0 0 28px; text-align: center; font-size: 15px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--kon-ink); }

/* Razorpay Magic Checkout "BUY NOW" button (plugin id btn-1cc-pdp): same look as our Buy it now */
body.kon-storefront.single-product form.cart #btn-1cc-pdp {
	grid-column: 1 / -1; width: 100%; height: 52px; min-height: 52px; margin: 0 !important; padding: 0 24px;
	background: var(--kon-ink) !important; color: var(--kon-inv) !important; border: 1px solid var(--kon-ink) !important; border-radius: var(--kon-radius);
	font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
}
body.kon-storefront.single-product form.cart #btn-1cc-pdp:hover { opacity: .85; }
body.kon-storefront.single-product form.cart #btn-1cc-pdp.disabled,
body.kon-storefront.single-product form.cart #btn-1cc-pdp:disabled { opacity: .45; cursor: not-allowed; }

/* ------------------------------------------------------------------
 * SHOP + CATEGORY PAGES
 * ------------------------------------------------------------------ */
body.kon-storefront.post-type-archive-product .main-title-section-wrapper .main-title-section-container,
body.kon-storefront.tax-product_cat .main-title-section-wrapper .main-title-section-container { padding-top: 26px; padding-bottom: 26px; }
body.kon-storefront.post-type-archive-product .main-title-section h1,
body.kon-storefront.tax-product_cat .main-title-section h1 { font-size: 22px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }

/* category pills (added above the grid) */
.kon-cat-pills { display: flex; gap: 8px; margin: 0 0 18px; padding: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.kon-cat-pills::-webkit-scrollbar { display: none; }
.kon-cat-pills a {
	flex: 0 0 auto; padding: 9px 18px; border: 1px solid var(--kon-line); color: var(--kon-ink); background: transparent;
	font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
	transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.kon-cat-pills a:hover { border-color: var(--kon-ink); }
.kon-cat-pills a.is-current { background: var(--kon-ink); color: var(--kon-inv); border-color: var(--kon-ink); }

/* toolbar: count on the left, sorting on the right, one thin line */
body.kon-storefront .product-loop-sorting {
	display: flex !important; align-items: center; justify-content: space-between; gap: 16px;
	margin: 0 0 24px !important; padding: 0 0 14px !important; border-bottom: 1px solid var(--kon-line);
}
body.kon-storefront .product-loop-sorting > * { float: none !important; margin: 0 !important; width: auto !important; }
body.kon-storefront .product-loop-sorting .product-loop-sorting-item-group { display: flex; align-items: center; gap: 14px; }
body.kon-storefront .product-loop-sorting .product-layout-controller,
body.kon-storefront .product-loop-sorting .product-list-options-controller { display: none !important; } /* column switcher does nothing with the new grid */
body.kon-storefront .woocommerce-result-count { float: none !important; margin: 0 !important; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--kon-muted); }
body.kon-storefront .woocommerce-ordering { float: none !important; margin: 0 !important; min-width: 0 !important; }
body.kon-storefront .woocommerce-ordering select {
	height: 40px; min-width: 190px; padding: 0 38px 0 14px; border-radius: 0;
	background-color: var(--kon-bg); color: var(--kon-ink); border: 1px solid var(--kon-line);
	font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
}
body.kon-storefront .woocommerce-ordering select option { background: #fff; color: #111; text-transform: none; }

/* pagination */
body.kon-storefront nav.woocommerce-pagination { margin: 40px 0 10px; text-align: center; }
body.kon-storefront nav.woocommerce-pagination ul { display: inline-flex; gap: 6px; border: 0 !important; margin: 0; padding: 0; }
body.kon-storefront nav.woocommerce-pagination ul li { border: 0 !important; background: none !important; margin: 0; }
body.kon-storefront nav.woocommerce-pagination ul li a,
body.kon-storefront nav.woocommerce-pagination ul li span {
	display: flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 12px;
	border: 1px solid var(--kon-line); color: var(--kon-ink); background: transparent; font-size: 13px; line-height: 1;
}
body.kon-storefront nav.woocommerce-pagination ul li span.current,
body.kon-storefront nav.woocommerce-pagination ul li a:hover { background: var(--kon-ink); color: var(--kon-inv); border-color: var(--kon-ink); }

/* shop cards: li wrapper must not add its own spacing/background */
body.kon-storefront ul.products > li.kon-loop-item { background: none !important; border: 0 !important; box-shadow: none !important; }
body.kon-storefront ul.products > li.kon-loop-item .kon-card__title { text-transform: none; }

@media (max-width: 767px) {
	body.kon-storefront .product-loop-sorting { gap: 10px; }
	body.kon-storefront .woocommerce-ordering select { min-width: 150px; }
	body.kon-storefront nav.woocommerce-pagination ul li a, body.kon-storefront nav.woocommerce-pagination ul li span { min-width: 38px; height: 38px; }
}

/* ------------------------------------------------------------------
 * PRODUCT PAGE: compact variations + quantity (they were taking a lot of height)
 * ------------------------------------------------------------------ */
body.kon-storefront.single-product table.variations { margin: 0 0 12px; }
body.kon-storefront.single-product table.variations tr { margin: 0 0 10px; }
body.kon-storefront.single-product table.variations th.label,
body.kon-storefront.single-product table.variations .label { margin: 0 0 6px; padding: 0; line-height: 1.2; }
body.kon-storefront.single-product table.variations td.value { line-height: 1; }
.kon-swatches { gap: 6px; }
.kon-swatch { min-width: 46px; height: 40px; padding: 0 12px; font-size: 13px; letter-spacing: .02em; }
body.kon-storefront.single-product .reset_variations[style*="hidden"] { display: none !important; }  /* hidden Clear link still reserved a line */
body.kon-storefront.single-product .reset_variations { margin: 6px 0 0; }
body.kon-storefront.single-product .single_variation_wrap { margin: 0; }
body.kon-storefront.single-product .woocommerce-variation { margin: 0 0 10px; min-height: 0; }
body.kon-storefront.single-product .woocommerce-variation-description { display: none; }
body.kon-storefront.single-product .woocommerce-variation-price { margin: 0; font-size: 15px; }
body.kon-storefront.single-product .woocommerce-variation-availability p.stock { margin: 0 0 8px; font-size: 13px; }

/* quantity box: one tidy 52px control, not a wide flex row */
body.kon-storefront.single-product form.cart .quantity {
	display: flex !important; align-items: center; flex: 0 0 auto; width: auto !important; max-width: 128px;
	height: 52px; margin: 0 !important; padding: 0; border: 1px solid var(--kon-line); background: transparent; overflow: hidden;
}
body.kon-storefront.single-product form.cart .quantity input.qty {
	width: 48px; height: 100%; padding: 0; margin: 0; text-align: center; border: 0 !important; background: transparent !important;
	color: var(--kon-ink) !important; font-size: 14px; box-shadow: none; -moz-appearance: textfield;
}
body.kon-storefront.single-product form.cart .quantity input.qty::-webkit-outer-spin-button,
body.kon-storefront.single-product form.cart .quantity input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
body.kon-storefront.single-product form.cart .quantity .plus,
body.kon-storefront.single-product form.cart .quantity .minus,
body.kon-storefront.single-product form.cart .quantity button {
	width: 36px; min-width: 0; height: 100%; padding: 0; margin: 0; border: 0 !important; background: transparent !important; color: var(--kon-ink) !important; cursor: pointer; line-height: 1;
}
body.kon-storefront.single-product .summary .product_meta { margin-top: 14px; padding-top: 12px; gap: 4px; }
body.kon-storefront.single-product .summary .woocommerce-product-details__short-description { margin: 12px 0; }
body.kon-storefront.single-product .kon-tax-note { margin: 2px 0 16px; }

/* ------------------------------------------------------------------
 * PRODUCT PAGE (round 2): quantity + buttons row, Zoo swatches on ONE line
 * ------------------------------------------------------------------ */

/* whatever element holds the quantity box becomes the [qty][Add to cart] row, Buy it now underneath */
body.kon-storefront.single-product form.cart :has(> .quantity) {
	display: grid !important;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 10px;
	align-items: stretch;
	margin: 0 0 18px;
}
body.kon-storefront.single-product form.cart :has(> .quantity) > .quantity { grid-column: 1; grid-row: 1; margin: 0 !important; }
body.kon-storefront.single-product form.cart :has(> .quantity) > .single_add_to_cart_button { grid-column: 2; grid-row: 1; }
body.kon-storefront.single-product form.cart :has(> .quantity) > .kon-buy-now-button,
body.kon-storefront.single-product form.cart :has(> .quantity) > #btn-1cc-pdp { grid-column: 1 / -1; grid-row: auto; }
body.kon-storefront.single-product form.cart :has(> .quantity) > *:not(.quantity):not(button):not(a):not(input) { grid-column: 1 / -1; }

/* quantity: one clean 52px control. The theme made it a white pill with white numbers. */
body.kon-storefront.single-product form.cart .quantity,
body.kon-storefront.single-product form.cart div.quantity {
	display: flex !important; align-items: center; flex: 0 0 auto;
	width: auto !important; min-width: 0; max-width: 140px; height: 52px; margin: 0 !important; padding: 0 !important;
	background: transparent !important; border: 1px solid var(--kon-line) !important; border-radius: 0 !important; overflow: hidden; box-shadow: none !important;
}
body.kon-storefront.single-product form.cart .quantity input.qty,
body.kon-storefront.single-product form.cart .quantity input {
	float: none !important; flex: 1 1 auto; width: 44px !important; min-width: 0; height: 100% !important; min-height: 0 !important;
	margin: 0 !important; padding: 0 !important; text-align: center !important; border: 0 !important; border-radius: 0 !important;
	background: transparent !important; box-shadow: none !important; outline: 0;
	color: var(--kon-ink) !important; -webkit-text-fill-color: var(--kon-ink) !important; opacity: 1 !important;
	font-size: 15px !important; font-weight: 600 !important; -moz-appearance: textfield; appearance: textfield;
}
body.kon-storefront.single-product form.cart .quantity input::-webkit-outer-spin-button,
body.kon-storefront.single-product form.cart .quantity input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.kon-qty-btn {
	flex: 0 0 38px; width: 38px; height: 100%; padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important;
	background: transparent !important; color: var(--kon-ink) !important; font-size: 20px; line-height: 1; cursor: pointer; box-shadow: none !important;
}
.kon-qty-btn:hover { background: var(--kon-soft) !important; }

/* Zoo size/colour boxes: smaller, same style as the rest, always on one line */
body.kon-storefront.single-product .zoo-cw-attr-row,
body.kon-storefront.single-product .zoo-cw-variations { width: 100% !important; max-width: none !important; }
body.kon-storefront.single-product .zoo-cw-group-attribute {
	display: flex !important; flex-wrap: nowrap !important; gap: 8px; align-items: center;
	width: 100% !important; max-width: none !important; margin: 0 0 12px !important; padding: 2px 0;
	overflow-x: auto; scrollbar-width: none;
}
body.kon-storefront.single-product .zoo-cw-group-attribute::-webkit-scrollbar { display: none; }
body.kon-storefront.single-product .zoo-cw-group-attribute .zoo-cw-attribute-option { display: block !important; float: none !important; flex: 0 0 auto; margin: 0 !important; }
body.kon-storefront.single-product .zoo-cw-group-attribute .zoo-cw-attribute-option .zoo-cw-attr-item,
body.kon-storefront.single-product .zoo-cw-attr-item {
	display: flex !important; align-items: center; justify-content: center;
	min-width: 52px !important; width: auto !important; height: 42px !important; padding: 0 14px !important; margin: 0 !important;
	background: var(--kon-bg) !important; color: var(--kon-ink) !important; -webkit-text-fill-color: var(--kon-ink);
	border: 1px solid var(--kon-line) !important; border-radius: 0 !important; box-shadow: none !important;
	font-size: 13px; font-weight: 500; letter-spacing: .03em; line-height: 1; cursor: pointer;
	transition: background .2s ease, color .2s ease, border-color .2s ease;
}
body.kon-storefront.single-product .zoo-cw-attr-item .zoo-cw-label-text,
body.kon-storefront.single-product .zoo-cw-attr-item span { color: inherit !important; -webkit-text-fill-color: inherit; font-size: inherit; line-height: 1; }
body.kon-storefront.single-product .zoo-cw-attribute-option:hover .zoo-cw-attr-item { border-color: var(--kon-ink) !important; }
body.kon-storefront.single-product .zoo-cw-attribute-option.zoo-cw-active .zoo-cw-attr-item {
	background: var(--kon-ink) !important; color: var(--kon-inv) !important; -webkit-text-fill-color: var(--kon-inv); border-color: var(--kon-ink) !important;
}
body.kon-storefront.single-product .zoo-cw-attribute-option[class*="disabled"] .zoo-cw-attr-item,
body.kon-storefront.single-product .zoo-cw-attribute-option[class*="out-of-stock"] .zoo-cw-attr-item,
body.kon-storefront.single-product .zoo-cw-attribute-option[class*="unavailable"] .zoo-cw-attr-item { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
body.kon-storefront.single-product .zoo-cw-attr-item:after { display: none !important; }
/* colour dots keep their colour, just a neat ring */
body.kon-storefront.single-product .zoo-cw-attr-item[class*="color"],
body.kon-storefront.single-product .zoo-cw-attr-item[class*="image"] { min-width: 0 !important; width: 36px !important; height: 36px !important; padding: 0 !important; border-radius: 50% !important; }

/* the swatch plugin's own boxes are replaced by .kon-swatches (see storefront.js) */
.kon-hide-foreign { display: none !important; }
body.kon-storefront.single-product .kon-swatches { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
body.kon-storefront.single-product .kon-swatch { border-radius: var(--kon-radius) !important; }

/* ------------------------------------------------------------------
 * PRODUCT PAGE (round 3): size buttons in ONE row, whatever width the theme gives the cell
 * ------------------------------------------------------------------ */
body.kon-storefront.single-product { --kon-swatch-line: var(--kon-line); }
body.kon-storefront.kon-dark.single-product { --kon-swatch-line: #5a5a5a; }

/* the cell: full width, stack [buttons] then [Clear] */
body.kon-storefront.single-product table.variations td.value {
	display: flex !important; flex-direction: column; align-items: flex-start;
	width: 100% !important; max-width: none !important; min-width: 0 !important; float: none !important; padding: 0 !important; margin: 0 !important;
}
body.kon-storefront.single-product table.variations td.value .kon-swatches { order: 1; }
body.kon-storefront.single-product table.variations td.value .reset_variations {
	order: 2; position: static !important; float: none !important; display: inline-block; margin: 8px 0 0 !important; padding: 0;
	font-size: 12px; color: var(--kon-muted) !important; text-decoration: underline; letter-spacing: .04em;
}
body.kon-storefront.single-product table.variations td.value .reset_variations[style*="hidden"] { display: none !important; }

/* never wrap: sizes stay on a single line (a very long list scrolls sideways) */
body.kon-storefront.single-product .kon-swatches {
	display: flex !important; flex-wrap: nowrap !important; gap: 8px;
	width: 100% !important; max-width: 100% !important; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding: 1px 0;
}
body.kon-storefront.single-product .kon-swatches::-webkit-scrollbar { display: none; }

/* the buttons: fixed 42px height, centred text (the theme's button padding made them tall with text sitting low) */
body.kon-storefront.single-product .kon-swatches .kon-swatch {
	flex: 0 0 auto !important; box-sizing: border-box !important;
	display: inline-flex !important; align-items: center; justify-content: center;
	width: auto !important; min-width: 52px !important; height: 42px !important; min-height: 0 !important;
	margin: 0 !important; padding: 0 16px !important; line-height: 1 !important;
	font-size: 13px !important; font-weight: 500 !important; letter-spacing: .04em !important; text-transform: uppercase !important;
	border: 1px solid var(--kon-swatch-line) !important; border-radius: var(--kon-radius) !important;
}
body.kon-storefront.single-product .kon-swatches .kon-swatch:hover { border-color: var(--kon-ink) !important; }
body.kon-storefront.single-product .kon-swatches .kon-swatch.is-selected { border-color: var(--kon-ink) !important; }

/* SALE badge: sit on the big photo, not on top of the thumbnails */
body.kon-storefront.single-product .woocommerce-product-gallery:has(.flex-control-thumbs) span.onsale { left: calc(84px + 12px + 14px); }
@media (max-width: 800px) {
	body.kon-storefront.single-product .woocommerce-product-gallery:has(.flex-control-thumbs) span.onsale { left: 14px; }
}
