/* The category shell, local fonts, brand and Tailwind palette are shared. */
* { box-sizing: border-box; }
body.product-page { margin: 0; background: #fff; color: #0b1c30; font: 400 16px/1.7 Inter, sans-serif; }
.product-page :is(header,footer) :is(a,p,h2,h4,button,span) { font-size: max(1rem, 16px); }
.product-page header a, .product-page header button { min-height: 48px; align-items: center; }
.product-page header a { display: inline-flex; }
.product-page header nav { padding-inline: 20px; }
.product-page header nav > .flex > :is(a,button) { min-width: 48px; min-height: 48px; justify-content: center; }
.product-page header .brand-mark { font-size: 26px; }
.product-page header .brand-mark span { font-size: inherit; }
.product-page footer .brand-mark { font-size: 26px; font-weight: 700; }
.product-page footer .brand-mark span { font-size: inherit; }
.product-page footer p { color: #434655; }
.product-page :is(button,input,a,summary):focus-visible { outline: 3px solid #004ac6; outline-offset: 4px; }
.product-main { max-width: 800px; margin: auto; padding: 28px 24px 64px; }
.product-main h1,.product-main h2,.product-main h3 { font-family: 'Space Grotesk',sans-serif; font-weight: 700; line-height: 1.2; }
.product-main h1 { font-size: clamp(32px,6vw,48px); margin: 12px 0 16px; }
.product-main h2 { font-size: clamp(26px,5vw,36px); margin: 0 0 20px; }
.product-main h3 { font-size: 22px; margin: 12px 0; }
.product-main p { margin: 12px 0; }
.product-main section { padding-block: 40px; border-bottom: 1px solid #e2e8f0; }
.product-main .product-hero { padding-top: 16px; }
.product-main .eyebrow { color: #004ac6; font-weight: 600; }
.product-main .product-image { width: 100%; height: auto; max-width: 520px; display: block; margin: 0 auto 24px; border-radius: 24px; background: #f8f9ff; }
.product-main figcaption { color: #434655; font-size: 16px; }
.product-main figure { margin: 0 0 24px; }
.product-main .price { font-weight: 700; font-size: 32px; margin: 16px 0; }
.product-main fieldset { border: 0; padding: 0; margin: 24px 0; }
.product-main legend { font-weight: 600; margin-bottom: 12px; }
.mode-options { display: flex; gap: 12px; flex-wrap: wrap; }
.mode-options label { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border: 1px solid #737686; border-radius: 12px; min-height: 52px; cursor: pointer; }
.mode-options label:has(input:checked) { background: #eff4ff; border-color: #004ac6; color: #003ea8; }
.mode-options input { width: 20px; height: 20px; accent-color: #004ac6; }
.product-cta { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; padding: 16px 24px; background: #004ac6; color: #fff; border-radius: 999px; font-weight: 600; text-decoration: none; margin-top: 24px; }
.product-cta:hover { background: #003ea8; }
.product-main .detail-list { margin: 0; }
.detail-list div { padding: 16px 0; border-bottom: 1px solid #e2e8f0; }
.detail-list dt { font-weight: 600; }
.detail-list dd { margin: 4px 0 0; }
.product-main details { border-bottom: 1px solid #e2e8f0; padding: 12px 0; }
.product-main summary { cursor: pointer; min-height: 48px; padding-block: 12px; font-weight: 600; }
.product-main p a { color: #003ea8; text-decoration: underline; text-underline-offset: 3px; }
.other-models { display: grid; grid-template-columns: 1fr; gap: 24px; }
.other-models a { border: 1px solid #e2e8f0; padding: 20px; border-radius: 20px; display: block; text-decoration: none; color: inherit; min-height: 48px; }
.other-models img { width: 100%; height: auto; max-width: 280px; margin: auto; display: block; border-radius: 12px; }
.other-models span { color: #003ea8; }
.product-page footer a { display: inline-flex; align-items: center; min-height: 48px; }
.product-page footer { padding-inline: 24px; }
.product-page .product-bottom { text-align: center; border: 0; }
@media (min-width: 640px) { .other-models { grid-template-columns: 1fr 1fr; } }
@media (max-width: 1023px) {
  .product-page header nav > div.hidden { display: none; }
  .product-page #menuButton { display: inline-flex; }
  .product-page #mobileMenu:not(.hidden) { display: block; }
}
@media (prefers-reduced-motion: reduce) { .product-page * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* Product gallery and purchase panel: wide on desktop, stacked on phones. */
.product-main { max-width: 1240px; padding-inline: clamp(20px,4vw,48px); }
/* Home story sections use 48px mobile / 72px desktop; split this total
   between the two neighboring product sections to avoid doubled whitespace. */
.product-main { --section-space: 48px; }
.product-main > section:not(.product-hero) { max-width: 820px; margin-inline: auto; padding-block: calc(var(--section-space) / 2); }
.product-main .product-hero { display: grid; gap: 24px; padding-block: 24px; align-items: start; }
.product-gallery { min-width: 0; }
.product-main .product-gallery figure { margin: 0; }
.gallery-stage { background: #f5f5f7; border-radius: 28px; padding: clamp(20px,4vw,48px); aspect-ratio: 1; display: grid; place-items: center; }
.product-main .gallery-stage .product-image { margin: 0; max-width: none; border-radius: 8px; mix-blend-mode: multiply; aspect-ratio: 1; object-fit: contain; }
.product-main .product-gallery figcaption { text-align: center; margin-top: 16px; }
.gallery-thumbnails { display: flex; justify-content: center; gap: 12px; margin-top: 16px; }
.gallery-thumbnails button { width: 80px; height: 80px; padding: 6px; background: #fff; border: 2px solid #d5d8de; border-radius: 14px; cursor: pointer; transition: border-color .18s; }
.gallery-thumbnails button[aria-pressed="true"] { border-color: #004ac6; background: #eff4ff; }
.gallery-thumbnails img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.product-main .gallery-note { text-align: center; color: #555d68; margin-top: 20px; }
.gallery-error { color: #9f271e; text-align: center; }
.product-main .product-purchase h1 { font-size: clamp(36px,4vw,52px); letter-spacing: -.035em; }
.product-main .product-purchase .price { font-size: 36px; margin-top: 24px; }
.product-spec-line { padding-block: 18px; border-block: 1px solid #e2e8f0; font-weight: 500; }
.product-purchase .mode-options { display: grid; grid-template-columns: 1fr; }
.product-purchase .mode-options label { min-height: 64px; border-radius: 16px; }
.product-purchase .purchase-note { text-align: center; color: #555d68; }
.product-bottom .product-cta { max-width: 420px; margin-inline: auto; }
@media (min-width: 1024px) {
 .product-main .product-hero { grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); gap: 24px; }
 .product-gallery { position: sticky; top: 100px; }
 .product-purchase { padding-block: 8px; }
}
@media (prefers-reduced-motion: reduce) { .gallery-thumbnails button { transition: none; } }

/* Six faces per mini cube, matching the existing homepage CSS 3D geometry. */
.product-page { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
.product-cube-viewer { display: grid; gap: 16px; min-width: 0; }
.product-cube-stage { order: 0; width: 100%; height: 380px; display: grid; place-items: center; perspective: 1000px; container-type: inline-size; overflow: clip; background: #f5f5f7; border-radius: 28px; touch-action: pan-y pinch-zoom; cursor: grab; user-select: none; }
.product-face-buttons { order: 1; display: flex; gap: 8px; overflow-x: auto; padding: 4px; }
.product-face-buttons button { flex: 0 0 auto; min-width: 64px; min-height: 48px; border: 1px solid #737686; border-radius: 12px; padding: 8px; background: white; font: inherit; cursor: pointer; }
.product-face-buttons button[aria-pressed="true"] { background: #eff4ff; border: 2px solid #004ac6; color: #003ea8; font-weight: 700; }
.product-cube-hint { order: 2; color: #434655; white-space: nowrap; font-size: 16px; letter-spacing: -.02em; }
.product-cube-frame { --unit: min(calc((100cqw - 104px) / var(--cols)),calc(280px / var(--rows))); position: relative; left: -24px; width: calc(var(--cols) * var(--unit)); height: calc(var(--rows) * var(--unit)); transform-style: preserve-3d; }
.product-cube { --face-x: 0deg; --face-y: 0deg; position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .4s ease; }
.product-mini { position: absolute; left: calc(var(--col) * var(--unit)); top: calc(var(--row) * var(--unit)); width: var(--unit); height: var(--unit); transform-style: preserve-3d; transform: rotateX(var(--face-x)) rotateY(var(--face-y)); transition: transform .65s ease; }
.product-face { position: absolute; inset: 0; backface-visibility: hidden; border: .25px solid #ffffff26; background-image: var(--photo); background-size: calc(var(--cols) * 100%) calc(var(--rows) * 100%); background-position: var(--photo-x) var(--photo-y); }
.product-face--front { transform: translateZ(calc(var(--unit) / 2)); }
.product-face--back { transform: rotateY(180deg) translateZ(calc(var(--unit) / 2)); }
.product-face--top { transform: rotateX(90deg) translateZ(calc(var(--unit) / 2)); }
.product-face--bottom { transform: rotateX(-90deg) translateZ(calc(var(--unit) / 2)); }
.product-face--left { transform: rotateY(-90deg) translateZ(calc(var(--unit) / 2)); }
.product-face--right { transform: rotateY(90deg) translateZ(calc(var(--unit) / 2)); }
/* A continuous print surface prevents interior side-edge raster seams crossing
   the wedding portrait's eyes; the silhouette and user rotation remain 3D. */
.product-clean-face { position: absolute; inset: 0; background: url('../img/product/16-face-6.webp') center / 100% 100%; transform: translateZ(calc(var(--unit) / 2 + 1px)); opacity: 0; pointer-events: none; transition: opacity .65s ease; backface-visibility: hidden; }
.product-cube[data-selected-face="6"] .product-clean-face { opacity: 1; }
.product-cube.is-assembling .product-mini { animation: product-assemble .8s both; animation-delay: var(--delay); }
.product-cube.is-dragging { transition: none; cursor: grabbing; }
@keyframes product-assemble { from { opacity: 0; transform: translate3d(var(--scatter-x),var(--scatter-y),100px) rotateX(35deg) rotateY(35deg); } to { opacity: 1; transform: rotateX(var(--face-x)) rotateY(var(--face-y)); } }
.product-main .product-render-gallery { margin-top: 8px; padding: 0; border: 1px solid #e2e8f0; border-radius: 12px; }
.product-render-gallery summary { padding: 12px 16px; color: #003ea8; background: #eff4ff; border-radius: 12px; }
.product-render-gallery[open] summary { margin-bottom: 16px; }
.product-sticky { position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px max(16px,calc((100vw - 1144px) / 2)) calc(12px + env(safe-area-inset-bottom)); background: #fffffff5; border-top: 1px solid #e2e8f0; box-shadow: 0 -4px 20px #0b1c3010; animation: product-bar-in .2s ease-out; }
.product-sticky[hidden] { display: none; }
.product-sticky > div { display: grid; flex-shrink: 0; line-height: 1.5; }
.product-sticky .product-cta { margin: 0; min-height: 48px; padding: 10px 16px; font-size: 16px; line-height: 1.3; text-align: center; }
@keyframes product-bar-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 1024px) {
 .product-main { --section-space: 72px; }
 .product-gallery { position: static; }
 .product-cube-viewer { grid-template-columns: 76px minmax(0,1fr); }
 .product-face-buttons { grid-column: 1; grid-row: 1; flex-direction: column; overflow: visible; justify-content: center; }
 .product-cube-stage { grid-column: 2; height: 440px; }
 .product-cube-hint { grid-column: 2; }
 .product-cube-frame { --unit: min(calc((100cqw - 112px) / var(--cols)),calc(340px / var(--rows))); }
}
@media (prefers-reduced-motion: reduce) {
 .product-cube, .product-mini { transition: none; }
 .product-cube.is-assembling .product-mini, .product-sticky { animation: none; }
}

/* Dimensions live beside the rotating element, so every label stays upright. */
.cube-dimensions { position: absolute; inset: 0; pointer-events: none; color: #526078; font-size: 13px; line-height: 1.4; }
.cube-dimension { position: absolute; border-color: #c3c6d7; }
.cube-dimension > span { position: absolute; white-space: nowrap; background: #f5f5f7; padding-inline: 4px; }
.cube-dimension--width { left: 0; right: 0; top: -32px; border-top: 1px solid #c3c6d7; }
.cube-dimension--width::before,.cube-dimension--width::after { content: ''; position: absolute; top: -4px; height: 8px; border-left: 1px solid #c3c6d7; }
.cube-dimension--width::before { left: 0; }.cube-dimension--width::after { right: 0; }
.cube-dimension--width > span { left: 50%; transform: translate(-50%,-50%); }
.cube-dimension--height { left: -24px; top: 0; bottom: 0; border-left: 1px solid #c3c6d7; }
.cube-dimension--height::before,.cube-dimension--height::after,.cube-dimension--unit::before,.cube-dimension--unit::after { content: ''; position: absolute; left: -4px; width: 8px; border-top: 1px solid #c3c6d7; }
.cube-dimension--height::before,.cube-dimension--unit::before { top: 0; }.cube-dimension--height::after,.cube-dimension--unit::after { bottom: 0; }
.cube-dimension--height > span { top: 50%; left: 0; transform: translate(-50%,-50%) rotate(-90deg); }
.cube-dimension--unit { top: 0; right: -20px; height: var(--unit); border-left: 1px solid #c3c6d7; }
.cube-dimension--unit > span { top: 50%; left: 6px; transform: translateY(-50%); }
.model-comparison { --compare-unit: 6px; display: flex; align-items: flex-start; gap: 24px; overflow-x: auto; padding: 16px 4px; }
.model-comparison a { flex: 0 0 auto; width: max(104px,calc(var(--model-width) * var(--compare-unit))); display: grid; gap: 8px; text-align: center; color: #434655; text-decoration: none; }
.comparison-shape { height: 132px; display: flex; align-items: flex-end; justify-content: center; }
.comparison-silhouette { width: calc(var(--model-width) * var(--compare-unit)); height: calc(var(--model-height) * var(--compare-unit)); display: block; border: 1px solid #94a3b8; background: #f5f5f7; border-radius: 2px; }
.model-comparison [aria-current="page"] { color: #003ea8; }
.model-comparison [aria-current="page"] .comparison-silhouette { border: 2px solid #004ac6; background: #eff4ff; }
.comparison-current { font-size: 14px; font-weight: 600; }
@media (max-width: 639px) {
 .cube-dimension--height { display: none; }
 .model-comparison { --compare-unit: 2.4px; gap: 8px; }
 .model-comparison a { width: max(48px,calc(var(--model-width) * var(--compare-unit))); line-height: 1.4; }
 .model-comparison a > span:not(.comparison-shape) { font-size: 14px; }
 .comparison-shape { height: 60px; }
}
@media (max-width: 359px) { .model-comparison { --compare-unit: 2px; gap: 4px; } }
