/**
 * Akoirah Quick View — layout skeleton.
 *
 * WHY THIS FILE EXISTS
 *
 * The removed woosq plugin shipped two stylesheets' worth of work, and the
 * theme only ever replaced one of them. The theme's 342 #woosq-popup rules are
 * *appearance* — type, colour, spacing, the gallery's finish. The plugin
 * supplied the *skeleton* underneath: the two-column split and a height for the
 * image column. Losing it left rules that could not resolve:
 *
 *     #woosq-popup .aqvg-gallery { display:grid; height:100% }   ← 100% of what?
 *     #woosq-popup .aqvg-main    { height:100%; min-height:0 }   ← 100% of what?
 *     .woosq-product             { width:100% }                  ← and nothing else
 *
 * With no ancestor height, `height:100%` resolved against a parent that was
 * itself sized by its content — circular — so the slider collapsed to 2px and
 * the columns stacked instead of sitting side by side. Measured on the live
 * popup: .aqvg-main 820x2, image column above the summary rather than beside it.
 *
 * SCOPE — deliberately narrow
 *
 * Layout only: flex, height, overflow. No colours, no type, no spacing beyond
 * what the box model needs. Appearance stays entirely with the theme's existing
 * rules, so the design is unchanged and this file cannot drift away from it.
 *
 * Specificity is kept to a single #woosq-popup prefix, matching the theme's own
 * rules, and no !important is used — anything the theme wants to override, it
 * still can.
 */

/* The popup's own surface.
 *
 * The theme styles the shape - `body .woosq-popup { max-width:897px;
 * border-radius:16px }` - but never gives it a background, because the plugin's
 * stylesheet did. Without one the panel was transparent: the gallery looked
 * right (the image column paints its own cream) while the details column showed
 * the page bleeding through behind the text.
 */
/* The shell stays transparent on purpose — see .woosq-popup-inner below. */
#woosq-popup {
	background: transparent;
	overflow: hidden;
}


#woosq-popup.woosq-popup {
	/* width: none !important;
	max-width: none !important; */
	box-shadow: none !important;
}

.woosq-product .summary.woosq-product-summary {
	padding: 20px 20px !important;
}

/*
 * The visible white panel.
 *
 * The theme drives the geometry here, and the two rules disagree by design:
 *
 *     #woosq-popup                  { width: min(1120px, 100vw - 32px) !important }
 *     .woosq-popup .woosq-popup-inner { max-width: 860px !important }
 *
 * So the shell is 1120px and the content is 860px. An earlier version of this
 * file painted the background on the shell, which stretched white across the
 * full 1120 and left ~260px of empty panel down the right-hand side. Painting
 * the 860px inner instead makes the white exactly the width of the content, and
 * `margin: 0 auto` then centres that panel inside the wider shell — which is
 * also what fixes the popup sitting off to the left.
 *
 * (The class name is not ours by coincidence: the removed plugin used
 * .woosq-popup-inner too, which is why the theme already has rules for it.)
 *
 * The explicit height matters as well: `height:100%` on .woosq-product resolves
 * against this element, and an auto-height parent makes that percentage
 * meaningless — without it the columns grew to their content (817px) and
 * overflowed a 620px popup.
 */
#woosq-popup .woosq-popup-inner {
	height: 100%;
	min-height: 0;
	background: #ffffff;
	margin-left: auto;
	margin-right: auto;
	border-radius: 16px;
	overflow: hidden;
}

/* The two columns. This is the rule whose absence stacked the popup. */
#woosq-popup .woosq-product {
	display: flex;
	align-items: stretch;
	height: 100%;
	box-sizing: border-box;
}

/* Left: gallery. min-height:0 matters — without it a flex child refuses to
   shrink below its content, and the gallery's internal overflow never works. */
#woosq-popup .woosq-product-images {
	flex: 0 0 52%;
	max-width: 52%;
	min-height: 0;
	box-sizing: border-box;
}

/* Right: details. Scrolls on its own so a long description cannot push the
   gallery out of the popup. */
#woosq-popup .woosq-product-summary {
	flex: 1 1 48%;
	max-width: 48%;
	min-height: 0;
	overflow-y: auto;
	box-sizing: border-box;
}

/* The theme already sets `display:grid; height:100%` here. It just never had a
   row definition, so the main slider and the 76px thumbnail strip had no shares
   to divide. minmax(0,1fr) rather than 1fr is what lets the slider shrink
   instead of overflowing. */
#woosq-popup .aqvg-gallery {
	grid-template-rows: minmax(0, 1fr) auto;
	gap: 12px;
	min-height: 0;
}

#woosq-popup .aqvg-main {
	position: relative;
	min-height: 0;
	overflow: hidden;
}

/* Slick inserts .slick-list and .slick-track between .aqvg-main and the slides.
   Neither inherits height, so without this the chain breaks at exactly the
   point the theme's rules stop describing. */
#woosq-popup .aqvg-main .slick-list,
#woosq-popup .aqvg-main .slick-track {
	height: 100%;
}

#woosq-popup .aqvg-main .aqvg-slide {
	height: 100%;
	align-items: center;
	justify-content: center;
}

/* contain, not cover: these are product photographs on a white field and must
   never be cropped. */
#woosq-popup .aqvg-main .aqvg-slide img,
#woosq-popup .aqvg-main .aqvg-slide video {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	margin: 0 auto;
}

/* The prev/next arrows. Slick sizes them from its own stylesheet, which leaves
   them as wide ovals here; equal width and height makes them the circles the
   design asks for. */
#woosq-popup .aqvg-main .slick-prev,
#woosq-popup .aqvg-main .slick-next {
	width: 40px;
	height: 40px;
	min-width: 40px;
	min-height: 40px;
	padding: 0;
	border-radius: 50%;
	z-index: 5;
}

#woosq-popup .aqvg-main .slick-prev {
	left: 12px;
}

#woosq-popup .aqvg-main .slick-next {
	right: 12px;
}

#woosq-popup .aqvg-thumb-wrap {
	flex: 0 0 auto;
	cursor: pointer;
}

#woosq-popup .aqvg-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ---------------------------------------------------------------------------
 * The selectors and trust row.
 *
 * Unlike everything above, these are NEW class names — the old Quick View built
 * its metal/karat controls from WooCommerce variation dropdowns, so the theme
 * has no rules for them. Styled here to the design: colour discs for the metal,
 * outlined pills for the carat, a two-column reassurance grid.
 * ------------------------------------------------------------------------- */

#woosq-popup .ak-qv-option {
	margin: 0 0 18px;
}

#woosq-popup .ak-qv-option__label {
	display: block;
	margin: 0 0 8px;
	font-size: 13px;
	letter-spacing: 0.02em;
	color: #1c0a00;
}

#woosq-popup .ak-qv-swatches {
	display: flex;
	gap: 14px;
	align-items: center;
}

#woosq-popup .ak-qv-swatch {
	width: 22px;
	height: 22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	background: #ccc;
	box-shadow: inset 0 0 0 1px rgba(28, 10, 0, 0.18);
	position: relative;
}

/* The three metals. Gradients rather than flat fills so a small disc still
   reads as metal rather than as a coloured dot. */
#woosq-popup .ak-qv-swatch--yg {
	background: linear-gradient(135deg, #f4d07a, #d9a227);
}

#woosq-popup .ak-qv-swatch--rg {
	background: linear-gradient(135deg, #f0b9a6, #d08267);
}

#woosq-popup .ak-qv-swatch--wg {
	background: linear-gradient(135deg, #f2f2f0, #c8c8c6);
}

/* Selected state is a detached ring, so the metal colour itself stays true. */
#woosq-popup .ak-qv-swatch.is-active::after {
	content: "";
	position: absolute;
	inset: -5px;
	border: 1px solid #8b1a1a;
	border-radius: 50%;
}

#woosq-popup .ak-qv-karats {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

#woosq-popup .ak-qv-karat {
	min-width: 62px;
	padding: 9px 14px;
	border: 1px solid rgba(28, 10, 0, 0.22);
	border-radius: 3px;
	background: transparent;
	color: #1c0a00;
	font-size: 13px;
	line-height: 1;
	text-transform: uppercase;
	cursor: pointer;
}

#woosq-popup .ak-qv-karat:hover {
	border-color: #8b1a1a;
}

#woosq-popup .ak-qv-karat.is-active {
	border-color: #8b1a1a;
	color: #8b1a1a;
}

#woosq-popup .ak-qv-trust {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px 16px;
	margin: 20px 0;
	padding: 0;
	list-style: none;
}

#woosq-popup .ak-qv-trust__item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	color: #4a4a4a;
	list-style: none;
}

#woosq-popup .ak-qv-trust__icon {
	flex: 0 0 16px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: rgba(139, 26, 26, 0.10);
}

#woosq-popup .ak-qv-eyebrow {
	margin: 0 0 6px;
	font-size: 11px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: #8b1a1a;
}

#woosq-popup .ak-qv-sku {
	margin: 0 0 12px;
	font-size: 12px;
	color: #6b6b6b;
}

#woosq-popup .ak-qv-tax-note {
	margin: 6px 0 16px;
	font-size: 12px;
	color: #6b6b6b;
}

/*
 * The mu-plugin's own fulfilment pills.
 *
 * mu-plugins/akoirah-product-importer-frontend.php injects
 * .wcpi-fulfillment containing all three of its badges, then reveals the right
 * ones by reading `data-product_variations` from the form. These products are
 * simple products backed by the flat variant table, so that attribute does not
 * exist, it cannot decide, and it left "Made To Order (MTO)" and "Delivery
 * Date : 3-4 Weeks" on screen at the same time as our "In Stock" line.
 *
 * Hidden inside the popup only — the mu-plugin still behaves normally on the
 * product page, which is not ours to change.
 */
#woosq-popup .wcpi-fulfillment {
	display: none;
}

#woosq-popup .ak-qv-stock {
	display: inline-block;
	margin: 0 0 18px;
	padding: 6px 12px;
	border-radius: 3px;
	font-size: 12px;
}

#woosq-popup .ak-qv-stock--instock {
	background: rgba(31, 138, 76, 0.10);
	color: #1f8a4c;
}

#woosq-popup .ak-qv-stock--mto {
	background: rgba(139, 26, 26, 0.08);
	color: #8b1a1a;
}

/* One column on phones. The popup is height-constrained by Magnific Popup, so
   the whole thing scrolls rather than the two panes scrolling independently. */
@media (max-width: 767px) {
	#woosq-popup .woosq-product {
		display: block;
		height: auto;
	}

	#woosq-popup .woosq-product-images,
	#woosq-popup .woosq-product-summary {
		flex: none;
		max-width: 100%;
		overflow: visible;
	}

	#woosq-popup .aqvg-gallery {
		height: auto;
	}

	#woosq-popup .aqvg-main {
		height: 62vw;
		max-height: 380px;
	}
}