/* === CONFIGURATOR APP CSS === */

/* -- Reset -- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-sans);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-weight: 300; margin: 0; }
::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--rule); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* -- Animations -- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* -- Top bar -- */
.cfg-bar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 128px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--rule);
  z-index: 100;
  display: flex;
  flex-direction: column;
}
.cfg-bar__top {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.cfg-bar__bottom {
  height: 48px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--rule);
  position: relative;
}
.cfg-bar__logo {
  display: flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
  flex-shrink: 0;
}
.cfg-bar__logo-monogram {
  font-family: var(--f-display);
  font-size: 50px;
  font-weight: 300;
  color: var(--brass);
  letter-spacing: 4px;
  line-height: 1;
}
.cfg-bar__logo-sep {
  width: 1px;
  height: 50px;
  background: var(--rule);
  flex-shrink: 0;
}
.cfg-bar__logo-brand {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cfg-bar__logo-name {
  font-family: var(--f-sans);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--fg);
}
.cfg-bar__logo-tagline {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.01em;
  line-height: 1;
  color: var(--accent);  /* brass, matching the CE monogram + marketing site */
}
@media (max-width: 680px) {
  .cfg-bar__logo-monogram { font-size: 36px; }
  .cfg-bar__logo-sep { height: 36px; }
}
@media (max-width: 440px) {
  .cfg-bar__logo-monogram { font-size: 30px; }
  .cfg-bar__logo-sep { height: 30px; }
  .cfg-bar__logo-name { font-size: 9px; letter-spacing: 0.22em; }
  .cfg-bar__logo-tagline { font-size: 11px; max-width: 62vw; line-height: 1.3; }
}
.cfg-bar__back {
  font-family: var(--f-sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
  transition: color var(--dur) var(--ease);
  flex-shrink: 0;
}
.cfg-bar__back:hover { color: var(--accent); }

/* -- In-step price strip -- */
.cfg-price-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 24px;
  border-top: 1px solid var(--rule);
  margin-top: 32px;
}
.cfg-price-strip__left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cfg-price-strip__label {
  font-family: var(--f-sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.cfg-price-strip__note {
  font-family: var(--f-sans);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
  opacity: 0.7;
}
.cfg-price-strip__amount {
  font-family: var(--f-display);
  font-size: 32px;
  font-weight: 300;
  color: var(--fg);
  letter-spacing: 0.02em;
  line-height: 1;
}

/* -- Progress bar -- */
.cfg-progress {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
  flex: 1;
  justify-content: center;
}
.cfg-progress__step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-family: var(--f-sans);
  color: var(--fg-muted);
  position: relative;
  white-space: nowrap;
}
.cfg-progress__step + .cfg-progress__step::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--rule);
  font-size: 14px;
}
.cfg-progress__step { cursor: pointer; }
.cfg-progress__step.is-active { color: var(--accent); cursor: default; }
.cfg-progress__step.is-done   { color: var(--fg-muted); opacity: 0.55; transition: opacity var(--dur) var(--ease), color var(--dur) var(--ease); }
.cfg-progress__step.is-done:hover { opacity: 1; color: var(--fg); }
.cfg-progress__step:not(.is-active):not(.is-done):hover { opacity: 0.7; }
.cfg-progress__num {
  width: var(--step-dot);
  height: var(--step-dot);
  border: 1px solid #4a3e30;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-family: var(--f-sans);
  line-height: 1;
  /* Digits have no descender, so under line-height:1 they sit optically ~1px
     high in the circle - nudge the glyph down onto the true centre. */
  padding-top: 1px;
  flex-shrink: 0;
  transition: all var(--dur) var(--ease);
}
.cfg-progress__step.is-active .cfg-progress__num {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}
.cfg-progress__step.is-done .cfg-progress__num {
  background: var(--rule);
  border-color: var(--rule);
  color: var(--fg-muted);
}

/* -- Progress bar -- */
.cfg-main { padding-top: 128px; }

.cfg-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 64px);
}

.cfg-viewer {
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  /* Match the model-viewer's own background so the opacity fade on model
     load/switch doesn't reveal a different (grayer) colour behind it. */
  background: var(--obsidian);
  overflow: hidden;
  isolation: isolate;
}
.cfg-viewer model-viewer {
  width: 100%;
  height: 100%;
  background-color: var(--obsidian);
  --progress-bar-color: var(--accent);
  opacity: 1;
  transition: opacity 420ms var(--ease);
}
/* Hides the model while its raw (black) baked-in material is still showing,
   before JS has applied the swatch colour - see initViewerMaps(). */
.cfg-viewer model-viewer.is-coloring {
  opacity: 0;
}

.cfg-panel { border-left: 1px solid var(--rule); }
.cfg-wrap  { padding: 44px 36px 80px; }

/* Saved view (step 7): drop the 3D viewer, then centre the content in a container
   about as wide as the old right-hand panel (rather than stretching edge to edge,
   which reads like an upscaled mobile layout). */
.cfg-layout--no-viewer { grid-template-columns: 1fr; }
.cfg-layout--no-viewer .cfg-viewer { display: none; }
.cfg-layout--no-viewer .cfg-panel  { border-left: none; margin-top: 0; }
.cfg-layout--no-viewer .cfg-wrap   { max-width: 960px; margin-left: auto; margin-right: auto; }

/* -- Steps -- */
.cfg-step { display: none; }
.cfg-step.is-active {
  display: block;
  animation: fadeUp 0.45s var(--ease) forwards;
}

/* -- Step heading -- */
.cfg-step__head { margin-bottom: 32px; }
.cfg-step__eyebrow {
  font-family: var(--f-sans);
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.cfg-step__title {
  font-family: var(--f-display);
  font-size: clamp(22px, 2.8vw, 36px);
  font-weight: 300;
  line-height: 1.1;
  color: var(--fg);
}
.cfg-step__sub {
  font-size: 13px;
  color: var(--fg-muted);
  margin-top: 10px;
  max-width: 48ch;
  line-height: 1.65;
}

/* -- Viewer share button & popup -- */

/* -- Intro step (step 1) -- */
.brand-name {
  font-family: var(--f-display);
  font-size: clamp(28px, 3.6vw, 52px);
  font-weight: 300;
  line-height: 1.1;
  margin: 0;
  letter-spacing: 0.02em;
}
@media (max-width: 680px) {
  .brand-name { text-align: center; }
}
.cfg-step__intro-body {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--rule-soft);
  max-width: 52ch;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cfg-step__intro-body p {
  margin: 0;
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.8;
}

/* -- Type toggle (step 3: compact Dining / Coffee picker) -- */
.type-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.type-toggle {
  padding: 8px 20px;
  border: 1px solid var(--rule);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: var(--f-sans);
  color: var(--fg-muted);
  background: transparent;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.type-toggle:hover { border-color: var(--accent); color: var(--fg); }
.type-toggle.is-selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent);
}

/* -- Leg picker (step 5) - 82px square icon tile, same footprint as a colour swatch.
   Uses the same shrink-to-fit grid as the swatches so it keeps 4 across on mobile. -- */
.leg-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, var(--swatch-size)));
  justify-content: start;
  gap: 20px 16px;
  margin-bottom: 28px;
}
.leg-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 0; border: none; background: none;
  color: var(--fg-muted); cursor: pointer; text-align: center;
  transition: color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.leg-card__icon {
  width: 100%; max-width: var(--swatch-size); aspect-ratio: 1 / 1; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule);
  background: var(--bg-card);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.leg-card__icon svg { width: 66%; height: 66%; }
.leg-card__label { font-family: var(--f-sans); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; }
@media (hover: hover) {
  .leg-card:hover { color: var(--accent); }
  .leg-card:hover .leg-card__icon { border-color: var(--accent); }
}
.leg-card.is-selected { color: var(--accent); }
.leg-card.is-selected .leg-card__icon { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--bg-card)); }
.leg-card.is-disabled { opacity: 0.3; pointer-events: none; cursor: not-allowed; }

/* -- Type cards (step 1: Dining / Coffee) -- */
.type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.type-card {
  border: 1px solid var(--rule);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
  position: relative;
  overflow: hidden;
}
.type-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.type-card.is-selected { border-color: var(--accent); }
.type-card.is-selected::after {
  content: '\2713';
  position: absolute; top: 14px; right: 14px;
  width: 22px; height: 22px;
  background: var(--accent); color: var(--ink);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.type-card__img {
  aspect-ratio: 3 / 2;
  display: flex; align-items: center; justify-content: center;
  padding: 32px;
  background: transparent;
}
.type-card__img svg { width: 100%; max-width: 220px; opacity: 0.7; transition: opacity var(--dur) var(--ease); }
.type-card:hover .type-card__img svg,
.type-card.is-selected .type-card__img svg { opacity: 1; }
.type-card__body { padding: 20px 24px; border-top: 1px solid var(--rule-soft); }
.type-card__name { font-family: var(--f-display); font-size: 22px; font-weight: 300; line-height: 1.2; }
.type-card__sub  { font-size: 10px; letter-spacing: 0.16em; color: var(--accent); text-transform: uppercase; margin-top: 5px; font-family: var(--f-sans); }

/* -- Shape cards (step 2) -- */
.shape-groups { display: flex; flex-direction: column; gap: 14px; }
.shape-group__header { font-family: var(--f-sans); font-size: 9px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-muted); border-bottom: 1px solid var(--rule); padding-bottom: 5px; margin-bottom: 6px; }
.shape-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);  /* desktop: 3 rows of 5 (15 shapes) */
  gap: 8px;
}
.shape-card {
  border: 1px solid var(--rule);
  background: var(--bg-card);
  cursor: pointer;
  padding: 10px 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
  position: relative;
}
.shape-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.shape-card.is-selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 4%, var(--bg-card)); }
/* Landscape silhouette: wrapper is a fixed-height (matches colour/leg icons)
   centring box; the svg fills that height and takes its width from the 100x60
   aspect, capped so it never overflows its cell. */
.shape-card__svg {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: var(--swatch-size);
  color: var(--fg-muted); transition: color var(--dur) var(--ease);
}
.shape-card__svg svg { height: 100%; width: auto; max-width: 100%; }
.shape-card:hover .shape-card__svg,
.shape-card.is-selected .shape-card__svg { color: var(--accent); }
.shape-card__label { font-family: var(--f-sans); font-size: 7px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); text-align: center; line-height: 1.3; word-break: break-all; }
.shape-card.is-selected .shape-card__label { color: var(--accent); }

/* -- Dimension inputs (step 3) -- */
.dimension-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 20px; }
.dim-leg-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 28px;
  padding: 10px 12px;
  border-left: 2px solid var(--accent);
  background: rgba(197,168,130,.06);
  font-family: var(--f-sans);
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: 0.03em;
  color: var(--fg-muted);
}
.dim-field { display: flex; flex-direction: column; gap: 10px; }
.dim-field__label { font-family: var(--f-sans); font-size: 9px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--fg-muted); }
.dim-field__row { display: flex; align-items: baseline; gap: 0; border-bottom: 1px solid var(--rule); transition: border-color var(--dur) var(--ease); }
.dim-field__row:focus-within { border-bottom-color: var(--accent); }
.dim-field__input {
  background: transparent; border: 0; padding: 10px 0;
  font-family: var(--f-display); font-size: 36px; font-weight: 300;
  color: var(--fg); outline: none; width: 100%; line-height: 1;
  -moz-appearance: textfield; appearance: textfield;
}
.dim-field__input::-webkit-outer-spin-button,
.dim-field__input::-webkit-inner-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }
/* Width is derived from length (locked ratio) - shown read-only, slightly muted. */
.dim-field__input[readonly] { color: var(--fg-muted); cursor: default; }
.dim-field__unit { font-family: var(--f-sans); font-size: 11px; letter-spacing: 0.1em; color: var(--fg-muted); padding-bottom: 10px; flex-shrink: 0; }
.dim-field__range { font-family: var(--f-sans); font-size: 9px; letter-spacing: 0.14em; color: var(--fg-muted); }
.dim-field__error { font-size: 9px; letter-spacing: 0.12em; color: #c97070; display: none; }
.dim-field.has-error .dim-field__row { border-bottom-color: #c97070; }
.dim-field.has-error .dim-field__error { display: block; }


/* -- Swatches (step 3) -- */
.swatch-group { margin-bottom: 44px; }
.swatch-group__label {
  display: block;
  font-family: var(--f-sans);
  font-size: 9px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 16px;
}
.swatch-grid {
  display: grid;
  /* fixed-size (not stretchy 1fr) columns so squares stay ~shape height and
     pack left instead of ballooning to fill the panel */
  grid-template-columns: repeat(6, minmax(0, var(--swatch-size)));
  justify-content: start;
  gap: 20px 16px;
}
.swatch { position: relative; cursor: pointer; text-align: center; }
.swatch__dot {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 2px solid transparent;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
  position: relative;
  margin: 0 auto;
}
.swatch__dot::after {
  content: '';
  position: absolute;
  inset: 3px;
  display: block;
  background: var(--sw, #ccc);   /* hex comes from the inline --sw var (ce_colors) */
}
.swatch:hover .swatch__dot  { border-color: var(--accent); transform: scale(1.08); }
.swatch.is-selected .swatch__dot { border-color: var(--accent); }
.swatch.is-selected .swatch__dot::before {
  content: '✓';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  z-index: 2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.swatch__name {
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  margin-top: 7px;
  text-transform: uppercase;
  font-family: var(--f-sans);
  max-width: var(--swatch-size);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Swatch fill colours now come from the inline --sw var per swatch (ce_colors,
   editable via the admin Colours screen) - no hardcoded per-colour rules. */

/* -- Lead form (step 5) -- */
.lead-form { max-width: 100%; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 36px;
}
.form-grid .field--full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label {
  font-family: var(--f-sans);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.field__input,
.field__select,
.field__textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 10px 0;
  font-family: var(--f-sans);
  font-size: 14px;
  font-weight: 300;
  color: var(--fg);
  width: 100%;
  outline: none;
  transition: border-color var(--dur) var(--ease);
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}
.field__input::placeholder { color: var(--fg-muted); opacity: 0.7; }
.field__input:focus,
.field__select:focus,
.field__textarea:focus { border-bottom-color: var(--accent); }
.field__select { cursor: pointer; }
.field__select option { background: var(--bg-2); color: var(--fg); }
.field__textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.field__error {
  font-size: 9px;
  letter-spacing: 0.12em;
  color: #c97070;
  display: none;
}
.field.has-error .field__input,
.field.has-error .field__select { border-bottom-color: #c97070; }
.field.has-error .field__error  { display: block; }

/* -- Navigation buttons -- */
.cfg-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.cfg-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--f-sans);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  border-radius: var(--btn-radius);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  background: transparent;
}
.cfg-btn--primary { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.cfg-btn--primary:hover:not([disabled]) { background: transparent; color: var(--accent); }
.cfg-btn--ghost { color: var(--fg-muted); border-color: var(--rule); }
.cfg-btn--ghost:hover:not([disabled]) { color: var(--accent); border-color: var(--accent); }
.cfg-btn[disabled] { opacity: 0.35; cursor: not-allowed; pointer-events: none; }
.cfg-btn__arrow { transition: transform var(--dur) var(--ease); display: inline-block; }
.cfg-btn:hover:not([disabled]) .cfg-btn__arrow { transform: translateX(4px); }
/* Forward step-advance buttons only - same filled-accent treatment as the
   saved-design order CTA (.cfg-cta-card__btn--accent) so the primary path
   through the 5-step flow stands out more than a plain outline button. */
.cfg-btn--next {
  background: #C68A48;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.20);
}
.cfg-btn--next:hover:not([disabled]) {
  background: #CE9251;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.26);
}
.cfg-btn--next[disabled] { background: #C68A48; color: #fff; }

/* Deposit "Pay via iDEAL" CTA - a green trust button with a soft breathing
   glow, echoing the marketing site's magnet CTA (.ce-btn--magnet). Green reads
   as "safe to pay"; the pulse draws the eye to the one action that starts
   production. Reduced-motion users get the static button. */
@keyframes cfgPayPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47, 122, 74, 0.45); }
  50%      { box-shadow: 0 0 26px 3px rgba(47, 122, 74, 0.28); }
}
.cfg-btn--pay {
  background: #2F7A4A;
  color: #fff;
  border-color: #2F7A4A;
  font-weight: 600;
  animation: cfgPayPulse 3.4s var(--ease) infinite;
}
.cfg-btn--pay:hover:not([disabled]) {
  background: #276540;
  color: #fff;
  border-color: #276540;
  animation-play-state: paused;
}
/* The save button keeps its brass-era depth: the pulse replaces the resting shadow, so give
   it back the same lift on hover the step-advance buttons have. */
.cfg-btn--wide.cfg-btn--pay:hover:not([disabled]) { transform: translateY(-1px); }
.cfg-btn--pay[disabled] { background: #2F7A4A; color: #fff; border-color: #2F7A4A; }
@media (prefers-reduced-motion: reduce) {
  .cfg-btn--pay { animation: none; }
}

/* "Order Your Table" CTA - same soft breathing glow as the deposit button, in the
   accent (brass) tone, to pull focus to the primary order action. The disabled
   state (order already placed) and reduced-motion users get no animation. */
@keyframes cfgAccentPulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  50%      { box-shadow: 0 0 26px 3px color-mix(in srgb, var(--accent) 30%, transparent); }
}
.cfg-cta-card__btn--accent:not([disabled]) {
  animation: cfgAccentPulse 3.4s var(--ease) infinite;
}
.cfg-cta-card__btn--accent:not([disabled]):hover { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .cfg-cta-card__btn--accent { animation: none; }
}

/* -- Toast notification -- */
.toast {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--fg);
  color: var(--bg);
  padding: 10px 22px;
  font-family: var(--f-sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  z-index: 300;
  white-space: nowrap;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* -- Version badge (+ dev texture/stretch tuning sliders) -- */
/* Version badge: a subtle fixed marker bottom-left (deploy/cache check), matching
   the marketing site's translucent .site-version. */
.cfg-version {
  position: fixed;
  bottom: 10px;
  left: 12px;
  z-index: 60;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--fg-muted);
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
}

/* -- Language switcher -- */
.lang-switcher {
  position: absolute;
  right: 32px;
  display: flex;
  align-items: center;
}
.lang-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 8px;
  line-height: 1;
}
.lang-btn.is-active { display: none; }
.lang-btn__text {
  font-family: var(--f-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  transition: color var(--dur) var(--ease);
}
.lang-btn:hover .lang-btn__text { color: var(--fg); }

/* -- Responsive -- */
@media (max-width: 960px) {
  .cfg-bar { height: 108px; }
  .cfg-main { padding-top: 108px; }
  .cfg-layout { grid-template-columns: 1fr; }
  .cfg-viewer {
    position: fixed;
    top: 108px;
    left: 0;
    right: 0;
    height: 260px;
    z-index: 5;
    border-bottom: 1px solid var(--rule);
  }
  .cfg-panel {
    margin-top: 260px;
    border-left: none;
  }
}
@media (max-width: 900px) {
  .cfg-progress__label { display: none; }
  .cfg-progress__step  { padding: 4px 10px; }
}
@media (max-width: 680px) {
  .cfg-wrap { padding: 32px 20px 60px; }
  .form-grid           { grid-template-columns: 1fr; }
  .form-grid .field--full { grid-column: 1; }
}


/* -- Additional responsive for new layout -- */
@media (max-width: 760px) {
  .type-grid   { grid-template-columns: 1fr 1fr; }
  .shape-grid  { grid-template-columns: repeat(3, 1fr); }
  .swatch-grid { grid-template-columns: repeat(4, minmax(0, var(--swatch-size))); }
  /* tighter column gap on mobile so 4 icons fit comfortably across */
  .swatch-grid, .leg-grid { gap: 16px 10px; }
  .dimension-panel { grid-template-columns: 1fr; }
}
@media (max-width: 440px) {
  .type-grid   { grid-template-columns: 1fr; }
}

/* -- Configuration summary card (steps 5 + 6) -- */
.cfg-summary {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  padding: 20px 24px;
  margin-bottom: 32px;
}
.cfg-summary__head {
  font-family: var(--f-sans);
  font-size: 9px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.cfg-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.cfg-summary__row:last-child { border-bottom: none; }
.cfg-summary__label {
  font-family: var(--f-sans);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
  flex-shrink: 0;
}
.cfg-summary__value {
  font-size: 13px;
  color: var(--fg);
  text-align: right;
}
.cfg-summary--inset {
  background: transparent;
  border-color: var(--rule-soft);
  margin-top: 36px;
  margin-bottom: 0;
}

/* -- Save section (step 6) --
   The __label and __sub rules were dropped in v1.47.1: the section no longer has a heading of
   its own, the step title above it carries that. */
/* Real breathing room before the specification card underneath. It used to be 0, so the
   follow-up strip ran straight into the next block with only its own padding between them. */

/* The underline-only field reads as a divider rather than something you type in, which on the
   one screen that decides whether we get a lead is too subtle. Here the inputs get a real box:
   faint fill, full border, and an accent frame on focus. Scoped to this section on purpose -
   the sample and order forms keep the quieter treatment until we decide to roll this out. */
/* Full width of the form, deliberately: the inputs above and the follow-up strip below use the
   whole panel, so a narrower centred button could never line up with either. "Too big" was
   about HEIGHT, and that is what got trimmed - the width now matches the fields exactly. */
.cfg-btn--wide {
  width: 100%;
  display: flex;
  justify-content: center;
  padding-top: 15px;
  padding-bottom: 15px;
  margin-top: 22px;
}

/* Three follow-up steps under the save button. Equal columns with hairline dividers, the same
   width as the button and the fields so every edge in this block lines up. */
/* All three icons share one box size. They used to differ, which pushed the middle column's
   label lower than its neighbours; the swatch icon is made to look bigger inside its own
   viewBox instead (larger circles), so the boxes stay identical and the labels line up. */
/* Stay three across on phones too. Stacking them turned a compact reassurance strip into three
   full-width rows that pushed everything below it away and read as a menu rather than a summary.
   The columns just get tighter: less padding, smaller type, smaller icons. */
@media (max-width: 480px) {
}

/* -- Saved success (step 6) -- */
.cfg-saved__check {
  width: 52px; height: 52px;
  border: 1px solid var(--accent);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 28px;
}
.cfg-saved__title {
  font-family: var(--f-display);
  font-size: clamp(22px, 2.8vw, 36px);
  font-weight: 300;
  line-height: 1.1;
  color: var(--fg);
  margin-bottom: 10px;
}
.cfg-saved__sub {
  font-size: 13px;
  color: var(--fg-muted);
  margin-bottom: 28px;
  max-width: 46ch;
  line-height: 1.65;
}
.cfg-saved__link-box {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--rule);
  margin-bottom: 12px;
}
.cfg-saved__url {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  padding: 12px 14px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--fg-muted);
  outline: none;
  cursor: text;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cfg-saved__copy-btn {
  flex-shrink: 0;
  background: var(--rule);
  border: 0;
  border-left: 1px solid var(--rule);
  border-radius: var(--btn-radius);
  padding: 12px 20px;
  font-family: var(--f-sans);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg);
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.cfg-saved__copy-btn:hover { background: var(--accent); color: var(--ink); }
.cfg-saved__copy-btn.is-copied { background: var(--accent); color: var(--ink); }

.cfg-saved__whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-sans);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
  padding: 6px 0;
  margin-bottom: 0;
}
.cfg-saved__whatsapp:hover { color: #25D366; }

/* ── Saved view: decision-first layout ──────────────────────────── */
[hidden] { display: none !important; }   /* JS toggles the inline flows via the hidden attribute */

/* ── Premium dual-card conversion section ───────────────────────────
   Two visually separate, tactile cards: material samples + custom order.
   Each card is a horizontal split (visual | text) with a full-width
   button pinned beneath. Cards span the saved panel full width (stacked)
   so the split has room; they never share a surface or border. */
.cfg-cta { margin: 8px 0 40px; }
/* Always two-up; cards shrink to fit side by side (desktop AND mobile). */
.cfg-cta__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(10px, 1.6vw, 20px);
}
/* container-type lets the card's own width drive its type + internal layout,
   so the same card works at ~150px (phone, 2-up) up to ~480px (wide). */
.cfg-cta-card {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 5cqw, 40px);
  border-radius: clamp(14px, 2.4cqw, 24px);
  border: 1px solid rgba(196, 166, 118, 0.18);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.cfg-cta-card--sample { background: linear-gradient(155deg, #232019, #141210); }
.cfg-cta-card--order  { background: linear-gradient(155deg, #2d2318, #17110c); }
.cfg-cta-card:hover {
  transform: translateY(-4px);
  border-color: rgba(210, 180, 130, 0.32);
  box-shadow: 0 34px 64px rgba(0, 0, 0, 0.28);
}
/* Already-requested recap: greyed/inert card, but the requested finish swatches
   keep their true colour so the customer can see what they ordered. */
.cfg-cta-card.is-requested { opacity: 0.3; }
.cfg-cta-card.is-requested:hover {
  transform: none;
  border-color: rgba(196, 166, 118, 0.18);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.22);
}
.cfg-cta-card__btn:disabled { cursor: default; }
.cfg-cta-card__btn:disabled:hover { transform: none; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.20); }

/* Internal layout: horizontal by default (visual left, copy right); only the
   tiniest cards stack. Copy is top-aligned so it lines up across both cards. */
.cfg-cta-card__top {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: clamp(16px, 4cqw, 34px);
  flex: 1 1 auto;
  margin-bottom: clamp(16px, 4cqw, 30px);
}
.cfg-cta-card__text { flex: 1 1 auto; min-width: 0; align-self: flex-start; }
.cfg-cta-card__label {
  margin: 0 0 clamp(8px, 2cqw, 14px);
  font-family: var(--f-sans);
  font-size: clamp(9px, 2.4cqw, 12px);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #D3B07A;
}
.cfg-cta-card__headline {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(16px, 8cqw, 38px);
  line-height: 1.1;
  color: #F4ECE3;
}
.cfg-cta-card__divider {
  display: block;
  width: clamp(38px, 12cqw, 56px);
  height: 2px;
  background: #C99B5F;
  margin: clamp(12px, 3cqw, 18px) 0;
}
.cfg-cta-card__body {
  margin: 0;
  font-size: clamp(11px, 3cqw, 15px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.74);
}

/* Overlapping finish circles (real ce_colors hexes via --sw) */
.cfg-cta-swatches { flex: 0 0 auto; align-self: center; display: flex; }
.cfg-cta-swatch {
  width: clamp(40px, 16cqw, 84px);
  height: clamp(40px, 16cqw, 84px);
  border-radius: 50%;
  background: var(--sw, #b8a890);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.42);
  margin-left: clamp(-22px, -4cqw, -10px);
}
.cfg-cta-swatch:first-child { margin-left: 0; }

/* Card 2 render: rounded material image that fades softly toward the copy.
   Layered fallback: real table photo (from the marketing site's assets at the web root) on
   top, bundled walnut material underneath, warm colour last - never blank.

   The photo layer pointed at table-oak-01.webp, which does not exist - the file was renamed
   at some point and this was not. That 404'd on every load, and it went unnoticed because a
   background image inside a `display:none` step is never fetched: this card only lived on the
   saved view, which a handful of people a month reached. Since v1.90.0 it is on step 6 as well,
   where everybody who finishes a design lands, so the failed request became constant.

   Do NOT collapse this to a single layer to "clean it up". The first layer's `contain` in the
   background-size below is what the render inherits when captureAndUploadRender sets the image
   inline; on `cover` a long table gets cut off at both ends. */
.cfg-cta-card__media {
  flex: 0 0 42%;
  align-self: stretch;
  min-height: clamp(150px, 30cqw, 220px);
  border-radius: 14px;
  background-color: #3D3530;   /* matches the viewer bg; shows behind transparent renders */
  background-image: url('../../../assets/img/tables/table-chalk.webp'), url('../textures/american_walnut.webp');
  /* First layer is the render once one exists (set inline by captureAndUploadRender) and must be
     `contain` so a wide table is never cut at the ends; the walnut behind it stays `cover`. */
  background-size: contain, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  -webkit-mask-image: linear-gradient(95deg, #000 76%, transparent);
          mask-image: linear-gradient(95deg, #000 76%, transparent);
}

/* Full-width buttons - the only interaction - pinned to the card bottom */
.cfg-cta-card__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 2cqw, 12px);
  width: 100%;
  height: clamp(44px, 13cqw, 64px);
  margin-top: auto;
  border: none;
  border-radius: clamp(7px, 1cqw, 10px);
  cursor: pointer;
  font-family: var(--f-sans);
  font-size: clamp(10px, 2.7cqw, 15px);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
/* Flat, grounded buttons - a soft drop, not a floating 3D glow */
.cfg-cta-card__btn--light {
  background: #F2E7DD;
  color: #221B18;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.20);
}
.cfg-cta-card__btn--light:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.26);
}
.cfg-cta-card__btn--accent {
  background: #C68A48;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.20);
}
.cfg-cta-card__btn--accent:hover {
  transform: translateY(-1px);
  background: #CE9251;
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.26);
}
.cfg-cta-card__arrow { transition: transform 0.3s ease; }
.cfg-cta-card__btn:hover .cfg-cta-card__arrow { transform: translateX(4px); }

/* Narrow cards (phones, still 2-up): stack visual over copy, hide the body text
   so the blocks stay compact (not tall rectangles), and give both visuals the
   same height so the labels + headlines line up across the two cards. */
@container (max-width: 300px) {
  .cfg-cta-card__top { flex-direction: column; align-items: stretch; gap: clamp(12px, 5cqw, 18px); }
  .cfg-cta-card__text { align-self: stretch; }
  .cfg-cta-card__body { display: none; }
  .cfg-cta-swatches {
    align-self: stretch;
    justify-content: flex-start;
    align-items: center;
    height: clamp(80px, 30cqw, 120px);
  }
  .cfg-cta-card__media {
    flex: none;
    width: 100%;
    min-height: 0;
    height: clamp(80px, 30cqw, 120px);
    -webkit-mask-image: linear-gradient(180deg, #000 82%, transparent);
            mask-image: linear-gradient(180deg, #000 82%, transparent);
  }
  /* Smaller button label, no arrow - so it fits the narrow button */
  .cfg-cta-card__arrow { display: none; }
  .cfg-cta-card__btn { gap: 0; font-size: clamp(10px, 3cqw, 12px); letter-spacing: 0.05em; }
}

/* Inline flow (sample / order), opens in place of the decision cards */
.cfg-flow { margin: 0 0 30px; }
.cfg-flow__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin: 0 0 18px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--f-sans);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  transition: color var(--dur) var(--ease);
}
.cfg-flow__back:hover { color: var(--accent); }
.cfg-flow__back-arrow { transition: transform var(--dur) var(--ease); display: inline-block; }
.cfg-flow__back:hover .cfg-flow__back-arrow { transform: translateX(-3px); }
.cfg-flow__title {
  font-family: var(--f-display);
  font-size: 26px;
  font-weight: 400;
  color: var(--fg);
  line-height: 1.15;
  margin: 0 0 8px;
}
.cfg-flow__intro {
  font-size: 13px;
  line-height: 1.6;
  color: var(--fg-muted);
  margin: 0 0 22px;
  max-width: 46ch;
}
.cfg-flow__subhead {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0 0 12px;
}

/* Finish picker (reuses .swatch / .swatch-grid) */
.cfg-pick { margin: 0 0 24px; }
.cfg-pick__count {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0 0 14px;
}
/* At the 3-finish cap, dim the unselected swatches to signal the limit */
.cfg-pick__grid.is-max .swatch:not(.is-selected) { opacity: 0.4; }
.cfg-pick__grid.is-max .swatch:not(.is-selected):hover .swatch__dot { border-color: transparent; transform: none; }

/* Included list */
.cfg-included {
  margin: 0 0 24px;
  padding: 16px 18px;
  border: 1px solid var(--rule-soft);
}
.cfg-included__head {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0 0 10px;
}
.cfg-included__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.cfg-included__list li {
  position: relative;
  padding-left: 20px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--fg);
}
.cfg-included__list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-size: 11px;
}

/* Inline form error + optional-field hint */
.cfg-form-error {
  font-size: 11px;
  color: #c97070;
  margin-bottom: 12px;
}
.cfg-sf__opt { opacity: 0.5; font-size: 9px; }
/* Non-NL delivery notice (sample + order flows) */
.cfg-intl-note {
  font-size: 12px;
  line-height: 1.6;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-radius: 3px;
  padding: 10px 14px;
  margin: 0 0 14px;
}
.cfg-intl-note[hidden] { display: none; }
/* Highlight a required order-form field that was left empty on submit. */
.cfg-sf__input--error { border-color: #c97070 !important; }

/* Order grid: 3 columns (raised specificity so it wins over .cfg-sample-grid) */
.cfg-sample-grid.cfg-order-grid { grid-template-columns: 1fr 1fr 1fr; }
.cfg-sf--s1 { grid-column: span 1; }
.cfg-sf--s2 { grid-column: span 2; }
.cfg-sf--s3 { grid-column: span 3; }
.cfg-sample-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.cfg-sf { display: flex; flex-direction: column; gap: 5px; }
.cfg-sf__label {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.cfg-sf__input {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--fg);
  font-size: 12px;
  padding: 9px 12px;
  outline: none;
  transition: border-color var(--dur) var(--ease);
  width: 100%;
  box-sizing: border-box;
  font-family: var(--f-sans);
}
.cfg-sf__input:focus { border-color: var(--accent); }
.cfg-sf__input::placeholder { color: var(--fg-muted); opacity: 0.5; }
/* Inline spinner shown while resolving a NL postcode to street/city. */
.cfg-sf.is-loading { position: relative; }
.cfg-sf.is-loading .cfg-sf__input { opacity: 0.6; }
.cfg-sf.is-loading::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 11px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--rule);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: cfg-sf-spin 0.6s linear infinite;
  pointer-events: none;
}
@keyframes cfg-sf-spin { to { transform: rotate(360deg); } }
.cfg-sf--postal  { grid-column: span 2; }
.cfg-sf--number  { grid-column: span 2; }
.cfg-sf--street  { grid-column: span 4; }
.cfg-sf--city    { grid-column: span 4; }
.cfg-sf--country { grid-column: span 4; }
.cfg-sf--notes   { grid-column: span 4; }
.cfg-sample-success {
  padding: 18px 0 10px;
  text-align: center;
  margin-bottom: 10px;
}
.cfg-sample-success__msg {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.7;
  margin: 0 auto 18px;
  max-width: 42ch;
  white-space: pre-line;   /* honour intentional line breaks in the copy */
}

/* In-production confirmation: a big green "valid" check with a soft halo, shown on
   the saved page once the deposit is paid (replaces the decision cards). */
.cfg-order-live {
  padding: 26px 0 16px;
  text-align: center;
  margin-bottom: 10px;
}
.cfg-order-live__check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #2F7A4A;
  color: #fff;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 0 0 6px color-mix(in srgb, #2F7A4A 20%, transparent);
}
.cfg-order-live__msg {
  font-size: 14px;
  color: var(--fg);
  line-height: 1.7;
  max-width: 44ch;
  margin: 0 auto;
}
/* Sample success: requested finishes + delivery address (replaces specs) */
.cfg-sample-summary {
  max-width: 360px;
  margin: 24px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--rule-soft);
  text-align: left;
}
.cfg-sample-summary__block { margin-bottom: 18px; }
.cfg-sample-summary__block:last-child { margin-bottom: 0; }
.cfg-sample-summary__head {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0 0 10px;
}
.cfg-sample-summary__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cfg-sample-summary__chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 7px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg);
}
.cfg-sample-summary__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  flex-shrink: 0;
}
.cfg-sample-summary__addr {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--fg);
  font-weight: 600;
}
.cfg-order-notice {
  font-size: 11px;
  color: var(--fg-muted);
  opacity: 0.65;
  line-height: 1.6;
  margin: 0 0 14px;
}
/* Subtle "waiting for your payment" line, revealed only after the iDEAL button is clicked. */
.cfg-await-pay {
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.6;
  margin: 12px 0 0;
}
.cfg-await-pay[hidden] { display: none; }
/* Moneybird verification code shown under the pay button (subtle, code in bold). */
.cfg-pay-code {
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.6;
  margin: 8px 0 0;
}
.cfg-pay-code strong { color: var(--fg); letter-spacing: 0.06em; }
.cfg-pay-code[hidden] { display: none; }
@media (max-width: 520px) {
  .cfg-sample-grid,
  .cfg-sample-grid.cfg-order-grid { grid-template-columns: 1fr; }
  .cfg-sf--street, .cfg-sf--number, .cfg-sf--postal,
  .cfg-sf--city, .cfg-sf--country, .cfg-sf--notes,
  .cfg-sf--s1, .cfg-sf--s2, .cfg-sf--s3 { grid-column: span 1; }
}

/* ── Locked progress step (view mode - steps 1-4 when loaded via /config/{token}) ── */
.cfg-progress__step.is-locked {
  opacity: 0.2;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Step 6: saved design view ── */
.cfg-saved-view { padding-bottom: 32px; }

.cfg-sv-date {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  opacity: 0.5;
  margin: 0 0 28px;
}

/* Full-width primary button variant */
.cfg-btn--full {
  width: 100%;
  justify-content: space-between;
  margin-bottom: 8px;
}

/* ── Premium product summary (saved view lower half) ─────────────────
   Editorial product card: product story (left) + technical summary (right).
   Type scales with the card width (container queries) so the big serif
   hierarchy from the reference holds in the half-width saved panel. */
/* container-type on the SECTION (parent) so the card below can be stacked via the
   @container query - an element (.cfg-prod) cannot query its own inline size, so the
   query container has to be an ancestor, or the two-column layout never collapses. */
.cfg-prod-section { container-type: inline-size; margin-bottom: clamp(28px, 4vw, 44px); }
.cfg-prod-head {
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: #CDA56B;
  opacity: 0.95;
  margin: 0 0 28px;
}
.cfg-prod {
  container-type: inline-size;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(32px, 5cqw, 56px);
  padding: clamp(28px, 5cqw, 56px);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(40, 31, 28, 0.92), rgba(18, 16, 15, 0.98));
  border: 1px solid rgba(190, 160, 120, 0.14);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.18);
}

/* LEFT: product story */
.cfg-prod__story { display: flex; flex-direction: column; }
.cfg-prod__media {
  width: 88%;
  /* 16/9 to match the shape the render actually comes out at. save-render.php crops to the table
     plus a small margin and caps the result at 2:1, which lands around 1.7-1.8 for a dining table
     (measured: 831x479). At the old 16/11 the picture was fitted on width and left slack above and
     below, which read as if the table had been zoomed out even though it fills its own frame. */
  aspect-ratio: 16 / 9;
  margin: 0 0 36px;
  border-radius: 18px;
  overflow: hidden;
  /* #3D3530, the same colour the render is flattened onto, so `contain` leaves no visible bars. */
  background-color: #3D3530;
  /* contain, NOT cover. A table shot from the hero angle is a wide, low picture; `cover` scaled it
     up until this near-square box was full and cut both ends off - the saved page showed a
     tighter, cropped table than the card the visitor had just approved. The whole table must be
     visible, and empty space around it costs nothing because it is the same colour. */
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}
.cfg-prod__title {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(24px, 4.8cqw, 48px);
  line-height: 1.05;
  color: #F3ECE4;
}
.cfg-prod__divider { display: block; width: 56px; height: 2px; background: #C89D63; margin: 28px 0; }
.cfg-prod__body {
  margin: 0;
  max-width: 560px;
  font-size: clamp(15px, 2.4cqw, 20px);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.72);
}
.cfg-prod__finish { margin-top: auto; padding-top: 40px; }
.cfg-prod__flabel {
  font-family: var(--f-sans);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #D1A96C;
  margin: 0 0 16px;
}
.cfg-prod__chip { display: inline-flex; align-items: center; gap: 18px; }
.cfg-prod__chip-dot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(210, 170, 120, 0.6);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  background: #b8a890;
  flex-shrink: 0;
}
.cfg-prod__chip-name { font-family: var(--f-display); font-size: clamp(17px, 3cqw, 23px); color: #EEE4D9; }

/* RIGHT: technical summary */
.cfg-prod__dim-label,
.cfg-prod__price-label {
  font-family: var(--f-sans);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #D1A96C;
  margin: 0 0 14px;
}
.cfg-prod__dim {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(22px, 4cqw, 44px);
  line-height: 1.1;
  color: #F3ECE4;
  white-space: nowrap;
}
.cfg-prod__dim-cap {
  margin: 12px 0 0;
  font-family: var(--f-sans);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}
/* Small remark under the dimensions (e.g. the leg-circumference note). */
.cfg-prod__dim-note {
  margin: 14px 0 0;
  font-family: var(--f-sans);
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.45);
  max-width: 340px;
}
.cfg-prod__rows { margin: clamp(28px, 4cqw, 40px) 0 0; }
.cfg-prod__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
  border-top: 1px solid rgba(210, 180, 130, 0.08);
}
.cfg-prod__row-k {
  font-family: var(--f-sans);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
}
.cfg-prod__row-v {
  font-family: var(--f-display);
  font-size: clamp(16px, 3cqw, 23px);
  color: rgba(255, 255, 255, 0.88);
  text-align: right;
}
.cfg-prod__price { margin-top: clamp(32px, 5cqw, 48px); }
.cfg-prod__price-val {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(34px, 5.3cqw, 62px);
  line-height: 1;
  color: #F6EEE5;
  white-space: nowrap;
}
.cfg-prod__price-note { margin: 16px 0 0; font-size: 15px; color: rgba(255, 255, 255, 0.55); }

/* Stack the two sides on a narrow card */
@container (max-width: 600px) {
  .cfg-prod { grid-template-columns: 1fr; gap: 36px; }
  .cfg-prod__media { width: 100%; }
}

/* ── Bottom action bar (Continue Editing | Copy Link | WhatsApp) ────── */
.cfg-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-radius: 20px;
  border: 1px solid rgba(190, 160, 120, 0.12);
  background: rgba(255, 255, 255, 0.01);
  margin-bottom: clamp(40px, 6vw, 72px);
  overflow: hidden;
}
.cfg-actions__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 17px 28px;
  border: none;
  border-left: 1px solid rgba(210, 180, 130, 0.08);
  background: transparent;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  color: inherit;
  font-family: var(--f-sans);
  transition: background 250ms var(--ease);
}
.cfg-actions__item:first-child { border-left: none; }
.cfg-actions__item:hover { background: rgba(255, 255, 255, 0.02); }
.cfg-actions__icon { flex-shrink: 0; color: #CDA56B; display: flex; }
.cfg-actions__icon svg { width: 20px; height: 20px; display: block; }
.cfg-actions__text { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cfg-actions__title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg);
}
.cfg-actions__desc { font-size: 12px; color: var(--fg-muted); letter-spacing: 0.02em; }
@media (max-width: 640px) {
  .cfg-actions { grid-template-columns: 1fr; }
  .cfg-actions__item { border-left: none; border-top: 1px solid rgba(210, 180, 130, 0.08); }
  .cfg-actions__item:first-child { border-top: none; }
}

/* ---- Mobile: 16px min font-size on inputs prevents iOS Safari zoom-on-focus ---- */
@media (max-width: 960px) {
  .field__input,
  .field__select,
  .field__textarea,
  .cfg-sf__input {
    font-size: 16px !important;
  }
}

/* ---- Mobile: collapse model viewer while keyboard is open ---- */
@media (max-width: 960px) {
  .cfg-viewer { transition: height 0.32s ease-in-out; overflow: hidden; }
  body.keyboard-open .cfg-viewer { height: 0 !important; }
}

/* Journey - state-only, informational. Quiet horizontal row of passive dots.
   No heading, no numbers, no hover, no interaction. */
.cfg-journey {
  padding-bottom: 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--rule-soft);
}
.cfg-journey__steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: flex-start;
}
.cfg-journey__step {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 2px;
  text-align: center;
  position: relative;
}
/* Connector between markers (sits behind them); fills accent up to the current
   step, so the coloured line reads as "progress so far". */
.cfg-journey__step + .cfg-journey__step::before {
  content: '';
  position: absolute;
  top: 9px;            /* vertical centre of the 18px marker */
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--rule-soft);
  z-index: 0;
}
.cfg-journey__step + .cfg-journey__step.is-reached::before { background: var(--accent); }
.cfg-journey__marker {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--rule);
  background: var(--bg);   /* mask the connector behind hollow markers */
  box-sizing: border-box;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
  color: var(--ink);       /* checkmark colour on the filled (accent) marker */
}
.cfg-journey__label {
  font-family: var(--f-sans);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  line-height: 1.35;
}
/* Done: filled accent with a checkmark. */
.cfg-journey__step.is-done .cfg-journey__marker {
  background: var(--accent);
  border-color: var(--accent);
}
.cfg-journey__step.is-done .cfg-journey__label { color: var(--fg); }
/* Current ("you are here"): filled accent marker with a soft halo + bold label. */
.cfg-journey__step.is-current .cfg-journey__marker {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 26%, transparent);
}
.cfg-journey__step.is-current .cfg-journey__label { color: var(--fg); font-weight: 600; }

/* ---- Capture stage: somewhere the viewer can DRAW ------------------------------------------
 * model-viewer only renders an element that is displayed AND inside the viewport, and it hands
 * toBlob() its last drawn frame otherwise. Steps 6 and 7 drop the viewer entirely
 * (.cfg-layout--no-viewer), and a visitor can land straight on either one - a restored ce_step,
 * "Continue Editing", a shared link. At the exact moment a render is wanted there was then nothing
 * drawing, every capture route declined, and the design silently kept no picture at all: not on the
 * card, not on the saved page, not in the confirmation email. Measured on a customer who arrived
 * from an ad and saved 18 seconds later.
 *
 * So for the few hundred ms a capture takes, park the viewer where it will draw: on screen, at the
 * 16/9 the capture wants, behind the page and at an opacity the eye does not register. Explicitly
 * NOT display:none and NOT visibility:hidden - both stop the render loop, which is the whole
 * problem. Not opacity:0 either: a fully transparent layer is work a browser is entitled to skip,
 * and 0.01 costs nothing while keeping it an ordinary painted element.
 *
 * Every selector carries the .cfg-viewer--capture class twice over so it outranks the two rules
 * that would otherwise win: .cfg-layout--no-viewer .cfg-viewer (display:none) and
 * body.keyboard-open .cfg-viewer (height:0 !important, which is live while the save form is
 * focused - exactly when a render is being taken).
 */
.cfg-viewer.cfg-viewer--capture,
body.keyboard-open .cfg-viewer.cfg-viewer--capture,
.cfg-layout--no-viewer .cfg-viewer.cfg-viewer--capture {
  display: block !important;
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  width: min(960px, 100vw) !important;
  height: min(540px, 56.25vw) !important;
  min-height: 200px !important;
  opacity: 0.01 !important;
  pointer-events: none !important;
  z-index: -1 !important;
  transition: none !important;
  border-bottom: none !important;
}
