/* ==========================================================================
   PAGE — Single product
   --------------------------------------------------------------------------
   Rebuilt 18.11.2026 for the client's compact product page. One layout
   system instead of per-device patches:

   - Two columns from tablets up: the picture column is a fluid track
     (--pdp-media, ≈35 % on a 1440 desktop, wider share on a portrait
     tablet, capped at 560px on big screens and by the window height on
     short laptop windows) and the information column takes the rest.
   - The bands under them (Toidusoovitus, the producer) sit on the same two
     tracks, so every left edge on the page is the picture's or the
     information column's.
   - Phones (under 700px wide) get one column in reading order. That is the
     only layout breakpoint; type and spacing are fluid (clamp()). Short
     windows keep two columns with a height-limited picture.

   Reading order: picture | name, price, "Laos", quantity, "Lisa korvi",
   "Toote kirjeldus" — facts — Toidusoovitus — producer — Sarnased tooted.
   ========================================================================== */

.product-detail {
	/* The picture column. A linear share of the container (300px on a
	   portrait tablet, ≈460px at 1440), never under 300 nor over 560 — 300
	   holds the row under the picture on one line. A short window (1414x645,
	   a landscape phone, a 1000x480 desktop window) narrows it further so the
	   45:52 plate stays near the first screen's height, down to 200px.
	   The 200px is the header (122) and the breadcrumb above the plate; the
	   announcement strip's row comes off as well, as in the homepage hero
	   (19.11.2026: with the strip on, the plate ended 15px below a
	   1366x633 window — a 13" Windows laptop's Chrome — and now ends 17px
	   above it, as it does with the strip off). */
	--pdp-media: min(
		clamp(300px, calc(27% + 104px), 560px),
		max(200px, calc((100vh - 200px - var(--site-announce-h, 0px)) * 45 / 52))
	);
	--pdp-gap: clamp(24px, 3.5vw, 80px);
	/* Text size in the information column: 16px to ~1500, 17.7px at 1920,
	   18px at most — the column is the line length (owner 18.11). */
	--pdp-text: clamp(16px, calc(10px + 0.4vw), 18px);
	--pdp-rule: 1px solid var(--color-surface-mid);

	padding-block-end: var(--space-2xl);
}

/* --------------------------------------------------------------------------
   Breadcrumb — WooCommerce's, restyled. Emitted before the product markup.
   -------------------------------------------------------------------------- */

.woocommerce .woocommerce-breadcrumb,
.woocommerce-breadcrumb {
	/* 38px on a tall desktop, about 20px on a short laptop window. */
	margin: clamp(16px, calc(4vh - 4px), 38px) 0 var(--space-md);
	font-family: var(--font-ui);
	font-weight: 500;
	font-size: 12px;
	line-height: 16px;
	color: var(--color-text-secondary);
}

/* Qualified with .woocommerce to outrank the plugin's own breadcrumb link. */
.woocommerce .woocommerce-breadcrumb a,
.woocommerce-breadcrumb a {
	color: inherit;
	text-decoration: none;
	transition: color var(--transition-base);
}

.woocommerce .woocommerce-breadcrumb a:hover,
.woocommerce-breadcrumb a:hover {
	color: var(--color-primary);
}

.woocommerce-breadcrumb__sep {
	padding-inline: var(--space-xs);
	opacity: 0.6;
}

/* The two things WooCommerce emits before the product sit on the wide rail. */
.product-shell > .woocommerce-breadcrumb,
.product-shell > .woocommerce-notices-wrapper {
	width: 100%;
	max-width: calc(var(--container-wide) + var(--page-gutter-wide) * 2);
	margin-inline: auto;
	padding-inline: var(--page-gutter-wide);
}

/* --------------------------------------------------------------------------
   Top: picture | information
   -------------------------------------------------------------------------- */

.product-detail__top {
	display: grid;
	grid-template-columns: var(--pdp-media) minmax(0, 1fr);
	column-gap: var(--pdp-gap);
	align-items: start;
}

.product-gallery,
.product-detail__main {
	min-width: 0;
}

/* --------------------------------------------------------------------------
   Picture
   -------------------------------------------------------------------------- */

/*
 * A portrait plate (owner 04.11.2026; UI Final 615 x 890 ≈ 45:52). Its width
 * is the column's, its height follows; the photograph is contained inside the
 * warm grey, never cropped or stretched.
 */
.product-gallery__stage {
	position: relative;
	aspect-ratio: 45 / 52;
	width: 100%;
	border-radius: var(--radius-button);
	background-color: var(--color-surface-light);
	overflow: hidden;
}

.product-gallery__frame {
	position: absolute;
	inset: var(--space-xs);
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Scoped to the frame so WooCommerce's .woocommerce img { height: auto }
   cannot outrank it. */
.product-gallery__frame .product-gallery__image {
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	object-fit: contain;
	filter: drop-shadow(0 25px 25px rgba(0, 0, 0, 0.15));
}

/* Thumbnails — only when a product has more than one image. */
.product-gallery__thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-xs);
	margin: var(--space-sm) 0 0;
	padding: 0;
	list-style: none;
}

.product-gallery__thumb {
	display: block;
	width: 72px;
	padding: 6px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	background-color: var(--color-surface-light);
	cursor: pointer;
	transition: border-color var(--transition-base);
}

.product-gallery__thumb:hover,
.product-gallery__thumb.is-current {
	border-color: var(--color-primary);
}

.product-gallery__thumb img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: contain;
}

/* The second image while a mouse is over the photograph (approved design). */
.product-gallery__frame .product-gallery__hover {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	filter: drop-shadow(0 25px 25px rgba(0, 0, 0, 0.15));
	opacity: 0;
	pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
	.product-gallery__frame.has-hover-image .product-gallery__image,
	.product-gallery__frame.has-hover-image .product-gallery__hover {
		transition: opacity var(--transition-slow);
	}

	.product-gallery__stage:hover .has-hover-image:not(.is-browsing):not(.is-touched) .product-gallery__hover {
		opacity: 1;
	}

	.product-gallery__stage:hover .has-hover-image:not(.is-browsing):not(.is-touched) .product-gallery__image {
		opacity: 0;
	}
}

/* Under the picture: the note, then one row of actions, on its left edge. */
.product-gallery__utils {
	padding-block-start: 12px;
}

.product-gallery__note {
	margin: 0;
	font-family: var(--font-body);
	font-style: italic;
	font-size: 12px;
	line-height: 16px;
	letter-spacing: 0.025em;
	color: var(--color-text);
}

.product-gallery__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	column-gap: 20px;
	margin-block-start: 4px;
}

/* Each a 44px-tall target with its word centred on it. */
.product-gallery__action {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	padding: 0;
	border: 0;
	background: none;
	font-family: var(--font-body);
	font-weight: 500;
	font-size: 12px;
	line-height: 16px;
	letter-spacing: 0.03em;
	color: var(--color-text);
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: color var(--transition-base);
}

.product-gallery__action:hover {
	color: var(--color-primary);
}

.product-gallery__action svg {
	flex-shrink: 0;
}

/* The heart: outline until saved, filled once it is (wishlist.css swaps
   fill and stroke on aria-pressed). Its label stays in the text colour. */
.product-gallery__actions .product-gallery__favourite[aria-pressed='true'] {
	color: var(--color-text);
}

.product-gallery__actions .product-gallery__favourite[aria-pressed='true'] svg {
	color: var(--color-primary);
}

/* Portrait tablets (a 300–310px column): the three items keep one line
   with the small phones' type — 11px, no tracking, 285px in all — each still
   44px tall (QA 18.11 D2). */
@media (min-width: 700px) and (max-width: 1023px) {
	.product-gallery__actions {
		column-gap: 12px;
	}

	.product-gallery__action {
		font-size: 11px;
		letter-spacing: 0;
	}
}

.product-gallery__status {
	margin: 0;
	font-family: var(--font-ui);
	font-size: 12px;
	color: var(--color-text);
}

.product-gallery__status:empty {
	display: none;
}

/* --------------------------------------------------------------------------
   Purchase column
   -------------------------------------------------------------------------- */

/* Trophy, then the badges, on one baseline. Scoped through the parent
   because reset.css targets ul[role='list']. */
.product-summary__accolades {
	display: flex;
	align-items: flex-start;
	gap: var(--space-sm);
	margin: 0 0 var(--space-sm);
}

/* Centred on the FIRST badge row (26px: 12px line, 12px padding, 2px border):
   with the awards (02.12.2026) the badges can wrap to several rows, and the
   trophy stays beside the first, as it stood beside the single row before. */
.product-summary__accolades-icon {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	min-height: 26px;
	color: var(--color-text);
}

.product-summary .product-summary__badges {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-xs);
	margin: 0;
	padding: 0;
	list-style: none;
}

.product-summary__badge {
	padding: 6px 12px;
	border: 1px solid color-mix(in srgb, var(--color-text) 60%, transparent);
	border-radius: var(--radius-button);
	font-family: var(--font-body);
	font-weight: 700;
	font-size: 10px;
	line-height: 12px;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--color-ink);
}

/* 25px on a tablet, 33 at 1280, 36 from 1440. Long names wrap between
   words; one unbreakable run may break anywhere rather than overflow. */
.product-summary__title {
	margin: 0 0 var(--space-sm);
	font-family: var(--font-heading);
	font-style: normal;
	font-weight: 400;
	font-size: clamp(24px, calc(14px + 1.5vw), 36px);
	line-height: 1.22;
	color: var(--color-ink);
	overflow-wrap: break-word;
	text-wrap: pretty;
}

/* The price, then "33cl · 3,64 €/L", then the deposit on its own line
   (usertest 31.10, finding 3). */
.product-summary__price-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: var(--space-xs) var(--space-sm);
	margin-bottom: var(--space-sm);
}

.product-summary__price-row:has(+ .product-summary__discount) {
	margin-bottom: var(--space-xs);
}

/* Ink unless the product is really reduced; .is-sale comes from PHP. */
.product-summary__price {
	margin: 0;
	font-family: var(--font-meta);
	font-weight: 600;
	font-size: clamp(26px, calc(18px + 0.9vw), 32px);
	line-height: 1.1;
	color: var(--color-ink);
}

.product-summary__price.is-sale {
	color: var(--color-primary-dark);
}

/* An alcoholic product on sale prints only the price it is sold at (no
   <del>, AS § 43(2)); a non-alcoholic one may show the old price. */
.product-summary__price del {
	margin-inline-end: var(--space-xs);
	font-size: 18px;
	font-weight: 500;
	color: var(--color-text);
	opacity: 0.6;
}

.product-summary__price ins {
	text-decoration: none;
}

.product-summary__per-litre {
	margin: 0;
	font-family: var(--font-meta);
	font-size: 14px;
	color: var(--color-text-secondary);
	white-space: nowrap;
}

.product-summary__deposit {
	flex-basis: 100%;
	margin: -4px 0 0;
	font-family: var(--font-meta);
	font-size: 14px;
	line-height: 1.4;
	color: var(--color-text);
}

.product-summary__deposit .woocommerce-Price-amount {
	white-space: nowrap;
}

/* "Hind on kuvatud Sulle juba -30% soodushinnaga." and the member note. */
.product-summary__discount {
	margin: 0 0 var(--space-sm);
	font-family: var(--font-heading);
	font-style: italic;
	font-size: 14px;
	letter-spacing: 0.04em;
	color: var(--color-text);
}

.product-summary__discount strong {
	font-weight: 700;
	color: var(--color-primary);
}

/* The buy row: "Laos", quantity, "Lisa korvi". */
.product-summary__cart {
	margin-block-start: var(--space-sm);
}

/* WooCommerce's olive "Laos" is 3.25:1 on the cream page; the body colour. */
body .product-detail .product-summary__cart .stock {
	margin: 0 0 var(--space-xs);
	font-family: var(--font-ui);
	font-size: 14px;
	line-height: 20px;
}

body .product-detail .product-summary__cart .stock.in-stock {
	color: var(--color-text);
}

.product-summary__cart form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 12px var(--space-sm);
	margin: 0;
}

/* WooCommerce clears this form with ::before/::after; in a flex container
   those become items and push the button off its line. */
.woocommerce div.product .product-summary__cart form.cart::before,
.woocommerce div.product .product-summary__cart form.cart::after,
.product-summary__cart form.cart::before,
.product-summary__cart form.cart::after {
	content: none;
}

.woocommerce div.product .product-summary__cart form.cart .quantity,
.product-summary__cart .quantity {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-xs);
	width: 116px;
	min-height: 48px;
	margin: 0;
	padding-inline: 14px;
	border: 1px solid var(--color-surface-mid);
	border-radius: var(--radius-button);
	background-color: var(--color-surface-light);
}

.product-summary__cart .quantity input.qty {
	width: 100%;
	min-width: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	font-family: var(--font-meta);
	font-weight: 700;
	font-size: 16px;
	text-align: center;
	color: var(--color-ink);
	appearance: textfield;
}

.product-summary__cart .quantity input.qty::-webkit-outer-spin-button,
.product-summary__cart .quantity input.qty::-webkit-inner-spin-button {
	appearance: none;
	margin: 0;
}

.product-quantity__step {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: var(--radius-sm);
	background: none;
	font-family: var(--font-ui);
	font-size: 20px;
	line-height: 1;
	color: var(--color-ink);
	cursor: pointer;
	transition: color var(--transition-base);
}

.product-quantity__step:hover:not(:disabled) {
	color: var(--color-primary);
}

.product-quantity__step:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

/* A button of its own size beside the quantity (260px), shrinking before
   it wraps. */
.woocommerce .product-summary__cart button.single_add_to_cart_button {
	flex: 0 1 260px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-xs);
	min-width: 0;
	min-height: 48px;
	padding: 12px var(--space-md);
	border: 1px solid var(--color-primary);
	border-radius: var(--radius-button);
	background-color: var(--color-primary);
	color: var(--color-on-dark);
	font-family: var(--font-ui);
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color var(--transition-base);
}

.product-summary__cart button.single_add_to_cart_button::before {
	content: '';
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	background-color: currentColor;
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='black' d='M6 20C5.45 20 4.97917 19.8042 4.5875 19.4125C4.19583 19.0208 4 18.55 4 18C4 17.45 4.19583 16.9792 4.5875 16.5875C4.97917 16.1958 5.45 16 6 16C6.55 16 7.02083 16.1958 7.4125 16.5875C7.80417 16.9792 8 17.45 8 18C8 18.55 7.80417 19.0208 7.4125 19.4125C7.02083 19.8042 6.55 20 6 20ZM16 20C15.45 20 14.9792 19.8042 14.5875 19.4125C14.1958 19.0208 14 18.55 14 18C14 17.45 14.1958 16.9792 14.5875 16.5875C14.9792 16.1958 15.45 16 16 16C16.55 16 17.0208 16.1958 17.4125 16.5875C17.8042 16.9792 18 17.45 18 18C18 18.55 17.8042 19.0208 17.4125 19.4125C17.0208 19.8042 16.55 20 16 20ZM5.15 4L7.55 9H14.55L17.3 4H5.15ZM4.2 2H18.95C19.3333 2 19.625 2.17083 19.825 2.5125C20.025 2.85417 20.0333 3.2 19.85 3.55L16.3 9.95C16.1167 10.2833 15.8708 10.5417 15.5625 10.725C15.2542 10.9083 14.9167 11 14.55 11H7.1L6 13H18V15H6C5.25 15 4.68333 14.6708 4.3 14.0125C3.91667 13.3542 3.9 12.7 4.25 12.05L5.6 9.6L2 2H0V0H3.25L4.2 2Z'/%3E%3C/svg%3E");
	mask-repeat: no-repeat;
	mask-size: contain;
	mask-position: center;
}

.product-summary__cart button.single_add_to_cart_button:hover:not(:disabled) {
	background-color: var(--color-primary-dark);
	border-color: var(--color-primary-dark);
}

/* A variable product's button is not really disabled until a choice is
   made: dimmed, still the brand colour. */
.woocommerce .product-summary__cart button.single_add_to_cart_button:disabled,
.woocommerce .product-summary__cart button.single_add_to_cart_button.disabled {
	background-color: var(--color-primary);
	border-color: var(--color-primary);
	color: var(--color-on-dark);
	opacity: 0.45;
	cursor: not-allowed;
}

/* Variations table, kept inside the design rather than hidden. */
.product-summary__cart .variations {
	width: 100%;
	margin-bottom: var(--space-sm);
	border-collapse: collapse;
}

.product-summary__cart .variations th,
.product-summary__cart .variations td {
	padding: 0 0 var(--space-xs);
	text-align: start;
	vertical-align: middle;
}

.product-summary__cart .variations label {
	margin: 0;
	font-family: var(--font-ui);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-text);
}

.product-summary__cart .woocommerce-variation-price {
	margin-bottom: var(--space-xs);
	font-family: var(--font-meta);
	font-weight: 600;
	font-size: 20px;
	color: var(--color-primary-dark);
}

.product-summary__cart .variations select {
	width: 100%;
	max-width: 320px;
}

.product-summary__cart .reset_variations {
	font-family: var(--font-ui);
	font-size: 12px;
	color: var(--color-primary);
}

.product-summary__cart .stock.out-of-stock,
.product-detail .stock.out-of-stock {
	margin: 0;
	font-family: var(--font-ui);
	font-weight: 600;
	font-size: 14px;
	color: var(--color-primary-dark);
}

/* --------------------------------------------------------------------------
   Text: "Toote kirjeldus", the food text, the producer's story
   -------------------------------------------------------------------------- */

.product-description {
	margin-block-start: var(--space-md);
	padding-block-start: var(--space-md);
	border-block-start: var(--pdp-rule);
	/* The text grows downward from where it starts (QA 04.11, D1). */
	overflow-anchor: none;
}

.product-description__title,
.product-band__title {
	margin: 0 0 var(--space-xs);
	font-family: var(--font-heading);
	font-style: normal;
	font-weight: 400;
	font-size: 20px;
	line-height: 1.3;
	color: var(--color-ink);
}

.product-description__body,
.product-band__body {
	/* No measure of its own: the text runs to the information column's inner
	   edge at every width (owner 18.11 — the 72ch, then 52em cap stopped it
	   at 720 / 878px on a 1101px column at 1920). The column itself is the
	   measure; the size grows with it so a wide line stays readable. */
	font-size: var(--pdp-text);
}

/* Type only — no margin here. A "margin: 0" on these (one class and an
   element) outranked the rhythm rule below and ran a description's
   paragraphs together (17.11, again 18.11 QA D1). */
.product-description__body p,
.product-description__body li,
.product-band__body p,
.product-producer__story p {
	font-family: var(--font-ui);
	font-size: var(--pdp-text);
	line-height: 1.6;
	color: var(--color-ink);
	overflow-wrap: break-word;
}

/* Paragraphs and lists 14px apart, the compact page's rhythm (17.11).
   Qualified by the parent so each rule outranks a plain "p" reset. */
.product-detail .product-description__body > *,
.product-detail .product-band__body > p,
.product-detail .product-producer__story > * {
	margin-block: 0;
	margin-inline: 0;
}

.product-detail .product-description__body > * + *,
.product-detail .product-band__body > p + p,
.product-detail .product-producer__story > * + * {
	margin-block-start: 0.875em;
}

.product-detail .product-description__body ul,
.product-detail .product-description__body ol {
	padding-inline-start: 1.25em;
}

.product-description__body li + li {
	margin-block-start: 4px;
}

/* Tables or images an editor pasted in never push the page sideways. */
.product-description__body img,
.product-description__body table {
	max-width: 100%;
	height: auto;
}

/*
 * Folded: single-product.js sets the height at the foot of a whole line;
 * the last line fades a little, so the text reads as continuing.
 */
/* clip, not just hidden: a hidden box can still be scrolled inside (Tab to
   a link, find-in-page) and would show a middle slice of the text. */
.product-description.is-collapsed .product-description__body {
	overflow: hidden;
	overflow: clip;
	mask-image: linear-gradient(to bottom, #000 calc(100% - 1.6em), rgba(0, 0, 0, 0.35));
}

/* "Näita rohkem" / "Näita vähem": the theme's link voice, a 44px target. */
.product-more {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin-block-start: var(--space-xs);
	padding: 0;
	border: 0;
	background: none;
	font-family: var(--font-ui);
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: underline;
	text-underline-offset: 4px;
	color: var(--color-primary);
	cursor: pointer;
}

.product-more[hidden] {
	display: none;
}

.product-more:hover {
	color: var(--color-primary-dark);
}

.product-more:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   The lower sections' one system (client 19.11.2026: "valget osa liiga
   palju", the producer's eyebrow, name and line "üksteise otsas")
   --------------------------------------------------------------------------
   Facts, Toidusoovitus and the producer share one vertical rhythm: the same
   space from each rule to the first ink of the section below it — 28px on
   phones and tablets, 32px at 1440, 38px at 1920 (it was 26 / 50 / 50px on
   18.11 at 1440, 48px bands on phones). Side-heads (the band title, the
   producer's eyebrow) stand on the first baseline of the text beside them;
   headings and text keep the picture's and the information column's left
   edges. The producer is one rose panel (the 04.11 surface, now inside the
   page rail), its tracks the page's own. */

.product-detail {
	--pdp-band-pad: clamp(28px, calc(14px + 1.25vw), 40px);
}

/* --------------------------------------------------------------------------
   Facts — one block of icon, label, value; the four key facts first
   -------------------------------------------------------------------------- */

.product-facts {
	--facts-gap: clamp(24px, 2.5vw, 40px);
	/* An item's own top padding; the list adds the rest of the band rhythm. */
	--facts-item-pad: 18px;

	margin-block-start: var(--space-xl);
	border-block: var(--pdp-rule);
}

/*
 * Beside the picture (short or no description, avallone_product_facts_beside()):
 * in the information column under the description, where that column holds
 * six facts a row (1600px and wider); narrower, full width under both
 * columns as usual — at 1180–1280 four or five a row made the right column
 * 230–260px longer than the picture, the same gap on the other side. The picture spans both rows, and any
 * height it has beyond them goes to the last row, so the facts follow the
 * text directly.
 */
.product-detail__top--facts {
	grid-template-rows: auto 1fr;
}

.product-detail__top--facts > .product-facts {
	grid-column: 1 / -1;
	align-self: start;
}

/* From 1600 only: there six fit a row at 132px or more. At 1366-1536 five a
   row put the eleventh fact on a third row and ran the column 191-276px past
   the picture (QA polish D3b) — worse than the white space it fills. */
@media (min-width: 1600px) {
	.product-detail__top--facts > .product-gallery {
		grid-row: 1 / span 2;
	}

	/* Up to six facts a row in the information column (112px or more each,
	   16px apart): eleven facts take two rows, not three. */
	.product-detail__top--facts > .product-facts {
		--facts-gap: var(--space-sm);

		grid-column: 2;
		margin-block-start: var(--space-md);
	}

	.product-detail__top--facts .product-facts__list {
		grid-template-columns: repeat(auto-fill, minmax(max(132px, calc((100% - 5 * var(--facts-gap)) / 6)), 1fr));
	}

	/* Beside the picture: six a row, 137px at 1600 to 170px at 1920 — never
	   the 112px columns that wrapped values onto four lines (QA polish D3).
	   A little less air than full width keeps the column short: it ends
	   within -61…+57px of the picture's foot (measured 1600/1680/1920). */
	.product-detail__top--facts .product-facts__item {
		padding-block: 14px;
	}

	/* Beside the picture the list keeps its 18.11 8px: the band rhythm below
	   would lengthen the column by 24px against the picture's foot. */
	.product-detail__top--facts .product-facts__list {
		padding-block: var(--space-xs);
	}
}

/*
 * As many columns as fit at 132px or more, never more than six. Each fact
 * spans two rows of a shared grid (subgrid), so the values of one row line
 * up even where a label wraps ("Alkoholi-sisaldus").
 */
.product-facts__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(max(150px, calc((100% - 5 * var(--facts-gap)) / 6)), 1fr));
	column-gap: var(--facts-gap);
	row-gap: var(--space-xs);
	margin: 0;
	/* With the item's padding: the band rhythm from each rule to the icons. */
	padding-block: calc(var(--pdp-band-pad) - var(--facts-item-pad));
}

.product-facts__item {
	display: grid;
	grid-row: span 2;
	grid-template-rows: subgrid;
	row-gap: 6px;
	min-width: 0;
	padding-block: var(--facts-item-pad);
}

/* Icon at the top of the row, label at its foot, on its value. */
.product-facts__label {
	display: flex;
	flex-direction: column;
	min-width: 0;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
	margin: 0;
	font-family: var(--font-heading);
	font-style: normal;
	font-size: 14px;
	line-height: 1.35;
	letter-spacing: 0.04em;
	color: color-mix(in srgb, var(--color-text) 80%, transparent);
	hyphens: manual;
}

.product-facts__icon {
	display: flex;
	color: var(--color-text);
	opacity: 0.7;
}

/* Long values ("Kaitstud päritolunimetusega vein", several EANs) wrap
   between words; a single word too long for its column is hyphenated (the
   page is lang="et"), and only a run with no break point breaks anywhere. */
.product-facts__value {
	margin: 0;
	font-family: var(--font-heading);
	font-style: normal;
	font-weight: 700;
	font-size: 16px;
	line-height: 1.4;
	color: var(--color-primary);
	/* min-width 0: a grid item's automatic minimum is its longest word, which
	   let "toatemperatuuril." run 36px out of the column in WebKit/Firefox
	   (QA polish D2); now such a word is hyphenated or, failing that, broken. */
	min-width: 0;
	overflow-wrap: break-word;
	hyphens: auto;
	text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Bands under the columns: the producer, then Toidusoovitus (02.12)
   -------------------------------------------------------------------------- */

/* The heading or the producer's identity on the picture's track, the text on
   the information column's. Both stand on one first baseline: the band
   title, or the producer's eyebrow, on the text's first line. */
.product-band {
	display: grid;
	grid-template-columns: var(--pdp-media) minmax(0, 1fr);
	column-gap: var(--pdp-gap);
	align-items: baseline;
	padding-block: var(--pdp-band-pad);
	border-block-end: var(--pdp-rule);
}

.product-band__title {
	margin: 0;
	font-size: 22px;
}

/* Every text of the page in one voice: the size, line height (1.6), paragraph
   gap (0.875em) and colour of "Toote kirjeldus" (client 19.11: "ühesuguse
   kirjastiili, vahede"); the bands had 1.7 since 18.11. */
.product-band__body p,
.product-producer__story p {
	line-height: 1.6;
}

.product-band__body {
	min-width: 0;
}

/*
 * The producer: one rose panel, a clearly separate block that stays inside
 * the page rail (not the full-width strip of 04.11). It reaches
 * --producer-bleed into the page gutter on each side and is padded by the
 * same amount, so its logo and text keep the picture's and the information
 * column's edges and the text still runs to the column's edge (owner 18.11).
 * The panel stands one rhythm below the rule or the text above it.
 */
.product-producer {
	--producer-bleed: clamp(16px, 2.2vw, 32px);

	margin-block-start: var(--pdp-band-pad);
	margin-inline: calc(var(--producer-bleed) * -1);
	padding: var(--pdp-band-pad) var(--producer-bleed);
	border: 0;
	border-radius: var(--radius-lg);
	background-color: var(--color-surface-rose);
	/* The opening and the rest change height in place; nothing jumps. */
	overflow-anchor: none;
}

/* Eyebrow, then the logo or name, then the line — each with its own room
   (16px, 12px), the eyebrow on the story's first baseline. */
.product-producer__intro {
	min-width: 0;
}

.product-producer__eyebrow {
	margin: 0 0 var(--space-sm);
	font-family: var(--font-ui);
	font-weight: 700;
	font-size: 12px;
	line-height: 16px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--color-primary);
}

.product-producer__name {
	margin: 0;
	font-family: var(--font-heading);
	font-style: normal;
	font-weight: 400;
	font-size: clamp(22px, calc(16px + 0.6vw), 26px);
	line-height: 1.25;
	color: var(--color-ink);
	overflow-wrap: break-word;
}

.product-producer__tagline {
	margin: 12px 0 0;
	font-family: var(--font-heading);
	font-style: italic;
	font-weight: 400;
	font-size: 17px;
	line-height: 1.35;
	color: var(--color-text);
}

/*
 * The logo as the heading (client 18.11.2026, Merlin): one logo area for every
 * producer, the brand page's method (inc/brand-archive.php, brand.css). The
 * mark is the logo's ink box (--r = its width / height); its width is the
 * smallest of equal area (--producer-logo-area², so a wide wordmark and a
 * round crest weigh the same), the height cap, the width cap, the ink's own
 * pixel width (never upscaled) and the column. The image inside is the whole
 * file, scaled and shifted so its ink fills the mark (--iw/--ix/--iy from
 * producer.php). Sizes match avallone_product_producer_logo_sizes().
 */
.product-producer__name--logo {
	--producer-logo-area: clamp(88px, 2vw + 60px, 112px);
	--producer-logo-hmax: var(--producer-logo-area);
	--producer-logo-wmax: calc(var(--producer-logo-area) * 2.58);

	margin-block-start: 0;
	line-height: 0;
}

.product-producer__mark {
	position: relative;
	display: block;
	width: min(
		calc(var(--producer-logo-area) * var(--rs)),
		calc(var(--producer-logo-hmax) * var(--r)),
		var(--producer-logo-wmax),
		var(--nw),
		100%
	);
	aspect-ratio: var(--r);
	overflow: hidden;
}

/*
 * Through the mark (0,2,0): WooCommerce's `.woocommerce-page img
 * { max-width: 100% }` (0,1,1) would hold the image to the mark's width and
 * push the ink out of the clip (the brand page's QA 18.11 D1). A logo on a
 * white plate multiplies into the page colour.
 */
.product-producer__mark .product-producer__logo-image {
	position: absolute;
	top: var(--iy);
	left: var(--ix);
	width: var(--iw);
	max-width: none;
	height: auto;
	mix-blend-mode: multiply;
}

.product-producer__text {
	min-width: 0;
}

.product-producer__toggle {
	display: none;
}

.product-producer.is-collapsible .product-producer__toggle {
	display: inline-flex;
}

.product-producer.is-collapsed [data-producer-more] {
	display: none;
}

@media (prefers-reduced-motion: no-preference) {
	.product-producer.is-entering [data-producer-more] {
		animation: product-about-in 220ms ease-out;
	}
}

@keyframes product-about-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

/* --------------------------------------------------------------------------
   Sarnased tooted — the catalogue's own card (catalog.css); only the grid
   and a few card sizes for this grid are set here.
   -------------------------------------------------------------------------- */

.product-section {
	padding-block: var(--space-lg) 0;
}

.product-section__title {
	margin: 0;
	font-family: var(--font-heading);
	font-style: normal;
	font-weight: 400;
	font-size: clamp(22px, calc(16px + 0.75vw), 28px);
	line-height: 1.25;
	color: var(--color-ink);
}

.product-related__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--space-md);
	margin-bottom: var(--space-md);
	padding-bottom: var(--space-sm);
	border-bottom: 1px solid var(--color-border);
}

.product-related__more {
	flex-shrink: 0;
	font-family: var(--font-ui);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-text);
	text-decoration: none;
	transition: color var(--transition-base);
}

.product-related__more:hover {
	color: var(--color-primary);
}

/* The row holds four products, four across wherever there are two columns
   (three across left the fourth alone on a row, two by two made tablet cards
   330px wide); on a tablet the card's inside is the compact one phones use
   (below). From 1280 the card keeps the catalogue's 310px and the row
   spreads. */
.product-related__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--space-md) var(--space-sm);
}

.product-related__grid .catalog-card__title {
	-webkit-line-clamp: 3;
	line-clamp: 3;
}

@media (min-width: 1280px) {
	.product-related__grid {
		grid-template-columns: repeat(4, minmax(0, 310px));
		justify-content: space-between;
	}
}

@media (min-width: 1180px) and (max-width: 1599px) {
	.product-related__grid .catalog-card__title {
		font-size: 20px;
		line-height: 1.25;
	}

	.product-related__grid .catalog-card__visual {
		margin-bottom: var(--space-sm);
	}

	.product-related__grid .catalog-card__image,
	.product-related__grid .catalog-card__media:not(:has(.catalog-card__image))::before {
		aspect-ratio: 4 / 5;
	}
}

/* --------------------------------------------------------------------------
   Buy bar — phones and short touch screens only: under 700px wide, or a
   touch screen under 501px tall (a landscape phone, where "Lisa korvi" sits
   under the fold beside a two-column page; lead 18.11 round 3). The same
   query as barQuery in single-product.js. display:none everywhere else,
   whatever its hidden attribute says, so a desktop window — however short —
   never shows it, styled or not (client 18.11.2026, image15).
   -------------------------------------------------------------------------- */

.product-buybar,
.product-buybar[hidden] {
	display: none;
}

@media (max-width: 699px), (max-height: 500px) and (pointer: coarse) {
	.product-buybar {
		position: fixed;
		inset-inline: 0;
		inset-block-end: 0;
		z-index: 90;
		display: flex;
		align-items: center;
		gap: var(--space-sm);
		padding: 10px var(--page-gutter) calc(10px + env(safe-area-inset-bottom, 0px));
		border-block-start: var(--pdp-rule);
		background-color: var(--color-cream);
		box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
		transform: translateY(100%);
		transition: transform var(--transition-base);
	}

	.product-buybar[hidden] {
		display: none;
	}

	.product-buybar.is-visible {
		transform: translateY(0);
	}

	.product-buybar__info {
		flex: 1 1 auto;
		min-width: 0;
	}

	.product-buybar__name {
		margin: 0;
		overflow: hidden;
		font-family: var(--font-ui);
		font-weight: 600;
		font-size: 14px;
		line-height: 20px;
		color: var(--color-ink);
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.product-buybar__price {
		margin: 0;
		font-family: var(--font-meta);
		font-weight: 700;
		font-size: 18px;
		line-height: 24px;
		color: var(--color-ink);
	}

	.product-buybar__price del {
		margin-inline-end: 6px;
		font-size: 12px;
		font-weight: 500;
		opacity: 0.7;
	}

	.product-buybar__button {
		display: inline-flex;
		align-items: center;
		gap: var(--space-xs);
		flex-shrink: 0;
		min-height: 48px;
		padding: 0 20px;
		border: 0;
		border-radius: var(--radius-button);
		background-color: var(--color-primary);
		color: var(--color-on-dark-pure);
		font-family: var(--font-ui);
		font-weight: 600;
		font-size: 13px;
		letter-spacing: 0.08em;
		text-transform: uppercase;
		cursor: pointer;
	}

	body.has-product-buybar {
		padding-block-end: 76px;
	}

	/* The cookie-preferences button steps above the bar while it is up. */
	body.has-product-buybar .sharks-cookie-floating-wrap {
		bottom: calc(88px + env(safe-area-inset-bottom, 0px));
		transition: bottom var(--transition-base);
	}
}

/* ==========================================================================
   PHONES — one column, by width only (under 700px; lead 18.11.2026). A short
   window 700px or wider — a landscape phone, a small desktop window — keeps
   the two columns, with the picture held by the window height (--pdp-media).
   ========================================================================== */

@media (max-width: 699px) {

	/* "Avaleht ›" and the product's own name go: the trail is the category. */
	.single-product .woocommerce-breadcrumb__item:first-child,
	.single-product .woocommerce-breadcrumb__item:first-child + .woocommerce-breadcrumb__sep,
	.single-product .woocommerce-breadcrumb__item:last-child,
	.single-product .woocommerce-breadcrumb__sep:has(+ .woocommerce-breadcrumb__item:last-child) {
		display: none;
	}

	.woocommerce .woocommerce-breadcrumb,
	.woocommerce-breadcrumb {
		margin-block: var(--space-xs);
	}

	.product-detail__top,
	.product-band {
		grid-template-columns: minmax(0, 1fr);
	}

	.product-detail__top {
		row-gap: 12px;
	}

	/*
	 * A landscape plate, so the name, price and button reach the first
	 * screen (usertest 31.10, finding 15). On a short screen it is also held
	 * to the room left by the header (~150px) and the name-to-button block
	 * (~370px): 220px at 360x740, the 160px floor at 375x667 and below. The
	 * photograph stays contained, so a lower plate only makes it smaller.
	 */
	.product-gallery__stage {
		aspect-ratio: 5 / 4;
		max-height: max(160px, calc(100vh - 520px));
		max-height: max(160px, calc(100svh - 520px));
	}

	.product-gallery__utils {
		padding-block: var(--space-xs) 4px;
		border-block-end: var(--pdp-rule);
	}

	/* The three items on one line on every phone. They measure about 286px
	   at 12px (261px at the 11px under 360) and engines differ by a few px
	   (Firefox at 360 needed 312 of 312 with a 12px gap, QA row 68), so the
	   gap gives way fluidly: 6px at 320–354, 7.5px at 360, 15px at 390,
	   16px from 394 — at least 10px of slack everywhere. */
	.product-gallery__actions {
		column-gap: clamp(6px, calc((100vw - 330px) / 4), 16px);
		margin-block-start: 0;
	}

	.product-gallery__action {
		letter-spacing: 0;
	}

	.product-summary__accolades {
		margin-block-end: var(--space-xs);
	}

	.product-summary__title {
		margin-block-end: var(--space-xs);
		line-height: 1.2;
	}

	.product-summary__price-row {
		margin-block-end: var(--space-xs);
	}

	.product-summary__cart {
		margin-block-start: 12px;
	}

	/* Quantity and button share one line; the button takes the rest. */
	.product-summary__cart form.cart {
		flex-wrap: nowrap;
		column-gap: 12px;
	}

	.woocommerce .product-summary__cart button.single_add_to_cart_button {
		flex: 1 1 auto;
	}

	.product-description {
		margin-block-start: var(--space-md);
		padding-block-start: var(--space-sm);
	}

	.product-facts {
		--facts-gap: var(--space-sm);

		margin-block-start: var(--space-md);
	}

	/* Two a row on every phone, 320 included (QA polish D1: 150px minimum
	   columns left one column under ~364px). */
	.product-facts__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.product-facts {
		--facts-item-pad: 12px;
	}

	/* One column: the heading over its text, 12px apart; the band rhythm
	   (28px) above and below instead of 48px. */
	.product-band {
		row-gap: 12px;
	}

	/* The panel runs edge to edge on a phone; the text keeps the gutter. */
	.product-producer {
		--producer-bleed: var(--page-gutter-wide);

		row-gap: 20px;
		border-radius: 0;
	}

	/* "Sarnased tooted": a sideways row, two cards and a peek of the third. */
	.product-related__grid {
		--related-peek: 32px;

		display: flex;
		gap: var(--space-sm);
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: var(--page-gutter);
		margin-inline: calc(var(--page-gutter) * -1);
		padding-inline: var(--page-gutter);
		padding-block-end: var(--space-xs);
		scrollbar-width: none;
	}

	.product-related__grid::-webkit-scrollbar {
		display: none;
	}

	.product-related__grid > * {
		flex: 0 0 calc((100% + var(--page-gutter) - 2 * var(--space-sm) - var(--related-peek)) / 2);
		min-width: 0;
		scroll-snap-align: start;
	}
}

/* Narrow phones (320–359): the row under the picture and the buy row keep
   one line each without crowding. */
@media (max-width: 359px) {
	.product-gallery__action {
		gap: 4px;
		font-size: 11px;
	}

	.woocommerce .product-summary__cart button.single_add_to_cart_button {
		padding-inline: 12px;
	}

	.product-related__grid {
		--related-peek: 24px;
	}
}

/* Cards under ~210px wide (phones, tablets): the card's inside at that
   width — price over a full-width "Lisa", the region allowed to wrap. */
@media (max-width: 1023px) {
	.product-related__grid .catalog-card__visual {
		margin-bottom: 12px;
	}

	.product-related__grid .card-wishlist {
		inset-block-start: var(--space-xs);
		inset-inline-end: var(--space-xs);
	}

	.product-related__grid .catalog-card__flag {
		inset-block-start: var(--space-xs);
		inset-inline-start: var(--space-xs);
	}

	.product-related__grid .catalog-card__region {
		font-size: 11px;
		letter-spacing: 0.08em;
		overflow-wrap: anywhere;
	}

	.product-related__grid .catalog-card__title {
		-webkit-line-clamp: 3;
		line-clamp: 3;
		min-height: calc(2 * 1.25em);
		margin-bottom: 12px;
		font-size: 16px;
		overflow-wrap: anywhere;
	}

	.product-related__grid .catalog-card__footer {
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		gap: 12px;
	}

	.product-related__grid .catalog-card__price {
		flex: 0 0 auto;
		column-gap: 6px;
		row-gap: 2px;
	}

	.product-related__grid .catalog-card__volume {
		flex-basis: 100%;
		font-size: 12px;
		line-height: 16px;
	}

	.product-related__grid .catalog-card__deposit {
		margin-top: 0;
		font-size: 12px;
		line-height: 16px;
	}

	.product-related__grid .catalog-card__cart {
		width: 100%;
		min-height: 44px;
		padding-inline: 8px;
		font-size: 13px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.product-gallery__frame.has-hover-image .product-gallery__image,
	.product-gallery__frame.has-hover-image .product-gallery__hover,
	.product-buybar {
		transition: none;
	}
}
