/* Layout: full-height showroom stage on the left, spec-sheet panel on the right; stacks on phones.
   Single light theme on purpose: product colours must read the same for every shopper. */
:root {
  --bg: #e8ebe7;        /* cool stone floor */
  --panel: #f6f7f4;
  --ink: #1b201d;
  --muted: #69716b;
  --line: #d6dbd4;
  --accent: #2f3d33;    /* deep olive CTA */
  --ring: #6e8a5e;
  --chip: #ffffff;
  --on-accent: #ffffff;
  --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --body: 'Figtree', 'Segoe UI', system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  display: flex; flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 28px; border-bottom: 1px solid var(--line); background: var(--panel);
}
.logo { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.demo { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; white-space: nowrap; }

.layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 380px; }

.stage { position: relative; min-height: 0; }
#c { width: 100%; height: 100%; display: block; touch-action: none; outline: none; }

.loader {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 10px;
  text-align: center; color: var(--muted); background: var(--bg); transition: opacity .5s;
}
.loader.done { opacity: 0; pointer-events: none; }
.loader .bar { width: 180px; height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.loader .bar span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s; }
.loader p { margin: 0; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }

.hint {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  font-size: 12px; color: var(--muted); background: var(--panel);
  padding: 6px 12px; border-radius: 99px; transition: opacity .6s; pointer-events: none; white-space: nowrap;
}
.hint.gone { opacity: 0; }

.viewbar {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 2px; padding: 4px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 99px;
  box-shadow: 0 6px 24px rgba(20, 30, 24, .08);
}
.viewbar button { border: 0; background: none; padding: 7px 14px; border-radius: 99px; font-size: 13px; color: var(--muted); }
.viewbar button.on, .viewbar button[aria-pressed="true"] { background: var(--ink); color: var(--on-accent); }
.viewbar .sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }

.dim-label {
  font: 600 12px var(--body); color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); padding: 2px 8px; border-radius: 99px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.panel {
  background: var(--panel); border-left: 1px solid var(--line); padding: 32px 30px; overflow-y: auto;
  display: flex; flex-direction: column;
}
.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 13px; }
h1 { font-family: var(--display); font-weight: 600; font-size: 34px; line-height: 1.05; letter-spacing: -.02em; margin: 0 0 10px; text-wrap: balance; }
.price { font-size: 20px; font-weight: 600; margin: 0 0 24px; font-variant-numeric: tabular-nums; }
.price span { display: inline-block; transition: transform .25s; }
.price span.bump { transform: scale(1.06); }

.group { padding: 18px 0; border-top: 1px solid var(--line); }
.glabel { font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.glabel span { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--muted); margin-left: 6px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--chip);
  padding: 8px 12px; border-radius: 10px; font-size: 14px; transition: border-color .15s;
}
.chip small { color: var(--muted); font-variant-numeric: tabular-nums; }
.chip i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.chip[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.sw {
  width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); transition: transform .15s;
  background-size: 160%; background-blend-mode: multiply;
}
.sw:hover { transform: scale(1.08); }
.sw[aria-pressed="true"] { outline: 2px solid var(--ring); outline-offset: 3px; }

.cta, .ghost { width: 100%; border-radius: 12px; padding: 15px; font-weight: 600; }
.cta { background: var(--accent); color: var(--on-accent); border: 0; margin-top: 22px; }
.cta:hover { opacity: .92; }
.ghost { background: none; border: 1px solid var(--line); margin-top: 10px; }
.fine { color: var(--muted); font-size: 13px; margin: 16px 0 0; }
.credit { margin-top: auto; padding-top: 24px; color: var(--muted); font-size: 12px; }

.toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: var(--on-accent); padding: 12px 18px; border-radius: 12px; font-size: 14px;
  transition: all .3s; pointer-events: none; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

button:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

@media (max-width: 860px) {
  html, body { height: auto; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .stage { height: 58vh; min-height: 340px; }
  .panel { border-left: 0; border-top: 1px solid var(--line); padding: 24px 16px 40px; }
  .topbar { padding: 12px 16px; }
  h1 { font-size: 28px; }
  .viewbar button { padding: 6px 9px; }
}
