/**
 * Model Page Styles – Redesigned
 * Configurator hero, stat strip, cinematic section, feature grids, specs, CTA
 */

/* ===========================================
   Configurator Hero
   =========================================== */

.configurator-hero {
  position: relative;
  min-height: 100vh;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  padding-top: 80px;
  overflow: hidden;
}

.configurator-bg-name {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -44%);
  font-size: clamp(130px, 28vw, 420px);
  font-weight: 800;
  letter-spacing: -0.08em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.045);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  line-height: 1;
}

.configurator-header {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 36px var(--container-padding) 0;
}

.configurator-eyebrow {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-brand);
  font-weight: 500;
  margin-bottom: 8px;
}

.configurator-title {
  font-size: clamp(52px, 9vw, 110px);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.04em;
  line-height: 0.92;
  margin-bottom: 12px;
}

.configurator-tagline {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 400;
}

/* Car image stage */
.configurator-car-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 16px 80px;
  min-height: 280px;
}

.configurator-car-wrap::after {
  content: '';
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 55%;
  height: 70px;
  background: radial-gradient(ellipse at center, rgba(220, 0, 12, 0.16) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.color-car-image {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 54vh;
  width: auto;
  object-fit: contain;
  transition: opacity 0.25s ease;
  filter: drop-shadow(0 28px 56px rgba(0, 0, 0, 0.72));
}

/* Bottom controls: swatches + CTA */
.configurator-controls {
  position: relative;
  z-index: 2;
  padding: 28px var(--container-padding) 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 40%, transparent);
}

.color-name-display {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  min-height: 1.5em;
  text-align: center;
  transition: opacity 0.15s ease;
}

.color-swatches-grid {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.color-swatch {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--swatch-color, #888);
  cursor: pointer;
  border: 2.5px solid rgba(255, 255, 255, 0.14);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.color-swatch:hover {
  transform: scale(1.14);
  border-color: rgba(255, 255, 255, 0.45);
}

.color-swatch.active {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 2px var(--color-brand);
  transform: scale(1.18);
}

.configurator-cta-row {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
}

.configurator-price {
  text-align: center;
}

.configurator-price strong {
  display: block;
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.configurator-price span {
  display: block;
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ===========================================
   Stat Strip
   =========================================== */

.model-stat-strip {
  background: #ffffff;
  padding: 60px 0;
  border-bottom: 1px solid #efefef;
}

.stat-strip-row {
  display: flex;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.stat-item {
  flex: 1;
  text-align: center;
  padding: 0 32px;
  border-left: 1px solid #e4e4e4;
}

.stat-item:first-child {
  border-left: none;
}

.stat-value {
  display: block;
  font-size: clamp(38px, 4.5vw, 60px);
  font-weight: 700;
  color: #0a0a0a;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stat-unit {
  font-size: 0.42em;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.stat-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #aaa;
  margin-top: 10px;
  font-weight: 500;
}

/* ===========================================
   Cinematic Intro Section
   =========================================== */

.cinematic-section {
  position: relative;
  height: 72vh;
  min-height: 460px;
  overflow: hidden;
}

.cinematic-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.cinematic-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    108deg,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.3) 52%,
    rgba(0, 0, 0, 0) 100%
  );
}

.cinematic-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 72px;
}

.cinematic-text {
  max-width: 580px;
}

.cinematic-eyebrow {
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--color-brand);
  font-weight: 500;
  margin-bottom: 14px;
}

.cinematic-heading {
  font-size: clamp(28px, 3.8vw, 46px);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 18px;
}

.cinematic-body {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.72;
  max-width: 460px;
}

/* ===========================================
   Feature Sections & Grids
   =========================================== */

.features-section {
  padding: 96px 0;
  background: #ffffff;
}

.features-section--dark {
  background: #0d0d0d;
}

.features-header {
  margin-bottom: 48px;
}

.features-eyebrow {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-brand);
  font-weight: 500;
  margin-bottom: 10px;
}

.features-title {
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #0a0a0a;
  margin: 0;
}

.features-section--dark .features-title {
  color: #ffffff;
}

/* Grid variants */
.features-grid {
  display: grid;
  gap: 14px;
}

.features-grid--3col {
  grid-template-columns: repeat(3, 1fr);
}

.features-grid--2col {
  grid-template-columns: repeat(2, 1fr);
}

.features-grid--12 {
  grid-template-columns: repeat(12, 1fr);
}

/* Span helpers for 12-column grid */
.fi-span2  { grid-column: span 2; }
.fi-span3  { grid-column: span 3; }
.fi-span4  { grid-column: span 4; }
.fi-span5  { grid-column: span 5; }
.fi-span6  { grid-column: span 6; }
.fi-span7  { grid-column: span 7; }
.fi-span8  { grid-column: span 8; }
.fi-span9  { grid-column: span 9; }
.fi-span12 { grid-column: span 12; }

/* Standard feature card */
.feature-item {
  border-radius: 14px;
  overflow: hidden;
  background: #f3f3f3;
  display: flex;
  flex-direction: column;
}

.features-section--dark .feature-item {
  background: #1a1a1a;
}

.feature-item-img {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  flex-shrink: 0;
}

.feature-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease;
}

.feature-item:hover .feature-item-img img {
  transform: scale(1.04);
}

.feature-item-body {
  padding: 18px 20px 22px;
  flex-grow: 1;
}

.feature-item-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 5px;
  color: #0a0a0a;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.feature-item-desc {
  font-size: 13px;
  line-height: 1.58;
  color: #666;
}

.features-section--dark .feature-item-title {
  color: #ffffff;
}

.features-section--dark .feature-item-desc {
  color: rgba(255, 255, 255, 0.46);
}

/* Overlay card – image fills cell, text overlaid at bottom */
.feature-item--overlay {
  position: relative;
  min-height: 300px;
}

.feature-item--overlay .feature-item-img {
  position: absolute;
  inset: 0;
  aspect-ratio: unset;
  height: 100%;
}

.feature-item--overlay .feature-item-img img {
  height: 100%;
}

.feature-item--overlay .feature-item-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.1) 65%, transparent 100%);
  padding: 52px 22px 22px;
  flex-grow: 0;
}

.feature-item--overlay .feature-item-title {
  color: #ffffff;
  font-size: 16px;
}

.feature-item--overlay .feature-item-desc {
  color: rgba(255, 255, 255, 0.6);
}

/* Tall overlay card */
.feature-item--tall {
  min-height: 420px;
}

/* ===========================================
   Specs Section
   =========================================== */

.specs-section {
  padding: 96px 0;
  background: #ffffff;
}

.specs-section .section-title,
.specs-section h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0a0a0a;
  margin-bottom: 48px;
  text-align: center;
}

.specs-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.specs-table th {
  padding: 16px 24px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  background-color: #0a0a0a;
  color: #ffffff;
}

.specs-table th:first-child {
  border-radius: 12px 0 0 0;
}

.specs-table th:last-child {
  border-radius: 0 12px 0 0;
}

.specs-table td {
  padding: 14px 24px;
  font-size: 13px;
  color: #0a0a0a;
  border-bottom: 1px solid #f0f0f0;
}

.specs-table tr:last-child td {
  border-bottom: none;
}

.specs-table tr:nth-child(even) td {
  background-color: #fafafa;
}

.specs-table td:first-child {
  font-weight: 500;
  color: #777;
  width: 220px;
}

.specs-category-row td {
  background-color: #f3f3f3 !important;
  font-weight: 600;
  color: #0a0a0a !important;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding-top: 12px;
  padding-bottom: 12px;
}

/* ===========================================
   Full-Bleed CTA
   =========================================== */

.model-cta-fullbleed {
  position: relative;
  min-height: 580px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.model-cta-fullbleed-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: transform 8s ease;
}

.model-cta-fullbleed:hover .model-cta-fullbleed-bg {
  transform: scale(1.06);
}

.model-cta-fullbleed-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.87) 0%,
    rgba(0, 0, 0, 0.48) 50%,
    rgba(0, 0, 0, 0.12) 100%
  );
}

.model-cta-fullbleed-content {
  position: relative;
  z-index: 2;
  padding-top: 100px;
  padding-bottom: 100px;
  width: 100%;
}

.model-cta-fullbleed-eyebrow {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-brand);
  font-weight: 500;
  margin-bottom: 16px;
}

.model-cta-fullbleed-title {
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 16px;
  max-width: 600px;
}

.model-cta-fullbleed-body {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.56);
  line-height: 1.68;
  max-width: 480px;
  margin-bottom: 36px;
}

.model-cta-fullbleed-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-outline-white {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.44);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  letter-spacing: 0.01em;
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.78);
}

/* ===========================================
   Responsive
   =========================================== */

@media (max-width: 1024px) {
  .features-grid--3col {
    grid-template-columns: repeat(2, 1fr);
  }

  .features-grid--12 .fi-span7 { grid-column: span 7; }
  .features-grid--12 .fi-span5 { grid-column: span 5; }

  .feature-item--overlay {
    min-height: 260px;
  }

  .feature-item--tall {
    min-height: 360px;
  }
}

@media (max-width: 768px) {
  .configurator-hero {
    padding-top: 70px;
    min-height: auto;
  }

  .configurator-header {
    padding-top: 24px;
  }

  .configurator-car-wrap {
    padding: 16px 24px;
    min-height: 220px;
  }

  .color-car-image {
    max-height: 44vw;
  }

  .configurator-controls {
    padding: 20px var(--container-padding) 40px;
    gap: 12px;
  }

  .configurator-cta-row {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
  }

  .configurator-cta-row .btn,
  .configurator-cta-row .btn-outline-white {
    width: 100%;
    max-width: 320px;
    text-align: center;
    justify-content: center;
  }

  /* Stat strip 2×2 */
  .stat-strip-row {
    flex-wrap: wrap;
  }

  .stat-item {
    flex: 0 0 50%;
    padding: 24px 16px;
    border-left: none;
    border-top: 1px solid #e8e8e8;
    box-sizing: border-box;
  }

  .stat-item:nth-child(odd) {
    border-right: 1px solid #e8e8e8;
  }

  .stat-item:first-child,
  .stat-item:nth-child(2) {
    border-top: none;
  }

  .cinematic-section {
    height: auto;
    min-height: 340px;
  }

  .cinematic-inner {
    padding-bottom: 44px;
    align-items: flex-end;
  }

  .cinematic-heading {
    font-size: clamp(22px, 6vw, 32px);
  }

  .cinematic-body {
    font-size: 14px;
    line-height: 1.65;
  }

  .features-section {
    padding: 64px 0;
  }

  .features-header {
    margin-bottom: 32px;
  }

  /* Flatten all grids to single column on mobile */
  .features-grid--3col,
  .features-grid--2col {
    grid-template-columns: 1fr;
  }

  .features-grid--12 {
    grid-template-columns: 1fr;
  }

  .fi-span2, .fi-span3, .fi-span4,
  .fi-span5, .fi-span6, .fi-span7,
  .fi-span8, .fi-span9, .fi-span12 {
    grid-column: span 1;
  }

  /* Override higher-specificity 1024px rules for fi-span7/fi-span5 */
  .features-grid--12 .fi-span7,
  .features-grid--12 .fi-span5 {
    grid-column: span 1;
  }

  /* Restore overlay cards to standard layout on mobile */
  .feature-item--overlay {
    min-height: 0;
    position: static;
  }

  .feature-item--overlay .feature-item-img {
    position: static;
    aspect-ratio: 16 / 9;
    height: auto;
  }

  .feature-item--overlay .feature-item-body {
    position: static;
    background: none;
    padding: 16px 18px 20px;
  }

  .features-section--dark .feature-item--overlay .feature-item-title,
  .feature-item--overlay .feature-item-title {
    color: inherit;
  }

  .features-section--dark .feature-item--overlay .feature-item-desc,
  .feature-item--overlay .feature-item-desc {
    color: inherit;
  }

  .model-cta-fullbleed {
    min-height: 440px;
  }

  .model-cta-fullbleed-content {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .model-cta-fullbleed-overlay {
    background: rgba(0, 0, 0, 0.68);
  }

  .model-cta-fullbleed-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .model-cta-fullbleed-actions .btn,
  .model-cta-fullbleed-actions .btn-outline-white {
    width: 100%;
    max-width: 280px;
    text-align: center;
    display: block;
  }

  .specs-section {
    padding: 64px 0;
  }
}

@media (max-width: 480px) {
  .configurator-title {
    font-size: clamp(44px, 18vw, 80px);
  }

  .configurator-car-wrap {
    padding: 12px 16px;
  }

  .color-car-image {
    max-height: 52vw;
  }

  /* Keep swatches visually 32px but give 44px touch area */
  .color-swatch {
    width: 32px;
    height: 32px;
    position: relative;
  }

  .color-swatch::before {
    content: '';
    position: absolute;
    inset: -6px;
  }

  .color-swatches-grid {
    gap: 8px;
  }

  /* Stat strip: stacked on smallest screens */
  .stat-strip-row {
    flex-direction: column;
  }

  .stat-item {
    flex: none;
    width: 100%;
    border-right: none;
    border-top: 1px solid #e8e8e8;
    padding: 20px var(--container-padding);
    text-align: left;
    display: flex;
    align-items: baseline;
    gap: 12px;
  }

  .stat-item:first-child {
    border-top: none;
  }

  .stat-value {
    font-size: 36px;
  }

  .stat-label {
    margin-top: 0;
  }

  .features-section {
    padding: 48px 0;
  }

  .model-cta-fullbleed {
    min-height: 380px;
  }

  .model-cta-fullbleed-body {
    font-size: 14px;
  }

  .cinematic-section {
    min-height: 280px;
  }

  .specs-table th,
  .specs-table td {
    padding: 12px 14px;
    font-size: 12px;
  }
}
