/* ==========================================================================
   PLS single product. Product-area owned. Tokens from base.css only.
   Mobile first: swipe gallery + stacked summary; >=990 two-column with sticky summary.
   ========================================================================== */

.pdp-main { overflow-x: clip; }
.pdp-notices { padding-top: var(--s-4); }

/* Layout ------------------------------------------------------------------- */
.pdp { display: block; }
.pdp__summary { padding: var(--s-5) var(--gutter) var(--s-10); }

/* Like the SIR reference: gallery bleeds from the left edge and takes every extra pixel;
   the summary column stays about 480-520px of content + 60px padding (58% gallery at 1440, 2/3 at 1920). */
@media (min-width: 990px) {
	.pdp { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
	/* The whole column sticks (like SIR): a sticky child inside a content-height grid cell has no room to move.
	   Taller-than-screen content (open accordions) simply scrolls with the page once the gallery ends. */
	.pdp__summary {
		position: sticky; top: calc(var(--header-h) + 1px); align-self: start;
		padding: var(--s-8) var(--s-10) var(--s-16);
	}
}
@media (min-width: 1200px) {
	.pdp { grid-template-columns: minmax(0, 1fr) clamp(560px, calc(7.5vw + 492px), 680px); }
	.pdp__summary { padding-inline: var(--s-16); }
	.pdp__summary-inner { max-width: 520px; }
}

/* Gallery ------------------------------------------------------------------- */
.pdp-gal { position: relative; }
.pdp-gal__track {
	display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
	overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; position: relative;
}
.pdp-gal__track::-webkit-scrollbar { display: none; }
.pdp-gal__item { flex: 0 0 100%; scroll-snap-align: start; background: var(--c-cream); }
.pdp-gal__btn { display: block; width: 100%; cursor: zoom-in; }
.pdp-gal__btn img, .pdp-gal__item > img { width: 100%; aspect-ratio: var(--pdp-ratio, 2 / 3); object-fit: cover; }
.pdp-gal__nav {
	position: absolute; left: 0; right: 0; bottom: var(--s-3); display: flex; justify-content: center;
	pointer-events: none;
}
.pdp-gal__count {
	background: rgba(255, 255, 255, .85); padding: 4px var(--s-3); letter-spacing: .12em;
}
.pdp-gal__dots { display: none; }

@media (min-width: 990px) {
	.pdp-gal__track {
		display: grid; grid-template-columns: 1fr 1fr; gap: var(--grid-gap);
		overflow: visible; scroll-snap-type: none;
	}
	.pdp-gal__item { flex: none; }
	.pdp-gal--single .pdp-gal__track { grid-template-columns: 1fr; }
	/* Always pairs from the top (no full-width lead image); an odd last photo sits alone. */
	.pdp-gal__nav { display: none; }
}

/* Zoom viewer (built by product.js) ------------------------------------------ */
.pdp-zoom {
	position: fixed; inset: 0; z-index: var(--z-popup); background: var(--c-bg);
	display: flex; flex-direction: column; opacity: 0; visibility: hidden;
	transition: opacity var(--dur) var(--ease), visibility var(--dur);
}
.pdp-zoom.is-open { opacity: 1; visibility: visible; }
.pdp-zoom__bar { display: flex; align-items: center; justify-content: space-between; padding: var(--s-2) var(--s-3); min-height: 52px; }
.pdp-zoom__stage { flex: 1; min-height: 0; overflow: auto; display: flex; cursor: zoom-in; overscroll-behavior: contain; }
.pdp-zoom__stage img { margin: auto; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.pdp-zoom.is-zoomed .pdp-zoom__stage { cursor: zoom-out; }
.pdp-zoom.is-zoomed .pdp-zoom__stage img { max-width: none; max-height: none; width: auto; height: auto; margin: 0; }
.pdp-zoom__arrow {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; min-width: 44px; min-height: 44px;
	display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .8);
}
.pdp-zoom__arrow--prev { left: var(--s-2); }
.pdp-zoom__arrow--next { right: var(--s-2); }
.pdp-zoom.is-zoomed .pdp-zoom__arrow { display: none; }

/* Summary head --------------------------------------------------------------- */
.pdp-crumbs { color: var(--c-muted); font-size: var(--fs-xxs); margin-bottom: var(--s-5); }
.pdp-crumbs ol { display: flex; flex-wrap: wrap; gap: var(--s-1) 0; }
.pdp-crumbs li + li::before { content: "/"; margin-inline: var(--s-2); }
.pdp-crumbs a:hover { color: var(--c-ink); }
.pdp__labels { color: var(--c-muted); margin-bottom: var(--s-2); }
.pdp__title { font-size: var(--fs-l); font-weight: var(--fw-regular); }
.pdp__summary .price { margin-top: var(--s-2); font-size: var(--fs-l); letter-spacing: .02em; }
.pdp__tax { margin-top: var(--s-1); font-size: var(--fs-s); }

/* Options ---------------------------------------------------------------------- */
.pdp .variations_form, .pdp form.cart { margin-top: var(--s-6); }
.pdp-opts { display: grid; gap: var(--s-5); position: relative; }
.pdp-opt__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-2); }
.pdp-opt__head label { display: inline; margin: 0; }
.pdp-opt__value { color: var(--c-muted); margin-left: var(--s-2); }
.pdp-opt__value:empty { display: none; }
.pdp-opt__chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.pdp-chip {
	display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
	min-width: 48px; min-height: 44px; padding: 0 var(--s-3);
	border: 1px solid var(--c-line); background: var(--c-bg); color: var(--c-ink);
	font-size: var(--fs-xs); letter-spacing: var(--tracking-ui); text-transform: uppercase; line-height: 1;
	transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.pdp-chip:hover { border-color: var(--c-ink); }
.pdp-chip.is-selected { background: var(--c-ink); border-color: var(--c-ink); color: #fff; }
.pdp-chip__dot { width: 10px; height: 10px; flex: none; border: 1px solid rgba(17, 17, 17, .25); }
.pdp-chip.is-selected .pdp-chip__dot { border-color: rgba(255, 255, 255, .6); }
/* combination not available with the current pick: struck through but still selectable (resets the rest) */
.pdp-chip.is-unavailable { color: var(--c-muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.pdp-chip.is-unavailable.is-selected { color: #fff; }
/* sold out in every combination */
.pdp-chip:disabled, .pdp-chip.is-soldout {
	color: var(--c-muted); text-decoration: line-through; text-decoration-thickness: 1px;
	border-color: var(--c-line); background: var(--c-bg); opacity: .55; cursor: not-allowed;
}
.pdp-opt.is-missing .pdp-opt__chips { animation: pdp-nudge .35s var(--ease); }
.pdp-opt.is-missing .pdp-opt__head { color: var(--c-error); }
@keyframes pdp-nudge { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* native selects stay in the DOM for WooCommerce's script, visually removed */
.pdp-opt__select {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
	clip-path: inset(50%); white-space: nowrap;
}
.pdp .reset_variations { justify-self: start; font-size: var(--fs-xs); letter-spacing: var(--tracking-ui); text-transform: uppercase; text-decoration: underline; text-underline-offset: 4px; color: var(--c-muted); }

/* Add to bag --------------------------------------------------------------------- */
.pdp .woocommerce-variation-add-to-cart, .pdp form.cart:not(.variations_form) { display: block; }
.pdp .quantity { display: none !important; } /* WC's script .show()s it inline; quantity is adjusted in the bag */
.pdp a.added_to_cart { display: none; } /* WC's "View cart" link: the cart drawer opens instead */
.pdp .single_variation_wrap { margin-top: var(--s-5); }
.pdp .single_variation:empty { display: none; }
.pdp .woocommerce-variation-price, .pdp .woocommerce-variation-description { display: none; } /* price shown above */
.pdp .woocommerce-variation-availability .stock { margin: 0 0 var(--s-3); font-size: var(--fs-s); color: var(--c-muted); }
.pdp .woocommerce-variation-availability .stock.in-stock { display: none; }
.pdp .woocommerce-variation-availability .stock.out-of-stock { color: var(--c-error); }
.pdp .single_add_to_cart_button, .pdp .single_add_to_cart_button.button.alt {
	width: 100%; min-height: 52px; background: var(--c-ink); border-color: var(--c-ink); color: #fff;
}
.pdp .single_add_to_cart_button:hover { background: var(--c-ink-2); }
/* WooCommerce marks the button "disabled" until a variation is picked: keep it clickable to explain why */
.pdp .single_add_to_cart_button.disabled, .pdp .single_add_to_cart_button.wc-variation-selection-needed { opacity: .55; cursor: pointer; }
.pdp .single_add_to_cart_button.wc-variation-is-unavailable { opacity: .4; cursor: not-allowed; }
.pdp .single_add_to_cart_button.loading { opacity: .6; pointer-events: none; }
.pdp-msg { margin-top: var(--s-3); font-size: var(--fs-s); color: var(--c-error); min-height: 0; }
.pdp-msg:empty { display: none; }
.pdp form.cart p.stock { margin: var(--s-4) 0 0; font-size: var(--fs-s); }

/* Accordions --------------------------------------------------------------------- */
.pdp-acc { margin-top: var(--s-8); border-top: 1px solid var(--c-line); }
.pdp-acc .accordion__body { font-size: var(--fs-m); color: var(--c-ink-2); }
.pdp-acc .accordion__body > * + * { margin-top: var(--s-3); }
.pdp-acc summary:focus-visible { outline-offset: -1px; }
.pdp-specs { display: grid; gap: var(--s-1); margin: 0; }
.pdp-specs > div { display: flex; gap: var(--s-3); }
.pdp-specs dt { min-width: 96px; color: var(--c-muted); }
.pdp-specs dd { margin: 0; }
.pdp-links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }

/* Size guide drawer --------------------------------------------------------------- */
.pdp-guide { width: min(600px, 100vw); }
.pdp-guide__title { margin: 0 0 var(--s-4); font-size: var(--fs-s); letter-spacing: var(--tracking-ui); text-transform: uppercase; font-weight: var(--fw-regular); }
.pdp-guide .pls-size-note { color: var(--c-muted); font-size: var(--fs-s); }
.pls-table-scroll { overflow-x: auto; margin-top: var(--s-4); -webkit-overflow-scrolling: touch; }
.pls-table-scroll:focus-visible { outline-offset: 2px; }
.pls-size-table, .pdp-guide table { width: 100%; min-width: 420px; border-collapse: collapse; font-size: var(--fs-s); text-align: center; }
.pdp-guide table th, .pdp-guide table td { padding: var(--s-3) var(--s-2); border-bottom: 1px solid var(--c-line); font-weight: var(--fw-regular); white-space: nowrap; }
.pdp-guide table thead th { border-bottom: 1px solid var(--c-line-strong); font-size: var(--fs-xs); letter-spacing: var(--tracking-ui); text-transform: uppercase; }
.pdp-guide table tbody th { text-align: left; font-size: var(--fs-xs); letter-spacing: var(--tracking-ui); text-transform: uppercase; }
.pdp-guide table thead th:first-child { text-align: left; color: var(--c-muted); }
.pdp-guide .pls-size-figure img, .pdp-guide__body img { width: 100%; height: auto; }

/* Related --------------------------------------------------------------------------- */
.pdp-related { padding-top: var(--s-12); border-top: 1px solid var(--c-line); }
.pdp-related__title { margin-bottom: var(--s-6); text-align: center; }
.pdp-related .product-grid { margin: 0; }

/* Structured data / hidden helpers */
.pdp .wc-block-components-notice-banner { margin-bottom: var(--s-4); }
