/* ============================================================
   Astrolaabh · Design-selection page (setup.css)
   Full-width design gallery: summary card + tabbed gallery.
   Tokens (--font-display Sesbania, --font-ui Geist, colours)
   inherited from buy.css :root.
   ============================================================ */

.setup-page {
  color: #ece7da;
  /* stones texture kept — gentle dark wash so the left-column content reads light */
  background:
    linear-gradient(rgba(26, 30, 20, 0.52), rgba(26, 30, 20, 0.60)),
    #1a1e14 url("assets/stones-bg.jpg") center top / cover fixed;
}

/* ---- only the breadcrumb rides the dark stones surface: light on dark ---- */
.setup-page .setup-back {
  color: #f4f1e9; border-color: rgba(244, 241, 233, 0.28);
}
.setup-page .setup-back:hover {
  background: rgba(244, 241, 233, 0.1); border-color: rgba(220, 190, 110, 0.55);
}
.setup-page .setup-trail {
  color: rgba(244, 241, 233, 0.6); border-color: rgba(244, 241, 233, 0.24);
}
.setup-page .setup-trail a { color: rgba(244, 241, 233, 0.72); }
.setup-page .setup-trail a:hover { color: #e0c07a; }
.setup-page .setup-trail li + li::before { color: rgba(244, 241, 233, 0.4); }
.setup-page .setup-trail [aria-current="page"] { color: #f4f1e9; }
/* energisation reads as a free perk — call it out in red */
.oc-v.is-free { color: #4e8f3e; font-weight: 600; }

/* ---- checkout: the bag list on the left (reuses the cart-drawer .cd-item look) ---- */
.co-bag {
  background: linear-gradient(180deg, #fbf9f3, #f6f3ea);
  border: 1px solid rgba(161, 121, 58, 0.28);
  border-radius: 18px;
  padding: clamp(1.1rem, 2vw, 1.55rem) clamp(1.2rem, 2.4vw, 1.9rem);
  box-shadow: 0 34px 66px -42px rgba(0, 0, 0, 0.6);
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
}
.co-bag-head { margin-bottom: 0.2rem; }
.co-bag-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem); color: var(--ink-dark, #20251a); margin: 0;
}
.co-bag-count { font-family: var(--font-ui); font-size: 0.82rem; color: rgba(32, 37, 26, 0.5); }
.co-items .cd-item:first-child { padding-top: 0.4rem; }
.co-items .cd-item:last-child { border-bottom: 0; padding-bottom: 0.2rem; }
.co-empty { font-family: var(--font-ui); font-size: 0.9rem; color: rgba(32, 37, 26, 0.6); margin: 0.4rem 0 0; }
.co-empty a { color: #8a5f22; }
.setup-aside[hidden], .setup-panel[hidden], .co-bag[hidden] { display: none !important; }

/* ---- the whole billing panel (title, lede + form) sits in a light card ---- */
.setup-page .setup-panel {
  background: linear-gradient(180deg, #fbf9f3, #f6f3ea);
  border: 1px solid rgba(161, 121, 58, 0.28);
  border-radius: 18px;
  padding: clamp(1.4rem, 2.6vw, 2.2rem);
  box-shadow: 0 34px 66px -42px rgba(0, 0, 0, 0.6);
}

/* the display rules below beat the [hidden] attribute, so restore it explicitly */
.setup-grid[hidden], .setup-size[hidden], .setup-loose[hidden],
.setup-custom[hidden], .setup-tabs[hidden] { display: none !important; }

.setup-main {
  min-height: 100vh;
  /* the site nav is sticky (in-flow), so it already occupies its height —
     only a small breathing gap is needed above the breadcrumb */
  padding: 1.25rem clamp(1.1rem, 4vw, 3.5rem) 9rem;
}
.setup-wrap { max-width: 1240px; margin: 0 auto; }

/* ---- two-column layout: journey (left) + floating order card (right) ---- */
.setup-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 344px;
  gap: clamp(1.25rem, 2vw, 2rem);
  align-items: start;
}
.setup-left { min-width: 0; }
/* breathing room so the breadcrumb, stepper and title don't crowd each other */
.setup-left .flow-steps { margin: 0.75rem 0 2.4rem; }
.setup-head { margin-top: 0.25rem; }

/* secondary bar action — Add to cart */
.bb-secondary {
  display: inline-flex; align-items: center; gap: 0.45rem; flex: none;
  height: 46px; padding: 0 1.3rem; border-radius: 999px;
  background: rgba(246, 244, 236, 0.6);
  border: 1px solid rgba(32, 37, 26, 0.22);
  color: var(--ink-dark, #20251a);
  font-family: var(--font-ui); font-size: 0.9rem; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.bb-secondary:hover { background: rgba(246, 244, 236, 0.95); border-color: rgba(161, 121, 58, 0.5); }
.bb-secondary i { font-size: 1.05rem; color: var(--gold, #a1793a); }
@media (max-width: 620px) { .bb-secondary { display: none; } }

/* ---- loose-stone confirm modal ---- */
.confirm-modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; }
.confirm-modal[hidden] { display: none; }
.cm-backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 24, 16, 0.5);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.cm-panel {
  position: relative;
  width: min(420px, calc(100vw - 2.5rem));
  background: #fbf9f3;
  border: 1px solid rgba(161, 121, 58, 0.3);
  border-radius: 18px;
  padding: 2rem 1.9rem;
  text-align: center;
  box-shadow: 0 40px 80px -30px rgba(20, 24, 16, 0.6);
}
.cm-ic {
  display: grid; place-items: center;
  width: 52px; height: 52px; margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(161, 121, 58, 0.1);
  border: 1px solid rgba(161, 121, 58, 0.3);
  color: var(--gold, #a1793a); font-size: 1.6rem;
}
.cm-panel h2 {
  font-family: var(--font-display); font-weight: 400; font-size: 1.5rem;
  margin: 0 0 0.7rem; color: var(--ink-dark, #20251a);
}
.cm-panel p {
  font-family: var(--font-ui); font-weight: 300; font-size: 0.9rem; line-height: 1.55;
  color: rgba(32, 37, 26, 0.7); margin: 0 0 1.5rem;
}
.cm-panel strong { font-weight: 600; color: var(--ink-dark, #20251a); }
.cm-actions { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }
.cm-cancel, .cm-confirm {
  height: 44px; padding: 0 1.4rem; border-radius: 999px;
  font-family: var(--font-ui); font-size: 0.88rem; font-weight: 500; cursor: pointer;
}
.cm-cancel { background: transparent; border: 1px solid rgba(32, 37, 26, 0.25); color: var(--ink-dark, #20251a); }
.cm-cancel:hover { background: rgba(32, 37, 26, 0.05); }
.cm-confirm { background: #4c543e; border: 1px solid #4c543e; color: #f4f1e9; }
.cm-confirm:hover { background: #3c4231; }

.setup-aside { position: sticky; top: calc(var(--nav-h, 88px) + 1.4rem); }
.order-card {
  background: linear-gradient(180deg, #fbf9f3, #f5f2e9);
  border: 1px solid rgba(161, 121, 58, 0.55);
  border-radius: 18px;
  padding: 1.4rem 1.5rem 1.5rem;
  box-shadow: 0 0 0 1px rgba(201, 162, 75, 0.12), 0 26px 54px -38px rgba(32, 37, 26, 0.55);
}
.oc-eyebrow {
  font-family: var(--font-ui); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; color: #a1793a;
  margin: 0 0 1rem;
}
.oc-stone { display: flex; align-items: flex-start; gap: 0.85rem; padding-bottom: 1.1rem; border-bottom: 1px solid rgba(161, 121, 58, 0.18); }
.oc-thumb {
  width: 54px; height: 54px; flex: none; border-radius: 12px; overflow: hidden;
  background: #efece2; border: 1px solid rgba(161, 121, 58, 0.25);
  display: grid; place-items: center;
}
.oc-thumb img { width: 78%; height: 78%; object-fit: contain; }
.oc-stone-lines { display: flex; flex-direction: column; gap: 0.12rem; min-width: 0; }
.oc-planet {
  font-family: var(--font-ui); font-size: 0.6rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: #a1793a;
}
.oc-name {
  font-family: var(--font-display); font-weight: 400; font-size: 1.1rem;
  line-height: 1.15; color: var(--ink-dark, #20251a);
}
.oc-spec { font-family: var(--font-ui); font-size: 0.78rem; color: rgba(32, 37, 26, 0.6); }
.oc-editlink {
  align-self: flex-start; margin-top: 0.35rem;
  font-family: var(--font-ui); font-size: 0.72rem; font-weight: 500;
  color: #8a5f22; text-decoration: none;
  border-bottom: 1px solid rgba(161, 121, 58, 0.4);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.oc-editlink:hover { color: #a1793a; border-color: #a1793a; }

.oc-rows { margin: 1.1rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.oc-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 0.55rem 0; border-bottom: 1px solid rgba(161, 121, 58, 0.12);
}
.oc-k {
  font-family: var(--font-ui); font-size: 0.82rem; font-weight: 400;
  color: rgba(32, 37, 26, 0.66); min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.oc-k--design { display: inline-flex; align-items: center; gap: 0.45rem; }
.oc-design-thumb {
  flex: none; width: 22px; height: 22px; border-radius: 6px;
  overflow: hidden; border: 1px solid rgba(161, 121, 58, 0.3);
  background: #fff; display: inline-grid; place-items: center;
}
.oc-design-thumb[hidden] { display: none; }
.oc-design-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 1px; }
.oc-v {
  margin: 0; flex: none;
  font-family: var(--font-ui); font-size: 0.84rem; font-weight: 500;
  color: var(--ink-dark, #20251a); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.oc-total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin-top: 0.9rem; padding-top: 0.9rem;
  border-top: 1px solid rgba(161, 121, 58, 0.3);
}
.oc-total-k {
  font-family: var(--font-ui); font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.02em; color: rgba(32, 37, 26, 0.7);
}
.oc-total-v {
  font-family: var(--font-ui); font-weight: 600; font-size: 1.4rem;
  color: var(--ink-dark, #20251a); font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.oc-tax {
  display: block; text-align: right;
  font-family: var(--font-ui); font-size: 0.72rem; color: rgba(32, 37, 26, 0.5);
  margin-top: 0.1rem;
}
.oc-trust {
  list-style: none; margin: 1.2rem 0 0; padding: 1.1rem 0 0;
  border-top: 1px solid rgba(161, 121, 58, 0.16);
  display: flex; flex-direction: column; gap: 0.55rem;
}
.oc-trust li {
  display: flex; align-items: center; gap: 0.65rem;
  font-family: var(--font-ui); font-size: 0.78rem; color: rgba(32, 37, 26, 0.66);
}
.oc-trust i {
  flex: none;
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--hair-gold);
  background: rgba(161, 121, 58, 0.06);
  color: var(--gold, #a1793a);
  font-size: 0.9rem;
}

/* add-on eyebrow on the design step */
.setup-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.6rem;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold, #a1793a);
}
.setup-eyebrow i { font-size: 1.05rem; }

/* order-card actions (moved in from the removed sticky bar) */
.oc-actions { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1.2rem; }
.oc-continue {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 52px;
  padding: 0 1.2rem;
  border: 0;
  border-radius: 999px;
  background: url("assets/consult-card-bg.jpg") center / cover, #4c543e;
  color: #fff;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  box-shadow: 0 10px 24px -14px rgba(20, 24, 16, 0.6);
  transition: filter 0.2s ease, transform 0.2s ease;
}
.oc-continue:hover { filter: brightness(1.06); transform: translateY(-1px); }
.oc-continue:active { transform: translateY(1px); }
.oc-continue .bb-add-done { display: none; align-items: center; gap: 0.45rem; }
.oc-continue.is-added .bb-add-default { display: none; }
.oc-continue.is-added .bb-add-done { display: inline-flex; }
.oc-secondary {
  width: 100%;
  min-height: 46px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(32, 37, 26, 0.2);
  color: var(--ink-dark, #20251a);
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.oc-secondary:hover { background: rgba(32, 37, 26, 0.04); border-color: var(--gold, #a1793a); }
.oc-error {
  margin: 0.7rem 0 0;
  display: flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-ui); font-size: 0.76rem; color: #9c3a2a;
}
.oc-error[hidden] { display: none; }

/* the payment step's own two-column grid: stack inside the narrower left column */
.setup-left .setup-pay { grid-template-columns: 1fr; max-width: none; }

/* stack the layout on narrower screens; card moves below the journey */
@media (max-width: 960px) {
  .setup-layout { grid-template-columns: 1fr; }
  .setup-aside { position: static; order: 2; margin-top: 2rem; }
  .setup-left { order: 1; }
  .order-card { max-width: 520px; }
}

/* ---- back + breadcrumb ---- */
.setup-crumb { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 1rem; }
.setup-back {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; flex: none;
  border-radius: 50%;
  color: var(--ink-dark, #20251a);
  border: 1px solid rgba(32, 37, 26, 0.14);
  background: transparent;
  text-decoration: none; font-size: 0.9rem;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.setup-back:hover { background: rgba(32, 37, 26, 0.05); border-color: rgba(161, 121, 58, 0.4); transform: translateX(-2px); }
/* breadcrumb trail — small, subtle outlined pill */
.setup-trail {
  display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap;
  list-style: none; margin: 0;
  padding: 0 0.9rem;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(32, 37, 26, 0.14);
  background: transparent;
  font-family: var(--font-ui); font-size: 0.78rem; letter-spacing: 0.02em;
  color: rgba(32, 37, 26, 0.5);
}
.setup-trail li { display: flex; align-items: center; gap: 0.55rem; }
.setup-trail li + li::before { content: "›"; color: rgba(32, 37, 26, 0.35); }
.setup-trail a { color: rgba(32, 37, 26, 0.6); text-decoration: none; transition: color 0.2s ease; }
.setup-trail a:hover { color: #a1793a; }
.setup-trail [aria-current="page"] { color: var(--ink-dark, #20251a); font-weight: 500; }

/* ---- summary card of prior selections ---- */
.setup-summary {
  display: grid;
  grid-template-columns: 2fr 1.3fr auto;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: 1.15rem 1.4rem;
  background: linear-gradient(180deg, #fbf9f3, #f6f3ea);
  border: 1px solid rgba(161, 121, 58, 0.22);
  border-radius: 18px;
  box-shadow: 0 20px 44px -34px rgba(32, 37, 26, 0.5);
  margin-bottom: 2.4rem;
}
.sum-cell { display: flex; align-items: center; gap: 0.9rem; min-width: 0; }
.sum-cell--metal, .sum-cell--price { position: relative; }
.sum-cell--metal::before, .sum-cell--price::before {
  content: ""; position: absolute; left: calc(-1 * clamp(0.5rem, 1.5vw, 1.25rem));
  top: 50%; transform: translateY(-50%); height: 60%; width: 1px;
  background: rgba(161, 121, 58, 0.2);
}
.sum-thumb {
  width: 52px; height: 52px; flex: none; border-radius: 12px; overflow: hidden;
  background: #efece2; border: 1px solid rgba(161, 121, 58, 0.25);
  display: grid; place-items: center;
}
.sum-thumb img { width: 78%; height: 78%; object-fit: contain; }
.sum-lines { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.sum-eyebrow {
  font-family: var(--font-ui); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: #a1793a;
}
.sum-name {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1rem, 1.5vw, 1.22rem); line-height: 1.15; color: var(--ink-dark, #20251a);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sum-sub { font-family: var(--font-ui); font-size: 0.78rem; color: rgba(32, 37, 26, 0.6); }
.sum-edit {
  margin-left: auto; flex: none;
  font-family: var(--font-ui); font-size: 0.75rem; font-weight: 500;
  color: #8a5f22; text-decoration: none;
  padding: 0.3rem 0.7rem; border-radius: 999px;
  border: 1px solid rgba(161, 121, 58, 0.35);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.sum-edit:hover { background: rgba(161, 121, 58, 0.1); border-color: rgba(161, 121, 58, 0.6); }
.sum-cell--price { flex-direction: column; align-items: flex-end; gap: 0.05rem; text-align: right; }
.sum-total { font-family: var(--font-display); font-size: clamp(1.15rem, 2vw, 1.5rem); color: var(--ink-dark, #20251a); }

/* ---- heading ---- */
.setup-head { margin-bottom: 1.3rem; }
.setup-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.05;
  color: var(--ink-dark, #20251a); margin: 0 0 0.5rem;
}
.setup-lede {
  font-family: var(--font-ui); font-size: 0.98rem; line-height: 1.55;
  color: rgba(32, 37, 26, 0.66); max-width: 62ch; margin: 0;
}

/* ---- segmented tabs ---- */
.setup-tabs {
  display: inline-flex; flex-wrap: wrap; gap: 0.2rem;
  padding: 0.28rem; margin-bottom: 1.4rem;
  background: rgba(251, 249, 243, 0.85);
  border: 1px solid rgba(161, 121, 58, 0.22);
  border-radius: 999px; max-width: 100%;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 2px rgba(32, 37, 26, 0.04), 0 8px 24px -18px rgba(32, 37, 26, 0.5);
  /* keeps the form tabs in view (and context) while the gallery scrolls */
  position: sticky;
  top: calc(var(--nav-h, 88px) + 0.6rem);
  z-index: 20;
}
.setup-tab {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 0.95rem; border: 0; background: none; cursor: pointer;
  border-radius: 999px;
  font-family: var(--font-ui); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.005em;
  color: rgba(32, 37, 26, 0.55); white-space: nowrap;
  transition: background 0.25s var(--ease), color 0.25s ease, box-shadow 0.25s ease;
}
.setup-tab i { font-size: 1em; opacity: 0.75; transition: color 0.25s ease, opacity 0.25s ease; }
.setup-tab:hover { color: var(--ink-dark, #20251a); }
.setup-tab:hover i { opacity: 1; }
.setup-tab.is-selected {
  background: #fff; color: #20251a; font-weight: 600;
  box-shadow: 0 1px 2px rgba(32, 37, 26, 0.06), 0 6px 16px -8px rgba(161, 121, 58, 0.5);
}
.setup-tab.is-selected i { color: #a1793a; opacity: 1; }

/* ---- subrow: count + size ---- */
.setup-subrow {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.setup-count {
  font-family: var(--font-ui); font-size: 0.82rem; color: rgba(32, 37, 26, 0.55);
  margin: 0;
}
.setup-size { display: flex; align-items: flex-end; gap: 0.9rem; }
.setup-size-field { display: flex; flex-direction: column; gap: 0.3rem; }
.setup-size-field span {
  font-family: var(--font-ui); font-size: 0.72rem; letter-spacing: 0.02em;
  color: rgba(32, 37, 26, 0.6);
}
.setup-size-field select {
  font-family: var(--font-ui); font-size: 0.88rem; color: var(--ink-dark, #20251a);
  padding: 0.5rem 2.2rem 0.5rem 0.85rem; border-radius: 10px;
  border: 1px solid rgba(161, 121, 58, 0.3);
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background: #fbf9f3 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%238a6a22' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
  cursor: pointer;
}
.setup-size-chart {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-family: var(--font-ui); font-size: 0.78rem; color: #8a5f22;
  background: none; border: 0; cursor: pointer; padding: 0.55rem 0;
}
.setup-size-chart:hover { text-decoration: underline; }

/* ---- design gallery: smaller cards ---- */
.setup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  grid-auto-rows: 1fr;
  gap: clamp(0.9rem, 1.6vw, 1.3rem);
  margin-bottom: 2.4rem;
}
.scard {
  display: flex; flex-direction: column;
  height: 100%;
  background: #fbf9f3;
  border: 1px solid rgba(161, 121, 58, 0.18);
  border-radius: 14px; overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.22,0.61,0.36,1), box-shadow 0.25s ease, border-color 0.25s ease;
}
.scard:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -28px rgba(32,37,26,0.45); border-color: rgba(161,121,58,0.4); }
.scard.is-selected {
  border-color: #a1793a;
  box-shadow: 0 0 0 1px #a1793a, 0 22px 40px -28px rgba(32,37,26,0.5);
}
.scard-media {
  position: relative; display: block; width: 100%;
  height: clamp(150px, 14vw, 185px); flex: none;
  border: 0; padding: 0; cursor: zoom-in;
  background: radial-gradient(120% 100% at 50% 28%, #fdfbf6 0%, #f4f0e7 100%);
}
.scard-media img { width: 100%; height: 100%; object-fit: contain; padding: 0.5rem; }
.scard-zoom {
  position: absolute; top: 0.55rem; right: 0.55rem;
  width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(251,249,243,0.85); color: #8a5f22;
  font-size: 0.85rem; opacity: 0; transition: opacity 0.2s ease;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.scard:hover .scard-zoom { opacity: 1; }
.scard-body { display: flex; flex-direction: column; gap: 0.28rem; padding: 0.8rem 0.9rem 0.9rem; flex: 1; }
.scard-cat {
  font-family: var(--font-ui); font-size: 0.58rem; font-weight: 600;
  letter-spacing: 0.16em; color: #a1793a; margin: 0;
}
.scard-name {
  font-family: var(--font-display); font-weight: 400; font-size: 1.1rem;
  line-height: 1.1; color: var(--ink-dark, #20251a); margin: 0;
}
.scard-story {
  font-family: var(--font-ui); font-size: 0.78rem; line-height: 1.45;
  color: rgba(32, 37, 26, 0.6); margin: 0 0 0.2rem; flex: 1;
  /* clamp to keep every card's copy block the same height */
  min-height: 3.3em;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.scard-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.6rem; margin-top: auto; padding-top: 0.5rem;
  border-top: 1px solid rgba(161, 121, 58, 0.16);
}
.scard-price { font-family: var(--font-ui); font-size: 0.9rem; font-weight: 500; color: var(--ink-dark, #20251a); }
.scard-cta {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-family: var(--font-ui); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em;
  color: #8a5f22;
  padding: 0.4rem 0.9rem; border-radius: 999px;
  border: 1px solid rgba(161, 121, 58, 0.4);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.scard:hover .scard-cta { background: rgba(161, 121, 58, 0.1); }
.scard.is-selected .scard-cta {
  background: #4c543e; color: #f4f1e9; border-color: #4c543e;
}

/* ---- loose panel ---- */
.setup-loose {
  display: flex; align-items: flex-start; gap: 1.1rem;
  padding: 1.6rem 1.8rem; margin-bottom: 2.4rem;
  background: #fbf9f3; border: 1px dashed rgba(161, 121, 58, 0.4); border-radius: 16px;
  max-width: 640px;
}
.setup-loose-ic { font-size: 2rem; color: #a1793a; line-height: 1; }
.setup-loose h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; margin: 0 0 0.35rem; color: var(--ink-dark, #20251a); }
.setup-loose p { font-family: var(--font-ui); font-size: 0.9rem; line-height: 1.55; color: rgba(32, 37, 26, 0.66); margin: 0; }

/* ---- custom panel ---- */
.setup-custom { max-width: 640px; margin-bottom: 2.4rem; display: flex; flex-direction: column; gap: 1rem; }
.setup-custom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.setup-custom .cf-field { display: flex; flex-direction: column; gap: 0.35rem; }
.setup-custom .cf-label { font-family: var(--font-ui); font-size: 0.78rem; color: rgba(32,37,26,0.66); }
.setup-custom .cf-label .req { color: #b3624a; font-style: normal; font-size: 0.9em; }
.setup-custom input, .setup-custom select, .setup-custom textarea {
  font-family: var(--font-ui); font-size: 0.9rem; color: var(--ink-dark, #20251a);
  padding: 0.6rem 0.8rem; border-radius: 10px;
  border: 1px solid rgba(161, 121, 58, 0.3); background: #fbf9f3; width: 100%;
}
.setup-custom-apply {
  align-self: flex-start;
  font-family: var(--font-ui); font-size: 0.85rem; font-weight: 500; color: #f4f1e9;
  background: #4c543e; border: 1px solid #4c543e; border-radius: 999px;
  padding: 0.6rem 1.3rem; cursor: pointer;
  transition: background 0.2s ease;
}
.setup-custom-apply:hover { background: #3c4231; }

/* ---- blocks (energisation, gift) ---- */
.setup-block { margin-bottom: 1.8rem; max-width: 720px; }
.setup-block-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.9rem; }
.setup-block-title {
  font-family: var(--font-display); font-weight: 400; font-size: 1.4rem;
  color: var(--ink-dark, #20251a); margin: 0;
}

/* ---- stepper: Design → Energisation → Payment ---- */
.setup-steps {
  display: flex; align-items: center; gap: 0.6rem;
  list-style: none; margin: 0 0 2.2rem; padding: 0;
}
.setup-step {
  display: flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-ui); font-size: 0.86rem; font-weight: 500;
  color: rgba(32, 37, 26, 0.5); cursor: default;
  transition: color 0.25s ease;
}
.setup-step-n {
  display: grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 50%;
  font-size: 0.78rem; font-weight: 600;
  color: rgba(32, 37, 26, 0.55);
  background: #efece2; border: 1px solid rgba(161, 121, 58, 0.28);
  transition: all 0.25s ease;
}
.setup-step.is-active { color: var(--ink-dark, #20251a); }
.setup-step.is-active .setup-step-n { background: #4c543e; border-color: #4c543e; color: #f4f1e9; }
.setup-step.is-done { color: #8a5f22; cursor: pointer; }
.setup-step.is-done .setup-step-n { background: rgba(161, 121, 58, 0.16); border-color: #a1793a; color: #8a5f22; }
.setup-step.is-done .setup-step-n::before { content: "\2713"; }
.setup-step.is-done .setup-step-n { font-size: 0.7rem; }
.setup-step-bar { flex: 1; max-width: 68px; height: 1px; background: rgba(161, 121, 58, 0.28); }
@media (max-width: 560px) {
  .setup-step-l { display: none; }
  .setup-step-bar { max-width: none; }
}

/* ---- payment step ---- */
.setup-pay {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(1.2rem, 3vw, 2.6rem); align-items: start;
  max-width: 880px;
}
.setup-pay-h {
  font-family: var(--font-ui); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: #a1793a;
  margin: 0 0 0.9rem;
}
.setup-pay-review {
  background: #fbf9f3; border: 1px solid rgba(161, 121, 58, 0.2);
  border-radius: 16px; padding: 1.3rem 1.4rem;
}
.pay-line {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  font-family: var(--font-ui); font-size: 0.9rem; color: rgba(32, 37, 26, 0.72);
  padding: 0.5rem 0; border-bottom: 1px solid rgba(161, 121, 58, 0.12);
}
.pay-line span:last-child { color: var(--ink-dark, #20251a); white-space: nowrap; }
.pay-line--total {
  border-bottom: 0; margin-top: 0.3rem; padding-top: 0.8rem;
  border-top: 1px solid rgba(161, 121, 58, 0.3);
  font-family: var(--font-display); font-size: 1.15rem; color: var(--ink-dark, #20251a);
}
.pay-line--total span:last-child { font-size: 1.15rem; }
.setup-pay-form { display: flex; flex-direction: column; gap: 0.9rem; }
.setup-pay-note {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-ui); font-size: 0.8rem; color: rgba(32, 37, 26, 0.55);
  margin: 0.4rem 0 0;
}
.setup-pay-note i { color: #8a5f22; }

/* buybar back button */
.bb-step-back {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-ui); font-size: 0.85rem; font-weight: 500;
  color: rgba(32, 37, 26, 0.7); background: none; cursor: pointer;
  padding: 0.7rem 1rem; border-radius: 999px;
  border: 1px solid rgba(32, 37, 26, 0.18);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.bb-step-back:hover { background: rgba(32, 37, 26, 0.06); border-color: rgba(161, 121, 58, 0.4); }

@media (max-width: 720px) {
  .setup-pay { grid-template-columns: 1fr; }
  .setup-summary { grid-template-columns: 1fr; gap: 1rem; }
  .sum-cell--metal::before, .sum-cell--price::before { display: none; }
  .sum-cell--price { align-items: flex-start; text-align: left; }
  .setup-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
}

/* ---- design card: hover angle arrows ---- */
.scard-arw {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(251, 249, 243, 0.85); color: #8a5f22;
  border: 1px solid rgba(161, 121, 58, 0.3);
  opacity: 0; transition: opacity 0.2s ease, background 0.2s ease; cursor: pointer; z-index: 2;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.scard-arw-l { left: 0.5rem; }
.scard-arw-r { right: 0.5rem; }
.scard:hover .scard-arw { opacity: 0.85; }
.scard-arw:hover { opacity: 1; background: #fff; }

/* ---- lightbox: angle nav, thumbnails, select CTA, category ---- */
.lightbox-media { position: relative; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(251, 249, 243, 0.9); color: var(--ink-dark, #20251a);
  border: 1px solid rgba(161, 121, 58, 0.3); cursor: pointer; font-size: 1.1rem; z-index: 2;
  transition: background 0.2s ease;
}
.lb-nav:hover { background: #fff; }
.lb-prev { left: 0.75rem; }
.lb-next { right: 0.75rem; }
.lb-thumbs { display: flex; gap: 0.5rem; justify-content: center; padding: 0.85rem 0 0; flex-wrap: wrap; }
.lb-thumb {
  width: 54px; height: 54px; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer;
  background: #f0ece1; border: 1px solid rgba(161, 121, 58, 0.25);
}
.lb-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 0.25rem; }
.lb-thumb.is-on { border-color: #a1793a; box-shadow: 0 0 0 1px #a1793a; }
.lb-cat {
  font-family: var(--font-ui); font-size: 0.6rem; font-weight: 600;
  letter-spacing: 0.16em; color: #a1793a; margin: 0 0 0.3rem;
}
.lb-select {
  display: inline-block; margin-top: 1rem;
  height: 44px; padding: 0 1.5rem; border-radius: 999px;
  background: #4c543e; border: 1px solid #4c543e; color: #f4f1e9;
  font-family: var(--font-ui); font-size: 0.9rem; font-weight: 500; cursor: pointer;
  transition: background 0.2s ease;
}
.lb-select:hover { background: #3c4231; }

/* ---- metal-pending: lock banner + grid overlay ---- */
.metal-lock[hidden] { display: none; }
.metal-lock {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem 1.25rem; margin-bottom: 1.4rem;
  border: 1px solid var(--hair-gold); border-radius: 14px;
  background: linear-gradient(160deg, rgba(201, 162, 75, 0.09), rgba(201, 162, 75, 0.03));
}
.metal-lock-ic {
  flex: none; display: grid; place-items: center; width: 42px; height: 42px;
  border-radius: 50%; background: rgba(161, 121, 58, 0.1);
  border: 1px solid var(--hair-gold); color: var(--gold, #a1793a); font-size: 1.2rem;
}
.metal-lock-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.metal-lock-text strong { font-family: var(--font-ui); font-weight: 600; font-size: 0.92rem; color: var(--ink-dark, #20251a); }
.metal-lock-text span { font-family: var(--font-ui); font-weight: 300; font-size: 0.82rem; line-height: 1.4; color: rgba(32, 37, 26, 0.66); }
.metal-lock-cta {
  flex: none; height: 42px; padding: 0 1.3rem; border-radius: 999px;
  background: rgba(246, 244, 236, 0.5); color: var(--ink-dark, #20251a);
  border: 1px solid rgba(32, 37, 26, 0.25);
  font-family: var(--font-ui); font-size: 0.85rem; font-weight: 500; cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.metal-lock-cta:hover { background: rgba(246, 244, 236, 0.9); border-color: rgba(161, 121, 58, 0.5); }
.setup-grid.is-locked { opacity: 0.45; pointer-events: none; filter: grayscale(0.15); }

/* ---- metal picker modal ---- */
.mp-panel { width: min(460px, calc(100vw - 2.5rem)); text-align: left; padding: 1.75rem 1.75rem 1.5rem; }
.mp-panel h2 { text-align: left; margin-bottom: 0.35rem; }
.mp-panel p { text-align: left; margin-bottom: 1.1rem; }
.mp-close {
  position: absolute; top: 1rem; right: 1rem; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(32, 37, 26, 0.15); background: transparent; cursor: pointer;
  display: grid; place-items: center; color: var(--ink-dark, #20251a);
}
.mp-list { display: flex; flex-direction: column; gap: 0.5rem; }
.mp-opt {
  display: flex; align-items: center; gap: 0.85rem; width: 100%;
  padding: 0.7rem 0.9rem; border: 1px solid var(--hair); border-radius: 12px;
  background: #fff; cursor: pointer; text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.mp-opt:hover { border-color: var(--hair-gold); box-shadow: 0 8px 18px -12px rgba(32, 37, 26, 0.4); }
.mp-opt-sw { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(161, 121, 58, 0.3); }
.mp-opt-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.mp-opt-text strong { font-family: var(--font-ui); font-weight: 600; font-size: 0.9rem; color: var(--ink-dark, #20251a); }
.mp-opt-text span { font-family: var(--font-ui); font-weight: 300; font-size: 0.78rem; color: rgba(32, 37, 26, 0.6); }
.mp-opt-badge {
  flex: none; font-family: var(--font-ui); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold, #a1793a);
  padding: 0.2rem 0.5rem; border: 1px solid var(--hair-gold); border-radius: 999px;
}
.mp-opt-price { flex: none; font-family: var(--font-ui); font-size: 0.82rem; font-weight: 500; color: var(--ink-dark, #20251a); }
.mp-loose {
  display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.9rem;
  background: none; border: 0; cursor: pointer; font-family: var(--font-ui); font-size: 0.85rem; color: #8a5f22;
}
.mp-loose:hover { text-decoration: underline; }
.mp-loose i { font-size: 1rem; }

/* loose panel as a selection card with a tick */
.setup-loose { position: relative; }
.setup-loose.is-selected {
  border-style: solid; border-color: #a1793a; background: #fbf9f3;
  box-shadow: 0 0 0 1px #a1793a, 0 22px 40px -28px rgba(32, 37, 26, 0.4);
}
.setup-loose-check {
  position: absolute; top: 1rem; right: 1rem;
  width: 30px; height: 30px; border-radius: 50%;
  background: #4c543e; color: #fff; display: grid; place-items: center; font-size: 0.9rem;
}

/* custom-design form locked until a metal is chosen */
.setup-custom.is-locked { opacity: 0.45; pointer-events: none; filter: grayscale(0.15); }

/* tertiary "learn more" link (metal picker, energisation) */
.tertiary-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-top: 1rem;
  font-family: var(--font-ui); font-size: 0.8rem; font-weight: 400;
  color: #8a5f22; text-decoration: none;
  transition: color 0.2s ease;
}
.tertiary-link:hover { color: #a1793a; }
.tertiary-link i { font-size: 0.9rem; }
.tertiary-link i:last-child { font-size: 0.72rem; }
.setup-block-head { justify-content: flex-start; gap: 0.9rem; }
.setup-block-head .tertiary-link { margin-top: 0; }

/* ---- design quick-view lightbox (backdrop + panel) ---- */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 210;
  display: grid; place-items: center;
  padding: clamp(1rem, 3vw, 2rem);
}
.lightbox-overlay[hidden] { display: none; }
.lightbox-backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 24, 16, 0.6);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.lightbox-figure {
  position: relative; margin: 0;
  width: min(680px, calc(100vw - 2rem)); max-height: 90vh; overflow: auto;
  background: #fbf9f3;
  border: 1px solid rgba(161, 121, 58, 0.3);
  border-radius: 20px;
  padding: 1.25rem 1.25rem 1.5rem;
  box-shadow: 0 50px 100px -40px rgba(20, 24, 16, 0.6);
  display: flex; flex-direction: column;
}
.lightbox-close {
  position: absolute; top: 1rem; right: 1rem; z-index: 3;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(32, 37, 26, 0.15);
  background: rgba(251, 249, 243, 0.9); cursor: pointer;
  display: grid; place-items: center; color: var(--ink-dark, #20251a); font-size: 1.05rem;
}
.lightbox-close:hover { background: #fff; }
.lightbox-media {
  position: relative; border-radius: 14px; overflow: hidden;
  background: radial-gradient(120% 100% at 50% 28%, #fdfbf6, #f0ece1);
  aspect-ratio: 4 / 3;
}
.lightbox-media img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; }
.lightbox-cap { text-align: center; padding: 1.1rem 0.5rem 0.3rem; }
.lightbox-cap strong {
  display: block; font-family: var(--font-display); font-weight: 400;
  font-size: 1.5rem; color: var(--ink-dark, #20251a); margin: 0.2rem 0 0.3rem;
}
.lightbox-cap #lightboxSub {
  font-family: var(--font-ui); font-weight: 300; font-size: 0.85rem;
  color: rgba(32, 37, 26, 0.62);
}

/* order card stays light/white — base .order-card styles apply */

/* energisation upgrade upsell inside the summary */
.oc-upsell {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.85rem; row-gap: 0.7rem;
  align-items: center;
  margin-top: 1rem; padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--gold, #a1793a);
  background:
    linear-gradient(135deg, rgba(201, 162, 75, 0.18), rgba(201, 162, 75, 0.05) 65%),
    #fffdf8;
  box-shadow: 0 12px 28px -20px rgba(161, 121, 58, 0.6);
}
.oc-upsell-ic {
  flex: none;
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  background: rgba(161, 121, 58, 0.14);
  color: var(--gold, #a1793a);
  font-size: 1.2rem;
}
.oc-upsell-ic { grid-row: 1 / span 2; align-self: center; }
.oc-upsell-copy { grid-column: 2; grid-row: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.oc-upsell-btn { grid-column: 2; grid-row: 2; justify-self: start; }
.oc-upsell-copy strong {
  font-family: var(--font-ui); font-weight: 600; font-size: 0.88rem; color: var(--ink-dark, #20251a);
}
.oc-upsell-copy span { font-family: var(--font-ui); font-weight: 300; font-size: 0.75rem; line-height: 1.35; color: rgba(32, 37, 26, 0.62); }
.oc-upsell.is-added .oc-upsell-ic { background: rgba(161, 121, 58, 0.08); }
.oc-upsell-btn {
  flex: none; padding: 0.5rem 1.1rem; border-radius: 999px;
  border: 0; background: var(--gold, #a1793a); color: #fff;
  font-family: var(--font-ui); font-weight: 600; font-size: 0.8rem; cursor: pointer;
  box-shadow: 0 4px 12px -6px rgba(161, 121, 58, 0.8);
  transition: filter 0.2s ease, transform 0.2s ease;
}
.oc-upsell-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
/* once added: recede to a quiet confirmation */
.oc-upsell.is-added {
  border-style: dashed; border-color: var(--hair-gold, rgba(161,121,58,0.4));
  background: rgba(201, 162, 75, 0.05);
  box-shadow: none;
}
.oc-upsell.is-added .oc-upsell-copy strong::before { content: "\2713"; color: var(--gold); }
.oc-upsell.is-added .oc-upsell-btn {
  background: transparent; border: 1px solid var(--hair-gold, rgba(161,121,58,0.4)); color: var(--gold, #a1793a);
  box-shadow: none;
}

.oc-upsell[hidden] { display: none !important; }
