/* ============================================
   COMPOSITE DECK CONFIGURATOR — STYLES
   Premium tablet-first interactive demo
   ============================================ */

/* ---- CSS CUSTOM PROPERTIES ---- */
@font-face {
  font-family: 'IBM Plex Sans Condensed';
  src: url('fonts/ibm-plex-sans-condensed-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Sans Condensed';
  src: url('fonts/ibm-plex-sans-condensed-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Sans Condensed';
  src: url('fonts/ibm-plex-sans-condensed-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Sans Condensed';
  src: url('fonts/ibm-plex-sans-condensed-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Sans Condensed';
  src: url('fonts/ibm-plex-sans-condensed-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Sans Condensed';
  src: url('fonts/ibm-plex-sans-condensed-500-italic.woff2') format('woff2');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Sans Condensed';
  src: url('fonts/ibm-plex-sans-condensed-600-italic.woff2') format('woff2');
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Sans Condensed';
  src: url('fonts/ibm-plex-sans-condensed-700-italic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #F5F0EA;
  --bg-card: #FFFFFF;
  --accent: #C8956C;
  --accent-hover: #B07A52;
  --accent-light: rgba(200, 149, 108, 0.08);
  --accent-medium: rgba(200, 149, 108, 0.15);
  --text-primary: #2A2420;
  --text-secondary: #7A7268;
  --border: #E0D8D0;
  --border-light: #EDE8E2;
  --success: #7CB87C;
  --error: #D45050;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(42, 36, 32, 0.06);
  --shadow-md: 0 4px 12px rgba(42, 36, 32, 0.08);
  --shadow-lg: 0 8px 30px rgba(42, 36, 32, 0.12);
  --shadow-xl: 0 16px 50px rgba(42, 36, 32, 0.16);
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);
  --font-serif: 'IBM Plex Sans Condensed', 'Arial Narrow', sans-serif;
  --font-sans: 'IBM Plex Sans Condensed', 'Arial Narrow', sans-serif;
}

/* ---- RESET & BASE ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--bg);
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  letter-spacing: 0.02em;
  font-weight: 400;
  overscroll-behavior: none;
  /* Prevent parent page scroll */
}

#app {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

/* ---- SCREEN SYSTEM ---- */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateX(60px);
  transition: opacity 350ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 350ms cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0ms linear 350ms;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.screen.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition: opacity 350ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 350ms cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0ms linear 0ms;
  z-index: 2;
}

.screen.exit-left {
  opacity: 0;
  transform: translateX(-60px);
  z-index: 1;
}

.screen.enter-right {
  transform: translateX(60px);
}

.screen.exit-right {
  opacity: 0;
  transform: translateX(60px);
  z-index: 1;
}

.screen.enter-left {
  transform: translateX(-60px);
}

/* ---- SPLASH SCREEN ---- */
.screen-splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden !important;
  /* No scroll on splash */
}

.splash-bg {
  position: absolute;
  inset: 0;
  /* Beautiful gradient that evokes warm wood and sunset */
  background:
    radial-gradient(ellipse at 30% 20%, rgba(200, 149, 108, 0.3) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(176, 122, 82, 0.2) 0%, transparent 60%),
    linear-gradient(145deg, #3D2E24 0%, #2A2420 30%, #1A1512 60%, #2A2018 100%);
  z-index: 0;
  background-attachment: fixed;
}

.splash-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg,
      transparent,
      transparent 18px,
      rgba(200, 149, 108, 0.03) 18px,
      rgba(200, 149, 108, 0.03) 19px),
    repeating-linear-gradient(0deg,
      transparent,
      transparent 80px,
      rgba(255, 255, 255, 0.01) 80px,
      rgba(255, 255, 255, 0.01) 81px);
  opacity: 0.8;
}

.splash-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(26, 21, 18, 0.4) 100%);
}

.splash-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.splash-particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(200, 149, 108, 0.4);
  border-radius: 50%;
  animation: floatParticle linear infinite;
}

@keyframes floatParticle {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    transform: translateY(-10vh) scale(1);
    opacity: 0;
  }
}

.splash-content {
  position: relative;
  z-index: 1;
  padding: 40px 32px;
  max-width: 600px;
  animation: splashFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes splashFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.splash-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 48px;
  animation: splashFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
  color: white;
  /* Ensure SVG inherits white color if not specified */
}

.splash-logo svg {
  max-width: 280px;
  height: auto;
}

.logo-text {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: rgba(200, 149, 108, 0.8);
  text-transform: uppercase;
}

.splash-headline {
  font-family: var(--font-serif);
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1.15;
  margin-bottom: 16px;
  animation: splashFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

.splash-headline em {
  font-style: italic;
  color: var(--accent);
  display: inline-block;
}

.splash-subtitle {
  font-size: clamp(16px, 2.5vw, 20px);
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.5;
  margin-bottom: 40px;
  font-weight: 400;
  animation: splashFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.8s both;
}

.splash-cta {
  animation: splashFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1s both;
  font-size: 18px;
  padding: 18px 40px;
}

.splash-note {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 16px;
  animation: splashFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.2s both;
}

.splash-badge {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  animation: splashFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.4s both;
}

.splash-badge span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ---- STEP SCREENS ---- */
.step-container {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.step-header {
  padding-top: 20px;
  padding-bottom: 8px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.step-nav-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.btn-back {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-back:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.step-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.step-spacer {
  flex: 1;
}

/* ---- PROGRESS BAR ---- */
.progress-bar {
  height: 4px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 24px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: var(--radius-full);
  transition: width 400ms cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
  border-radius: var(--radius-full);
}

.step-title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.step-desc {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* ---- STEP BODY ---- */
.step-body {
  flex: 1;
  padding-bottom: 60px;
  /* Reduced from 100px */
}

/* ---- STEP FOOTER ---- */
.step-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0 24px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 900px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
  background: linear-gradient(to top, var(--bg) 70%, transparent);
  z-index: 10;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(200, 149, 108, 0.3);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(200, 149, 108, 0.4);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(200, 149, 108, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.btn-large {
  padding: 16px 32px;
  font-size: 17px;
  border-radius: var(--radius-md);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  box-shadow: 0 4px 20px rgba(200, 149, 108, 0.4);
}

.btn-accent:hover {
  box-shadow: 0 6px 28px rgba(200, 149, 108, 0.5);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ---- SECTION LABEL ---- */
.section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
  margin-top: 32px;
}

.section-label:first-child {
  margin-top: 0;
}

/* ============================================
   SCREEN 1: SHAPE SELECTOR
   ============================================ */
.shape-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.shape-card {
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px 16px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.shape-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-md);
  transform: scale(1.02);
}

.shape-card.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(200, 149, 108, 0.15);
}

.shape-icon {
  width: 100%;
  max-width: 120px;
  height: 80px;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.shape-card.selected .shape-icon {
  color: var(--accent-hover);
}

.shape-icon svg {
  width: 100%;
  height: 100%;
}

.shape-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}

.shape-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ---- SIZE CONTROLS ---- */
.size-section {
  margin-top: 8px;
}

.size-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.size-slider-group {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--border-light);
}

.size-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.size-slider-header label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.size-value {
  font-weight: 700;
  font-size: 18px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* ---- RANGE SLIDER ---- */
.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--border-light);
  outline: none;
  transition: background var(--transition-fast);
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(200, 149, 108, 0.4);
  transition: all var(--transition-fast);
  border: 3px solid #fff;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 16px rgba(200, 149, 108, 0.5);
}

.range-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(200, 149, 108, 0.4);
  border: 3px solid #fff;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* ---- AREA DISPLAY ---- */
.area-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.area-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.area-value {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  transition: all var(--transition-fast);
}

.area-value.bump {
  animation: bumpValue 300ms ease;
}

@keyframes bumpValue {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
  }
}

/* ============================================
   SCREEN 2: BOARD COLLECTION & COLOR
   ============================================ */
.boards-layout {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ---- COLLECTION CARDS ---- */
.collection-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.collection-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
  overflow: hidden;
  position: relative;
}

.collection-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: transparent;
  transition: background var(--transition-fast);
}

.collection-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.collection-card.selected {
  border-color: var(--accent);
  background: var(--accent-light);
}

.collection-card.selected::before {
  background: var(--accent);
}

.collection-texture {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.texture-essentials {
  background: linear-gradient(135deg, #A0785A, #B8926E);
}

.texture-naturale {
  background: linear-gradient(135deg, #8B6B3D, #A68450);
}

.texture-premium {
  background: linear-gradient(135deg, #5C3A24, #7A4E32);
}

.collection-texture::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg,
      transparent,
      transparent 4px,
      rgba(0, 0, 0, 0.08) 4px,
      rgba(0, 0, 0, 0.08) 5px);
}

.collection-info {
  flex: 1;
}

.collection-name {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 2px;
}

.collection-tagline {
  font-size: 13px;
  color: var(--text-secondary);
}

.collection-price {
  font-weight: 700;
  font-size: 18px;
  color: var(--accent);
  padding-right: 8px;
}

/* ---- COLOR GRID ---- */
.color-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.color-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.color-swatch-circle {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  position: relative;
  border: 3px solid transparent;
  transition: all var(--transition-fast);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.color-swatch-circle::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg,
      transparent,
      transparent 3px,
      rgba(255, 255, 255, 0.06) 3px,
      rgba(255, 255, 255, 0.06) 4px);
  border-radius: inherit;
}

.color-swatch:hover .color-swatch-circle {
  transform: scale(1.08);
  box-shadow: var(--shadow-md);
}

.color-swatch.selected .color-swatch-circle {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 149, 108, 0.3);
  transform: scale(1.05);
}

.color-swatch.selected .color-swatch-circle::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  border-radius: inherit;
}

.color-swatch .checkmark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  color: #fff;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.color-swatch.selected .checkmark {
  opacity: 1;
}

.color-swatch-name {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.2;
  font-weight: 500;
}

/* ---- BOARD PREVIEW ---- */
.board-preview {
  margin-top: 24px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border-light);
}

.preview-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
  font-weight: 500;
}

.preview-boards {
  display: flex;
  gap: 3px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.preview-plank {
  flex: 1;
  position: relative;
  transition: background-color 400ms ease;
  background: #8B6B3D;
}

.preview-plank::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg,
      transparent,
      transparent 6px,
      rgba(0, 0, 0, 0.04) 6px,
      rgba(0, 0, 0, 0.04) 7px);
}

.preview-plank:nth-child(odd)::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.03);
}

/* ============================================
   SCREEN 3: RAILING
   ============================================ */
.railing-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
}

.toggle-label {
  font-weight: 600;
  font-size: 16px;
}

/* ---- TOGGLE SWITCH ---- */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle-switch input:checked+.toggle-slider {
  background: var(--accent);
}

.toggle-switch input:checked+.toggle-slider::before {
  transform: translateX(24px);
}

/* ---- RAILING GRID ---- */
.railing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.railing-card {
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.railing-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-md);
  transform: scale(1.02);
}

.railing-card.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(200, 149, 108, 0.15);
}

.railing-icon {
  width: 100%;
  max-width: 120px;
  height: 60px;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.railing-card.selected .railing-icon {
  color: var(--accent-hover);
}

.railing-icon svg {
  width: 100%;
  height: 100%;
}

.railing-name {
  font-weight: 600;
  font-size: 14px;
}

.railing-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ---- RAILING SUB OPTIONS ---- */
.railing-sub-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 8px;
}

.railing-color-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.railing-color-swatch {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: 3px solid transparent;
  transition: all var(--transition-fast);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.railing-color-swatch span {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
  font-weight: 500;
}

.railing-color-swatch:hover {
  transform: scale(1.1);
}

.railing-color-swatch.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 149, 108, 0.3);
}

/* ---- PILL BUTTONS ---- */
.pill-group {
  display: flex;
  gap: 12px;
}

.pill {
  flex: 1;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-light);
  background: var(--bg-card);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.pill small {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-secondary);
}

.pill:hover {
  border-color: var(--border);
}

.pill.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent-hover);
}

/* ---- RAILING OPTIONS TRANSITION ---- */
.railing-options {
  transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.railing-options.hidden {
  opacity: 0.3;
  pointer-events: none;
  transform: translateY(8px);
}

/* ============================================
   SCREEN 4: EXTRAS
   ============================================ */
.extras-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.extra-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  transition: all var(--transition-fast);
}

.extra-row.active {
  background: var(--accent-light);
  border-color: rgba(200, 149, 108, 0.25);
}

.extra-icon {
  width: 44px;
  height: 44px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.extra-row.active .extra-icon {
  background: var(--accent-medium);
  color: var(--accent-hover);
}

.extra-info {
  flex: 1;
}

.extra-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 2px;
}

.extra-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ---- STAIRS SUB OPTION ---- */
.stairs-sub-option {
  background: var(--accent-light);
  border: 1px solid rgba(200, 149, 108, 0.2);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-left: 60px;
  animation: slideDown 250ms ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
    max-height: 0;
  }

  to {
    opacity: 1;
    transform: translateY(0);
    max-height: 100px;
  }
}

.stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stepper-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.stepper {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stepper-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  background: var(--bg-card);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stepper-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.stepper-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  min-width: 30px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ============================================
   SCREEN 5: SUMMARY
   ============================================ */
.summary-container {
  max-width: 1000px;
}

.summary-body {
  padding-bottom: 40px;
}

.summary-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

/* ---- DECK VISUALIZATION ---- */
.summary-visual {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.deck-visualization {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 4/3;
  position: relative;
}

.deck-viz-house {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 20%;
  background: #E8E2DA;
  border: 2px solid #CFC7BD;
  border-radius: 4px 4px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  z-index: 2;
}

.deck-viz-deck {
  position: absolute;
  border-radius: 6px;
  transition: background-color 400ms ease;
  overflow: hidden;
}

.deck-viz-deck::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg,
      transparent,
      transparent 12px,
      rgba(0, 0, 0, 0.06) 12px,
      rgba(0, 0, 0, 0.06) 13px);
  border-radius: inherit;
}

.deck-viz-railing {
  position: absolute;
  border: 2px solid;
  border-radius: 6px;
  pointer-events: none;
}

.deck-viz-icon {
  position: absolute;
  font-size: 16px;
  z-index: 5;
}

.visual-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 16px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* ---- SPEC SHEET ---- */
.summary-specs {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.spec-section {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
}

.spec-section-title {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.spec-section-title svg {
  color: var(--accent);
}

.spec-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 0;
  border-bottom: 1px solid var(--border-light);
}

.spec-row:last-child {
  border-bottom: none;
}

.spec-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.spec-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.spec-cost .spec-row-total {
  border-top: 2px solid var(--accent);
  padding-top: 12px;
  margin-top: 4px;
}

.spec-row-total .spec-label,
.spec-row-total .spec-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-hover);
}

.spec-disclaimer {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 12px;
  line-height: 1.4;
  opacity: 0.7;
}

/* ---- SUMMARY CTAs ---- */
.summary-ctas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.summary-actions {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 16px 0;
}

.action-link {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast);
  padding: 8px;
}

.action-link:hover {
  color: var(--accent);
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42, 36, 32, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms ease, visibility 0ms linear 300ms;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
  transition: opacity 300ms ease, visibility 0ms linear 0ms;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95) translateY(20px);
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--bg);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--border);
  color: var(--text-primary);
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}

.modal-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.5;
}

/* ---- FORM ---- */
.quote-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group .optional {
  font-weight: 400;
  color: var(--text-secondary);
}

.form-group input {
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg);
  transition: all var(--transition-fast);
  outline: none;
}

.form-group input::placeholder {
  color: var(--border);
}

.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 149, 108, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ---- SUCCESS STATE ---- */
.quote-success {
  text-align: center;
  padding: 20px 0;
}

.quote-success-icon {
  width: 64px;
  height: 64px;
  background: rgba(124, 184, 124, 0.15);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--success);
}

.quote-success h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  margin-bottom: 8px;
}

.quote-success p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================
   TOAST
   ============================================ */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-primary);
  color: #fff;
  padding: 14px 24px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  opacity: 0;
  transition: all 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Desktop / large tablet landscape */
@media (min-width: 1024px) {
  .shape-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .railing-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .color-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

/* Small tablet / large phone */
@media (max-width: 768px) {
  .summary-layout {
    grid-template-columns: 1fr;
  }

  .summary-ctas {
    grid-template-columns: 1fr;
  }

  .railing-sub-options {
    grid-template-columns: 1fr;
  }

  .size-controls {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .summary-actions {
    flex-wrap: wrap;
    gap: 16px;
  }
}

/* Phone */
@media (max-width: 480px) {
  .step-container {
    padding: 0 16px;
  }

  .color-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .color-swatch-circle {
    width: 52px;
    height: 52px;
  }

  .modal {
    padding: 28px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .summary-visual {
    padding: 20px;
    min-height: 240px;
  }

  .splash-headline {
    font-size: 32px;
  }

  .stairs-sub-option {
    margin-left: 0;
  }
}

/* ---- SCROLLBAR STYLING ---- */
.screen::-webkit-scrollbar {
  width: 6px;
}

.screen::-webkit-scrollbar-track {
  background: transparent;
}

.screen::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}

.screen::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* ---- SELECTION ANIMATIONS ---- */
@keyframes selectPop {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.shape-card.just-selected,
.railing-card.just-selected,
.collection-card.just-selected {
  animation: selectPop 250ms ease;
}

/* ---- LOADING SHIMMER ---- */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

/* ---- SPLASH SCREEN WOOD GRAIN GLOW ---- */
.splash-bg::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -20%;
  width: 140%;
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(200, 149, 108, 0.1) 0%, transparent 70%);
  animation: splashGlow 6s ease-in-out infinite alternate;
}

@keyframes splashGlow {
  0% {
    opacity: 0.5;
    transform: scale(1);
  }

  100% {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* ---- SUMMARY VISUAL GLOW ---- */
.summary-visual {
  position: relative;
  overflow: hidden;
}

.summary-visual::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  height: 80%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(200, 149, 108, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* ---- ENHANCED COLOR SWATCH HOVER ---- */
.color-swatch:hover .color-swatch-name {
  color: var(--text-primary);
}

/* ---- STEP TITLE ACCENT LINE ---- */
.step-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: var(--radius-full);
  margin-top: 10px;
}

/* ---- PRINT STYLES ---- */
@media print {
  .screen {
    display: none !important;
  }

  .screen[data-screen="5"] {
    display: block !important;
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .step-footer,
  .summary-ctas,
  .summary-actions,
  .step-header {
    display: none !important;
  }

  .summary-layout {
    grid-template-columns: 1fr 1fr;
  }
}
