/* =============================================================================
   Product single — per-template stylesheet.

   Enqueued only on is_singular('wwh_product'). Mirrors the editorial design
   vocabulary used by single-wwh_event (hero strip → 2-col body with sticky
   obsidian rail → facts panel → cream-2 maker strip → obsidian related band).

   All values via theme.json tokens; no raw hex / px / rem outside the
   THEME_STANDARDS snap-table.
   ========================================================================= */

/* -----------------------------------------------------------------------------
   Hero — 86vh photographic cover mirroring .wwh-event-hero exactly. Featured
   image is the background, scrimmed; a glass price card sits on the left and
   a copy column (eyebrow / title / excerpt) on the right.
   ----------------------------------------------------------------------------- */

body.wwh-magazine .wwh-single--product .wwh-product-hero {
	position: relative;
	min-height: 86vh;
	color: #fff;
	padding: clamp(7rem, 12vh, 9rem) clamp(1.5rem, 5vw, 3.5rem) clamp(3rem, 6vh, 4rem);
	display: flex;
	align-items: flex-end;
	overflow: hidden;
}

/* Same scrim gradient as the event hero — softer on top, deeper at the
   bottom so the glass card on the left sits over a lighter zone while the
   headline sits over deeper colour. */
body.wwh-magazine .wwh-single--product .wwh-product-hero .wp-block-cover__background,
body.wwh-magazine .wwh-single--product .wwh-product-hero::after {
	background: linear-gradient(180deg,
		rgba(10, 8, 6, 0.35) 0%,
		rgba(10, 8, 6, 0.2) 35%,
		rgba(10, 8, 6, 0.85) 100%);
}

body.wwh-magazine .wwh-single--product .wwh-product-hero .wp-block-cover__inner-container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: end;
}

/* Glass price card — mirrors .wwh-event-datestamp exactly. */
body.wwh-magazine .wwh-product-hero-price {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: var(--wp--preset--spacing--6) var(--wp--preset--spacing--8);
	background: rgba(255, 255, 255, 0.07);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border: 1px solid rgba(255, 255, 255, 0.2);
	min-width: 180px;
}

body.wwh-magazine .wwh-product-hero-price__lab {
	font-family: var(--wp--preset--font-family--ui);
	font-size: var(--wp--preset--font-size--cap);
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.7);
	margin: 0;
}

body.wwh-magazine .wwh-product-hero-price__num {
	font-family: var(--wp--preset--font-family--display);
	font-style: italic;
	font-weight: 400;
	font-size: clamp(3rem, 5.5vw, 4.5rem);
	line-height: 0.95;
	letter-spacing: -0.02em;
	margin: var(--wp--preset--spacing--2) 0 0;
	color: #fff;
}

body.wwh-magazine .wwh-product-hero-price__sub {
	font-family: var(--wp--preset--font-family--body);
	font-style: italic;
	font-size: var(--wp--preset--font-size--caption);
	color: rgba(255, 255, 255, 0.7);
	margin: var(--wp--preset--spacing--2) 0 0;
	padding-top: var(--wp--preset--spacing--2);
	border-top: 1px solid rgba(255, 255, 255, 0.18);
	width: 100%;
	text-align: center;
}

/* Hero copy column (right of glass card). */
body.wwh-magazine .wwh-product-hero__copy {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--6);
}

body.wwh-magazine .wwh-product-hero-eyebrow {
	font-family: var(--wp--preset--font-family--ui);
	font-size: var(--wp--preset--font-size--cap);
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.75);
	margin: 0;
}

body.wwh-magazine .wwh-product-hero__title {
	font-family: var(--wp--preset--font-family--display);
	font-style: italic;
	font-weight: 400;
	font-size: var(--wp--preset--font-size--display-hero);
	line-height: 0.98;
	letter-spacing: -0.015em;
	text-wrap: balance;
	color: #fff;
	margin: 0;
}

body.wwh-magazine .wwh-product-hero__sub {
	font-family: var(--wp--preset--font-family--body);
	font-style: italic;
	font-size: var(--wp--preset--font-size--lede);
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.88);
	max-width: 48ch;
	margin: 0;
}

/* -----------------------------------------------------------------------------
   Buying section — gallery left, sticky obsidian rail right.
   ----------------------------------------------------------------------------- */

body.wwh-magazine .wwh-product-buy {
	max-width: 1280px;
	margin: 0 auto;
	padding: clamp(2rem, 5vh, 4rem) clamp(1.5rem, 5vw, 3.5rem);
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(360px, 1fr);
	gap: clamp(2rem, 5vw, 4rem);
	align-items: start;
}

body.wwh-magazine .wwh-product-buy__media {
	min-width: 0;
}

body.wwh-magazine .wwh-product-buy__rail {
	position: sticky;
	top: calc(var(--wwh-header-height, 72px) + var(--wp--preset--spacing--6));
	align-self: start;
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--4);
}

/* Obsidian panel that wraps the rail summary + buy + enquire blocks. */
body.wwh-magazine .wwh-product-rail-panel {
	background: var(--wp--preset--color--warm-obsidian);
	color: #fff;
	padding: var(--wp--preset--spacing--8);
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--4);
}

/* -----------------------------------------------------------------------------
   product-summary block — refactored to render inside the obsidian panel.
   ----------------------------------------------------------------------------- */

body.wwh-magazine .wwh-product-rail-panel .wwh-product-summary {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--4);
	color: #fff;
}

body.wwh-magazine .wwh-product-rail-panel .wwh-product-summary__maker {
	font-family: var(--wp--preset--font-family--ui);
	font-size: var(--wp--preset--font-size--cap);
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.65);
	margin: 0;
}
body.wwh-magazine .wwh-product-rail-panel .wwh-product-summary__maker a {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}
body.wwh-magazine .wwh-product-rail-panel .wwh-product-summary__maker a:hover {
	border-bottom-color: #fff;
}

body.wwh-magazine .wwh-product-rail-panel .wwh-product-summary__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--4);
	flex-wrap: wrap;
}

body.wwh-magazine .wwh-product-rail-panel .wwh-product-summary__price {
	font-family: var(--wp--preset--font-family--display);
	font-style: italic;
	font-weight: 400;
	font-size: var(--wp--preset--font-size--display-section);
	line-height: 1;
	color: #fff;
}

body.wwh-magazine .wwh-product-rail-panel .wwh-product-summary__stock {
	font-family: var(--wp--preset--font-family--ui);
	font-size: var(--wp--preset--font-size--cap);
	letter-spacing: 0.18em;
	text-transform: uppercase;
	padding: var(--wp--preset--spacing--2) var(--wp--preset--spacing--4);
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 9999px;
	color: #fff;
}
body.wwh-magazine .wwh-product-rail-panel .wwh-product-summary__stock--in {
	border-color: var(--wp--preset--color--event-status-dot);
	color: var(--wp--preset--color--event-status-dot);
}
body.wwh-magazine .wwh-product-rail-panel .wwh-product-summary__stock--low {
	color: #ffd6a8;
	border-color: #ffd6a8;
}
body.wwh-magazine .wwh-product-rail-panel .wwh-product-summary__stock--out {
	background: var(--wp--preset--color--event-soldout);
	border-color: var(--wp--preset--color--event-soldout);
	color: #fff;
}

body.wwh-magazine .wwh-product-rail-panel .wwh-product-summary__medium,
body.wwh-magazine .wwh-product-rail-panel .wwh-product-summary__history {
	font-family: var(--wp--preset--font-family--body);
	font-style: italic;
	font-size: var(--wp--preset--font-size--caption);
	color: rgba(255, 255, 255, 0.78);
	margin: 0;
	border-top: 1px solid rgba(255, 255, 255, 0.18);
	padding-top: var(--wp--preset--spacing--3);
}

/* Hide the highlights list inside the rail panel — those move to the
   Facts panel below. */
body.wwh-magazine .wwh-product-rail-panel .wwh-product-summary__highlights {
	display: none;
}

/* -----------------------------------------------------------------------------
   Variation picker + buy button + enquire button inside the obsidian rail.
   ----------------------------------------------------------------------------- */

body.wwh-magazine .wwh-product-rail-panel .wwh-variation-picker {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--2);
	border-top: 1px solid rgba(255, 255, 255, 0.18);
	padding-top: var(--wp--preset--spacing--4);
}
body.wwh-magazine .wwh-product-rail-panel .wwh-variation-picker__label {
	font-family: var(--wp--preset--font-family--ui);
	font-size: var(--wp--preset--font-size--cap);
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.55);
}
body.wwh-magazine .wwh-product-rail-panel .wwh-variation-picker__select {
	background: rgba(255, 255, 255, 0.05);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.25);
	padding: var(--wp--preset--spacing--3) var(--wp--preset--spacing--4);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--body);
}

body.wwh-magazine .wwh-product-rail-panel .wwh-buy-button .wwh-buy-button__cta {
	display: block;
	background: #fff;
	color: var(--wp--preset--color--ink-primary);
	font-family: var(--wp--preset--font-family--ui);
	font-size: var(--wp--preset--font-size--cap);
	letter-spacing: 0.22em;
	text-transform: uppercase;
	padding: var(--wp--preset--spacing--6) var(--wp--preset--spacing--8);
	border: 0;
	border-radius: 9999px;
	text-align: center;
	cursor: pointer;
	width: 100%;
	text-decoration: none;
}
body.wwh-magazine .wwh-product-rail-panel .wwh-buy-button .wwh-buy-button__cta:hover {
	background: rgba(255, 255, 255, 0.88);
}
body.wwh-magazine .wwh-product-rail-panel .wwh-buy-button.is-disabled .wwh-buy-button__cta,
body.wwh-magazine .wwh-product-rail-panel .wwh-buy-button .wwh-buy-button__cta:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

body.wwh-magazine .wwh-product-rail-panel .wwh-product-enquire .wwh-product-enquire__trigger {
	display: block;
	background: transparent;
	color: #fff;
	font-family: var(--wp--preset--font-family--ui);
	font-size: var(--wp--preset--font-size--cap);
	letter-spacing: 0.22em;
	text-transform: uppercase;
	padding: var(--wp--preset--spacing--6) var(--wp--preset--spacing--8);
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 9999px;
	text-align: center;
	cursor: pointer;
	width: 100%;
	text-decoration: none;
}
body.wwh-magazine .wwh-product-rail-panel .wwh-product-enquire .wwh-product-enquire__trigger:hover {
	border-color: #fff;
	background: rgba(255, 255, 255, 0.06);
}

/* -----------------------------------------------------------------------------
   Editorial body — full prose column under the buy section.
   ----------------------------------------------------------------------------- */

body.wwh-magazine .wwh-product-body {
	max-width: 720px;
	margin: 0 auto;
	padding: clamp(2rem, 5vh, 4rem) clamp(1.5rem, 5vw, 3.5rem);
}

body.wwh-magazine .wwh-product-body .wp-block-post-content {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--prose);
	line-height: 1.6;
	color: var(--wp--preset--color--ink-primary);
}

body.wwh-magazine .wwh-product-body .wp-block-post-content > * + * {
	margin-top: var(--wp--preset--spacing--6);
}

body.wwh-magazine .wwh-product-body .wp-block-post-content h2 {
	font-family: var(--wp--preset--font-family--display);
	font-style: italic;
	font-weight: 400;
	font-size: var(--wp--preset--font-size--display-prose);
	line-height: 1.1;
	margin-top: var(--wp--preset--spacing--12);
}

/* -----------------------------------------------------------------------------
   Facts panel — Medium / Provenance / Highlights / etc., below the body.
   ----------------------------------------------------------------------------- */

body.wwh-magazine .wwh-product-facts {
	max-width: 720px;
	margin: 0 auto;
	padding: 0 clamp(1.5rem, 5vw, 3.5rem) clamp(3rem, 6vh, 5rem);
}

body.wwh-magazine .wwh-product-facts__list {
	border-top: 1px solid var(--wwh-hair-light, rgba(26, 22, 19, 0.12));
}

body.wwh-magazine .wwh-product-facts__row {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: var(--wp--preset--spacing--6);
	padding: var(--wp--preset--spacing--6) 0;
	border-bottom: 1px solid var(--wwh-hair-light, rgba(26, 22, 19, 0.12));
	align-items: baseline;
}

body.wwh-magazine .wwh-product-facts__lab {
	font-family: var(--wp--preset--font-family--ui);
	font-size: var(--wp--preset--font-size--cap);
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ink-caption);
	margin: 0;
}

body.wwh-magazine .wwh-product-facts__val {
	font-family: var(--wp--preset--font-family--display);
	font-style: italic;
	font-size: var(--wp--preset--font-size--card-title);
	color: var(--wp--preset--color--ink-primary);
	margin: 0;
	line-height: 1.3;
}

body.wwh-magazine .wwh-product-facts__row:has(.wwh-product-facts__val:empty) {
	display: none;
}

/* Highlights list rendered as a separate row below the facts. */
body.wwh-magazine .wwh-product-facts__highlights {
	list-style: none;
	margin: var(--wp--preset--spacing--6) 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--3);
}

body.wwh-magazine .wwh-product-facts__highlights li {
	font-family: var(--wp--preset--font-family--body);
	font-style: italic;
	font-size: var(--wp--preset--font-size--prose-li);
	line-height: 1.5;
	color: var(--wp--preset--color--ink-primary);
	position: relative;
	padding-left: var(--wp--preset--spacing--6);
}

body.wwh-magazine .wwh-product-facts__highlights li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.7em;
	width: 14px;
	height: 1px;
	background: var(--wp--preset--color--ink-caption);
}

/* -----------------------------------------------------------------------------
   Maker strip — full-width cream-2 section (mirrors event "Where we meet").
   ----------------------------------------------------------------------------- */

body.wwh-magazine .wwh-product-maker {
	background: var(--wp--preset--color--warm-cream-2);
	padding: clamp(3rem, 8vh, 6rem) clamp(1.5rem, 5vw, 3.5rem);
}

body.wwh-magazine .wwh-product-maker__inner {
	max-width: 1280px;
	margin: 0 auto;
}

/* Hide the maker strip when the wwh/product-maker-card block returned empty
   (no linked product_artist_id, or the linked artist isn't published). */
body.wwh-magazine .wwh-product-maker:not(:has(.wwh-product-maker-card)) {
	display: none;
}

/* Same for the facts section if literally every row is empty AND no highlights. */
body.wwh-magazine .wwh-product-facts:not(:has(.wwh-product-facts__val:not(:empty))):not(:has(.wwh-product-facts__highlights li)) {
	display: none;
}

body.wwh-magazine .wwh-product-maker .wwh-product-maker-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
	gap: clamp(2rem, 5vw, 4rem);
	align-items: center;
}

body.wwh-magazine .wwh-product-maker .wwh-product-maker-card__portrait {
	margin: 0;
	width: 100%;
	max-width: 380px;
	height: auto;
	aspect-ratio: 1 / 1;
}

body.wwh-magazine .wwh-product-maker .wwh-product-maker-card__portrait img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

body.wwh-magazine .wwh-product-maker .wwh-product-maker-card__body {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--4);
}

body.wwh-magazine .wwh-product-maker .wwh-product-maker-card__eyebrow {
	font-family: var(--wp--preset--font-family--ui);
	font-size: var(--wp--preset--font-size--cap);
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ink-caption);
	margin: 0;
}

body.wwh-magazine .wwh-product-maker .wwh-product-maker-card__name {
	font-family: var(--wp--preset--font-family--display);
	font-style: italic;
	font-weight: 400;
	font-size: var(--wp--preset--font-size--display-prose);
	line-height: 1.1;
	color: var(--wp--preset--color--ink-primary);
	margin: 0;
}
body.wwh-magazine .wwh-product-maker .wwh-product-maker-card__name a {
	color: inherit;
	text-decoration: none;
}
body.wwh-magazine .wwh-product-maker .wwh-product-maker-card__name a:hover {
	color: var(--wp--preset--color--ink-caption);
}

body.wwh-magazine .wwh-product-maker .wwh-product-maker-card__meta {
	font-family: var(--wp--preset--font-family--ui);
	font-size: var(--wp--preset--font-size--cap);
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ink-caption);
	margin: 0;
}

body.wwh-magazine .wwh-product-maker .wwh-product-maker-card__bio {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--body);
	line-height: 1.55;
	color: var(--wp--preset--color--ink-primary);
	margin: 0;
	max-width: 56ch;
}

body.wwh-magazine .wwh-product-maker .wwh-product-maker-card__cta {
	font-family: var(--wp--preset--font-family--ui);
	font-size: var(--wp--preset--font-size--cap);
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ink-primary);
	text-decoration: none;
	border-bottom: 1px solid var(--wp--preset--color--ink-primary);
	padding-bottom: var(--wp--preset--spacing--1);
	align-self: flex-start;
	margin-top: var(--wp--preset--spacing--2);
}

/* -----------------------------------------------------------------------------
   Related products band — full-width warm-obsidian.
   ----------------------------------------------------------------------------- */

body.wwh-magazine .wwh-product-related {
	background: var(--wp--preset--color--warm-obsidian);
	padding: clamp(3rem, 8vh, 6rem) clamp(1.5rem, 5vw, 3.5rem);
	color: #fff;
}

body.wwh-magazine .wwh-product-related__inner {
	max-width: 1280px;
	margin: 0 auto;
}

body.wwh-magazine .wwh-product-related .wwh-related-products__heading {
	font-family: var(--wp--preset--font-family--display);
	font-style: italic;
	font-weight: 400;
	font-size: var(--wp--preset--font-size--display-section);
	line-height: 1.05;
	color: #fff;
	margin: 0 0 var(--wp--preset--spacing--8);
	text-wrap: balance;
}

body.wwh-magazine .wwh-product-related .wwh-related-products__item {
	background: transparent;
}

body.wwh-magazine .wwh-product-related .wwh-related-products__link {
	color: #fff;
}

body.wwh-magazine .wwh-product-related .wwh-related-products__title {
	font-family: var(--wp--preset--font-family--display);
	font-style: italic;
	font-weight: 400;
	font-size: var(--wp--preset--font-size--card-title);
	color: #fff;
}

body.wwh-magazine .wwh-product-related .wwh-related-products__price {
	font-family: var(--wp--preset--font-family--ui);
	font-size: var(--wp--preset--font-size--cap);
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.72);
	font-weight: 400;
}

/* -----------------------------------------------------------------------------
   Responsive
   ----------------------------------------------------------------------------- */

@media (max-width: 1024px) {
	body.wwh-magazine .wwh-product-buy {
		grid-template-columns: 1fr;
	}
	body.wwh-magazine .wwh-product-buy__rail {
		position: static;
		order: 2;
	}
	body.wwh-magazine .wwh-product-buy__media { order: 1; }
	body.wwh-magazine .wwh-product-maker .wwh-product-maker-card {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 720px) {
	body.wwh-magazine .wwh-product-facts__row {
		grid-template-columns: 1fr;
		gap: var(--wp--preset--spacing--2);
	}
	body.wwh-magazine .wwh-single--product .wwh-product-hero .wp-block-cover__inner-container {
		grid-template-columns: 1fr;
		gap: var(--wp--preset--spacing--8);
	}
	body.wwh-magazine .wwh-product-hero-price {
		min-width: 0;
		align-self: flex-start;
	}
}
