/* Product pages, Equal Earth EU.
   Loaded after home.css, which holds the tokens, bar, buttons, last band, footer and motion.
   Same direction as the homepage ("One motif", tasteskill seed 67697659): the Equal Earth outline
   masks pictures and marks list points; brand kept: anthracite, yellow, ocean, Open Sans.
   Classes are prefixed p- so they never collide with the homepage. */

[hidden] { display: none !important; }
/* Full-width chrome, with the gallery and form kept readable on wide displays. */
html:has(body.material-variant) { background: var(--bg); }
body.material-variant { --product-width: 1600px; }
.material-variant > main, .p-bar-inner, .p-footer-inner { max-width: var(--product-width); margin-inline: auto; }
.material-variant > .bar { padding-inline: 0; }
.p-bar-inner { display: flex; align-items: center; gap: 32px; width: 100%; padding-inline: var(--margin); }
.material-variant > .ma-foot { max-width: none; padding-inline: 0; }
.p-footer-inner { padding-inline: var(--margin); }
.material-variant .cta-word { font-size: min(25vw, 400px); }
.p-hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: 'gallery head' 'gallery config'; column-gap: clamp(24px, 4vw, 64px); padding: 12px var(--margin) 0; align-items: start; }
.p-head { grid-area: head; padding-top: clamp(16px, 3vw, 48px); }
.product-gallery { grid-area: gallery; grid-row: 1 / span 2; }
.p-config { grid-area: config; }

/* Gallery: one large stage, its views as pills. */
.product-gallery { position: sticky; top: calc(var(--bar) + 12px); display: grid; gap: 14px; min-width: 0; }
.p-stage { position: relative; overflow: hidden; aspect-ratio: 1.2; background: var(--surface); }
.flat-scene { position: absolute; inset: 0; display: grid; place-items: center; padding: 7%; }
.flat-scene img { width: 100%; height: 100%; object-fit: contain; }
.room-scene { position: absolute; inset: 0; }
.room-background { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wall-map { position: absolute; left: 50%; top: 15%; width: 60%; height: auto; object-fit: contain; transform: translateX(-50%); transition: width 600ms var(--ease-expo); }
.gallery-image-button { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; }
.gallery-image-button:focus-visible { outline-offset: -6px; }
.p-round { position: absolute; z-index: 2; width: 48px; height: 48px; border-radius: 999px; background: #fff; display: grid; place-items: center; transition: background-color 160ms ease, transform 140ms var(--ease-out); }
.p-round svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.8; }
.p-round:hover { background: var(--accent); }
.p-round:active { transform: scale(0.92); }
.gallery-previous { left: 16px; top: 50%; translate: 0 -50%; }
.gallery-next { right: 16px; top: 50%; translate: 0 -50%; }
.zoom { right: 16px; bottom: 16px; }
.p-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.p-views, .p-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.p-views button, .p-pills button { min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--surface); font-weight: 600; font-size: var(--step-small); font-variant-numeric: tabular-nums; transition: background-color 160ms ease, color 160ms ease, transform 140ms var(--ease-out); }
.p-views button:hover, .p-pills button:hover { background: var(--ocean); }
.p-views button:active, .p-pills button:active { transform: scale(0.95); }
.p-views button[aria-pressed="true"], .p-pills button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.p-caption { font-size: var(--step-small); color: var(--muted); }

/* Configuration: title, price, then the choices in the order people make them. */
.p-config { min-width: 0; }
.p-title { max-width: 9ch; margin-bottom: 24px; }
.p-intro { max-width: 40ch; margin-bottom: 32px; }
.p-price { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 24px; padding: 24px 28px; background: var(--accent); }
#price-prefix { font-size: var(--step-small); font-weight: 600; margin-left: 6px; }
.p-price-value strong { font-size: var(--step-head); font-weight: 700; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.p-price-value strong.is-text { font-size: var(--step-lead); letter-spacing: -0.01em; }
.p-price-note { font-size: var(--step-small); text-align: right; max-width: 24ch; }
.p-field { border: 0; margin: 32px 0 0; padding: 0; min-width: 0; }
.p-field legend { padding: 0; margin-bottom: 12px; font-weight: 700; }
.p-hint { font-size: var(--step-small); color: var(--muted); margin-top: 12px; }
.p-hint strong { color: var(--ink); font-weight: 600; }
.p-link { font-weight: 600; text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 2px; text-decoration-color: var(--accent); transition: text-decoration-color 160ms ease; }
.p-link:hover { text-decoration-color: currentColor; }
.p-hint .p-link { font-size: inherit; color: var(--ink); }

.map-switch-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.map-switch-option { display: grid; gap: 8px; padding: 10px 10px 12px; background: var(--surface); text-decoration: none; transition: background-color 160ms ease, transform 140ms var(--ease-out); }
.map-switch-option img { width: 100%; height: auto; clip-path: url(#ee); }
.map-switch-option:hover { background: var(--ocean); }
.map-switch-option:active { transform: scale(0.97); }
.map-switch-option[aria-current="page"] { background: var(--ink); color: #fff; }
.map-switch-text { display: grid; line-height: 1.3; }
.map-switch-name { font-weight: 700; }
.map-switch-detail { font-size: var(--step-small); }
.p-note { margin-top: 10px; padding: 12px 16px; background: var(--ocean); font-size: var(--step-small); }

.p-finishes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.p-finishes label { position: relative; display: grid; align-content: start; gap: 2px; min-height: 84px; padding: 14px 16px; background: var(--surface); cursor: pointer; transition: background-color 160ms ease, color 160ms ease, transform 140ms var(--ease-out); }
.p-finishes input { position: absolute; opacity: 0; pointer-events: none; }
.p-finishes label:hover { background: var(--ocean); }
.p-finishes label:active { transform: scale(0.97); }
.p-finishes label:has(input:checked) { background: var(--ink); color: #fff; }
.p-finishes label:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }
.setup-name { font-weight: 700; line-height: 1.3; }
.setup-detail { font-size: var(--step-small); line-height: 1.35; }

.p-order { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 12px; margin-top: 32px; }
.p-qty { display: grid; gap: 6px; }
.p-qty label { font-weight: 700; font-size: var(--step-small); }
.p-qty input { width: 96px; min-height: 52px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--surface); font: inherit; font-weight: 600; color: var(--ink); text-align: center; }
.p-primary { width: 100%; }
.p-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.p-summary { margin-top: 10px; }
.p-secondary { display: inline-block; margin-top: 20px; text-align: left; }
.p-points { display: grid; gap: 10px; margin-top: 28px; }
.p-points li { position: relative; padding-left: 34px; font-size: var(--step-small); line-height: 1.5; }
.p-points li::before { content: ''; position: absolute; left: 0; top: 0.32em; width: 22px; height: 12px; background: var(--accent); clip-path: url(#ee); }
.p-points strong { font-weight: 700; }

/* The room: the map hung to scale (140 cm; same scale as the homepage). */
.p-room { margin-top: var(--section); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.p-room-picture { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: #e8e8e6; }
.p-room-picture > img:first-child { width: 100%; height: 100%; object-fit: cover; }
.p-room-map { position: absolute; left: 52%; bottom: 44%; width: calc(140 * 0.2314%); height: auto; translate: -50% 0; }
.p-room-picture figcaption { position: absolute; left: 12px; bottom: 12px; padding: 6px 12px; background: #fff; font-size: var(--step-small); }
.p-room-text h2 { margin-bottom: 24px; max-width: 18ch; }
.p-room-text p { margin-bottom: 36px; max-width: 30ch; }

/* Why Equal Earth: a full ocean field with the live comparison. */
.p-difference { margin-top: var(--section); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding: clamp(40px, 6vw, 96px) var(--margin); background: var(--ocean); }
.p-difference-text h2 { margin-bottom: 28px; max-width: 11ch; }
.p-difference-text p { max-width: 42ch; margin-bottom: 18px; }
.p-small { font-size: var(--step-small); }
.p-difference-text .p-small { margin-top: 24px; }
.p-morph { background: #fff; padding: clamp(20px, 3vw, 36px); }
.p-morph h3 { font-size: var(--step-lead); font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; margin-bottom: 16px; }
.morph-stage { position: relative; margin-bottom: 16px; }
.morph-canvas { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--surface); }
.morph-fallback { display: none; }
.morph-demo.is-unavailable .morph-canvas, .morph-demo.is-unavailable .morph-controls, .morph-demo.is-unavailable .range-endpoints, .morph-demo.is-unavailable #morph-status { display: none; }
.morph-demo.is-unavailable .morph-fallback { display: block; }
.morph-controls { display: flex; align-items: center; gap: 14px; }
.morph-controls input { flex: 1; accent-color: var(--ink); height: 28px; cursor: pointer; }
.morph-play { flex: none; width: 48px; height: 48px; border-radius: 999px; background: var(--accent); display: grid; place-items: center; transition: background-color 160ms ease, transform 140ms var(--ease-out); }
.morph-play:hover { background: var(--ink); }
.morph-play:hover svg { fill: #fff; }
.morph-play:active { transform: scale(0.92); }
.morph-play svg { width: 18px; height: 18px; fill: var(--ink); }
.range-endpoints { display: flex; justify-content: space-between; margin: 6px 0 14px; font-size: var(--step-small); font-weight: 600; }
.p-morph .p-small { color: var(--ink); margin-top: 6px; }
.p-morph .p-small a { text-underline-offset: 0.2em; }

/* What is on the map: a close-up in the map's own outline beside the features. */
.p-details { margin-top: var(--section); display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.p-plate { aspect-ratio: 1; clip-path: url(#ee); background: var(--ocean); }
.p-plate img { width: 100%; height: 100%; object-fit: cover; }
.p-details-text h2 { margin-bottom: 32px; }
.p-features { display: grid; gap: 24px; margin-bottom: 36px; }
.p-features h3 { font-size: var(--step-lead); font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; margin-bottom: 6px; }
.p-features p { max-width: 46ch; }
.p-specs { display: grid; gap: 4px; margin: 0; }
.p-specs div { display: flex; justify-content: space-between; gap: 24px; padding: 12px 18px; background: var(--surface); font-size: var(--step-small); }
.p-specs dt { font-weight: 700; }
.p-specs dd { margin: 0; text-align: right; }

/* Organisations: one dark field. */
.p-org { margin-top: var(--section); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px); align-items: start; min-height: 60svh; padding: clamp(40px, 6vw, 96px) var(--margin); background: var(--dark); color: var(--dark-ink); }
.p-org h2 { margin-bottom: 24px; max-width: 12ch; }
.p-org-text p { max-width: 44ch; color: #e6e6e6; }
.p-org-action { display: grid; gap: 32px; justify-items: start; }
.p-points-dark { margin-top: 0; }
.p-points-dark li { font-size: var(--step-body); color: #e6e6e6; }
.p-org :focus-visible { outline-color: var(--accent); }

/* Questions: stacked fields in the three colours, one at a time. */
.p-faq { margin-top: var(--section); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--gutter); align-items: start; }
.p-faq > h2 { position: sticky; top: calc(var(--bar) + 32px); max-width: 8ch; }
.p-faq-list { display: grid; gap: 4px; }
.p-faq-list details { background: var(--surface); }
.p-faq-list details:nth-child(3n+2) { background: var(--ocean); }
.p-faq-list details:nth-child(3n+3) { background: var(--accent); }
.p-faq-list summary { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 28px; font-size: var(--step-lead); font-weight: 600; cursor: pointer; list-style: none; transition: padding-left 200ms var(--ease-out); }
.p-faq-list summary::-webkit-details-marker { display: none; }
.p-faq-list summary::after { content: '+'; font-weight: 400; font-size: 1.5em; line-height: 1; transition: transform 200ms var(--ease-out); }
.p-faq-list details[open] summary::after { transform: rotate(45deg); }
.p-faq-list summary:hover { padding-left: 36px; }
.p-faq-list details p { padding: 0 28px 26px; max-width: 56ch; }

/* Phone bar, only when the buy button is out of view. */
.mobile-action { display: none; }

/* Dialogs float, so they may cast a shadow. */
.p-dialog { width: min(560px, calc(100% - 32px)); max-height: 90dvh; padding: clamp(24px, 4vw, 40px); border: 0; color: var(--ink); background: #fff; box-shadow: 0 24px 80px rgb(0 0 0 / 0.28); overscroll-behavior: contain; } /* taste-skill-ignore: dialogs float */
.p-dialog::backdrop { background: rgb(17 17 17 / 0.6); }
.p-dialog h2 { font-size: var(--step-head); font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; padding-right: 48px; }
.close-dialog { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 999px; background: var(--surface); font-size: 1.6rem; line-height: 1; transition: background-color 160ms ease; }
.close-dialog:hover { background: var(--accent); }
.map-dialog { width: min(1200px, calc(100% - 32px)); }
.enlarged-map { overflow: auto; margin-top: 20px; }
.enlarged-map img { min-width: 650px; width: 100%; }
.checkout-dialog { width: min(760px, calc(100% - 32px)); }
.checkout-mount { margin-top: 20px; min-height: 120px; }
.checkout-status { font-size: var(--step-small); margin-top: 12px; }
.checkout-status:empty { display: none; }
#cart-empty > p { margin: 24px 0; }
#cart-empty .button { width: 100%; }
.cart-product { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: start; margin-top: 24px; }
.cart-product > img { width: 100%; height: auto; padding: 8px; background: var(--surface); }
.p-dialog img { height: auto; }
.cart-product h3 { font-size: var(--step-body); font-weight: 700; line-height: 1.35; }
.cart-product p { font-size: var(--step-small); margin-top: 4px; }
.cart-product .p-hint { margin-top: 4px; }
.cart-meta { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 20px 0 12px; font-size: var(--step-small); }
.cart-total { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 18px; background: var(--surface); }
.cart-total strong { font-size: var(--step-lead); font-variant-numeric: tabular-nums; }
#cart-filled .button { width: 100%; margin-top: 10px; }
#cart-filled #cart-explanation { margin: 16px 0 6px; }
.remove-item { display: block; margin: 16px auto 0; font-size: var(--step-small); }
#cart-note { text-align: center; }
.quote-summary { margin: 20px 0 4px; padding: 14px 18px; background: var(--surface); font-size: var(--step-small); }
.quote-dialog { padding: clamp(24px, 3vw, 32px); }
.quote-dialog h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; }
.quote-dialog .p-hint { margin-top: 12px; }
.quote-dialog .quote-summary { margin-top: 12px; padding: 10px 14px; }
.quote-dialog .quote-field { margin-top: 12px; }
.quote-summary strong { display: block; }
.quote-field { margin-top: 16px; display: grid; gap: 6px; }
.quote-field label { font-weight: 700; font-size: var(--step-small); }
.quote-field label span { font-weight: 400; color: var(--muted); }
.quote-field input, .quote-field textarea { width: 100%; padding: 12px 14px; min-height: 48px; border: 1px solid #bdbdbd; border-radius: 4px; background: #fff; color: var(--ink); font: inherit; }
.quote-field textarea { resize: vertical; }
#quote-form .button { width: 100%; margin-top: 16px; }
#quote-status { font-size: var(--step-small); margin-top: 10px; }
#quote-status:empty { display: none; }
#quote-form > .p-hint { margin-top: 16px; }

/* Cart button in the bar. */
.p-cart { gap: 8px; margin-left: 0; }
.p-cart svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.p-cart-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.bar-links + .p-cart { margin-left: 0; }

@media (prefers-reduced-motion: no-preference) {
  .js .p-title { animation: rise 1000ms var(--ease-expo) both 80ms; }
  .js .p-intro, .js .p-price { animation: rise 900ms var(--ease-expo) both 200ms; }
  .js .p-stage { animation: rise 1000ms var(--ease-expo) both 120ms; }
  .js .p-room-picture > img:first-child { animation: drift 26s var(--ease-soft) 1.2s infinite alternate; }
  .js .p-plate[data-reveal] { transform: scale(0.94); transition: opacity 900ms var(--ease-out), transform 1400ms var(--ease-expo); }
  .js .p-plate[data-reveal].is-in { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wall-map { transition: none; }
}

@media (max-width: 1100px) {
  .p-bar-inner { gap: 12px; }
  .bar .p-cart { margin-left: auto; }
}
@media (max-width: 1000px) {
  .p-hero { grid-template-columns: 1fr; grid-template-areas: 'head' 'gallery' 'config'; row-gap: 28px; }
  .product-gallery { position: static; grid-row: auto; }
  .p-head { padding-top: 16px; }
  .p-title { max-width: none; }
  .p-room, .p-details, .p-difference, .p-org { grid-template-columns: 1fr; }
  .p-plate { max-width: 560px; width: 100%; justify-self: center; }
  .p-stage { aspect-ratio: 1.5; }
  .p-org { min-height: 0; }
}

/* The wider tablet stage has less wall height; keep even the 200 cm map above the cabinet. */
@media (min-width: 761px) and (max-width: 1000px) {
  .wall-map { top: 8%; }
}

/* Phone: its own composition. */
@media (max-width: 760px) {
  .p-bar-inner { gap: 8px; }
  .p-hero { gap: 28px; }
  .p-stage { aspect-ratio: 1.1; }
  .flat-scene { padding: 5%; }
  .p-round { width: 44px; height: 44px; }
  .gallery-previous { left: 8px; } .gallery-next { right: 8px; } .zoom { right: 8px; bottom: 8px; }
  .p-intro { margin-bottom: 24px; }
  .p-price { padding: 20px; }
  .p-price-note { text-align: left; }
  .map-switch-option { padding: 8px; }
  .p-finishes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-pills button { flex: 1; padding: 0 8px; }
  .p-order { grid-template-columns: 1fr; }
  .p-qty { grid-template-columns: auto 1fr; align-items: center; gap: 12px; }
  .p-room-text p { max-width: none; }
  .p-faq { grid-template-columns: 1fr; }
  .p-faq > h2 { position: static; max-width: none; margin-bottom: 24px; }
  .p-faq-list summary { padding: 18px 20px; font-size: var(--step-body); }
  .p-faq-list details p { padding: 0 20px 20px; }
  .p-specs div { padding: 12px 14px; }
  .mobile-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 12px var(--margin); background: var(--surface); transition: transform 200ms var(--ease-out); }
  .mobile-action strong { display: block; font-size: var(--step-small); }
  .mobile-action span { display: block; font-size: var(--step-small); color: var(--muted); }
  .mobile-action.is-hidden { transform: translateY(110%); pointer-events: none; }
  body:has(dialog[open]) .mobile-action { visibility: hidden; }
  .foot { padding-bottom: 96px; }
  .cart-product { grid-template-columns: 88px 1fr; gap: 12px; }
}
.has-pay #cart-quote { background: var(--surface); color: var(--ink); }
.has-pay #cart-quote:hover { background: var(--ink); color: #fff; }
/* Order status page */
.return-page { min-height: 70vh; display: grid; place-items: center; padding: 64px var(--margin); }
.return-card { max-width: 40rem; }
.return-card h1 { margin-bottom: 20px; }
.return-card .button { margin-top: 32px; }
