/* ─────────────────────────────────────────────────────────────────────────────
   DuPlessis Pools — 3D Pool Designer · BLACK + GOLD skin (JRod's comp 2026-07-03)
   Three faces, one DOM:
     · DESKTOP (default)    — accordion panel left, stage right, options bar below
     · MOBILE PORTRAIT      — 3D on top, bottom tab bar, slide-up section drawer
     · MOBILE LANDSCAPE     — left icon rail, 3D beside, side drawer
   ───────────────────────────────────────────────────────────────────────────── */
:root {
  /* black + gold */
  --bg: #0a0a0c;          /* page */
  --panel: #101014;       /* panel surface */
  --card: #17171d;        /* cards / controls */
  --card-2: #1e1e25;      /* hover / raised */
  --line: rgba(255, 255, 255, .08);
  --gold: #c9a445;
  --gold-bright: #e6c366;
  --gold-dim: rgba(201, 164, 69, .35);
  --text: #e9e5da;
  --muted: #97928a;
  --red: #bc0303;         /* DuPlessis signal red — CTA */
  --red-700: #970202;
  --green: #1f8a3b;       /* cart has items */

  --sans: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --sh-1: 0 1px 2px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.35);
  --sh-2: 0 10px 30px rgba(0,0,0,.5);
  --ease: cubic-bezier(.22,.61,.36,1);

  font-family: var(--sans);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--text); font-family: var(--sans);
  display: flex; flex-direction: column; height: 100dvh; overflow: hidden;
}

/* ── header ── */
.app-bar {
  position: relative; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 20px; background: #000;
  border-bottom: 1px solid var(--gold-dim);
}
.brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand__mark { height: 46px; width: auto; display: block; filter: sepia(1) saturate(2.2) hue-rotate(-12deg) brightness(1.05); }
.brand__text { display: flex; flex-direction: column; min-width: 0; }
.brand__text strong { font-size: 1.05rem; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; color: #fff; white-space: nowrap; }
.brand__text span { font-size: .74rem; color: var(--gold); white-space: nowrap; }
/* mobile price = the gold Estimated Total pill treatment (JRod's comp) */
.app-bar__price {
  display: none; align-items: center; gap: 8px;
  padding: 5px 13px; background: var(--panel);
  border: 1px solid var(--gold); border-radius: 11px;
}
.app-bar__price svg { width: 19px; height: 19px; color: var(--gold); flex-shrink: 0; display: block; }
.app-bar__price-text { display: flex; flex-direction: column; line-height: 1.15; }
.app-bar__price-text small { font-size: .54rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--gold); }
.app-bar__price-text b { font-size: .98rem; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; }
.app-bar__actions { display: flex; gap: 8px; align-items: center; }

.btn {
  font: inherit; font-weight: 700; border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 9px 16px; cursor: pointer; transition: .15s var(--ease);
  display: inline-flex; align-items: center; gap: 7px;
}
.btn svg { width: 18px; height: 18px; }
.btn--ghost { background: #121218; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--gold-dim); color: #fff; }

/* share sheet: copy / socials / send-to-sales — opens from the Share button */
.share-sheet {
  position: fixed; inset: 0; z-index: 60; display: none;
  align-items: center; justify-content: center;
  background: rgba(6, 6, 10, .72); padding: 18px;
}
.share-sheet.is-on { display: flex; }
.share-sheet__card {
  position: relative; width: min(430px, 100%);
  background: #15151c; border: 1px solid var(--gold-dim);
  border-radius: var(--radius-md); padding: 26px 24px 22px;
  text-align: center;
}
.share-sheet__card h2 { margin: 0 0 6px; font-size: 1.15rem; color: #fff; }
.share-sheet__card > p { margin: 0 0 18px; font-size: .88rem; color: var(--text); }
.share-sheet__row { display: flex; gap: 9px; justify-content: center; flex-wrap: wrap; }
.share-sheet__row button {
  font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer;
  padding: 10px 15px; border-radius: var(--radius-sm);
  background: #121218; color: var(--text); border: 1px solid var(--line);
  min-height: 44px;
}
.share-sheet__row button:hover { border-color: var(--gold-dim); color: #fff; }
.share-sheet__icon { min-width: 48px; padding: 10px 13px !important; display: inline-flex; align-items: center; justify-content: center; }
.share-sheet__icon svg { width: 21px; height: 21px; }
.share-sheet__divider { height: 1px; background: var(--line); margin: 20px 0; }
.share-sheet__send { width: 100%; justify-content: center; min-height: 48px; font-size: .95rem; }
p.share-sheet__hint { margin: 26px 0 4px; font-size: .78rem; color: var(--text); opacity: .75; }
.share-sheet__close {
  position: absolute; top: 8px; right: 12px; font-size: 1.5rem; line-height: 1;
  background: none; border: none; color: var(--text); cursor: pointer; padding: 6px;
}
.share-sheet__close:hover { color: #fff; }

/* salesperson walkway: gold Create Quote — only exists in sales-mode sessions */
.btn--quote { background: var(--gold); color: #121218; font-weight: 800; }
.btn--quote:hover { background: #b8933a; }

/* smart cart: red "+ cart" when empty → green cart with (count) when filled */
.btn--cart { background: var(--red); color: #fff; font-weight: 800; }
.btn--cart:hover { background: var(--red-700); }
.btn--cart .cart__plus { display: none; font-size: 1.05rem; font-weight: 900; line-height: 1; margin-right: -2px; }
.btn--cart .cart__count { font-variant-numeric: tabular-nums; }
.btn--cart.has-items { background: var(--green); }
.btn--cart.has-items:hover { background: #187330; }

/* mobile actions menu */
.menu[hidden] { display: none; }
.menu {
  position: absolute; top: calc(100% + 8px); right: 14px; z-index: 40;
  display: flex; flex-direction: column; min-width: 170px;
  background: var(--card); border: 1px solid var(--gold-dim); border-radius: 10px;
  box-shadow: var(--sh-2); overflow: hidden;
}
.menu button {
  font: inherit; font-weight: 700; color: var(--text); text-align: left;
  background: none; border: 0; padding: 12px 16px; cursor: pointer;
}
.menu button:hover { background: var(--card-2); color: var(--gold-bright); }
.menu button + button { border-top: 1px solid var(--line); }

.desk-only { display: inline-flex; }
.mob-only { display: none; }

/* ── layout ── */
.layout { flex: 1; display: flex; min-height: 0; }
.panel {
  width: 384px; flex-shrink: 0; background: var(--panel);
  border-right: 1px solid var(--line); overflow-y: auto; padding: 14px 14px 20px;
  scrollbar-width: thin; scrollbar-color: #2a2a33 transparent;
}
.stage { flex: 1; position: relative; min-width: 0; background: #0e0e11; overflow: hidden; }
.viewport { position: absolute; inset: 0; }

/* ── estimate card ── */
.estimate {
  background: #000; border: 1px solid var(--gold-dim); border-radius: var(--radius);
  padding: 15px 16px 13px; margin-bottom: 14px;
}
.estimate__label { font-size: .68rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.estimate__total { font-size: 2.05rem; font-weight: 900; color: #fff; line-height: 1.15; font-variant-numeric: tabular-nums; }
.estimate__model { font-size: .88rem; color: var(--text); margin-top: 2px; }
.estimate__live { display: flex; align-items: center; gap: 6px; font-size: .74rem; color: var(--gold); margin-top: 7px; }
.estimate__live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: pulse 2.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ── collapsible sections (desktop accordion) ── */
.sec {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: 10px; overflow: hidden;
}
.sec__head {
  display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer;
  padding: 12px 14px; font-size: .74rem; font-weight: 800; letter-spacing: 1.3px;
  text-transform: uppercase; color: var(--text); user-select: none;
}
.sec__head::-webkit-details-marker { display: none; }
.sec__head:hover { color: #fff; background: var(--card); }
.sec__icon { display: inline-flex; color: var(--gold); }
.sec__icon svg, .drawer__subtitle svg, .tabbar svg { width: 19px; height: 19px; }
.sec__title { flex: 1; }
.sec__badge { color: var(--gold); }
.sec__chev { width: 17px; height: 17px; color: var(--muted); transition: .2s var(--ease); }
.sec[open] > .sec__head .sec__chev { transform: rotate(180deg); }
.sec__body { padding: 4px 14px 14px; border-top: 1px solid var(--line); }

/* ── controls ── */
.model-sel {
  width: 100%; padding: 11px 12px; margin-top: 8px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-weight: 700; color: #fff; background: var(--card); cursor: pointer;
}
.model-sel:focus { outline: 2px solid var(--gold); outline-offset: 1px; }

.row { display: grid; grid-template-columns: 92px 1fr 52px; align-items: center; gap: 8px; margin-top: 12px; }
.row--toggle { grid-template-columns: 1fr auto; }
.row__label { font-size: .86rem; color: var(--text); }
.row__val { font-size: .84rem; text-align: right; font-variant-numeric: tabular-nums; color: var(--gold-bright); font-weight: 700; }
.row input[type="range"] { width: 100%; accent-color: var(--gold); }
.row input[type="checkbox"] { width: 19px; height: 19px; accent-color: var(--green); cursor: pointer; }
.row select {
  padding: 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit;
  background: var(--card); color: var(--text); width: 100%;
}

/* size tiers + divider */
.size-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-top: 8px; }
.size-chip {
  font: inherit; font-size: .82rem; font-weight: 700; color: var(--text);
  padding: 10px 6px; background: var(--card); border: 1.5px solid var(--line);
  border-radius: 8px; cursor: pointer; transition: .12s var(--ease);
}
.size-chip:hover { border-color: var(--gold-dim); }
.size-chip.is-on { border-color: var(--gold); color: var(--gold-bright); box-shadow: 0 0 0 1px var(--gold); }
.ctl__hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0 2px; }

/* finish product pickers — swipeable rows */
.fin-sub { font-size: .8rem; font-weight: 700; color: var(--muted); margin: 14px 0 7px; }
/* subsection header with a gold spiff icon (Services & Warranty — JRod 2026-07-15) */
.fin-sub--icon { display: flex; align-items: center; gap: 6px; }
.fin-sub--icon svg { width: 15px; height: 15px; color: var(--gold); flex: 0 0 auto; }

/* water wall LF stepper (+ / − with the number, price alongside) */
.lf-step { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.lf-step button {
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  font: inherit; font-size: 1.25rem; font-weight: 900; line-height: 1;
  color: var(--gold-bright); background: var(--card); border: 1.5px solid var(--gold-dim);
  transition: .12s var(--ease);
}
.lf-step button:hover { border-color: var(--gold); background: var(--card-2); }
.lf-step button:active { transform: scale(.94); }
.lf-step__num { min-width: 62px; text-align: center; font-weight: 900; font-size: 1.05rem; color: #fff; font-variant-numeric: tabular-nums; }
.lf-step__price { margin-left: auto; font-weight: 800; color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.lf-note { font-size: .72rem; color: var(--muted); margin: 8px 0 2px; }

/* ── LED color swatches (lights / bubblers / deck jets share these) ── */
.led-row { display: flex; flex-wrap: wrap; gap: 9px; padding: 2px 0 4px; }
.led-dot {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  background: var(--led); border: 2px solid rgba(255,255,255,.16);
  transition: .15s var(--ease);
}
.led-dot:hover { transform: scale(1.12); }
.led-dot.is-on {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px #000, 0 0 0 3.5px var(--gold), 0 0 12px var(--led);
}
.size-chip[disabled] { opacity: .38; cursor: not-allowed; text-decoration: line-through; }
/* desktop: swatches fill the panel width — 4 per row, NO dead side space
   (JRod 2026-07-03); the mobile drawer overrides to a swipe row further down */
/* max 4 per row (min 72px fits exactly 4 in the 325px panel, never 5); a row
   with fewer items collapses the empty tracks so the cards scale UP to fill
   the width (JRod 2026-07-15 — 3 automation cards fill instead of shrinking) */
.tex-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; }
/* STANDARD CARD SIZING (JRod 2026-07-15): buttons vertically-center their
   content by default, so on a stretched row a card with fewer text lines let
   its image drift DOWN (black bar on top). Flex-column anchors the image to
   the TOP and margin-top:auto pins the price to the BOTTOM — image tops +
   price bottoms line up across every card regardless of how many lines the
   name wraps to. Works for any section we add. */
.tex {
  border: 2px solid var(--line); border-radius: 8px; padding: 0;
  background: var(--card); cursor: pointer; overflow: hidden; transition: .12s var(--ease);
  display: flex; flex-direction: column;
}
.tex:hover { border-color: var(--gold-dim); }
.tex img { width: 100%; height: 66px; object-fit: cover; display: block; flex: 0 0 auto; }
.tex__name { display: block; width: 100%; font-size: .64rem; font-weight: 600; color: var(--muted); padding: 4px 2px; text-align: center; line-height: 1.15; flex: 0 0 auto; }
.tex.is-on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.tex.is-on .tex__name { color: var(--gold-bright); }
/* priced picks (equipment / automation) — gold price chip pinned to the card bottom */
.tex__price { display: block; width: 100%; font-size: .62rem; font-weight: 700; color: var(--gold); padding: 0 2px 5px; text-align: center; line-height: 1; margin-top: auto; }
.tex.is-on .tex__price { color: var(--gold-bright); }
/* product-photo cards (automation etc.) — the graphic FILLS the card, no white
   letterbox/padding (JRod 2026-07-15); source shots carry their own blue-tile bg */
.tex--photo img { height: 88px; object-fit: cover; }
.drawer .tex--photo img { height: 76px; }
/* the None card in a PHOTO row (heaters) matches the photo footprint */
.tex--none.tex--photo .tex__none { height: 88px; flex: 0 0 auto; }
.drawer .tex--none.tex--photo .tex__none { height: 76px; }
/* the "None" swatch in optional-upgrade grids — dashed empty frame, same footprint */
/* SPRAY DECK COLOURS (Derek's official seven, 2026-07-27) — named swatches, not
   bare dots: the palette is CLOSED now, so the customer picks a real product by
   NAME + SW code rather than guessing a colour from a tooltip. Same card
   anatomy as .tex (swatch on top, label below, gold ring when on) so the
   Decking section reads as part of the same system. The old free any-hex
   picker (.sw-free) retired with the open palette. */
.sw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; }
.sw-chip {
  border: 2px solid var(--line); border-radius: 8px; padding: 0;
  background: var(--card); cursor: pointer; overflow: hidden; transition: .12s var(--ease);
  display: flex; flex-direction: column; text-align: center;
}
.sw-chip:hover { border-color: var(--gold-dim); }
.sw-chip__swatch { display: block; width: 100%; height: 46px; flex: 0 0 auto; }
.sw-chip__name { display: block; font-size: .64rem; font-weight: 600; color: var(--muted); padding: 4px 3px 0; line-height: 1.15; }
.sw-chip__code { display: block; font-size: .58rem; font-weight: 700; color: var(--gold-dim); padding: 1px 3px 5px; line-height: 1; margin-top: auto; letter-spacing: .02em; }
.sw-chip.is-on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.sw-chip.is-on .sw-chip__name { color: var(--gold-bright); }
.sw-chip.is-on .sw-chip__code { color: var(--gold); }
.tex--wide { grid-column: 1 / -1; }              /* spot-tile border strip — full row, shown at strip aspect */
.tex--wide img { height: 40px; }
.tex--none { border-style: dashed; background: transparent; }
.tex--none .tex__none { display: flex; align-items: center; justify-content: center; height: 66px; font-size: 1.3rem; color: var(--muted); }
.drawer .tex--none .tex__none { height: 58px; }

/* build summary lines */
.sum__line { display: flex; justify-content: space-between; gap: 10px; font-size: .84rem; padding: 6px 0; color: var(--text); border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.sum__line--total { border-bottom: 0; margin-top: 4px; font-weight: 900; color: var(--gold-bright); font-size: .95rem; }

/* ── stage overlays (black + gold) ── */
.stage__motion {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer;
  padding: 7px 14px; border: 1px solid var(--gold-dim); border-radius: 20px;
  background: rgba(12,12,12,.9); color: var(--text); box-shadow: var(--sh-1);
  transition: .15s var(--ease);
}
.stage__motion:hover { background: rgba(201,164,69,.18); color: #fff; }
.stage__motion[aria-pressed="false"] { opacity: .55; }

.viewbar {
  position: absolute; bottom: 44px; left: 50%; transform: translateX(-50%); z-index: 3;
  display: flex; align-items: stretch;
  background: rgba(12,12,12,.9); border: 1px solid var(--gold-dim);
  border-radius: 14px; padding: 5px; box-shadow: var(--sh-2); backdrop-filter: blur(6px);
}
.viewbar button {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  font: inherit; font-size: .74rem; font-weight: 700; letter-spacing: .2px;
  color: var(--text); background: none; border: 0; border-radius: 10px;
  padding: 9px 18px 8px; cursor: pointer; transition: .15s var(--ease);
}
.viewbar button + button { border-left: 1px solid var(--line); border-radius: 0 10px 10px 0; }
.viewbar svg { width: 21px; height: 21px; color: var(--gold); }
.viewbar button:hover { background: rgba(201,164,69,.14); color: #fff; }
.viewbar button:hover svg { color: var(--gold-bright); }

/* ── scene lighting: vertical pill — Daylight (default) / Dusk / Night.
   Three icon radios; the active sky wears the gold ring ── */
.dn-switch {
  position: absolute; bottom: 44px; left: 14px; z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 5px;
  background: rgba(12,12,12,.9); border: 1px solid var(--gold-dim);
  border-radius: 20px; box-shadow: var(--sh-2); backdrop-filter: blur(6px);
  transition: .15s var(--ease);
}
.dn-switch:hover { border-color: var(--gold); }
.dn-switch button {
  display: inline-flex; padding: 6px; margin: 0; background: none; border: 0;
  border-radius: 14px; cursor: pointer; transition: .2s var(--ease);
}
.dn-switch svg { width: 19px; height: 19px; color: var(--text); opacity: .45; transition: .2s var(--ease); }
.dn-switch button:hover svg { opacity: .85; }
.dn-switch button.is-on { background: rgba(201,164,69,.22); box-shadow: inset 0 0 0 1px var(--gold); }
.dn-switch button.is-on svg { color: var(--gold-bright); opacity: 1; }

.stage__hint {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 3;
  margin: 0; padding: 6px 15px; background: rgba(12,12,12,.78); color: var(--muted);
  font-size: .74rem; border-radius: 20px; pointer-events: none; white-space: nowrap;
}

/* ── desktop options bar ── */
.optionsbar {
  display: flex; align-items: stretch; gap: 10px;
  padding: 10px 16px; background: #000; border-top: 1px solid var(--gold-dim);
}
.ob__chip {
  flex: 1 1 0; /* chips stretch to meet the total — no dead middle (JRod) */
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px;
  text-align: center;
  padding: 8px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  min-width: 110px;
}
.ob__k { font-weight: 800; font-size: .92rem; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ob__l { font-size: .64rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.ob__total {
  margin-left: auto; display: flex; align-items: center; gap: 10px;
  padding: 8px 18px; background: var(--panel); border: 1px solid var(--gold);
  border-radius: 10px; text-align: center;
}
.ob__coin svg { width: 22px; height: 22px; color: var(--gold); display: block; }
.ob__totText { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.ob__total .ob__k { color: #fff; font-size: 1.25rem; }
.ob__total .ob__l { color: var(--gold); }

/* ── mobile tab bar + drawer (hidden on desktop) ── */
.tabbar { display: none; }
.drawer { display: none; }

/* notes pop CENTER of the 3D VIEWPORT as an overlay card (lives inside .stage
   — never covers the options panel/bars). Bottom toasts went unseen. */
.toast {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.92);
  max-width: min(440px, 84vw); text-align: center;
  background: rgba(10,10,12,.96); color: #fff; border: 1.5px solid var(--gold);
  padding: 20px 26px; border-radius: 16px; font-size: .98rem; line-height: 1.5; font-weight: 600;
  opacity: 0; pointer-events: none; transition: .25s var(--ease); z-index: 60;
  box-shadow: 0 8px 40px rgba(0,0,0,.65), 0 0 0 1px rgba(201,164,69,.25);
}
.toast.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); pointer-events: auto; cursor: pointer; }

/* ── notes/alerts bell (top-left, opposite the water-motion toggle) — only
   exists while something needs telling; click slides the notes out ── */
.stage__alerts {
  position: absolute; top: 14px; left: 14px; z-index: 4;
  display: flex; align-items: center; gap: 7px; cursor: pointer;
  font: inherit; font-size: .8rem; font-weight: 800; color: var(--gold-bright);
  padding: 8px 13px; border: 1px solid var(--gold); border-radius: 20px;
  background: rgba(12,12,12,.92); box-shadow: var(--sh-1), 0 0 14px rgba(201,164,69,.35);
  transition: .15s var(--ease); animation: bellIn .35s var(--ease);
}
.stage__alerts[hidden] { display: none; }
.stage__alerts:hover { background: rgba(201,164,69,.16); }
.stage__alerts svg { width: 17px; height: 17px; }
@keyframes bellIn { from { transform: translateY(-8px); opacity: 0; } }
.alerts-panel {
  position: absolute; top: 56px; left: 14px; z-index: 4; width: min(330px, 78vw);
  background: rgba(10,10,12,.96); border: 1px solid var(--gold-dim); border-radius: 14px;
  padding: 14px 16px; box-shadow: var(--sh-2);
  opacity: 0; transform: translateX(-14px); transition: .25s var(--ease); pointer-events: none;
}
.alerts-panel[hidden] { display: none; }
.alerts-panel.is-open { opacity: 1; transform: translateX(0); pointer-events: auto; }
.alerts-panel h3 {
  font-size: .68rem; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--gold); margin: 0 0 9px;
}
.alerts-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.alerts-panel li {
  font-size: .84rem; line-height: 1.45; color: var(--text);
  padding: 9px 11px; background: var(--card); border-left: 3px solid var(--gold); border-radius: 8px;
}

/* ═════════════════════════════ MOBILE PORTRAIT ═════════════════════════════
   3D up top · bottom tab bar · slide-up drawer · swipeable swatch rows      */
@media (max-width: 900px) and (orientation: portrait) {
  .panel, .optionsbar, .desk-only { display: none; }
  .mob-only { display: inline-flex; }
  .app-bar { padding: 8px 12px; }
  .brand__text { display: none; }
  .brand__mark { height: 38px; }
  .app-bar__price { display: flex; }
  .btn--cart .cart__label { display: none; }
  .btn--cart { padding: 9px 12px; }
  .btn--cart:not(.has-items) .cart__plus { display: inline; }
  .btn--ghost.mob-only { padding: 9px 10px; }

  .layout { flex: 1; }
  .stage { flex: 1; }
  .viewbar { bottom: 12px; }
  .viewbar button { padding: 7px 12px 6px; font-size: .66rem; }
  .stage__hint { display: none; }

  .tabbar {
    display: flex; align-items: stretch; z-index: 25;
    background: #000; border-top: 1px solid var(--gold-dim);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  }
  .tabbar button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    font: inherit; font-size: .64rem; font-weight: 700; color: var(--muted);
    background: none; border: 0; border-radius: 8px; padding: 7px 2px 6px; cursor: pointer;
  }
  .tabbar button svg { color: var(--muted); }
  .tabbar button.is-on { color: var(--gold-bright); }
  .tabbar button.is-on svg { color: var(--gold); }

  .drawer {
    display: flex; flex-direction: column; z-index: 24;
    position: fixed; left: 0; right: 0; bottom: 0;
    max-height: 62dvh; transform: translateY(105%);
    background: var(--panel); border-top: 1px solid var(--gold-dim);
    border-radius: 16px 16px 0 0; box-shadow: var(--sh-2);
    transition: transform .28s var(--ease);
    padding-bottom: calc(58px + env(safe-area-inset-bottom)); /* clear the tab bar */
  }
  .drawer.is-open { transform: translateY(0); }
  .drawer[hidden] { display: flex; visibility: hidden; }
  .drawer.is-open[hidden] { visibility: visible; }
}

/* drawer chrome (shared portrait + landscape) */
.drawer__head {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 10px; border-bottom: 1px solid var(--line);
}
.drawer__handle {
  position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
  width: 42px; height: 4px; border-radius: 2px; background: var(--line);
}
.drawer__title { font-size: .8rem; font-weight: 800; letter-spacing: 1.3px; text-transform: uppercase; color: var(--text); }
.drawer__done {
  font: inherit; font-weight: 800; color: var(--gold); background: none; border: 0;
  cursor: pointer; padding: 4px 2px; font-size: .86rem;
}
.drawer__done:hover { color: var(--gold-bright); }
.drawer__body { overflow-y: auto; padding: 4px 16px 18px; -webkit-overflow-scrolling: touch; }
.drawer__section + .drawer__section { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 8px; }
.drawer__subtitle {
  display: flex; align-items: center; gap: 8px; margin: 10px 0 2px;
  font-size: .72rem; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted);
}
.drawer__subtitle svg { color: var(--gold); }
/* fold-ups inside the drawer wear the OLD flat subtitle look — no card box,
   caret snugged up beside the title (JRod 2026-07-08: containers crunched
   the space). Desktop accordion keeps its cards; this is drawer-scoped. */
.drawer__body .sec { background: none; border: 0; border-radius: 0; margin-bottom: 0; overflow: visible; }
.drawer__body .sec + .sec { border-top: 1px solid var(--line); }
.drawer__body .sec__head {
  padding: 13px 0 9px; font-size: .72rem; letter-spacing: 1.2px; color: var(--muted);
}
.drawer__body .sec__head:hover { background: none; color: var(--text); }
.drawer__body .sec__title { flex: 0 0 auto; }
.drawer__body .sec__chev { margin-left: 2px; }
.drawer__body .sec__body { border-top: 0; padding: 0 0 14px; }
.drawer .tex-grid {
  display: flex; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 5px; gap: 7px;
  scrollbar-width: thin; scrollbar-color: #2a2a33 transparent;
  -webkit-overflow-scrolling: touch;
}
.drawer .tex { flex: 0 0 78px; }
.drawer .tex img { height: 58px; }
.drawer .tex--wide { flex: 0 0 100%; }
.drawer .tex--wide img { height: 40px; }
.drawer .tex__name { font-size: .62rem; }

/* gold scroll-affordance arrows on the swipe rows (mobile drawer) */
.tex-scroll { position: relative; }
.tex-arrow {
  position: absolute; top: 0; height: 62px; width: 38px; z-index: 4;
  display: none; align-items: center; justify-content: center;
  border: 0; padding: 0; cursor: pointer; color: var(--gold-bright);
}
.tex-arrow svg { width: 24px; height: 24px; filter: drop-shadow(0 1px 3px #000); }
.tex-arrow--left  { left: 0;  border-radius: 8px 0 0 8px; background: linear-gradient(90deg,  rgba(16,16,20,.96) 30%, rgba(16,16,20,0)); }
.tex-arrow--right { right: 0; border-radius: 0 8px 8px 0; background: linear-gradient(270deg, rgba(16,16,20,.96) 30%, rgba(16,16,20,0)); }
.tex-scroll.can-left  .tex-arrow--left  { display: flex; animation: nudgeL 1.6s ease-in-out infinite; }
.tex-scroll.can-right .tex-arrow--right { display: flex; animation: nudgeR 1.6s ease-in-out infinite; }
.tex-arrow:active { color: #fff; }
@keyframes nudgeR { 0%,100% { transform: translateX(0); } 50% { transform: translateX(3px); } }
@keyframes nudgeL { 0%,100% { transform: translateX(0); } 50% { transform: translateX(-3px); } }
@media (prefers-reduced-motion: reduce) { .tex-arrow { animation: none !important; } }

/* ════════════════════════════ MOBILE LANDSCAPE ═════════════════════════════
   Left icon rail · 3D beside · drawer slides from the rail · options scroll ↕ */
@media (max-height: 540px) and (orientation: landscape) {
  .panel, .optionsbar, .desk-only, .stage__hint { display: none; }
  .mob-only { display: inline-flex; }
  .app-bar { padding: 5px 12px; }
  .brand__text { display: none; }
  .brand__mark { height: 30px; }
  .app-bar__price { display: flex; padding: 3px 10px; }
  .btn--cart .cart__label { display: none; }
  .btn--cart:not(.has-items) .cart__plus { display: inline; }
  .btn { padding: 6px 10px; }

  .app-bar { height: 48px; padding-top: 0; padding-bottom: 0; }
  .layout { padding-left: 76px; }
  .tabbar {
    display: flex; flex-direction: column; z-index: 25;
    position: fixed; top: 48px; bottom: 0; left: 0;
    width: 76px; background: #000; border-right: 1px solid var(--gold-dim);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    overflow-y: auto; /* options scroll up/down in landscape */
  }
  .tabbar button {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    font: inherit; font-size: .6rem; font-weight: 700; color: var(--muted);
    background: none; border: 0; border-radius: 8px; padding: 9px 2px; cursor: pointer;
  }
  .tabbar button svg { color: var(--muted); }
  .tabbar button.is-on { color: var(--gold-bright); background: var(--card); }
  .tabbar button.is-on svg { color: var(--gold); }

  .drawer {
    display: flex; flex-direction: column; z-index: 24;
    position: fixed; top: 48px; bottom: 0; left: 76px; width: min(340px, 62vw);
    transform: translateX(-130%);
    background: var(--panel); border-right: 1px solid var(--gold-dim);
    box-shadow: var(--sh-2); transition: transform .28s var(--ease);
  }
  .drawer.is-open { transform: translateX(0); }
  .drawer[hidden] { display: flex; visibility: hidden; }
  .drawer.is-open[hidden] { visibility: visible; }
  .drawer__handle { display: none; }
  .viewbar { bottom: 10px; }
  .viewbar button { padding: 6px 11px 5px; font-size: .62rem; }
  .viewbar svg { width: 17px; height: 17px; }
}

/* material family switcher — the gold-icon cards up top (JRod's mock 2026-07-23) */
.mat-row { margin-bottom: 10px; }
.mat-chip { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 6px; }
.mat-chip__icon { display: inline-flex; }
.mat-chip__icon svg { width: 20px; height: 20px; color: var(--gold); stroke: currentColor; flex: 0 0 auto; }
.mat-chip.is-on .mat-chip__icon svg { color: var(--gold-bright); }

/* ── the price gate (Derek 2026-08-04): range until the email unlock ── */
.estimate__total--range { font-size: 1.42rem; letter-spacing: 0; }
.estimate__unlock { margin-top: 10px; }
.estimate__unlockBtn {
  width: 100%; padding: 10px 12px; border: 0; border-radius: var(--radius-sm);
  background: var(--gold); color: #141005; font-weight: 800; font-size: .8rem;
  cursor: pointer; transition: background .15s ease, transform .15s ease;
}
.estimate__unlockBtn:hover { background: var(--gold-bright); transform: translateY(-1px); }
.estimate__unlockForm { display: flex; gap: 6px; }
.estimate__unlockForm[hidden] { display: none; } /* flex would out-rank the hidden attribute */
.estimate__unlockForm input {
  flex: 1; min-width: 0; padding: 9px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: .85rem;
}
.estimate__unlockForm input:focus { outline: none; border-color: var(--gold-dim); }
.estimate__unlockForm button {
  padding: 9px 14px; border: 0; border-radius: var(--radius-sm);
  background: var(--gold); color: #141005; font-weight: 800; cursor: pointer;
}
.estimate__unlockForm button:hover { background: var(--gold-bright); }
.estimate__unlockForm.is-bad input { border-color: var(--red); animation: gate-shake .3s; }
@keyframes gate-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ── the cart drawer (view + adjust from the builder) ── */
.cartd[hidden] { display: none; }
.cartd { position: fixed; inset: 0; z-index: 80; }
.cartd__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .18s ease; }
.cartd__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100vw);
  display: flex; flex-direction: column; background: var(--panel);
  border-left: 1px solid var(--line); box-shadow: var(--sh-2);
  transform: translateX(14px); opacity: 0; transition: transform .18s ease, opacity .18s ease;
}
.cartd.is-on .cartd__scrim { opacity: 1; }
.cartd.is-on .cartd__panel { transform: translateX(0); opacity: 1; }
.cartd__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.cartd__head h2 { margin: 0; font-size: 1.05rem; color: var(--text); }
.cartd__close { border: 0; background: transparent; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 2px 8px; }
.cartd__close:hover { color: var(--text); }
.cartd__items { flex: 1; overflow-y: auto; padding: 12px 18px; display: grid; gap: 10px; align-content: start; }
.cartd__empty { color: var(--muted); font-size: .88rem; }
.cartd__item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 13px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.cartd__itemBody { display: grid; gap: 2px; min-width: 0; }
.cartd__itemBody strong { color: var(--text); font-size: .92rem; }
.cartd__itemBody span { color: var(--muted); font-size: .74rem; }
.cartd__itemBody em { font-style: normal; color: var(--gold); font-weight: 800; font-size: .86rem; font-variant-numeric: tabular-nums; }
.cartd__itemActs { display: grid; gap: 6px; flex: 0 0 auto; }
.cartd__itemActs button {
  padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--card-2); color: var(--text); font-size: .72rem; font-weight: 700; cursor: pointer;
}
.cartd__itemActs button:hover { border-color: var(--gold-dim); }
.cartd__itemActs [data-remove] { color: var(--muted); }
.cartd__itemActs [data-remove]:hover { color: #ff8d7e; border-color: rgba(188, 3, 3, .5); }
.cartd__foot { padding: 12px 18px 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.cartd__add {
  padding: 11px 12px; border: 0; border-radius: var(--radius-sm);
  background: var(--gold); color: #141005; font-weight: 800; cursor: pointer;
}
.cartd__add:hover { background: var(--gold-bright); }
.cartd__checkout {
  padding: 11px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--card); color: var(--muted); font-weight: 800; cursor: not-allowed;
}
.cartd__note { margin: 0; color: var(--muted); font-size: .7rem; line-height: 1.45; }

/* the cart's edit round-trip (JRod's catch 2026-08-04) */
.cartd__item.is-editing { border-color: var(--gold-dim); }
.cartd__flag {
  font-style: normal; color: var(--gold); font-size: .64rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .6px; margin-left: 6px;
}
.cartd__addNew {
  border: 0; background: transparent; color: var(--muted); font-size: .74rem;
  text-decoration: underline; cursor: pointer; padding: 0; justify-self: center;
}
.cartd__addNew:hover { color: var(--text); }
.cartd__addNew[hidden] { display: none; }

/* ── 30-day price hold: the estimate/summary buttons + the modal ── */
.estimate__hold, .sum__hold {
  width: 100%; margin-top: 10px; padding: 12px 14px; min-height: 44px;
  background: transparent; color: var(--gold-bright);
  border: 1px solid var(--gold); border-radius: 9px;
  font-weight: 700; font-size: .82rem; letter-spacing: .4px; cursor: pointer;
  transition: background .2s ease-out, color .2s ease-out;
}
.estimate__hold:hover, .sum__hold:hover { background: var(--gold); color: #111; }

.holdm { position: fixed; inset: 0; z-index: 300; opacity: 0; transition: opacity .18s ease-out; }
.holdm.is-on { opacity: 1; }
.holdm[hidden] { display: none; }
.holdm__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .62); }
.holdm__card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow: auto;
  background: #141414; border: 1px solid var(--gold-dim); border-radius: 14px;
  padding: 26px 24px; color: var(--text);
}
.holdm__card h2 { margin: 0 32px 8px 0; font-size: 1.15rem; color: var(--gold-bright); }
.holdm__sub { margin: 0 0 14px; font-size: .84rem; line-height: 1.55; color: var(--muted); }
.holdm__sub a { color: var(--gold-bright); text-decoration: none; }
.holdm__x {
  position: absolute; top: 10px; right: 12px; width: 40px; height: 40px;
  background: transparent; border: 0; color: var(--muted); font-size: 1.5rem; cursor: pointer;
}
.holdm__x:hover { color: var(--text); }
.holdm__form { display: grid; gap: 12px; }
.holdm__form label { display: grid; gap: 5px; font-size: .74rem; font-weight: 700; letter-spacing: .5px; color: var(--muted); }
.holdm__form input:not([type="checkbox"]) {
  min-height: 44px; padding: 10px 12px; border-radius: 8px;
  background: #0d0d0d; border: 1px solid #333; color: var(--text); font-size: 16px;
}
.holdm__form input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.holdm__consent { grid-template-columns: 22px 1fr; align-items: start; font-weight: 400 !important; }
.holdm__consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--gold); }
.holdm__consent span { font-size: .72rem; line-height: 1.5; color: var(--muted); letter-spacing: 0; }
.holdm__err { margin: 0; font-size: .78rem; color: #e08a8a; }
.holdm__err[hidden] { display: none; }
.holdm__go {
  min-height: 48px; padding: 13px 16px; border: 0; border-radius: 9px;
  background: var(--gold); color: #111; font-weight: 800; font-size: .9rem; cursor: pointer;
  transition: background .2s ease-out;
}
.holdm__go:hover { background: var(--gold-bright); }
.holdm__go:disabled { opacity: .6; cursor: default; }
@media (prefers-reduced-motion: reduce) { .holdm { transition: none; } }
