/* The shop look (public/shop.html): an online-shop product page in the full studio's type and colours (Figtree; ink,
   bronze, amber on warm paper), lighter than the garden studio and richer than the minimal look. Desktop: the 3D view
   sticks on the left while the option column scrolls on the right. Phones: the 3D view sticks on top, the options
   scroll under it, and a dock keeps the price and the call to action at hand. */
:root {
  --ink: #1b1712; --ink-2: #463b31; --mute: #74685c; --line: rgba(27, 23, 18, .1);
  --paper: #f6f2ec; --card: #fffdfa; --bronze: #8a5a2b; --amber: #e0a96e;
  --pad: clamp(16px, 3vw, 40px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.45 Figtree, 'Figtree fallback', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
/* Every language wraps differently: body copy never ends on one lonely word, and a button or link evens out its
   lines, so its arrow never sits alone on the second one (home.js also glues the arrow to the last word). */
p, li, dd, figcaption { text-wrap: pretty; }
a, button { text-wrap: balance; }
/* Korean breaks between words, as its readers expect, not inside one (the browser's default splits syllables) */
:lang(ko) { word-break: keep-all; overflow-wrap: break-word; } /* a word longer than the line still breaks */
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 2px; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: baseline; gap: 22px; height: 64px; padding: 20px var(--pad) 0; background: rgba(246, 242, 236, .9); backdrop-filter: blur(10px); }
.brand { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; white-space: nowrap; }
.brand .logo { display: block; width: auto; height: 20px; flex: none; } /* inline SVG (public/img/castomo.svg, test/logo.test.ts): the castomo wordmark alone; a vector drawn in the page stays sharp at any zoom, where an <img> was resampled */
.crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--mute); }
.crumbs b { color: var(--ink); font-weight: 600; }

.page { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(360px, 1fr); gap: var(--pad); padding: 8px var(--pad) 48px; align-items: start; }

/* the 3D view: a light room in a rounded frame, kept in view while the column scrolls */
.view { position: sticky; top: 72px; height: calc(100vh - 92px); min-height: 420px; border-radius: 28px; overflow: hidden; background: radial-gradient(80% 55% at 50% 32%, #fffdfa 0%, rgba(255, 253, 250, 0) 75%), linear-gradient(#f1ebe2 0%, #e9e1d5 60%, #ddd2c3 100%); box-shadow: inset 0 0 0 1px var(--line); }
.scene { position: absolute; inset: 0; }
.scene canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.loading { position: absolute; inset-inline-start: 50%; top: 45%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.loading .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--bronze); animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { to { transform: scale(.5); opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .loading .dot { animation: none; } }
.drag { position: absolute; inset-inline-start: 0; inset-inline-end: 0; bottom: 16px; margin: 0; text-align: center; font-size: 13px; color: var(--mute); pointer-events: none; }

/* the column */
.col { display: grid; gap: 14px; }
.head, .group, .ask { background: var(--card); border-radius: 22px; padding: 22px 24px; box-shadow: 0 1px 0 var(--line), 0 12px 32px -24px rgba(27, 23, 18, .4); }
/* the model picker: one scrolling strip of pictures per kind, bleeding to the card's edges; the chosen one ringed
   like a chosen swatch */
.models { display: grid; gap: 4px; margin: 0 -24px; --arrows-fade: var(--card); } /* app/arrows.js fades to the card */
.models-kind { margin: 0; padding: 0 24px; font-size: 13px; color: var(--mute); }
/* Every scroll stops with a whole picture at the strip's left edge (the chosen model centred on load, an arrow's
   jump, a swipe), never one cut mid-name. */
.strip { display: flex; gap: 10px; padding: 6px 24px 10px; overflow-x: auto; scroll-behavior: smooth; scroll-snap-type: x mandatory; scroll-padding-inline: 24px; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; } /* the picture cut off at the edge already says the strip scrolls */
@media (prefers-reduced-motion: reduce) { .strip { scroll-behavior: auto; } }
.model { flex: none; scroll-snap-align: start; display: grid; gap: 6px; width: 96px; padding: 0; border: 0; background: none; font-size: 12.5px; font-weight: 600; text-align: center; color: var(--ink); }
.model img { display: block; width: 96px; height: 72px; object-fit: cover; border-radius: 14px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); transition: transform .15s, box-shadow .15s; }
.model[aria-checked="true"] img { box-shadow: 0 0 0 3px var(--card), 0 0 0 5.5px var(--amber); }
@media (hover: hover) { .model:hover img { transform: translateY(-2px); } }
.head h1 { margin: 14px 0 0; font-size: clamp(28px, 3vw, 38px); line-height: 1.05; font-weight: 800; letter-spacing: -.02em; }
.kind { margin: 4px 0 0; color: var(--mute); }
.price { margin: 18px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.price b { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.price span { font-size: 13px; color: var(--mute); }
.days { margin: 6px 0 18px; font-size: 14px; color: var(--ink-2); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 28px; border: 0; border-radius: 999px; font-weight: 700; font-size: 16px; text-decoration: none; }
.cta { width: 100%; background: linear-gradient(160deg, #9b6835, #7a4c22); color: #fff; box-shadow: 0 10px 26px -10px rgba(138, 90, 43, .6); transition: transform .15s, box-shadow .15s; }
.cta:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -10px rgba(138, 90, 43, .7); }
.cta:disabled { opacity: .6; }

/* option groups: a title with the current pick, then the swatches */
.groups { display: grid; gap: 14px; }
.group h2 { margin: 0 0 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 16px; font-weight: 700; }
.group h2 span { font-size: 13px; font-weight: 500; color: var(--mute); text-align: end; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 14px 10px; }
.swatch { display: grid; justify-items: center; align-content: start; gap: 7px; padding: 0; border: 0; background: none; font-size: 12.5px; font-weight: 600; line-height: 1.2; text-align: center; color: var(--ink); }
.swatch small { font-size: 11.5px; font-weight: 500; color: var(--bronze); }
.swatch .pic { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 6px 14px -8px rgba(27, 23, 18, .5); transition: transform .15s, box-shadow .15s; }
.swatch .pic.sw { background: var(--img, none) center / cover, var(--c); background-blend-mode: multiply; }
.swatch .pic.ico { background: linear-gradient(160deg, #fff, var(--paper)); }
.swatch .pic.ico svg { width: 40%; height: 40%; fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.swatch[aria-checked="true"] .pic { box-shadow: 0 0 0 3px var(--card), 0 0 0 5.5px var(--amber), 0 6px 14px -8px rgba(27, 23, 18, .5); }
.swatch.multi .pic { border-radius: 16px; }
@media (hover: hover) { .swatch:hover .pic { transform: translateY(-2px); } }

/* the quote */
.ask h2 { margin: 0; font-size: 20px; font-weight: 800; }
.muted { color: var(--mute); font-size: 14px; margin: 6px 0 16px; }
.quote { display: grid; gap: 12px; }
.quote label { display: grid; gap: 5px; font-size: 13px; color: var(--mute); }
.quote input:not([type=checkbox]), .quote textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 16px; color: var(--ink); }
.quote textarea { resize: vertical; }
.quote .check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--bronze); }
.err { margin: 0; min-height: 1.4em; font-size: 14px; font-weight: 600; }

.dock { display: none; }

/* phones and narrow tablets: 3D on top (sticky), the column under it, the dock at the bottom */
@media (max-width: 900px) {
  .top { height: 54px; padding-top: 16px; background: var(--paper); } /* opaque: the options scroll under it */
  .crumbs span { display: none; }
  .page { grid-template-columns: 1fr; padding: 0 0 calc(96px + var(--offer-h, 0px)); gap: 12px; } /* the last option clears the dock and the offer bar */
  .view { top: 54px; z-index: 3; height: 34svh; min-height: 220px; border-radius: 0 0 24px 24px; } /* a third of the screen: the options under it need the rest, the dock and offer bar take the bottom */
  .col { padding: 0 12px; }
  .head, .group, .ask { padding: 18px; }
  .head .cta { display: none; } /* the dock has it */
  .models { margin: 0 -18px; } /* the strips bleed to the card's narrower phone padding */
  .models-kind, .strip { padding-inline-start: 18px; padding-inline-end: 18px; }
  .strip { scroll-padding-inline: 18px; }
  .dock { position: fixed; z-index: 6; inset-inline-start: 12px; inset-inline-end: 12px; bottom: calc(max(12px, env(safe-area-inset-bottom)) + var(--offer-h, 0px)); display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px; border-radius: 999px; background: rgba(27, 23, 18, .92); color: #fff; font-weight: 700; backdrop-filter: blur(10px); }
  .dock span { flex: 1; }
  .dock .cta { width: auto; min-height: 44px; padding: 10px 22px; font-size: 15px; }
}

/* the look switcher (app/switcher.js), at the header's right end */
.top .look-at { margin-inline-start: auto; align-self: center; margin-top: -10px; }
@media (max-width: 900px) { .top .look-at { margin-top: -8px; } }

/* the privacy notice beside every consent box (wellness.castomo.com/privacy/ covers this site) */
.privacy-link { align-self: flex-start; font-size: 13px; color: inherit; opacity: .75; text-decoration: underline; }

/* The options arrive from the script after the first paint; the form below them waits for them rather than being
   pushed down the page by them (a layout shift Lighthouse scored 0.29). */
.groups:empty + .ask { display: none; }
