/* ═══════════════════════════════════════════════════════════
   Aestivio — Configurator styles
   Imported by index.html, scoped to .cfg / #cfg
   ═══════════════════════════════════════════════════════════ */

/* Section header */
.configurator-section {
  background: #111;
  overflow: hidden;
}
.configurator-section__header {
  text-align: center;
  padding: 80px 24px 48px;
}
.configurator-section__title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  color: #fff;
  line-height: 1.2;
  margin: 12px 0;
}
.configurator-section__title em {
  font-style: italic;
  color: #C4AA8A;
}
.configurator-section__sub {
  color: rgba(255,255,255,0.5);
  font-size: 1rem;
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── CSS variables scoped to the configurator root ── */
#cfg {
  --stone: #C4AA8A;
  --dark:  #111;
  --d2:    #181818;
  --muted: rgba(255,255,255,0.42);
  --t:     .2s ease;
  --ts:    .42s ease;
}

/* ── Layout ─────────────────────────────────────────── */
.cfg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ── Left panel (SVG preview) ────────────────────────── */
.cfg-l {
  background: var(--d2);
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.cfg-l::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 55%, rgba(196,170,138,0.05) 0%, transparent 68%);
}

/* House stage */
.house-stage {
  width: 100%;
  max-width: 360px;
  transition: opacity .22s ease, transform .22s ease;
}
.house-stage.fading { opacity: 0; transform: scale(0.95); }
.house-stage svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 44px rgba(0,0,0,0.55));
}

/* SVG CSS-driven colors */
.hw      { fill: rgba(196,170,138,0.13); transition: fill var(--ts); }
.hw-f    { fill: none; stroke: rgba(196,170,138,0.52); stroke-width: 1.5; transition: stroke var(--ts); }
.hw-wall { fill: #323232; transition: fill var(--ts); }
.hw-roof { fill: #1e1e1e; }
.hw-base { fill: #1b1b1b; }
.hw-door { fill: #141414; }
.hw-glow { fill: rgba(196,170,138,0.07); opacity: 0; transition: opacity var(--ts), fill var(--ts); }

[data-std="premium"] .hw      { fill: rgba(196,170,138,0.28); }
[data-std="lux"]     .hw      { fill: rgba(255,195,80,0.32); }
[data-std="lux"]     .hw-f    { stroke: rgba(255,195,80,0.65); }
[data-std="premium"] .hw-glow { opacity: 1; }
[data-std="lux"]     .hw-glow { opacity: 1; fill: rgba(255,195,80,0.14); }
[data-tip="zidana"]  .hw-wall { fill: #2b2b2b; }

/* House info */
.house-info { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.house-area {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: 3rem;
  color: var(--stone);
  line-height: 1;
  transition: transform .2s ease;
}
.house-badges { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; }
.hb {
  padding: 4px 11px;
  border-radius: 2px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: all var(--t);
}
.hb.on { background: rgba(196,170,138,0.1); border-color: rgba(196,170,138,0.3); color: var(--stone); }

/* ── Right panel (wizard) ────────────────────────────── */
.cfg-r {
  display: flex;
  flex-direction: column;
  padding: 48px 56px;
  overflow-y: auto;
  min-height: 100vh;
  background: var(--dark);
  color: #fff;
}

/* Progress bar */
.cfg-prog { display: flex; align-items: center; margin-bottom: 44px; gap: 0; }
.pp { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pp-dot {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,0.05); border: 1.5px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: .68rem; font-weight: 700; color: var(--muted); transition: all var(--t);
}
.pp.active .pp-dot { background: var(--stone); border-color: var(--stone); color: #111; }
.pp.done   .pp-dot { background: rgba(196,170,138,0.18); border-color: rgba(196,170,138,0.45); color: var(--stone); }
.pp-lbl {
  font-size: .58rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: transparent; transition: color var(--t); white-space: nowrap;
}
.pp.active .pp-lbl, .pp.done .pp-lbl { color: var(--muted); }
.pp-line { flex: 1; height: 1.5px; background: rgba(255,255,255,0.07); margin-bottom: 20px; transition: background var(--ts); }
.pp-line.done { background: rgba(196,170,138,0.4); }

/* Step wrapper */
.cfg-step { flex: 1; display: flex; flex-direction: column; transition: opacity .18s ease, transform .18s ease; }
.cfg-step.out { opacity: 0; transform: translateX(-14px); }
.cfg-step .eye { font-size: .65rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--stone); margin-bottom: 5px; }
.cfg-step .ttl { font-family: 'DM Serif Display', serif; font-size: clamp(1.4rem, 2.2vw, 1.9rem); color: #fff; margin-bottom: 5px; }
.cfg-step .sub { font-size: .84rem; color: var(--muted); line-height: 1.6; margin-bottom: 28px; }

/* Choice options */
.opts { display: grid; gap: 8px; margin-bottom: 16px; }
.opts-2 { grid-template-columns: 1fr 1fr; }
.opts-3 { grid-template-columns: 1fr 1fr 1fr; }
.opts-5 { grid-template-columns: repeat(5, 1fr); }
.opt {
  background: rgba(255,255,255,0.04); border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 4px; padding: 14px 12px; cursor: pointer; transition: all var(--t);
  display: flex; flex-direction: column; gap: 4px;
}
.opt:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.14); }
.opt.sel { background: rgba(196,170,138,0.1); border-color: rgba(196,170,138,0.5); }
.opt-icon { font-size: 1.1rem; }
.opt-name { font-size: .86rem; font-weight: 600; color: #fff; }
.opt.sel .opt-name { color: var(--stone); }
.opt-desc { font-size: .7rem; color: var(--muted); line-height: 1.45; }

/* Custom note field */
.custom-field { margin-bottom: 20px; }
.custom-field label {
  display: block; font-size: .7rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.custom-field input, .custom-field textarea {
  width: 100%; background: rgba(255,255,255,0.04); border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 3px; padding: 10px 14px; color: #fff; font-family: inherit; font-size: .84rem;
  transition: border-color var(--t); resize: none;
}
.custom-field input:focus, .custom-field textarea:focus { outline: none; border-color: rgba(196,170,138,0.5); }
.custom-field input::placeholder, .custom-field textarea::placeholder { color: rgba(255,255,255,0.25); }

/* Slider */
.slider-wrap { margin-bottom: 24px; }
.slider-display { display: flex; align-items: baseline; gap: 8px; margin-bottom: 20px; }
.slider-num {
  font-family: 'DM Serif Display', serif; font-style: italic;
  font-size: 3.5rem; color: var(--stone); line-height: 1; transition: all .2s ease;
}
.slider-unit { font-size: 1rem; color: var(--muted); font-weight: 300; }
.slider-row { display: flex; align-items: center; gap: 12px; }
.slider-row input[type=range] {
  flex: 1; -webkit-appearance: none; height: 4px; border-radius: 2px; outline: none; cursor: pointer;
  background: linear-gradient(to right, var(--stone) var(--pct, 26%), rgba(255,255,255,0.1) var(--pct, 26%));
  transition: background var(--t);
}
.slider-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--stone); cursor: pointer; border: 2.5px solid #111;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.slider-row input[type=range]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: var(--stone);
  cursor: pointer; border: 2.5px solid #111; box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.slider-row .slider-input {
  width: 80px; background: rgba(255,255,255,0.05); border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 3px; padding: 8px 10px; color: #fff; font-family: inherit; font-size: .9rem;
  text-align: center; transition: border-color var(--t);
}
.slider-row .slider-input:focus { outline: none; border-color: rgba(196,170,138,0.5); }
.slider-range-hint { font-size: .7rem; color: rgba(255,255,255,0.25); margin-top: 8px; }

/* Checkbox groups */
.chk-groups { display: flex; flex-direction: column; gap: 20px; margin-bottom: 20px; }
.chk-group-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--stone); margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
}
.chk-group-label::after { content: ''; flex: 1; height: 1px; background: rgba(196,170,138,0.15); }
.chk-items { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.chk-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer;
  border-radius: 3px; border: 1.5px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03); transition: all var(--t);
}
.chk-item:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); }
.chk-item.checked { background: rgba(196,170,138,0.09); border-color: rgba(196,170,138,0.4); }
.chk-box {
  width: 16px; height: 16px; border-radius: 3px; flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.2); background: transparent;
  display: flex; align-items: center; justify-content: center; transition: all var(--t);
}
.chk-item.checked .chk-box { background: var(--stone); border-color: var(--stone); }
.chk-box svg { opacity: 0; transition: opacity var(--t); }
.chk-item.checked .chk-box svg { opacity: 1; }
.chk-text { flex: 1; }
.chk-name { font-size: .78rem; font-weight: 500; color: #fff; }
.chk-item.checked .chk-name { color: var(--stone); }

/* Contact step */
.contact-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.form-group label span { color: rgba(196,170,138,0.7); margin-left: 3px; }
.form-group input, .form-group textarea {
  background: rgba(255,255,255,0.05); border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 3px; padding: 11px 14px; color: #fff; font-family: inherit; font-size: .88rem;
  transition: border-color var(--t); resize: none;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: rgba(196,170,138,0.55); }
.form-group input.err { border-color: #e05c5c; }
.form-group input::placeholder, .form-group textarea::placeholder { color: rgba(255,255,255,0.2); }
.form-note { font-size: .72rem; color: rgba(255,255,255,0.28); line-height: 1.6; }

/* Navigation buttons */
.cfg-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.06);
}
.btn-back {
  background: none; border: none; color: var(--muted); font-family: inherit;
  font-size: .82rem; font-weight: 500; cursor: pointer; padding: 10px 0;
  transition: color var(--t); display: flex; align-items: center; gap: 7px;
}
.btn-back:hover { color: #fff; }
.btn-back:disabled { opacity: 0; pointer-events: none; }
.btn-next {
  background: var(--stone); color: #111; border: none; border-radius: 3px;
  padding: 12px 28px; font-family: inherit; font-size: .82rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; cursor: pointer;
  transition: all var(--t); display: flex; align-items: center; gap: 8px;
}
.btn-next:hover { background: #d4bb9d; }
.btn-next:disabled { background: rgba(196,170,138,0.18); color: rgba(196,170,138,0.35); cursor: not-allowed; }

/* Result / Thank-you screen */
.cfg-result { display: none; flex-direction: column; gap: 0; }
.cfg-result.on { display: flex; }
.res-icon { font-size: 2.5rem; margin-bottom: 12px; }
.res-eye  { font-size: .65rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--stone); margin-bottom: 5px; }
.res-ttl  { font-family: 'DM Serif Display', serif; font-size: clamp(1.3rem, 2vw, 1.75rem); color: #fff; margin-bottom: 24px; }
.res-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.res-tag  {
  padding: 4px 11px; background: rgba(196,170,138,0.1); border: 1px solid rgba(196,170,138,0.25);
  border-radius: 2px; font-size: .68rem; font-weight: 600; color: var(--stone);
  letter-spacing: .06em; text-transform: uppercase;
}
.res-price-box {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 4px; padding: 24px; margin-bottom: 12px;
}
.res-price-lbl { font-size: .65rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.res-price     { font-family: 'DM Serif Display', serif; font-size: clamp(1.6rem, 2.6vw, 2.4rem); color: var(--stone); line-height: 1; margin-bottom: 8px; }
.res-price-sub { font-size: .72rem; color: rgba(255,255,255,0.28); line-height: 1.6; }
.res-extras-box {
  background: rgba(196,170,138,0.04); border: 1px solid rgba(196,170,138,0.12);
  border-radius: 4px; padding: 16px 20px; margin-bottom: 16px;
}
.res-extras-lbl { font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.res-extra-item {
  display: flex; justify-content: space-between; font-size: .78rem;
  padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.res-extra-item:last-child { border-bottom: none; }
.res-extra-name { color: rgba(255,255,255,0.7); }
.res-actions { display: flex; flex-direction: column; gap: 8px; }
.btn-cta {
  background: var(--stone); color: #111; border: none; border-radius: 3px;
  padding: 14px 24px; font-family: inherit; font-size: .86rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; cursor: pointer; transition: all var(--t);
}
.btn-cta:hover { background: #d4bb9d; }
.btn-restart {
  background: none; border: 1px solid rgba(255,255,255,0.1); border-radius: 3px;
  padding: 10px 18px; font-family: inherit; font-size: .76rem; font-weight: 500;
  color: var(--muted); cursor: pointer; transition: all var(--t);
}
.btn-restart:hover { border-color: rgba(255,255,255,0.22); color: #fff; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1000px) {
  .cfg { grid-template-columns: 1fr; }

  /* Left panel: compact strip — hide SVG, show area + badges only */
  .cfg-l {
    position: relative;
    height: auto;
    min-height: 0;
    padding: 28px 24px;
  }
  .house-stage { display: none; }   /* hide SVG on mobile — saves space */

  /* Right panel: let the PAGE scroll, no inner scroll trap */
  .cfg-r {
    padding: 36px 24px 48px;
    overflow-y: visible;
    min-height: auto;
  }

  .opts-5 { grid-template-columns: 1fr 1fr; }
  .chk-items { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .opts-2, .opts-3 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
