/* ==========================================================================
   From The Forest Creations: Shop, Customize, order drawer and header cart.
   Builds on the variables, fonts and .btn / .display styles in styles.css.
   Everything here is scoped to new class names so the home page is untouched.
   ========================================================================== */

:root {
  --ink-line: rgba(245, 229, 193, 0.12);
  --ink-line-strong: rgba(245, 229, 193, 0.28);
  --panel: #262626;
  --panel-raised: #2c2c2c;
  --cream-dim: rgba(236, 220, 188, 0.72);
  --radius: 14px;
  --gutter: 16px;
  --bar-h: 68px;
}

.page [hidden], .ftf-drawer-root [hidden], .sheet-root [hidden] { display: none !important; }

/* ---------- Page shell (inner pages) ---------- */
.page { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; background: var(--charcoal); }
.page img { max-width: 100%; }
/* Artwork can be dropped into .page-bg later without touching layout */
.page-bg { position: fixed; inset: 0; z-index: -1; background: var(--charcoal); pointer-events: none; }
html.drawer-open body, html.sheet-open body { overflow: hidden; }

.page-main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter) 48px; }
.page-intro { text-align: center; padding: 28px 0 18px; }
.page-title { font-size: clamp(58px, 16vw, 112px); line-height: 0.95; }
.page-lede { margin-top: 10px; font-size: clamp(15px, 4vw, 18px); color: var(--cream-dim); font-weight: 300; }
.page-footer { padding: 22px var(--gutter) calc(22px + env(safe-area-inset-bottom)); text-align: center; font-size: 12px; letter-spacing: 0.03em; color: rgba(245, 229, 193, 0.6); border-top: 1px solid var(--ink-line); }

/* ---------- Header bar (inner pages) ---------- */
.site-header--bar {
  position: sticky;
  top: 0;
  left: auto;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--bar-h);
  padding: 0 var(--gutter);
  background: rgba(33, 33, 33, 0.94);
  border-bottom: 1px solid var(--ink-line);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header--bar { background: rgba(33, 33, 33, 0.8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}
.site-header--bar .site-logo img { width: 52px; }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a {
  padding: 10px 12px;
  font-size: 15px;
  color: var(--cream-soft);
  text-decoration: none;
  border-radius: 7px;
}
.site-nav a:hover { color: var(--cream); background: rgba(245, 229, 193, 0.06); }
.site-nav a[aria-current="page"] { color: var(--cream); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }
.site-nav a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Cart button (all pages) ---------- */
.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  color: var(--cream);
  background: rgba(26, 26, 26, 0.55);
  border: 1px solid var(--ink-line-strong);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.cart-btn:hover { background: var(--jade); border-color: var(--jade); }
.cart-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  font: 500 11px/20px var(--font-body);
  text-align: center;
  color: var(--charcoal);
  background: var(--gold);
  border-radius: 10px;
}
.cart-btn.is-bumped { animation: bump 0.5s ease; }
@keyframes bump { 30% { transform: scale(1.14); } 60% { transform: scale(0.96); } }
/* Home page: the cart floats top right, outside the walk's layout */
.cart-btn--float {
  position: fixed;
  top: clamp(14px, calc(34 * var(--u)), 38px);
  right: clamp(14px, calc(34 * var(--u)), 40px);
  z-index: 20;
}

/* ---------- Buttons on the new pages (sizes fixed, look matches the home page) ---------- */
.page .btn, .ftf-drawer-root .btn, .sheet-root .btn {
  height: 48px;
  padding: 0 24px;
  font-size: 16px;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}
.page .btn-small, .ftf-drawer-root .btn-small, .sheet-root .btn-small { height: 38px; padding: 0 16px; font-size: 14px; }
.page .btn-ghost, .ftf-drawer-root .btn-ghost, .sheet-root .btn-ghost {
  color: var(--cream);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--ink-line-strong);
}
.page .btn-ghost:hover, .ftf-drawer-root .btn-ghost:hover, .sheet-root .btn-ghost:hover { background: rgba(245, 229, 193, 0.08); }
.btn-wide { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Category tabs ---------- */
.cat-tabs {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 calc(var(--gutter) * -1);
  padding: 4px var(--gutter) 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 96px;
  padding: 12px 6px 10px;
  font: 400 12.5px/1.25 var(--font-body);
  color: var(--cream-dim);
  text-align: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  scroll-snap-align: center;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.cat-tab img { width: 46px; height: auto; border-radius: 6px; opacity: 0.75; transition: opacity 0.2s ease, transform 0.2s ease; }
.cat-tab:hover { color: var(--cream); }
.cat-tab:hover img { opacity: 1; }
.cat-tab[aria-selected="true"] { color: var(--cream); background: rgba(47, 129, 80, 0.16); border-color: rgba(47, 129, 80, 0.7); }
.cat-tab[aria-selected="true"] img { opacity: 1; transform: translateY(-2px); filter: drop-shadow(0 0 10px rgba(232, 199, 125, 0.35)); }
.cat-tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Category panel ---------- */
.cat-head {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 4px 16px;
  align-items: center;
  margin: 14px 0 18px;
}
.cat-head-icon { width: 64px; height: auto; border-radius: 8px; grid-row: span 2; }
.cat-head .display { font-size: clamp(38px, 10vw, 58px); line-height: 1; }
.cat-head p { font-size: 14px; line-height: 1.55; color: var(--cream-dim); grid-column: 2; }
.cat-custom { grid-column: 1 / -1; justify-self: start; margin-top: 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  height: 36px;
  padding: 0 16px;
  font: 400 14px/1 var(--font-body);
  color: var(--cream-soft);
  background: transparent;
  border: 1px solid var(--ink-line-strong);
  border-radius: 18px;
  cursor: pointer;
}
.chip[aria-pressed="true"] { color: var(--white); background: var(--jade); border-color: var(--jade); }
.chip:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Product cards (home page card style: icon left, title right, copy under) ---------- */
.product-grid { display: grid; gap: 14px; }
.product-card {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px 16px;
  align-items: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--ink-line);
  border-radius: 18px;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.25s ease;
}
.product-card:hover { border-color: rgba(47, 129, 80, 0.8); background: rgba(47, 129, 80, 0.07); }
.product-card-media { align-self: start; }
.product-card-img {
  width: 84px;
  aspect-ratio: 480 / 633;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}
.product-card-title { font-size: clamp(28px, 7.6vw, 36px); line-height: 1; }
.product-card-meta { margin-top: 6px; font-size: 13px; color: var(--cream-dim); }
.product-card-desc { grid-column: 1 / -1; font-size: 14px; line-height: 1.55; color: var(--cream-soft); }
.product-card-btn { grid-column: 1 / -1; justify-self: start; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.badges li {
  padding: 3px 9px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(232, 199, 125, 0.45);
  border-radius: 999px;
}

/* ---------- Pickers shared by the product panel and the builder ---------- */
.pick { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.pick legend, .pick-legend { display: flex; align-items: center; gap: 10px; padding: 0; margin-bottom: 10px; font-size: 15px; font-weight: 500; color: var(--cream); }
.pick legend em { font-style: normal; font-weight: 400; font-size: 13px; color: #f0a58f; }
.pick-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; font-size: 12px; font-weight: 500;
  color: var(--charcoal); background: var(--gold); border-radius: 50%;
}
.pick.is-missing .pick-chips { box-shadow: 0 0 0 1px #f0a58f; border-radius: 12px; padding: 6px; }
.pick-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-chip { position: relative; cursor: pointer; }
.pick-chip input, .tile input, .option input, .swatch input, .choice input {
  position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none;
}
.pick-chip > span {
  display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 6px;
  min-height: 42px; padding: 10px 15px;
  font-size: 14px; line-height: 1.3; color: var(--cream-soft);
  border: 1px solid var(--ink-line-strong); border-radius: 22px;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.pick-chip b { font-weight: 500; color: var(--gold); }
.pick-chip small { flex-basis: 100%; font-size: 11.5px; color: var(--cream-dim); }
.pick-chip:hover > span { border-color: var(--cream-dim); }
.pick-chip input:checked + span { color: var(--white); background: var(--jade); border-color: var(--jade); }
.pick-chip input:checked + span b, .pick-chip input:checked + span small { color: var(--white); }
.pick-chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.pick-chip--size > span { border-radius: 12px; }
.scent-info { margin-top: 12px; font-size: 13.5px; line-height: 1.55; color: var(--cream-dim); }
.scent-info strong { color: var(--gold); font-weight: 500; }

.qty { display: inline-flex; align-items: center; gap: 4px; }
.qty button {
  width: 42px; height: 42px; padding: 0;
  font: 400 20px/1 var(--font-body); color: var(--cream);
  background: transparent; border: 1px solid var(--ink-line-strong); border-radius: 50%; cursor: pointer;
}
.qty button:hover { border-color: var(--cream); }
.qty button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.qty output { min-width: 34px; text-align: center; font-size: 17px; color: var(--cream); }
.qty--sm button { width: 32px; height: 32px; font-size: 17px; }
.qty--sm output { min-width: 26px; font-size: 15px; }
.pick--qty { display: flex; align-items: center; justify-content: space-between; }
.pick--qty .pick-legend { margin: 0; }

/* ---------- Product panel: bottom sheet on phones, modal on desktop ---------- */
.sheet-scrim, .drawer-scrim {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(10, 10, 10, 0.6);
  opacity: 0; transition: opacity 0.28s ease;
}
.sheet-scrim.is-on, .drawer-scrim.is-on { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 91;
  display: flex; flex-direction: column;
  max-height: 92vh; max-height: 92svh;
  color: var(--cream-soft);
  background: var(--charcoal-deep);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(102%);
  visibility: hidden;
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.32s;
}
.sheet.is-open { transform: none; visibility: visible; transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1); }
.sheet:focus { outline: none; }
.sheet-close, .drawer-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; padding: 0;
  color: var(--cream); background: rgba(26, 26, 26, 0.75);
  border: 1px solid var(--ink-line-strong); border-radius: 50%; cursor: pointer;
}
.sheet-top { position: relative; display: flex; justify-content: flex-end; align-items: center; padding: 10px 12px 0; flex: 0 0 auto; }
.sheet-grip { position: absolute; left: 50%; top: 8px; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: rgba(245, 229, 193, 0.25); }
.sheet-close:focus-visible, .drawer-close:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sheet-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sheet-media { display: flex; justify-content: center; padding: 0 60px 6px; }
.sheet-img { width: auto; max-height: 210px; border-radius: 12px; object-fit: contain; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.45)); }
.sheet-body { padding: 8px 20px 20px; }
.sheet-title { margin-top: 10px; font-size: clamp(40px, 11vw, 60px); line-height: 1; }
.sheet-desc { margin: 10px 0 22px; font-size: 14.5px; line-height: 1.6; }
.sheet-foot {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: var(--charcoal-deep);
  border-top: 1px solid var(--ink-line);
}
.sheet-price { display: flex; flex-direction: column; min-width: 0; font-size: 12.5px; color: var(--cream-dim); }
.sheet-price strong { font-size: 24px; font-weight: 500; color: var(--cream); line-height: 1.1; }
.sheet-add { flex: 1; }

.inside { margin: 6px 0 22px; border-top: 1px solid var(--ink-line); border-bottom: 1px solid var(--ink-line); }
.inside summary {
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px 0; font-size: 15px; font-weight: 500; color: var(--cream); cursor: pointer; list-style: none;
}
.inside summary::-webkit-details-marker { display: none; }
.inside summary::after { content: "+"; font-size: 22px; font-weight: 300; color: var(--gold); }
.inside[open] summary::after { content: "\2212"; }
.inside summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.inside-list { margin: 0 0 14px; }
.inside-list > div { display: grid; grid-template-columns: 116px 1fr; gap: 10px; padding: 7px 0; font-size: 13.5px; line-height: 1.5; }
.inside-list dt { color: var(--cream-dim); }
.inside-list dd { margin: 0; color: var(--cream-soft); }
.inside-list dd.is-soon { color: rgba(236, 220, 188, 0.45); }

.pairs h3 { margin-bottom: 12px; font-size: 15px; font-weight: 500; color: var(--cream); }
.pairs-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pair-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 10px; border: 1px solid var(--ink-line); border-radius: 12px;
}
.pair-img { width: 100%; aspect-ratio: 480 / 633; height: auto; object-fit: cover; border-radius: 8px; }
.pair-name { font-size: 12.5px; line-height: 1.3; color: var(--cream); }
.pair-price { font-size: 11.5px; color: var(--cream-dim); margin-top: auto; }
.pair-card .btn-small { width: 100%; height: 34px; padding: 0 8px; font-size: 12.5px; }

/* ---------- Order drawer ---------- */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
  display: flex; flex-direction: column;
  width: min(440px, 100vw);
  color: var(--cream-soft);
  font-family: var(--font-body);
  background: var(--charcoal-deep);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
  transform: translateX(102%);
  visibility: hidden;
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.32s;
}
.drawer.is-open { transform: none; visibility: visible; transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1); }
.drawer:focus { outline: none; }
.drawer-scrim { z-index: 99; }
.drawer-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 12px 20px;
  border-bottom: 1px solid var(--ink-line);
}
.drawer-title {
  margin: 0 auto 0 0;
  font: 400 34px/1 var(--font-display);
  text-transform: uppercase;
  color: var(--cream);
  text-shadow: 0 0 18px rgba(232, 199, 125, 0.55);
  -webkit-text-stroke: 0.8px currentColor;
}
.drawer-back {
  order: -1; padding: 8px 10px 8px 0; font: 400 13px var(--font-body);
  color: var(--cream-dim); background: none; border: 0; cursor: pointer;
}
.drawer-back::before { content: "\2190  "; }
.drawer-back:focus-visible { outline: 2px solid var(--gold); }
.drawer-view { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.drawer-view > form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.drawer-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px 20px; -webkit-overflow-scrolling: touch; }
.drawer-foot { padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--ink-line); }
.foot-note { margin-top: 8px; font-size: 12px; text-align: center; color: var(--cream-dim); }

.gift-meter { margin-bottom: 14px; padding: 12px 14px; background: rgba(47, 129, 80, 0.12); border: 1px solid rgba(47, 129, 80, 0.4); border-radius: 12px; }
.gift-text { font-size: 13.5px; color: var(--cream); margin-bottom: 8px; }
.gift-bar { height: 6px; background: rgba(245, 229, 193, 0.12); border-radius: 3px; overflow: hidden; }
.gift-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--jade), var(--gold)); border-radius: 3px; transition: width 0.4s ease; }
.gift-meter.is-unlocked { border-color: rgba(232, 199, 125, 0.6); background: rgba(232, 199, 125, 0.1); }

.order-lines { list-style: none; margin: 0; padding: 0; }
.order-line {
  display: grid; grid-template-columns: 52px 1fr 32px; gap: 12px; align-items: start;
  padding: 14px 0; border-bottom: 1px solid var(--ink-line);
}
.order-thumb { width: 52px; height: auto; aspect-ratio: 480 / 633; object-fit: cover; border-radius: 8px; }
.order-line-title { font-size: 14.5px; font-weight: 500; color: var(--cream); line-height: 1.3; }
.order-line-detail { margin-top: 3px; font-size: 12.5px; line-height: 1.45; color: var(--cream-dim); }
.order-line-row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.order-line-price { font-size: 15px; color: var(--cream); }
.order-remove {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0; color: var(--cream-dim);
  background: none; border: 0; border-radius: 50%; cursor: pointer;
}
.order-remove svg { width: 16px; height: 16px; }
.order-remove:hover { color: var(--cream); background: rgba(245, 229, 193, 0.08); }
.order-remove:focus-visible { outline: 2px solid var(--gold); }
.order-empty { padding: 30px 0; text-align: center; }
.order-empty p { margin-bottom: 18px; color: var(--cream-dim); }
.order-empty .btn-row { justify-content: center; }

.order-suggest {
  display: flex; align-items: center; gap: 12px;
  margin: 14px 0 4px; padding: 12px 14px;
  font-size: 13px; line-height: 1.45;
  border: 1px dashed rgba(232, 199, 125, 0.5); border-radius: 12px;
}
.order-suggest p { flex: 1; }
.order-totals { margin: 16px 0 0; }
.order-totals > div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 14px; }
.order-totals dd { margin: 0; white-space: nowrap; }
.order-totals .is-deal { color: #9fd8b2; }
.order-totals .is-saved { color: var(--gold); font-size: 13px; }
.order-totals .is-total { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--ink-line); font-size: 18px; color: var(--cream); }

/* Checkout form */
.checkout-sum { margin-bottom: 16px; font-size: 14px; color: var(--cream-dim); }
.checkout-sum strong { color: var(--cream); font-weight: 500; }
.field { display: block; margin: 0 0 14px; padding: 0; border: 0; }
.field > span, .field legend { display: block; margin-bottom: 6px; font-size: 13px; color: var(--cream-dim); }
.field small { font-size: 11.5px; opacity: 0.8; }
.field input, .field textarea {
  display: block; width: 100%;
  padding: 12px 14px;
  font: 400 16px/1.4 var(--font-body);
  color: var(--cream);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--ink-line-strong);
  border-radius: 10px;
}
.field input[type="date"] { color-scheme: dark; min-height: 48px; }
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(232, 199, 125, 0.25); }
.field .is-invalid, .field input.is-invalid { border-color: #f0a58f; }
.field-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.field-choice legend { width: 100%; }
.choice { position: relative; flex: 1 1 140px; cursor: pointer; }
.choice span {
  display: block; padding: 12px 14px; font-size: 14.5px; color: var(--cream-soft);
  border: 1px solid var(--ink-line-strong); border-radius: 10px;
}
.choice small { display: block; font-size: 12px; color: var(--cream-dim); }
.choice input:checked + span { color: var(--white); background: rgba(47, 129, 80, 0.3); border-color: var(--jade); }
.choice input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.form-err { min-height: 1em; font-size: 13.5px; color: #f0a58f; }
.form-err a { color: var(--cream); }

/* Pay view */
.pay-lead { font-size: 15px; line-height: 1.55; color: var(--cream); }
.pay-total { margin-top: 22px; font-size: 15px; color: var(--cream-dim); }
.pay-total strong { display: block; font-size: 40px; font-weight: 500; color: var(--cream); }
.pay-sub { margin-top: 4px; font-size: 13px; color: var(--cream-dim); }
.pay-buttons { display: grid; gap: 10px; margin-top: 22px; }
.pay-hint { margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--cream-dim); }
.pay-note-box { margin-top: 16px; font-size: 13px; }
.pay-note-box summary { cursor: pointer; color: var(--cream-dim); }
.pay-note { margin-top: 8px; padding: 12px; font-size: 12.5px; line-height: 1.55; color: var(--cream); background: rgba(255, 255, 255, 0.04); border-radius: 10px; word-break: break-word; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 110;
  display: flex; align-items: center; gap: 14px;
  width: max-content; max-width: calc(100vw - 32px);
  padding: 10px 10px 10px 16px;
  font: 400 14px/1.35 var(--font-body); color: var(--cream);
  background: var(--velvet); border: 1px solid rgba(47, 129, 80, 0.8); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  transform: translateX(-50%);
}
.toast.is-on { animation: toast-in 0.3s ease; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }
.toast-view {
  flex: 0 0 auto; height: 34px; padding: 0 12px;
  font: 500 13px var(--font-body); color: var(--white);
  background: var(--jade); border: 0; border-radius: 7px; cursor: pointer;
}

/* ---------- Customize page ---------- */
.inspo {
  display: grid; grid-template-columns: 60px 1fr; gap: 6px 16px; align-items: center;
  max-width: 720px; margin: 4px auto 24px; padding: 16px 18px;
  border: 1px solid rgba(232, 199, 125, 0.35); border-radius: 16px;
  background: rgba(232, 199, 125, 0.05);
}
.inspo img { width: 60px; height: auto; border-radius: 8px; grid-row: span 2; }
.inspo blockquote { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--cream); }
.inspo figcaption { font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }

.builder { max-width: 820px; margin: 0 auto; }
.builder-progress { margin-bottom: 14px; }
.progress-count { font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cream-dim); margin-bottom: 8px; }
.progress-steps { position: relative; display: flex; gap: 6px; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; list-style: none; overflow-x: auto; scrollbar-width: none; }
.progress-steps::-webkit-scrollbar { display: none; }
.progress-steps li { flex: 0 0 auto; }
.progress-steps button {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 12px 0 6px;
  font: 400 13px var(--font-body); color: var(--cream-dim);
  background: transparent; border: 1px solid var(--ink-line); border-radius: 18px; cursor: pointer;
}
.progress-steps button span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; font-size: 11.5px; border-radius: 50%; background: rgba(245, 229, 193, 0.1);
}
.progress-steps .is-done button { color: var(--cream-soft); border-color: rgba(47, 129, 80, 0.6); }
.progress-steps .is-done button span { background: var(--jade); color: var(--white); }
.progress-steps .is-current button { color: var(--charcoal); background: var(--gold); border-color: var(--gold); }
.progress-steps .is-current button span { background: var(--charcoal); color: var(--gold); }
.progress-steps button[disabled] { opacity: 0.4; cursor: default; }
.progress-steps button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.step {
  padding: 22px 18px 26px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--ink-line);
  border-radius: 18px;
}
.step.is-missing { border-color: rgba(240, 165, 143, 0.7); }
.step-title { font-size: clamp(36px, 10vw, 54px); line-height: 1; margin-bottom: 6px; }
.step-title:focus { outline: none; }
.step-hint { margin-bottom: 18px; font-size: 14px; color: var(--cream-dim); }
.step-err { margin-top: 14px; font-size: 13.5px; color: #f0a58f; }
.step--category .step-title { margin-bottom: 18px; }

.tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { position: relative; cursor: pointer; }
.tile img { width: 64px; height: auto; margin: 0 auto 10px; border-radius: 8px; }
.tile-name { display: block; font-size: 13.5px; line-height: 1.3; text-align: center; color: var(--cream-soft); }
.tile::before { content: ""; position: absolute; inset: 0; border: 1px solid var(--ink-line-strong); border-radius: 14px; pointer-events: none; }
.tile { padding: 16px 10px 14px; border-radius: 14px; }
.tile:has(input:checked) { background: rgba(47, 129, 80, 0.18); }
.tile:has(input:checked)::before { border-color: var(--jade); box-shadow: 0 0 0 1px var(--jade); }
.tile:has(input:focus-visible)::before { outline: 2px solid var(--gold); outline-offset: 2px; }

.option-list { display: grid; gap: 10px; }
.option {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 15px 16px; border: 1px solid var(--ink-line-strong); border-radius: 12px; cursor: pointer;
}
.option-name { font-size: 15px; color: var(--cream); }
.option-name small { display: block; font-size: 12px; color: var(--cream-dim); }
.option-price { font-size: 15px; color: var(--gold); }
.option:has(input:checked) { background: rgba(47, 129, 80, 0.2); border-color: var(--jade); box-shadow: inset 0 0 0 1px var(--jade); }
.option:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }

.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 8px; margin-top: 14px; }
.swatch { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.swatch-dot {
  width: 54px; height: 54px; border-radius: 50%; background: var(--sw);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), 0 0 0 3px var(--charcoal), 0 0 0 4px var(--ink-line-strong);
}
.swatch input:checked + .swatch-dot { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), 0 0 0 3px var(--charcoal), 0 0 0 5px var(--gold); }
.swatch input:focus-visible + .swatch-dot { outline: 2px solid var(--gold); outline-offset: 6px; }
.swatch-name { font-size: 12px; line-height: 1.25; text-align: center; color: var(--cream-dim); }

.topper-group { margin: 0 0 20px; padding: 0; border: 0; }
.topper-group legend { margin-bottom: 10px; font-size: 15px; font-weight: 500; color: var(--cream); }
.topper-group legend small { font-weight: 400; font-size: 12.5px; color: var(--cream-dim); margin-left: 6px; }

.review-sentence { margin: 14px 0 18px; font-size: 17px; line-height: 1.6; color: var(--cream); }
.review-extras { margin: 0 0 18px; padding: 0; list-style: none; font-size: 14px; line-height: 1.7; }
.review-extras b { font-weight: 500; color: var(--cream-dim); margin-right: 6px; }
.review-price { margin: 0 0 18px; padding: 12px 14px; background: rgba(255, 255, 255, 0.03); border-radius: 12px; }
.review-price > div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 14px; }
.review-price dd { margin: 0; }
.review-price .is-total { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--ink-line); font-size: 17px; color: var(--cream); }
.review-qty { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; font-size: 15px; color: var(--cream); }
.review-actions { display: grid; gap: 10px; }
.review-note { font-size: 12.5px; text-align: center; color: var(--cream-dim); }
.request-form { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--ink-line); }
.request-form h3 { margin-bottom: 14px; font-size: 16px; font-weight: 500; color: var(--cream); }
.request-done p, .review-done p { font-size: 15px; line-height: 1.6; color: var(--cream); }
.request-done { margin-top: 20px; padding: 14px; border: 1px solid rgba(47, 129, 80, 0.6); border-radius: 12px; }
.review-done .btn-row { margin-top: 18px; }

.builder-bar {
  position: sticky; bottom: 0; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  margin: 14px calc(var(--gutter) * -1) 0;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: rgba(26, 26, 26, 0.96);
  border-top: 1px solid var(--ink-line);
}
.bar-total { flex: 1; display: flex; flex-direction: column; min-width: 0; text-align: center; font-size: 12px; color: var(--cream-dim); }
.bar-total span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-total strong { font-size: 21px; font-weight: 500; color: var(--cream); }
.page .bar-back, .page .bar-next { min-width: 92px; padding: 0 16px; }

@media (max-width: 639px) {
  .page--custom .page-intro { padding: 18px 0 12px; }
  .page--custom .page-title { font-size: 58px; }
  .inspo { grid-template-columns: 40px 1fr; padding: 12px 14px; margin-bottom: 16px; }
  .inspo img { width: 40px; }
  .inspo blockquote { font-size: 13px; }
}

/* ---------- Larger screens ---------- */
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .swatches { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .step { padding: 28px 28px 30px; }
  .builder-bar { margin: 16px 0 0; border: 1px solid var(--ink-line); border-radius: 14px; bottom: 12px; }
  .cat-head { grid-template-columns: 76px 1fr auto; }
  .cat-head-icon { width: 76px; }
  .cat-custom { grid-column: 3; grid-row: 1 / span 2; margin: 0; align-self: center; }
}
@media (min-width: 900px) {
  .page-intro { padding: 44px 0 24px; }
  .site-header--bar { height: 78px; padding: 0 32px; }
  .site-header--bar .site-logo img { width: 58px; }
  .cat-tabs { justify-content: center; margin: 0; padding: 4px 0 16px; overflow: visible; }
  .cat-tab { width: 132px; font-size: 13.5px; }
  .cat-tab img { width: 54px; }
  .tile-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .progress-steps { margin: 0; padding: 0; justify-content: center; }
  .progress-count { text-align: center; }

  .sheet {
    left: 50%; right: auto; top: 50%; bottom: auto;
    width: min(940px, calc(100vw - 64px));
    max-height: min(86vh, 820px);
    border-radius: 22px;
    transform: translate(-50%, -46%) scale(0.98);
    opacity: 0;
    transition: transform 0.28s ease, opacity 0.28s ease, visibility 0s linear 0.28s;
  }
  .sheet.is-open { transform: translate(-50%, -50%); opacity: 1; transition: transform 0.28s ease, opacity 0.28s ease; }
  .sheet-scroll { display: grid; grid-template-columns: 40% 1fr; }
  .sheet-media { position: sticky; top: 0; align-self: start; padding: 4px 24px 36px; }
  .sheet-grip { display: none; }
  .sheet-img { max-height: 520px; }
  .sheet-body { padding: 34px 32px 26px 8px; }
  .sheet-foot { padding: 14px 32px; border-radius: 0 0 22px 22px; }
  .sheet-add { flex: 0 0 auto; min-width: 240px; margin-left: auto; }
}
@media (min-width: 1100px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .sheet, .drawer, .sheet-scrim, .drawer-scrim, .gift-bar span { transition: none !important; }
  .toast.is-on, .cart-btn.is-bumped { animation: none; }
}
