/* ==========================================================================
   Product card — desktop (38:1416 hover canonical; BUG-01: ignore 17:1856)
   Card: 315×524   Image-area: 315×428   Info: ~78px   Gap: 12px
   Volume disclosure: 37:1307 closed (58px) / 37:1293 open (148px)
   ========================================================================== */

/* ── Card outer ──────────────────────────────────────────────────────────── */

.product-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* ── Image area (position:relative container for all overlaid elements) ───── */

.product-card__image-area {
	position: relative;
	height: 428px;
	overflow: hidden;
	background: var(--bg-primary);
}

.product-card__image-link {
	display: flex;
	position: absolute;
	inset: 0;
	z-index: 0;
}

/* height:100%, not auto. The card sizes are soft-cropped, so a square source
   arrives square; on height:auto the element takes the image's own ratio and
   sits at the top of the 428px frame with the gap under the product. Filling
   the frame lets object-fit/object-position do the placing, so the product
   always stands on the card's baseline the way the mobile card already does. */
.product-card__img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center bottom;
	display: block;
}

/* WooCommerce loads a generic `.woocommerce img { height:auto }` rule after
 * some theme bundles. Keep product artwork tied to its designed 315×428
 * frame instead of falling back to the source image's square aspect ratio. */
.woocommerce img.product-card__img,
.woocommerce-page img.product-card__img {
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
	object-position: center bottom;
}

.product-card__img--placeholder,
.product-card-mobile__img--placeholder {
	object-position: center;
}

.product-card__img-placeholder {
	width: 100%;
	height: 100%;
	background: var(--fig-neutral-100);
}

/* ── Badges row (top-right overlay) ─────────────────────────────────────── */

.product-card__badges {
	position: absolute;
	top: var(--sp-card-y);    /* 13px */
	right: var(--sp-card-x);  /* 14px */
	z-index: 1;
	display: flex;
	gap: var(--sp-2);         /* 8px */
	align-items: center;
}

/* Performance badge — Lato Regular 10.125px (t-body-h5) on neutral-200 */
.product-card__perf-badge {
	background: var(--fig-neutral-200);
	color: var(--text-heading-primary);
	padding: var(--sp-1);     /* 4px */
	border-radius: var(--r-sm);
	white-space: nowrap;
	    text-transform: uppercase;
}

/* The wishlist pill is defined once, at the bottom of this file, against
   YITH's markup - see "Wishlist: YITH's control wearing the theme's pill". */






/* ── Quick-add wrapper (position:absolute; hover-revealed) ───────────────── */
/*    Contains the expansion panel AND the bar; growing upward from bottom.   */

.product-card__quick-add-wrapper {
	position: absolute;
	bottom: var(--sp-card-y);  /* 13px */
	left: var(--sp-card-x);    /* 14px */
	right: var(--sp-card-x);   /* 14px */
	z-index: 1;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(8px);
	transition:
		opacity var(--dur-base) ease-out,
		transform var(--dur-base) ease-out,
		visibility 0s var(--dur-base);
}

@media (hover: hover) and (pointer: fine) {
	.product-card:hover .product-card__quick-add-wrapper {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: translateY(0);
		transition-delay: 0s;
	}
}

/* Keyboard reveal — scoped to image-area so focusing the name link doesn't trigger it */
.product-card__image-area:focus-within .product-card__quick-add-wrapper {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
	transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
	.product-card__quick-add-wrapper {
		transition: none;
	}
}

/* ── Volume expansion panel (37:1293 open state; grows above bar) ─────────── */

.product-card__volume-expansion {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows var(--dur-base) ease-out;
	border-radius: var(--r-sm) var(--r-sm) 0 0;
}

.product-card__volume-expansion[data-open] {
	grid-template-rows: 1fr;
}

@media (prefers-reduced-motion: reduce) {
	.product-card__volume-expansion {
		transition: none;
	}
}

.product-card__volume-expansion-inner {
	overflow: hidden;
	min-height: 0; /* allows grid-template-rows: 0fr to fully collapse this row */
}

/* Padded content wrapper — must be INSIDE the overflow:hidden inner for grid collapse to work */
.product-card__volume-expansion-content {
	background: var(--bg-secondary);
	border-radius: var(--r-sm) var(--r-sm) 0 0;
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.product-card__volume-title {
	color: var(--text-heading-primary);
}

/* Tier option pills row */
.product-card__tier-row {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.product-card__tier-btn {
	flex: 0 0 auto;
	height: 42px;
	padding: 12px;
	background: var(--bg-secondary);
	border: 1px solid var(--fig-neutral-100);
	border-radius: var(--r-sm);
	cursor: pointer;
	color: var(--text-link);
	white-space: nowrap;
	display: flex;
	align-items: center;
	transition: background var(--dur-fast) linear, border-color var(--dur-fast) linear, color var(--dur-fast) linear;
}

/* Selected tier — pure black fill + white text (BUG-12 port; token matches mobile Figma) */
.product-card__tier-btn[aria-selected="true"] {
	background: var(--btn-secondary-hover);
	border-color: var(--btn-secondary-hover);
	color: var(--fig-siegel-white);
}

@media (hover: hover) and (pointer: fine) {
	.product-card__tier-btn:not([aria-selected="true"]):hover {
		background: var(--bg-primary);
	}
}

.product-card__tier-btn:focus-visible {
	outline: 2px solid var(--btn-stroke-focused);
	outline-offset: 2px;
}

/* 8px gap between expansion panel and bar — visible only when panel is open.
   Uses CSS adjacent sibling + margin-top so the gap is transparent (shows image). */
.product-card__volume-expansion + .product-card__quick-add {
	margin-top: 0;
	transition: margin-top var(--dur-base) ease-out;
}

.product-card__volume-expansion[data-open] + .product-card__quick-add {
	margin-top: 8px;
}

/* ── Quick-add bar (37:1307 closed; 37:1301 within open) ─────────────────── */

.product-card__quick-add {
	background: var(--bg-secondary);
	border-radius: var(--r-sm);
	padding: var(--sp-2);      /* 8px */
	display: flex;
	gap: var(--sp-2);          /* 8px */
	align-items: center;
}

/* Volume selector button (tier disclosure trigger or disabled placeholder) */
.product-card__volume-btn {
	display: flex;
	align-items: center;
	gap: var(--sp-2);
	flex: 1 0 0;
	height: 42px;
	padding: 12px;
	background: var(--bg-secondary);
	border: 1px solid var(--fig-neutral-100);
	border-radius: var(--r-sm);
	cursor: pointer;
	color: var(--text-link);
	white-space: nowrap;
	overflow: hidden;
	transition: background var(--dur-fast) linear;
}

.product-card__volume-btn--na {
	opacity: 0.5;
	cursor: default;
}

@media (hover: hover) and (pointer: fine) {
	.product-card__volume-btn:not(.product-card__volume-btn--na):hover {
		background: var(--bg-primary);
	}
}

.product-card__volume-btn:focus-visible {
	outline: 2px solid var(--btn-stroke-focused);
	outline-offset: 2px;
}

/* Chevron — rotate 180° when disclosure is open */
.product-card__volume-chevron {
	flex: 0 0 14px;
	margin-left: auto;
	transition: transform var(--dur-base) ease-out;
}

.product-card__volume-btn[aria-expanded="true"] .product-card__volume-chevron {
	transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
	.product-card__volume-chevron {
		transition: none;
	}
}

/* ADD TO CART button — red, t-body-sm-exbold applied via class on element */
.product-card__add-btn {
	flex: 0 0 auto;
	height: 42px;
	padding: 12px;
	background: var(--btn-primary);
	border: 1px solid var(--btn-primary);
	border-radius: var(--r-sm);
	cursor: pointer;
	color: var(--fig-siegel-white);
	white-space: nowrap;
	transition: background var(--dur-fast) linear, border-color var(--dur-fast) linear;
}

.product-card--no-volume .product-card__add-btn {
	flex: 1 1 100%;
	width: 100%;
}

/* POA: no price, so no volume button sits beside it and the enquiry fills the
   bar. Same shape as ADD TO CART - it is the card's one call to action. */
.product-card__add-btn--enquire {
	flex: 1 1 100%;
	width: 100%;
}

@media (hover: hover) and (pointer: fine) {
	.product-card__add-btn:hover {
		background: var(--btn-primary-hover);
		border-color: var(--btn-primary-hover);
	}
}

.product-card__add-btn:focus-visible {
	outline: 2px solid var(--btn-stroke-focused);
	outline-offset: 2px;
}

.product-card__add-btn:disabled,
.product-card__add-btn[data-pending] {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ── Info bar ─────────────────────────────────────────────────────────────── */

.product-card__info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

/* Row 1: name + code badge (left, flex-1) | primary price (right, flex-1 text-right) */
.product-card__name-row {
	display: flex;
	align-items: center;
	height: 20px;
	overflow: hidden;
}

.product-card__name-group {
	display: flex;
	flex: 1 0 0;
	gap: 5px;
	align-items: center;
	min-width: 0;
	overflow: hidden;
}

/* Product name link */
.product-card__name {
	color: var(--text-product-card-title);
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	flex-shrink: 1;
}

@media (hover: hover) and (pointer: fine) {
	.product-card__name:hover {
		text-decoration: underline;
	}
}

.product-card__name:focus-visible {
	outline: 2px solid var(--btn-stroke-focused);
	outline-offset: 2px;
	border-radius: var(--r-sm);
}

/* Product-code badge — Aktiv SemiBold 12px, letter-spacing -0.048px */
.product-card__code-badge {
	flex: 0 0 auto;
	font: var(--fw-semibold) 0.75rem/0.759375rem var(--font-heading);
	letter-spacing: -0.048px;
	color: var(--fig-siegel-white);
	background: var(--product-blue);   /* default when no colour is set */
	padding: var(--sp-1);     /* 4px */
	border-radius: 0;         /* Square corners per Figma */
}
/* Per-product badge colour — set on the product (product_code_badge_color) */
.product-card__code-badge--green  { background: var(--product-green); }
.product-card__code-badge--yellow { background: var(--product-yellow); color: var(--fig-siegel-black); }
.product-card__code-badge--blue   { background: var(--product-blue); }
.product-card__code-badge--orange { background: var(--product-orange); }
/* Product Code Accent also ships Red, Black, Grey and White. White and
   yellow need dark text; the rest stay white on a solid fill. */
.product-card__code-badge--red    { background: var(--product-red); }
.product-card__code-badge--black  { background: var(--product-black); }
.product-card__code-badge--grey   { background: var(--product-grey); }
.product-card__code-badge--white  { background: var(--product-white); color: var(--fig-siegel-black); border: 1px solid var(--fig-neutral-100); }

/* Primary price — right-aligned, one line */
.product-card__price-primary {
	flex: 1 0 0;
	text-align: right;
	color: var(--text-product-card-secondary);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Row 2: tagline (left) | secondary tier price (right — blocked BUG-24/25) */
.product-card__desc-row {
	display: flex;
	gap: 6px;
	align-items: center;
	height: 14px;
	overflow: hidden;
}

.product-card__tagline {
	flex: 1 1 auto;
	min-width: 0;
	color: var(--text-product-card-secondary);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Second tier price ("$Y in carton"), right-aligned opposite the tagline. */
.product-card__price-secondary {
	flex: 0 0 auto;
	margin-left: auto;
	color: var(--text-product-card-secondary);
	white-space: nowrap;
}

/* "in pallet" / "in carton" unit suffix — lighter than the amount. */
.product-card__price-unit {
	color: var(--text-product-card-tertiary, var(--text-product-card-secondary));
}

/* Row 3: TDS + MSDS document buttons — 149px each at design width, but flex
   so the two buttons never force the card's min-content width past a fluid
   grid track (a hard 149px×2 floor caused a horizontal-overflow "grid
   blowout" on the category/shop archive at narrower fluid widths). */
.product-card__doc-row {
	display: flex;
	gap: var(--sp-3, 12px);
	align-items: flex-start;
	height: 36px;
	overflow: hidden;
	justify-content: space-between;
}

.product-card__doc-btn {
	display: inline-flex;
	box-sizing: border-box;
	align-items: center;
	justify-content: center;
	gap: var(--sp-2);         /* 8px */
	flex: 1 1 0;
	min-width: 0;
	max-width: 149px;
	height: 36px;
	padding-inline: 12px;
	background: var(--bg-secondary);
	border: 1px solid var(--fig-neutral-100);
	border-radius: var(--r-sm);
	color: var(--text-link);
	text-decoration: none;
	overflow: hidden;
	transition: background var(--dur-fast) linear;
}

.product-card__doc-btn--na {
	opacity: 0.4;
	cursor: default;
	pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
	.product-card__doc-btn:not(.product-card__doc-btn--na):hover {
		background: var(--bg-primary);
	}
}

.product-card__doc-btn:focus-visible {
	outline: 2px solid var(--btn-stroke-focused);
	outline-offset: 2px;
}

/* ── Mobile — desktop hidden ≤767px; mobile card shown only ≤767px ──────── */

@media (max-width: 767px) {
	.product-card--desktop {
		display: none;
	}
}

/* ==========================================================================
   Product card — mobile (113:7757)
   Card: 180.5×294px   Image area: 180×230   Gap: 8px   2-col grid (task 6.2)
   + ADD hit area: 44×44 via ::after (BUG-06; visual stays ~39×21)
   ========================================================================== */

.product-card--mobile {
	display: none;
}

@media (max-width: 767px) {
	.product-card--mobile {
		display: flex;
		flex-direction: column;
		gap: 8px; /* 7.997px ≈ 8px between image area and info */
	}
}

/* ── Image area ──────────────────────────────────────────────────────────── */

.product-card-mobile__image-area {
	position: relative;
	width: 100%;
	height: 230px;
	background: var(--bg-primary);
	border-radius: var(--r-sm);
	overflow: hidden;
	flex: none;
}

/* ── Gallery track (scroll-snap, no scrollbar) ───────────────────────────── */

.product-card-mobile__gallery-track {
	position: absolute;
	inset: 0;
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
	list-style: none;
	padding: 0;
	margin: 0;
}

.product-card-mobile__gallery-track::-webkit-scrollbar {
	display: none;
}

.product-card-mobile__slide {
	position: relative;
	flex: 0 0 100%;
	scroll-snap-align: start;
	list-style: none;
}

.product-card-mobile__image-link {
	display: block;
	width: 100%;
	height: 100%;
}

.product-card-mobile__slide .product-card-mobile__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center bottom;
	display: block;
}

/* Slide 1 is the product's main image - the packaging cut-out on a plain
   background - and keeps contain above: cover would crop a square into this
   portrait slot and cut the box's sides off. Every later slide is a gallery
   photo with no plain edge to blend into the card, so contain leaves grey
   bands above and below it; those fill the slot instead. */
.product-card-mobile__slide:not(:first-child) .product-card-mobile__img {
	object-fit: cover;
	object-position: center;
}

/* Same WooCommerce reset as the desktop card, for the 180×230 mobile frame. */
.woocommerce img.product-card-mobile__img,
.woocommerce-page img.product-card-mobile__img {
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
	object-position: center bottom;
}

/* ── Overlay rows — 6px inset from all edges ─────────────────────────────── */
/* Both rows are absolute siblings of the gallery track, z-index above it.   */

.product-card-mobile__row {
	position: absolute;
	left: 6px;
	right: 6px;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.product-card-mobile__row--top {
	top: 6px;
}

.product-card-mobile__row--bottom {
	bottom: 6px;
}

.product-card-mobile__row-spacer {
	display: block;
}

/* ── Performance badge (top-left) ────────────────────────────────────────── */

.product-card-mobile__perf-badge {
	background: var(--fig-neutral-200);
	color: var(--text-heading-primary);
	padding: 3px;
	border-radius: var(--r-sm);
	white-space: nowrap;
}

/* ── Wishlist button (top-right) — 22×22px pill ─────────────────────────── */



/* ── Gallery dots (bottom-left) ──────────────────────────────────────────── */
/* 4 dots × 5px wide + 3 gaps × 6px = 38px wide × 4px tall — matches design. */

.product-card-mobile__dots {
	display: flex;
	align-items: center;
	gap: 2px;
}

.product-card-mobile__dot {
	width: 4px;
	height: 4px;
	background: var(--fig-neutral-400);
	border-radius: 9999px;
	transition: width var(--dur-fast) linear, background var(--dur-fast) linear;
}

.product-card-mobile__dot--active {
	width: 20px;
	background: var(--fig-neutral-950);
}

@media (prefers-reduced-motion: reduce) {
	.product-card-mobile__dot {
		transition: none;
	}
}

/* ── + ADD button (bottom-right) ─────────────────────────────────────────── */
/* Visual: ~39×21px. Hit area: 44×44 via ::after inset -12px (BUG-06).       */

.product-card-mobile__add {
	position: relative;
	padding: 4px;
	background: var(--btn-primary);
	border: none;
	border-radius: var(--r-sm);
	color: var(--fig-siegel-white);
	cursor: pointer;
	white-space: nowrap;
	transition: background var(--dur-fast) linear;
}

.product-card-mobile__add::after {
	content: '';
	position: absolute;
	inset: -12px; /* expands tap target to ≥44×44 (BUG-06) */
}

@media (hover: hover) and (pointer: fine) {
	.product-card-mobile__add:hover {
		background: var(--btn-primary-hover);
	}
}

.product-card-mobile__add:focus-visible {
	outline: 2px solid var(--btn-stroke-focused);
	outline-offset: 2px;
}

.product-card-mobile__add:disabled,
.product-card-mobile__add[data-pending] {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ── Info area ───────────────────────────────────────────────────────────── */

.product-card-mobile__info {
	display: flex;
	flex-direction: column;
	gap: 0;
	padding-inline: 0;
}

/* Name row: name (flex-1, truncated) + code badge (flex-0). 83:2907 — gap 5,
   row 20 tall. category.css carried a 5px override but product-card.css loads
   after it, so the 4 here was the one that won. */
/* justify-content so the pair sits together at the left. The name was
   flex:1 1 0, which made it eat the whole row and push the badge against the
   right edge - on the desktop card the badge sits immediately after the
   name, and the client asked for the same here. */
.product-card-mobile__name-row {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 5px;
	overflow: hidden;
	/* The name and the price were touching - measured at 0px between them. */
	margin-bottom: 6px;
}

/* 83:2908 is Aktiv Grotesk Bold 16/20 with --ls-tight. The markup carries
   .t-m-h3, which is the 22/24 tier — 4px too large, and the extra 4px of
   leading is what took the card from its drawn 290.47 to 297. */
/* 0 1 auto, not 1 1 0: take the width the words need and shrink only when
   there is not enough room, so a short name leaves the badge beside it
   rather than at the far side of the card. */
.product-card-mobile__name {
	flex: 0 1 auto;
	font: var(--fw-bold) 1rem/1.25rem var(--font-heading);
	letter-spacing: var(--ls-tight);
	color: var(--text-product-card-title);
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
}

@media (hover: hover) and (pointer: fine) {
	.product-card-mobile__name:hover {
		text-decoration: underline;
	}
}

.product-card-mobile__name:focus-visible {
	outline: 2px solid var(--btn-stroke-focused);
	outline-offset: 2px;
	border-radius: var(--r-sm);
}

/* Code badge — Aktiv SemiBold 12px / -0.048px tracking.
   17 tall, not 20.15: Figma trims the text box to the cap height
   (text-box-trim: trim-both / text-box-edge: cap alphabetic), which browsers
   do not widely support yet. An explicit height reaches the drawn number
   without depending on that. */
/* The Enquire variant of the + ADD pill. Same shape, wider because the word
   is longer, so a POA product reads as a different action rather than a
   broken one. */
.product-card-mobile__add--enquire {
	padding-inline: 8px;
	white-space: nowrap;
}

.product-card-mobile__code-badge {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	height: 17px;
	box-sizing: border-box;
	font: var(--fw-semibold) 0.75rem / 0.759375rem var(--font-heading);
	letter-spacing: -0.048px;
	color: var(--fig-siegel-white);
	background: var(--product-blue);   /* default when no colour is set */
	padding: var(--sp-1);
	border-radius: 0;
}
.product-card-mobile__code-badge--green  { background: var(--product-green); }
.product-card-mobile__code-badge--yellow { background: var(--product-yellow); color: var(--fig-siegel-black); }
.product-card-mobile__code-badge--blue   { background: var(--product-blue); }
.product-card-mobile__code-badge--orange { background: var(--product-orange); }
.product-card-mobile__code-badge--red    { background: var(--product-red); }
.product-card-mobile__code-badge--black  { background: var(--product-black); }
.product-card-mobile__code-badge--grey   { background: var(--product-grey); }
.product-card-mobile__code-badge--white  { background: var(--product-white); color: var(--fig-siegel-black); border: 1px solid var(--fig-neutral-100); }

.product-card-mobile__price-primary,
.product-card-mobile__price-secondary {
	height: 16px;
	color: var(--text-product-card-secondary);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ── Mobile Quick-Add Sheet ──────────────────────────────────────────────────
   Dialog: slides up from below viewport. Only called from mobile card + ADD.
   Border structure: header (T/L/R), volume block (all 4), confirm (B/L/R) —
   matching Figma sections; no outer wrapper border needed.
   BUG-26: no scrim — backdrop transparent; scroll lock via sheet.js.
   ─────────────────────────────────────────────────────────────────────────── */

#quick-add-sheet {
	border: none;
	box-sizing: border-box;
	padding: 0 0 20px;
	position: fixed;
	inset: auto 16px 0 auto;
	width: calc(100% - 32px);
	max-width: 361px;
	margin: 0;
	background: transparent;
	translate: 0 0;
	transition:
		translate var(--dur-base) ease-out,
		display var(--dur-base) ease-out allow-discrete,
		overlay var(--dur-base) ease-out allow-discrete;
	transition-behavior: allow-discrete; /* belt-and-suspenders for Safari */
}

#quick-add-sheet::backdrop {
	background: rgba(19, 19, 19, 0.35);
}

@starting-style {
	#quick-add-sheet[open] {
		translate: 0 100%;
	}
}

#quick-add-sheet:not([open]) {
	translate: 0 100%;
}

@media (prefers-reduced-motion: reduce) {
	#quick-add-sheet {
		transition: display 0s allow-discrete, overlay 0s allow-discrete;
	}
}

.qa-sheet {
	width: 100%;
	background: var(--fig-siegel-white);
	border-radius: var(--r-sm);
	overflow: hidden;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.qa-sheet__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	padding: 12px;
	background: var(--fig-siegel-white);
	border: 1px solid var(--fig-neutral-100);
	border-bottom: none;
	border-radius: var(--r-sm) var(--r-sm) 0 0;
}

.qa-sheet__header-titles {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.qa-sheet__product-name {
	color: var(--fig-siegel-black);
}

/* Caption sm: Aktiv Grotesk Bold 10/12, tracking 0.6px, uppercase */
.qa-sheet__select-label {
	font: var(--fw-bold) 10px / 12px var(--font-heading);
	letter-spacing: 0.6px;
	text-transform: uppercase;
	color: var(--fig-siegel-black);
}

.qa-sheet__close {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	padding: 0;
	background: none;
	border: none;
	cursor: pointer;
	color: var(--fig-siegel-black);
}

.qa-sheet__close:focus-visible {
	outline: 2px solid var(--btn-stroke-focused);
	outline-offset: 4px;
	border-radius: var(--r-sm);
}

/* ── Volume block ────────────────────────────────────────────────────────── */
.qa-sheet__volume {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 12px;
	background: var(--fig-siegel-white);
	border: 1px solid var(--fig-neutral-100);
}

/* Caption sm — same as .qa-sheet__select-label */
.qa-sheet__volume-label {
	font: var(--fw-bold) 10px / 12px var(--font-heading);
	letter-spacing: 0.6px;
	text-transform: uppercase;
	color: var(--fig-siegel-black);
}

/* Disclosure trigger — t-body-xs class handles font */
.qa-sheet__volume-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 12px;
	background: var(--fig-siegel-white);
	border: 1px solid var(--fig-neutral-100);
	border-radius: var(--r-sm);
	cursor: pointer;
	text-align: left;
	color: var(--text-link);
}

/* Open: becomes top row of the options box (squared bottom corners) */
.qa-sheet__volume-trigger[aria-expanded="true"] {
	border-radius: var(--r-sm) var(--r-sm) 0 0;
}

.qa-sheet__volume-trigger:focus-visible {
	outline: 2px solid var(--btn-stroke-focused);
	outline-offset: 2px;
}

.qa-sheet__volume-chevron {
	flex-shrink: 0;
	color: var(--fig-siegel-black);
	transition: rotate var(--dur-fast) linear;
}

.qa-sheet__volume-trigger[aria-expanded="true"] .qa-sheet__volume-chevron {
	rotate: 180deg;
}

@media (prefers-reduced-motion: reduce) {
	.qa-sheet__volume-chevron { transition: none; }
}

/* Options disclosure panel — grid-template-rows: 0fr → 1fr */
.qa-sheet__options-wrap {
	display: grid;
	grid-template-rows: 0fr;
	overflow: hidden;
	transition: grid-template-rows var(--dur-base) ease-out;
	border: 0 solid var(--fig-neutral-100);
	border-top: none;
	border-radius: 0 0 var(--r-sm) var(--r-sm);
}

/* Border reveals only when open — avoids hairline on 0-height element */
.qa-sheet__options-wrap[data-open] {
	grid-template-rows: 1fr;
	border-left-width: 1px;
	border-right-width: 1px;
	border-bottom-width: 1px;
}

@media (prefers-reduced-motion: reduce) {
	.qa-sheet__options-wrap { transition: none; }
}

.qa-sheet__options-inner {
	min-height: 0;
}

.qa-sheet__options-content {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 8px;
}

/* Option rows — injected by JS (t-body-xs class added there for font) */
.qa-sheet__option {
	display: flex;
	align-items: center;
	width: 100%;
	padding: 12px;
	background: var(--fig-siegel-white);
	border: 1px solid var(--fig-neutral-100);
	border-radius: var(--r-sm);
	cursor: pointer;
	color: var(--text-link);
	text-align: left;
}

/* Selected = pure black fill + white text (BUG-12; --btn-secondary-hover = #000000) */
.qa-sheet__option[aria-selected="true"] {
	background: var(--btn-secondary-hover);
	border-color: var(--btn-secondary-hover);
	color: var(--fig-siegel-white);
}

.qa-sheet__option:focus-visible {
	outline: 2px solid var(--btn-stroke-focused);
	outline-offset: 2px;
}

/* ── Confirm block ───────────────────────────────────────────────────────── */
.qa-sheet__confirm {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 12px;
	background: var(--fig-siegel-white);
	border: 1px solid var(--fig-neutral-100);
	border-top: none;
	border-radius: 0 0 var(--r-sm) var(--r-sm);
}

/* ADD TO CART — t-body-sm-exbold class handles font */
.qa-sheet__add-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 12px;
	background: var(--btn-primary);
	border: 1px solid var(--btn-primary);
	border-radius: var(--r-sm);
	color: var(--fig-siegel-white);
	cursor: pointer;
}

.qa-sheet__add-btn:focus-visible {
	outline: 2px solid var(--btn-stroke-focused);
	outline-offset: 2px;
}

/* Document links row */
.qa-sheet__docs {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 17px;
}

/* t-body-h5 class handles font; underline + color here */
.qa-sheet__doc-link {
	color: var(--text-link);
	text-decoration: underline;
	text-underline-position: from-font;
}

.qa-sheet__doc-link:focus-visible {
	outline: 2px solid var(--btn-stroke-focused);
	outline-offset: 2px;
	border-radius: var(--r-sm);
}

/* =============================================================================
   COLOUR SWATCHES — desktop card + mobile quick-add sheet
   Design language derived from the "SELECT COLOUR: Translucent" pattern in
   the Figma prototype. Not in the original hover-state node (38:1416) —
   added on client request.
   ============================================================================= */

/* ── Desktop: colour row inside the quick-add wrapper ───────────────────── */

/* 37:1293 "Container": the colour block is the first child of the options
   panel, above VOLUME, so it inherits the panel's background and 8px padding.
   It used to be a standalone bar with its own white fill and border, sitting
   outside the panel - which is why the swatches showed on plain hover. */
.product-card__colour-row {
	display: flex;
	flex-direction: column;
	gap: 12px;    /* label ends at y=16, swatch row starts at y=28 */
}

.product-card__colour-label {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 4px;
	color: var(--text-heading-primary);
	letter-spacing: 0.04em;
}

.product-card__colour-name {
	font-weight: 400;
	font-family: var(--font-body);
	letter-spacing: 0;
	color: var(--fig-neutral-600);
}

.product-card__colour-swatches {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

/* ── Shared swatch button (desktop card + mobile sheet) ─────────────────── */

.product-card__colour-swatch {
	/* Figma 105:7505: 18px control with a centred 16px colour disc. */
	width: 18px;
	height: 18px;
	box-sizing: border-box;
	border-radius: 50%;
	border: 1px solid transparent;
	cursor: pointer;
	padding: 0;
	background-color: var(--fig-neutral-300);
	background-clip: content-box;
	transition:
		box-shadow var(--dur-fast) linear,
		transform   var(--dur-fast) linear;
	flex-shrink: 0;
}

.product-card__colour-swatch.is-light {
	border-color: #D0D1D1;
}

/* The selected asset is 20px overall: a 16px disc, 1px white separation and
   a 1px #333 outer ring. The button keeps its 18px layout footprint. */
.product-card__colour-swatch[aria-selected="true"] {
	box-shadow: 0 0 0 1px #333;
}

.product-card__colour-swatch:focus-visible {
	outline: 2px solid var(--btn-stroke-focused, var(--fig-red-600));
	outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
	.product-card__colour-swatch:not([aria-selected="true"]):hover {
		transform: scale(1.15);
	}
}

@media (prefers-reduced-motion: reduce) {
	.product-card__colour-swatch {
		transition: none;
	}
}

/* ── Mobile quick-add sheet colour block ────────────────────────────────── */

/* The sheet shows Volume and Colour as two matching dropdowns - see the note
   in quick-add-sheet.php. Everything below mirrors .qa-sheet__volume* so the
   two controls are identical; only the class names differ. */
.qa-sheet__colours {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 12px;
	background: var(--fig-siegel-white);
	border: 1px solid var(--fig-neutral-100);
	border-top: none;
}

.qa-sheet__colours[hidden] {
	display: none;
}

/* Matches .qa-sheet__volume-label exactly - the two captions sit above
   identical controls and must not read as different things. */
.qa-sheet__colours-label {
	margin: 0;
	font: var(--fw-bold) 10px / 12px var(--font-heading);
	letter-spacing: 0.6px;
	text-transform: uppercase;
	color: var(--fig-siegel-black);
}

.qa-sheet__colour-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 12px;
	background: var(--fig-siegel-white);
	border: 1px solid var(--fig-neutral-100);
	border-radius: var(--r-sm);
	cursor: pointer;
	text-align: left;
	color: var(--text-link);
}

.qa-sheet__colour-trigger[aria-expanded="true"] {
	border-radius: var(--r-sm) var(--r-sm) 0 0;
}

.qa-sheet__colour-trigger:focus-visible {
	outline: 2px solid var(--btn-stroke-focused);
	outline-offset: 2px;
}

.qa-sheet__colour-chevron {
	flex-shrink: 0;
	color: var(--fig-siegel-black);
	transition: rotate var(--dur-fast) linear;
}

.qa-sheet__colour-trigger[aria-expanded="true"] .qa-sheet__colour-chevron {
	rotate: 180deg;
}

@media (prefers-reduced-motion: reduce) {
	.qa-sheet__colour-chevron { transition: none; }
}

.qa-sheet__colour-options-wrap {
	display: grid;
	grid-template-rows: 0fr;
	overflow: hidden;
	transition: grid-template-rows var(--dur-base) ease-out;
	border: 0 solid var(--fig-neutral-100);
	border-top: none;
	border-radius: 0 0 var(--r-sm) var(--r-sm);
}

.qa-sheet__colour-options-wrap[data-open] {
	grid-template-rows: 1fr;
	border-left-width: 1px;
	border-right-width: 1px;
	border-bottom-width: 1px;
}

@media (prefers-reduced-motion: reduce) {
	.qa-sheet__colour-options-wrap { transition: none; }
}

.qa-sheet__colour-options-inner {
	min-height: 0;
}

.qa-sheet__colour-options-content {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 8px;
}

.qa-sheet__colour-option {
	display: flex;
	align-items: center;
	width: 100%;
	padding: 12px;
	background: var(--fig-siegel-white);
	border: 1px solid var(--fig-neutral-100);
	border-radius: var(--r-sm);
	cursor: pointer;
	color: var(--text-link);
	text-align: left;
}

/* Selected = black fill + white text, same as the Volume options (BUG-12). */
.qa-sheet__colour-option[aria-selected="true"] {
	background: var(--btn-secondary-hover);
	border-color: var(--btn-secondary-hover);
	color: var(--fig-siegel-white);
}

.qa-sheet__colour-option:focus-visible {
	outline: 2px solid var(--btn-stroke-focused);
	outline-offset: 2px;
}
/* End product-card component. */

/* ── Wishlist: YITH's control wearing the theme's pill and heart ──────────── */
/*
 * The client chose YITH so a saved product follows a shopper into their
 * account instead of living in one browser. The design is still ours: a 36px
 * pill on the desktop card, 22px on the mobile one, each holding the same
 * 16px heart. YITH owns the click, the state and the storage.
 *
 * Four things this has to survive:
 *
 *  - The button is drawn by YITH's own JavaScript, not by PHP, so there is no
 *    server-side filter that can put our heart in it. The icon is a CSS mask
 *    on the wrapper instead, which is immune to the component re-rendering
 *    itself - anything injected into the DOM would be wiped on the next state
 *    change.
 *  - Two states. Not saved is `--custom-button` alone with an outline heart;
 *    saved adds `--added` and YITH swaps to a filled one. Both get our path,
 *    so the only thing that changes is the fill and the colour.
 *  - AJAX loading, which /shop/ needs because WP Engine caches it for ten
 *    minutes and a baked-in state would be one shopper's hearts shown to the
 *    next. YITH ships an empty container and fills every button on the page
 *    in one request, so the pill is sized on the OUTER element - the one in
 *    the cached HTML - and the space is held before the fragment lands.
 *  - The label. YITH prints "Add to wishlist" / "Remove from list" next to
 *    the icon; it is taken out of the flow rather than hidden, because it is
 *    the button's only accessible name.
 */

.siegel-wishlist {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	background: var(--bg-secondary);
	border-radius: var(--r-pill);
	color: var(--text-heading-primary);
	transition: background var(--dur-fast) linear, color var(--dur-fast) linear;
}

/* Sized on the wrapper, so the space is held before the fragment arrives. */
.siegel-wishlist.product-card__wishlist { width: 36px; height: 36px; }
.siegel-wishlist.product-card-mobile__wishlist { width: 22px; height: 22px; }

/* Signed out, YITH wraps the button in an <a> to the account page carrying
   ?add_to_wishlist=<id>, so signing in saves the item. That anchor has to
   fill the pill and inherit the colour, or the heart comes out link-blue at
   16px in the corner of a 36px circle. */
.siegel-wishlist .yith-add-to-wishlist-button-block,
.siegel-wishlist .yith-wcwl-add-to-wishlist-button-anchor-wrapper,
.siegel-wishlist .yith-add-to-wishlist-button-block .yith-wcwl-add-to-wishlist-button,
.siegel-wishlist .yith-add-to-wishlist-button-block a.yith-wcwl-add-to-wishlist-button {
	display: flex;
	width: 100%;
	height: 100%;
	min-height: 0;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: var(--r-pill);
	background: transparent;
	box-shadow: none;
	color: inherit;
	font: inherit;
	line-height: 0;
	text-decoration: none;
	cursor: pointer;
}

/* Out of the flow, not hidden: it is the accessible name. */
.siegel-wishlist .yith-wcwl-add-to-wishlist-button__label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* YITH's own heart out, ours in.
 *
 * The heart is drawn on the button itself, not on YITH's icon wrapper,
 * because the wrapper is not always there. YITH emits at least three shapes
 * for this control depending on state and breakpoint - a <button> with the
 * svg inside a .yith-wcwl-icon-svg__wrapper, an <a> wrapping that button,
 * and a bare <a> with the svg as a direct child and no wrapper at all. The
 * only element common to all three is .yith-wcwl-add-to-wishlist-button, so
 * that is what carries the mask. The mask path is the exact one the cards
 * used before the plugin, so the shape has not changed. */
.siegel-wishlist .yith-wcwl-icon,
.siegel-wishlist .yith-wcwl-icon-svg__wrapper { display: none; }

.siegel-wishlist .yith-wcwl-add-to-wishlist-button::before {
	content: "";
	display: block;
	flex: none;
	width: 16px;
	height: 16px;
	background: currentColor;
	transition: background var(--dur-fast) linear;
	-webkit-mask: var(--siegel-heart-outline) center / 16px 16px no-repeat;
	mask: var(--siegel-heart-outline) center / 16px 16px no-repeat;
}

:root {
	--siegel-heart-outline: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M8 14s-6-3.686-6-8a4 4 0 0 1 6-3.464A4 4 0 0 1 14 6c0 4.314-6 8-6 8z' stroke='%23000' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E");
	--siegel-heart-filled: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 14s-6-3.686-6-8a4 4 0 0 1 6-3.464A4 4 0 0 1 14 6c0 4.314-6 8-6 8z' fill='%23000' stroke='%23000' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Saved: theme red, filled.
 *
 * The background is set on the pseudo-element rather than left to inherit
 * `currentColor`. YITH puts the --added class on a different element in
 * different states - sometimes the <button>, sometimes the <a> around it -
 * so a colour inherited down the tree reached the heart in some states and
 * not others, and it came out black. Painting the mask directly cannot miss. */
.siegel-wishlist .yith-wcwl-add-to-wishlist-button--added,
.siegel-wishlist .yith-wcwl-add-to-wishlist-button--added .yith-wcwl-add-to-wishlist-button,
.siegel-wishlist .exists .yith-wcwl-add-to-wishlist-button { color: var(--btn-primary); }

.siegel-wishlist .yith-wcwl-add-to-wishlist-button--added::before,
.siegel-wishlist .yith-wcwl-add-to-wishlist-button--added .yith-wcwl-add-to-wishlist-button::before {
	background: var(--btn-primary);
	-webkit-mask-image: var(--siegel-heart-filled);
	mask-image: var(--siegel-heart-filled);
}

/* YITH's extras have no place in a 36px pill. */
.siegel-wishlist .yith-wcwl-tooltip,
.siegel-wishlist .ajax-loading,
.siegel-wishlist .feedback,
.siegel-wishlist .separator,
.siegel-wishlist .view-wishlist { display: none; }

@media (hover: hover) and (pointer: fine) {
	.siegel-wishlist.product-card__wishlist:hover { background: var(--fig-neutral-100); }
}

.siegel-wishlist .yith-wcwl-add-to-wishlist-button:focus-visible,
.siegel-wishlist .yith-wcwl-add-to-wishlist-button-anchor-wrapper:focus-visible {
	outline: 2px solid var(--btn-stroke-focused);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.siegel-wishlist,
	.siegel-wishlist .yith-wcwl-add-to-wishlist-button::before { transition: none; }
}
