/* pages.css: family bench, photo grid, lightbox, AR sheet, lookbook, wall, request. */

.page main { padding-top: 76px; }

/* ---------- family bench ---------- */
.bench { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, 1fr); min-height: calc(100svh - 76px); }
.bench-stage { position: relative; background: #e4dccf; min-height: 420px; }
.bench-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.bench-stage.no-3d img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.bench-note { position: absolute; left: 20px; bottom: 16px; z-index: 2; font-size: 13px; letter-spacing: 0.04em; background: rgba(250, 247, 241, 0.86); padding: 6px 12px; border-radius: 30px; }
.bench-panel { padding: clamp(28px, 4vw, 56px) var(--gutter); display: flex; flex-direction: column; gap: 18px; background: var(--paper); }
.bench-panel h1 { font-size: clamp(48px, 5.5vw, 76px); }
.bench-panel .lede { margin-top: -6px; }
@media (max-width: 900px) {
  .bench { grid-template-columns: 1fr; }
  .bench-stage { height: 62svh; min-height: 360px; }
}

.cfg { display: grid; gap: 22px; margin-top: 10px; border-top: 1px solid var(--line); padding-top: 22px; }
.cfg-row { display: grid; gap: 10px; }
.cfg-k { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); }
.cfg-k b { font-weight: 500; letter-spacing: 0.04em; text-transform: none; color: var(--ink); margin-left: 8px; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 40px; font-size: 14px; background: #fff; }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip-note { font-size: 13px; color: var(--ink-faint); flex-basis: 100%; }
.dims { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.dims label { display: grid; gap: 4px; font-size: 12.5px; color: var(--ink-soft); }
.dims input { width: 120px; min-height: 44px; padding: 0 12px; font: inherit; font-size: 16px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.dims-hint { font-size: 12.5px; color: var(--ink-faint); padding-bottom: 12px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.sw { width: 40px; height: 40px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); position: relative; }
.sw.on::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1.5px solid var(--ink); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 40px; background: #fff; }
.stepper[hidden] { display: none; }
.stepper button { width: 38px; height: 38px; font-size: 18px; }
.stepper span { font-size: 13.5px; min-width: 74px; text-align: center; }
.bench-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.bench-actions .btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.bench-actions .btn.is-on svg { fill: currentColor; }
.fine { font-size: 13px; color: var(--ink-faint); max-width: 34em; }

/* ---------- photo grid ---------- */
.masonry { columns: 3 280px; column-gap: 18px; }
.ph { break-inside: avoid; margin: 0 0 18px; position: relative; }
.ph-open { display: block; width: 100%; border-radius: var(--r); overflow: hidden; background: var(--lime-deep); }
.ph-open img { width: 100%; height: auto; transition: transform 1s var(--ease); }
.ph-open:hover img { transform: scale(1.03); }
.ph .heart { position: absolute; top: 10px; right: 10px; }
.ph figcaption { font-size: 13px; color: var(--ink-soft); margin-top: 8px; }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(20, 18, 15, 0.96); color: var(--paper); display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px 360px; align-items: center; }
.lb-img { height: 100svh; display: grid; place-items: center; padding: 24px 0; }
.lb-img picture, .lb-img img { max-height: calc(100svh - 48px); max-width: 100%; width: auto; height: auto; object-fit: contain; }
.lb-nav { font-size: 40px; color: var(--paper); height: 100%; opacity: 0.7; }
.lb-nav:hover { opacity: 1; }
.lb-x {
  position: fixed; top: max(14px, env(safe-area-inset-top)); right: 16px; z-index: 5; width: 46px; height: 46px; border-radius: 50%;
  background: var(--ink); color: var(--paper); font-size: 28px; line-height: 1; display: grid; place-items: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}
.lb-x:hover { background: var(--charcoal); }
.lb-side { background: var(--paper); color: var(--ink); height: 100svh; padding: 64px 28px 28px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.lb-side h2 { font-size: 46px; }
.lb-meta { color: var(--ink-soft); }
.lb-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.lb-acts svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.lb-heart.is-on svg { fill: currentColor; }
.lb-note-l { display: grid; gap: 6px; font-size: 14px; margin-top: 8px; }
.lb-note-l span { color: var(--ink-faint); }
.lb-note, .field textarea, .field input { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; resize: vertical; width: 100%; }
.lb-saved { font-size: 13px; color: var(--brass); min-height: 1.2em; }
.lb-count { margin-top: auto; font-size: 12.5px; color: var(--ink-faint); letter-spacing: 0.1em; }
@media (max-width: 900px) {
  .lb { grid-template-columns: 1fr; grid-template-rows: 58svh auto; overflow-y: auto; align-items: start; }
  .lb-img { height: 58svh; padding: 12px; }
  .lb-img picture, .lb-img img { max-height: calc(58svh - 24px); }
  .lb-nav { position: absolute; top: 29svh; transform: translateY(-50%); height: 64px; width: 48px; z-index: 2; }
  .lb-prev { left: 0; } .lb-next { right: 0; }
  .lb-side { height: auto; min-height: 42svh; padding: 22px var(--gutter) 32px; }
  .lb-side h2 { font-size: 36px; }
}

/* ---------- AR sheet ---------- */
.ar-sheet { position: fixed; inset: 0; z-index: 110; background: rgba(20, 18, 15, 0.6); display: grid; place-items: center; padding: 16px; }
.ar-card { position: relative; width: min(560px, 100%); background: var(--paper); border-radius: 4px; overflow: hidden; }
.ar-stage { height: min(60svh, 520px); background: var(--lime); display: grid; place-items: center; }
.ar-stage model-viewer { width: 100%; height: 100%; }
.ar-wait { color: var(--ink-faint); }
.ar-go { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); }
.ar-foot { padding: 16px 20px 20px; display: grid; gap: 6px; font-size: 14px; color: var(--ink-soft); }
.ar-foot b { font-family: var(--display); font-size: 22px; font-weight: 500; color: var(--ink); }
.ar-close { position: absolute; top: 8px; right: 10px; z-index: 2; font-size: 28px; width: 44px; height: 44px; }
.pane-row .chip-note { flex-basis: auto; min-width: 54px; }
.chip-note .link { font-size: 13px; }

/* ---------- design rail: every design one tap away (family page) ---------- */
.rail { display: flex; gap: 6px; overflow-x: auto; padding: 10px var(--gutter); background: var(--paper); border-bottom: 1px solid var(--line); scrollbar-width: none; scroll-snap-type: x proximity; }
.rail::-webkit-scrollbar { display: none; }
.rail-item { flex: 0 0 auto; display: grid; justify-items: center; gap: 4px; width: 78px; padding: 4px 2px; border-radius: 8px; scroll-snap-align: center; opacity: 0.72; transition: opacity 0.2s, background 0.2s; }
.rail-item:hover { opacity: 1; background: var(--lime); }
.rail-item.on { opacity: 1; }
.rail-img { width: 54px; height: 64px; border-radius: 4px; overflow: hidden; background: var(--lime-deep); box-shadow: 0 0 0 1px var(--line); }
.rail-item.on .rail-img { box-shadow: 0 0 0 2px var(--ink); }
.rail-img img { width: 100%; height: 100%; object-fit: cover; }
.rail-t { font-size: 11.5px; line-height: 1.2; text-align: center; color: var(--ink-soft); }
.rail-item.on .rail-t { color: var(--ink); font-weight: 600; }
.page .bench { min-height: calc(100svh - 76px - 98px); }

/* stage arrows: the next design without leaving the page */
.stage-img { position: absolute; inset: 0; }
.stage-img picture, .stage-img img { width: 100%; height: 100%; object-fit: cover; }
.stage-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border-radius: 40px; background: rgba(250, 247, 241, 0.86); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1); font-size: 13px; color: var(--ink); opacity: 0.85; transition: opacity 0.2s; }
.stage-nav:hover { opacity: 1; }
.stage-nav span { font-size: 22px; line-height: 1; }
.stage-nav b { font-weight: 500; }
.stage-prev { left: 14px; } .stage-next { right: 14px; }
@media (max-width: 760px) { .stage-nav b { display: none; } .stage-nav { padding: 0 12px; } }
.stage-wc { position: absolute; right: 14px; bottom: 14px; z-index: 4; }

.bs-ok { font-size: 13.5px; color: var(--brass); }
.field em { font-style: normal; color: var(--ink-faint); }
