/* ═══════════════════════════════════════════════════════════════
   Legacy at Lancaster — Home Configurator
   Brand: forest green, warm gold, cream, Georgia serif
   ═══════════════════════════════════════════════════════════════ */

:root {
  --forest: #233D30;
  --moss: #4A6B52;
  --gold: #B8924E;
  --cream: #F7F2E9;
  --ivory: #FCFAF4;
  --ink: #1A1A1A;
  --muted: #6B6B6B;
  --border: #E0DBD2;
  --success: #2E7D32;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--ivory);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: Georgia, 'Times New Roman', serif; font-weight: 600; line-height: 1.25; }

img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
a { color: var(--forest); }

/* ─── HEADER ─────────────────────────────────────────────────── */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px;
  background: var(--forest);
  color: #fff;
  position: sticky; top: 0; z-index: 100;
}

.logo { text-decoration: none; color: #fff; display: flex; align-items: baseline; gap: 8px; }
.logo-mark { font-family: Georgia, serif; font-size: 1.3rem; font-weight: 600; letter-spacing: .02em; }
.logo-sub { font-size: .85rem; opacity: .7; }

.header-nav { display: flex; align-items: center; gap: 24px; }
.header-nav a { color: rgba(255,255,255,.85); text-decoration: none; font-size: .9rem; transition: color .2s; }
.header-nav a:hover { color: var(--gold); }
.header-phone { font-weight: 600; color: var(--gold) !important; }

/* ─── STEP NAV ───────────────────────────────────────────────── */
.step-nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 16px 32px;
  position: sticky; top: 52px; z-index: 90;
}

.step-track {
  display: flex; align-items: center; justify-content: center;
  gap: 0; max-width: 700px; margin: 0 auto;
}

.step-btn {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none;
  padding: 8px 14px; border-radius: 24px;
  font-size: .85rem; font-weight: 500;
  color: var(--muted);
  transition: all .25s;
  white-space: nowrap;
}
.step-btn:disabled { opacity: .45; cursor: default; }
.step-btn.active { background: var(--forest); color: #fff; }
.step-btn.done { color: var(--forest); }
.step-btn.done .step-num { background: var(--forest); color: #fff; }

.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--border); color: var(--muted);
  font-size: .75rem; font-weight: 700;
  transition: all .25s;
}
.step-btn.active .step-num { background: var(--gold); color: var(--forest); }

.step-line {
  flex: 1; height: 2px;
  background: var(--border);
  min-width: 20px; max-width: 60px;
}

/* ─── WIZARD STEPS ───────────────────────────────────────────── */
.wiz-step { display: none; animation: fadeUp .35s ease; }
.wiz-step.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-container { max-width: 1200px; margin: 0 auto; padding: 40px 32px 120px; }

.step-header { margin-bottom: 32px; }
.step-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); font-weight: 600; }
.step-header h1 { font-size: 2rem; color: var(--forest); margin: 6px 0 8px; }
.step-intro { color: var(--muted); font-size: 1rem; max-width: 600px; }

.back-link {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: none;
  color: var(--forest); font-size: .85rem; font-weight: 500;
  margin-bottom: 12px; padding: 0;
  transition: color .2s;
}
.back-link:hover { color: var(--gold); }

.step-footer { margin-top: 32px; text-align: center; }

.btn-continue {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--forest); color: #fff;
  border: none; padding: 14px 32px; border-radius: var(--radius);
  font-size: 1rem; font-weight: 600;
  transition: background .2s, transform .15s;
}
.btn-continue:hover { background: var(--moss); transform: translateY(-1px); }

/* ─── STEP 1: MODEL GRID ────────────────────────────────────── */
.series-filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 28px;
}

.filter-btn {
  padding: 8px 20px; border-radius: 24px;
  border: 1.5px solid var(--border);
  background: #fff; color: var(--ink);
  font-size: .85rem; font-weight: 500;
  transition: all .2s;
}
.filter-btn:hover { border-color: var(--forest); color: var(--forest); }
.filter-btn.active { background: var(--forest); color: #fff; border-color: var(--forest); }

.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.model-card {
  background: #fff; border-radius: var(--radius);
  border: 2px solid transparent;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  position: relative;
}
.model-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.model-card.selected { border-color: var(--gold); }
.model-card.flagship { border-color: var(--gold); }

.card-badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: var(--gold); color: #fff;
  padding: 4px 12px; border-radius: 4px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}

.card-img {
  height: 200px;
  background: var(--cream) center/cover no-repeat;
  position: relative;
}
.card-img-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: Georgia, serif; font-size: 1.4rem; color: var(--forest);
  background: linear-gradient(135deg, var(--cream), #e8e0d4);
}

.card-body { padding: 20px; }
.card-series { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); font-weight: 600; }
.card-title { font-size: 1.25rem; color: var(--forest); margin: 4px 0 10px; }

.card-specs {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 12px;
}
.card-specs span {
  padding: 3px 10px; border-radius: 4px;
  background: var(--cream); color: var(--forest);
  font-size: .78rem; font-weight: 500;
}

.card-features {
  list-style: none; margin-bottom: 14px;
}
.card-features li {
  font-size: .82rem; color: var(--muted);
  padding: 2px 0;
}
.card-features li::before { content: '\2713 '; color: var(--moss); font-weight: 700; margin-right: 4px; }

.card-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.card-price strong { font-family: Georgia, serif; font-size: 1.3rem; color: var(--forest); }
.card-price span { font-size: .82rem; color: var(--muted); }

.btn-select {
  width: 100%; padding: 12px;
  background: var(--forest); color: #fff;
  border: none; border-radius: var(--radius);
  font-size: .9rem; font-weight: 600;
  transition: background .2s;
}
.btn-select:hover { background: var(--moss); }

/* ─── STEP 2: FINISHES ──────────────────────────────────────── */
.finishes-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.preview-panel { position: sticky; top: 140px; }

.preview-viewport {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 360px;
  display: flex; flex-direction: column;
}

.preview-placeholder {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px;
  text-align: center;
  color: var(--muted);
  background: linear-gradient(135deg, var(--cream), #e8e0d4);
}
.preview-icon { color: var(--border); margin-bottom: 16px; }
.preview-note { font-size: .85rem; max-width: 280px; }

.preview-selections {
  padding: 16px 20px;
  background: #fff;
  border-top: 1px solid var(--border);
}

.psel { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: .82rem; }
.psel-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--border); flex-shrink: 0; }
.psel-cat { color: var(--muted); }
.psel-val { font-weight: 500; }
.psel-price { color: var(--gold); font-weight: 600; margin-left: auto; }

.finish-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 20px;
}

.ftab {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 8px;
  border: 1.5px solid var(--border);
  background: #fff; font-size: .8rem; font-weight: 500;
  color: var(--ink);
  transition: all .2s;
}
.ftab:hover { border-color: var(--forest); }
.ftab.active { background: var(--forest); color: #fff; border-color: var(--forest); }
.ftab.upgraded { border-color: var(--gold); }
.ftab.upgraded.active { background: var(--forest); border-color: var(--forest); }

.ftab-dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); flex-shrink: 0; }

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.swatch {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 16px 10px;
  background: #fff; border: 2px solid var(--border);
  border-radius: var(--radius);
  transition: all .2s;
  text-align: center;
}
.swatch:hover { border-color: var(--forest); transform: translateY(-2px); }
.swatch.selected { border-color: var(--gold); background: #FFFDF8; box-shadow: 0 0 0 1px var(--gold); }

.swatch-circle {
  width: 52px; height: 52px; border-radius: 50%;
  border: 2px solid rgba(0,0,0,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #fff;
  transition: transform .2s;
}
.swatch-circle.light { color: var(--forest); border-color: var(--border); }
.swatch.selected .swatch-circle { transform: scale(1.08); border-color: var(--gold); }

.swatch-label { font-size: .8rem; font-weight: 500; }
.swatch-price { font-size: .75rem; color: var(--muted); }
.swatch.selected .swatch-price { color: var(--gold); font-weight: 600; }

/* ─── STEPS 3 & 4: TOGGLE CARDS ─────────────────────────────── */
.toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.toggle-card {
  display: flex; align-items: center; gap: 16px;
  padding: 20px;
  background: #fff; border: 2px solid var(--border);
  border-radius: var(--radius);
  transition: all .25s;
}
.toggle-card:hover { border-color: var(--moss); }
.toggle-card.on { border-color: var(--gold); background: #FFFDF8; }

.tc-icon { font-size: 2rem; flex-shrink: 0; width: 48px; text-align: center; }

.tc-info { flex: 1; min-width: 0; }
.tc-info h3 { font-size: 1rem; margin-bottom: 4px; color: var(--forest); }
.tc-info p { font-size: .82rem; color: var(--muted); line-height: 1.4; }

.tc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex-shrink: 0; }
.tc-price { font-family: Georgia, serif; font-size: 1rem; font-weight: 600; color: var(--forest); white-space: nowrap; }

/* toggle switch */
.switch { position: relative; display: inline-block; width: 48px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--border); border-radius: 26px;
  transition: .25s;
}
.slider::before {
  content: ''; position: absolute;
  height: 20px; width: 20px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%;
  transition: .25s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
input:checked + .slider { background: var(--gold); }
input:checked + .slider::before { transform: translateX(22px); }

/* ─── STEP 5: SUMMARY ───────────────────────────────────────── */
.summary-content { max-width: 800px; }

.sum-section {
  background: #fff; border-radius: var(--radius);
  padding: 24px; margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.sum-section h2 {
  font-size: 1.15rem; color: var(--forest);
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.sum-subtotal { font-family: 'Inter', sans-serif; font-size: .85rem; color: var(--gold); font-weight: 600; }

.sum-model {
  display: flex; gap: 20px;
}
.sum-model-img {
  width: 180px; height: 130px; border-radius: 8px;
  background: var(--cream) center/cover no-repeat;
  flex-shrink: 0; position: relative;
}
.sum-model-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: Georgia, serif; color: var(--forest); font-size: 1.1rem;
  background: linear-gradient(135deg, var(--cream), #e8e0d4);
  border-radius: 8px;
}
.sum-model-info { flex: 1; }
.sum-series { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); font-weight: 600; }
.sum-model-info h3 { font-size: 1.3rem; color: var(--forest); margin: 2px 0 8px; }
.sum-model-info p { font-size: .88rem; color: var(--muted); margin-bottom: 8px; }
.sum-model-info strong { font-family: Georgia, serif; font-size: 1.1rem; color: var(--forest); }

.sum-table { width: 100%; border-collapse: collapse; }
.sum-table td { padding: 8px 0; font-size: .88rem; border-bottom: 1px solid var(--border); }
.sum-table tr:last-child td { border-bottom: none; }
.price-col { text-align: right; font-weight: 500; color: var(--forest); white-space: nowrap; }

.sum-total-section { background: var(--forest); color: #fff; }
.sum-total-row {
  display: flex; justify-content: space-between;
  padding: 8px 0; font-size: .92rem;
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.sum-total-row.grand {
  border-bottom: none; padding-top: 14px; margin-top: 6px;
  font-family: Georgia, serif; font-size: 1.4rem; font-weight: 700;
  border-top: 2px solid var(--gold);
}
.sum-monthly {
  text-align: center; padding: 16px 0 6px;
  font-size: 1.1rem;
}
.sum-monthly-detail { display: block; font-size: .78rem; opacity: .7; margin-top: 4px; }
.sum-disclaimer {
  font-size: .72rem; opacity: .6;
  line-height: 1.5; margin-top: 12px;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 12px;
}

.sum-ctas {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: center;
  margin-top: 28px;
}

.btn-cta {
  padding: 14px 28px; border-radius: var(--radius);
  font-size: .95rem; font-weight: 600;
  text-decoration: none; text-align: center;
  border: 2px solid transparent;
  transition: all .2s;
  cursor: pointer;
}
.btn-primary-cta { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn-primary-cta:hover { background: #A07E3E; border-color: #A07E3E; }
.btn-secondary-cta { background: var(--forest); color: #fff; border-color: var(--forest); }
.btn-secondary-cta:hover { background: var(--moss); border-color: var(--moss); }
.btn-outline-cta { background: transparent; color: var(--forest); border-color: var(--forest); }
.btn-outline-cta:hover { background: var(--forest); color: #fff; }

/* reserve dialog */
.reserve-dialog {
  border: none; border-radius: var(--radius);
  padding: 32px; max-width: 440px; width: 90%;
  box-shadow: var(--shadow-lg);
}
.reserve-dialog::backdrop { background: rgba(0,0,0,.5); }
.reserve-form { display: flex; flex-direction: column; gap: 14px; }
.reserve-form h2 { font-size: 1.3rem; color: var(--forest); }
.reserve-form p { font-size: .88rem; color: var(--muted); margin: -6px 0 4px; }
.reserve-form input[type="text"],
.reserve-form input[type="email"],
.reserve-form input[type="tel"],
.reserve-form textarea {
  padding: 12px 14px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: .9rem; font-family: inherit;
  transition: border-color .2s;
}
.reserve-form input:focus, .reserve-form textarea:focus {
  outline: none; border-color: var(--forest);
}
.reserve-actions { display: flex; gap: 10px; margin-top: 6px; }
.reserve-actions .btn-cta { flex: 1; }

/* ─── STICKY PRICE BAR ──────────────────────────────────────── */
.price-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--forest);
  color: #fff;
  z-index: 80;
  transform: translateY(100%);
  transition: transform .35s ease;
  box-shadow: 0 -4px 20px rgba(0,0,0,.2);
}
.price-bar.visible { transform: translateY(0); }

.bar-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto;
  padding: 12px 32px;
  gap: 16px;
}

.bar-left { flex-shrink: 0; }
.bar-model { font-family: Georgia, serif; font-size: .95rem; color: var(--gold); }

.bar-center { display: flex; align-items: center; gap: 20px; }
.bar-col { text-align: center; }
.bar-label { display: block; font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.bar-value { font-family: Georgia, serif; font-size: 1.2rem; font-weight: 700; }
.bar-mo { color: var(--gold); }

.bar-divider-v { width: 1px; height: 32px; background: rgba(255,255,255,.2); }

.bar-right { flex-shrink: 0; }
.bar-details-btn {
  background: rgba(255,255,255,.12); color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  padding: 8px 16px; border-radius: 6px;
  font-size: .8rem; font-weight: 500;
  transition: background .2s;
}
.bar-details-btn:hover { background: rgba(255,255,255,.2); }
.bar-caret { font-size: .7rem; transition: transform .25s; }
.price-bar.expanded .bar-caret { transform: rotate(180deg); }

.bar-breakdown {
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease;
  background: rgba(0,0,0,.15);
}
.price-bar.expanded .bar-breakdown { max-height: 400px; }

.bar-breakdown .bd-row {
  display: flex; justify-content: space-between;
  max-width: 400px; margin: 0 auto;
  padding: 6px 32px; font-size: .82rem;
}
.bd-divider { border-top: 1px solid rgba(255,255,255,.15); margin-top: 6px; padding-top: 10px; }
.bd-total { font-weight: 700; font-size: .9rem; padding-bottom: 14px; }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .finishes-layout { grid-template-columns: 1fr; }
  .preview-panel { position: static; }
  .preview-viewport { min-height: 240px; }
}

@media (max-width: 768px) {
  .site-header { padding: 12px 16px; }
  .logo-mark { font-size: 1.1rem; }
  .header-nav a:first-child { display: none; }

  .step-nav { padding: 10px 12px; top: 46px; }
  .step-text { display: none; }
  .step-btn { padding: 6px 10px; }

  .step-container { padding: 24px 16px 120px; }
  .step-header h1 { font-size: 1.5rem; }

  .model-grid { grid-template-columns: 1fr; }
  .toggle-grid { grid-template-columns: 1fr; }
  .swatch-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }

  .sum-model { flex-direction: column; }
  .sum-model-img { width: 100%; height: 160px; }

  .bar-inner { padding: 10px 16px; flex-wrap: wrap; gap: 8px; }
  .bar-model { font-size: .82rem; }
  .bar-value { font-size: 1rem; }
  .bar-left { width: 100%; text-align: center; }
  .bar-center { flex: 1; justify-content: center; }

  .sum-ctas { flex-direction: column; }
  .btn-cta { width: 100%; }
}

@media (max-width: 480px) {
  .series-filters { gap: 6px; }
  .filter-btn { padding: 6px 14px; font-size: .78rem; }
  .card-img { height: 160px; }
  .toggle-card { flex-wrap: wrap; }
  .tc-right { flex-direction: row; width: 100%; justify-content: space-between; align-items: center; }
  .swatch { padding: 12px 6px; }
  .swatch-circle { width: 40px; height: 40px; }
}
