/* The shower builder page (shower-builder.html). It reuses the cards and buttons from styles.css. */
.builder-head { padding-top: calc(var(--nav-h) + clamp(28px, 4vw, 56px)); padding-bottom: clamp(20px, 2.5vw, 32px); }
.builder-head h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.builder-head .lede { margin-top: 14px; }
.builder { display: grid; gap: 28px; padding-bottom: clamp(72px, 10vw, 140px); }

/* The picture stays in view while the options scroll under it */
.b-card { grid-area: auto; position: sticky; top: calc(var(--nav-h) + 8px); z-index: 5; padding: 12px 12px 12px; }
/* When the menu bar slides away on the way down the page, the picture moves up into its place */
.b-card { transition: top .3s ease; }
body:has(.nav.away) .b-card { top: 8px; }
.b-card figcaption { padding-bottom: 10px; margin-bottom: 10px; }
.b-stage {
  position: relative; overflow: hidden; margin: 0 auto; width: 100%;
  height: clamp(250px, 44svh, 460px);
  border-radius: var(--sg-radius-sm); background: #0b0c0e;
}
/* a soft darkening toward the corners of the picture, as a camera lens gives */
.b-stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 46%, transparent 58%, rgba(0,0,0,.38) 100%); }
.b-door, .b-fallback { z-index: 2; }
.b-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; touch-action: pan-y; }
.b-door {
  position: absolute; right: 10px; bottom: 10px; min-height: 40px; padding: 8px 16px; cursor: pointer;
  font: inherit; font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  color: var(--sg-text-primary); background: rgba(10,10,10,.72); border: 1px solid #4A4A4A; border-radius: var(--sg-radius-sm);
}
.b-door:hover { border-color: var(--sg-chrome); }
.b-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--sg-text-secondary); font-size: 14px; }
.b-fallback[hidden], .b-door[hidden], .b-note[hidden] { display: none; }

.b-panel { display: grid; gap: 26px; min-width: 0; }
.b-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.b-group legend {
  padding: 0; margin-bottom: 12px;
  font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--sg-chrome);
}
.b-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.b-opts .finish-btn { min-width: 0; }
.b-opts .finish-btn:disabled { opacity: .42; cursor: not-allowed; border-color: var(--sg-border); color: var(--sg-text-muted); }
.b-opts .finish-btn small { display: block; margin-top: 2px; font-size: 10.5px; letter-spacing: .04em; text-transform: none; color: var(--sg-text-muted); }

/* Finish swatches */
.b-sw { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); }
.b-sw-chrome { background: linear-gradient(135deg, #f4f6f8, #8f989f 55%, #e3e7ea); }
.b-sw-nickel { background: linear-gradient(135deg, #cfc9bd, #8e887c); }
.b-sw-black { background: linear-gradient(135deg, #3a3a3a, #0c0c0c); }
.b-sw-pbrass { background: linear-gradient(135deg, #f6dc8c, #a8791f 55%, #ecc866); }
.b-sw-sbrass { background: linear-gradient(135deg, #d3b672, #9b7b3a); }
.b-sw-bronze { background: linear-gradient(135deg, #a98c6c, #6b543c); }

/* Size boxes: plain text so a size like 59 3/4 can be typed on a phone */
.b-sizes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.b-size label { display: block; margin-bottom: 6px; font-size: 13px; color: #B9C4CF; }
.b-step { display: grid; grid-template-columns: 44px 1fr 44px; }
.b-step input {
  width: 100%; min-width: 0; font: inherit; font-size: 18px; text-align: center; color: var(--sg-text-primary);
  background: rgba(10,10,10,.55); border: 1px solid var(--sg-navy-hi); border-left: 0; border-right: 0; border-radius: 0; padding: 10px 6px;
}
.b-step input:focus { outline: 2px solid var(--sg-chrome); outline-offset: -2px; }
.b-step button {
  min-height: 48px; cursor: pointer; font: inherit; font-size: 20px; line-height: 1; color: var(--sg-text-primary);
  background: var(--sg-bg-surface); border: 1px solid var(--sg-navy-hi);
}
.b-step button:first-child { border-radius: var(--sg-radius-md) 0 0 var(--sg-radius-md); }
.b-step button:last-child { border-radius: 0 var(--sg-radius-md) var(--sg-radius-md) 0; }
.b-step button:hover { background: #2a2a2a; }
.b-hint { margin-top: 6px; font-size: 12px; color: var(--sg-text-muted); }
.b-note { margin-top: 12px; font-size: 13.5px; line-height: 1.5; color: #D9E3EC; padding: 10px 12px; border: 1px solid var(--sg-navy-hi); border-radius: var(--sg-radius-md); background: rgba(26,46,68,.35); }

.b-summary { padding: 20px; border: 1px solid var(--sg-border); border-radius: var(--sg-radius-md); background: var(--sg-bg-mid); }
.b-summary h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; margin-bottom: 12px; }
.b-summary dl { margin: 0 0 14px; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; }
.b-summary dt { color: var(--sg-text-muted); }
.b-summary dd { margin: 0; color: var(--sg-text-primary); }
.b-small { font-size: 12.5px; color: var(--sg-text-muted); margin-bottom: 16px; }
.b-summary .btn { width: 100%; }

@media (min-width: 960px) {
  .builder { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: start; }
  .b-card { top: calc(var(--nav-h) + 24px); padding: 16px 16px 16px; }
  .b-stage { height: min(calc(100svh - var(--nav-h) - 130px), 760px); }
}
