/* ========================================
   LUXURY GARAGE LANDING PAGE
   Design: Midnight Private Garage Aesthetic
   ======================================== */

/* --- CSS Reset & Variables --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colors */
  --bg-primary: #0A0A0A;
  --bg-secondary: #111111;
  --bg-tertiary: #1A1A1A;
  --gold: #C9A84C;
  --gold-dim: #8B7535;
  --white: #F5F5F5;
  --text-muted: #8A8A8A;
  --red: #E63946;
  --teal: #2EC4B6;
  --border: #222222;

  /* Typography */
  --font-display: 'Oswald', -apple-system, 'PingFang SC', sans-serif;
  --font-body: 'Inter', -apple-system, 'PingFang SC', sans-serif;

  /* Spacing */
  --section-pad: clamp(4rem, 10vh, 8rem);

  /* Easing */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-linear: linear;

  /* Transitions */
  --dur-fast: 200ms;
  --dur-mid: 400ms;
  --dur-slow: 800ms;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg-primary);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.section-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.6;
}

/* --- Layout Utilities --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.section {
  padding: var(--section-pad) 0;
  position: relative;
}

/* Gold separator line */
.gold-line {
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 1.5rem 0;
}

/* ========================================
   MODULE 1: HERO
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.35) contrast(1.15);
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 50% 80%, rgba(201,168,76,0.08) 0%, transparent 60%),
    linear-gradient(180deg, rgba(10,10,10,0.4) 0%, rgba(10,10,10,0.8) 100%);
}

/* Mouse-tracking headlight effect */
.hero-headlight {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  transition: background var(--dur-mid) var(--ease-out);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 900px;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--white);
  text-shadow: 0 0 80px rgba(201,168,76,0.15);
}

.hero-content h1 span {
  color: var(--gold);
}

.hero-content h2 {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 400;
  text-transform: none;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

/* Trust tags */
.trust-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.trust-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
}

.trust-tag::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--gold);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.trust-tag-sep {
  width: 3px;
  height: 3px;
  background: var(--text-muted);
  border-radius: 50%;
}

/* CTA Button */
.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color var(--dur-mid) var(--ease-out), border-color var(--dur-mid) var(--ease-out);
  text-decoration: none;
}

.cta-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: translateX(-101%);
  transition: transform var(--dur-mid) var(--ease-out);
}

.cta-primary:hover {
  color: var(--bg-primary);
  border-color: var(--gold);
}

.cta-primary:hover::before {
  transform: translateX(0);
}

.cta-primary span {
  position: relative;
  z-index: 1;
}

.cta-primary .arrow {
  position: relative;
  z-index: 1;
  transition: transform var(--dur-mid) var(--ease-out);
}

.cta-primary:hover .arrow {
  transform: translateX(4px);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  animation: scrollPulse 2s ease-in-out infinite;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold), transparent);
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ========================================
   MODULE 2: INFINITE CAROUSEL
   ======================================== */
.carousel-section {
  background: var(--bg-primary);
  overflow: hidden;
}

.carousel-header {
  text-align: center;
  margin-bottom: 3rem;
}

/* Carousel track */
.carousel-row {
  position: relative;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.carousel-row:last-child {
  margin-bottom: 0;
}

.carousel-track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  will-change: transform;
}

.carousel-track.scroll-left {
  animation: scrollLeft 50s linear infinite;
}

.carousel-track.scroll-right {
  animation: scrollRight 50s linear infinite;
}

.carousel-row:hover .carousel-track {
  animation-play-state: paused;
}

@keyframes scrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes scrollRight {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* Car card */
.car-card {
  flex-shrink: 0;
  width: 320px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: border-color var(--dur-mid) var(--ease-out), transform var(--dur-mid) var(--ease-out);
  cursor: pointer;
}

.car-card:hover {
  border-color: var(--gold-dim);
  transform: scale(1.02);
}

.car-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  filter: brightness(0.85) contrast(1.1);
  transition: filter var(--dur-mid) var(--ease-out);
}

.car-card:hover .car-card-img {
  filter: brightness(1) contrast(1.15);
}

/* Metallic shine sweep on hover */
.car-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 200px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.08), transparent);
  transition: left 0.6s var(--ease-out);
  pointer-events: none;
}

.car-card:hover::after {
  left: 150%;
}

.car-card-body {
  padding: 1.25rem;
}

.car-card-name {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 0.35rem;
}

.car-card-status {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.car-card-price {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.price-original {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.price-deal {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--gold);
  letter-spacing: 0.03em;
}

.price-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: rgba(230, 57, 70, 0.15);
  border: 1px solid rgba(230, 57, 70, 0.3);
  color: var(--red);
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

/* Row direction labels */
.carousel-row-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-dim);
  writing-mode: vertical-rl;
  opacity: 0.4;
}

.carousel-row-label.left {
  left: 8px;
}

.carousel-row-label.right {
  right: 8px;
}

/* ========================================
   MODULE 3: CAR CONFIGURATOR
   ======================================== */
.configurator {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.configurator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 768px) {
  .configurator-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.configurator-visual {
  position: relative;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.configurator-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter var(--dur-slow) var(--ease-out);
}

/* Color overlay for car configurator */
.configurator-visual .color-overlay {
  position: absolute;
  inset: 0;
  mix-blend-mode: color;
  opacity: 0.65;
  transition: background-color var(--dur-slow) var(--ease-out);
  pointer-events: none;
}

/* Metallic sweep animation */
.configurator-visual .metallic-sweep {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.06) 45%, transparent 50%);
  background-size: 300% 100%;
  animation: metallicSweep 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes metallicSweep {
  0% { background-position: 200% 0; }
  100% { background-position: -100% 0; }
}

.configurator-panel {
  padding: 2rem 0;
}

.configurator-panel .section-subtitle {
  margin-bottom: 2.5rem;
}

.config-group {
  margin-bottom: 2rem;
}

.config-group-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.config-options {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.config-btn {
  padding: 0.65rem 1.5rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--dur-mid) var(--ease-out);
}

.config-btn:hover {
  border-color: var(--gold-dim);
  color: var(--white);
}

.config-btn.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201,168,76,0.08);
}

/* Color swatch buttons */
.color-swatch {
  width: 40px;
  height: 40px;
  border: 2px solid var(--border);
  cursor: pointer;
  position: relative;
  transition: border-color var(--dur-mid) var(--ease-out);
}

.color-swatch::after {
  content: '';
  position: absolute;
  inset: 3px;
  transition: inset var(--dur-mid) var(--ease-out);
}

.color-swatch:hover,
.color-swatch.active {
  border-color: var(--gold);
}

.color-swatch.active::after {
  inset: 5px;
}

.color-swatch.matte-black {
  background: #1C1C1C;
}

.color-swatch.racing-red {
  background: #B71C1C;
}

.color-swatch.liquid-silver {
  background: #B0B0B0;
}

/* AI result */
.config-result {
  margin-top: 2rem;
  padding: 1.25rem;
  border: 1px solid var(--gold-dim);
  background: rgba(201,168,76,0.04);
  display: none;
}

.config-result.visible {
  display: block;
  animation: fadeInUp var(--dur-mid) var(--ease-out);
}

.config-result-text {
  font-size: 0.9rem;
  color: var(--white);
  line-height: 1.6;
}

.config-result-text strong {
  color: var(--gold);
}

/* ========================================
   MODULE 4: TRUST ENGINE
   ======================================== */
.trust-section {
  background: var(--bg-primary);
}

.trust-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.trust-step {
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  overflow: hidden;
  transition: border-color var(--dur-mid) var(--ease-out);
}

.trust-step:hover {
  border-color: var(--gold-dim);
}

.trust-step-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  cursor: pointer;
  user-select: none;
}

.trust-step-number {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold);
  min-width: 50px;
}

.trust-step-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  flex: 1;
}

.trust-step-toggle {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--dur-mid) var(--ease-out);
}

.trust-step-toggle svg {
  stroke: var(--gold);
}

.trust-step.expanded .trust-step-toggle {
  transform: rotate(45deg);
}

.trust-step-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-slow) var(--ease-out), padding var(--dur-slow) var(--ease-out);
}

.trust-step.expanded .trust-step-body {
  max-height: 300px;
  padding: 0 2rem 1.5rem 2rem;
}

.trust-step-body p {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 0.95rem;
  padding-left: 50px;
}

/* Metallic shimmer on expand */
.trust-step::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.03), transparent);
  transition: left 0.8s var(--ease-out);
  pointer-events: none;
}

.trust-step.expanded::before {
  left: 100%;
}

.trust-step {
  position: relative;
}

/* ========================================
   MODULE 5: GLOBAL DELIVERY + FORM
   ======================================== */
.delivery-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.delivery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .delivery-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Map container */
.delivery-map {
  position: relative;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg-primary);
}

.delivery-map img {
  width: 100%;
  height: auto;
  display: block;
  filter: brightness(0.6) contrast(1.2) saturate(0.5);
  opacity: 0.7;
}

.delivery-map-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 40%, rgba(201,168,76,0.05) 0%, transparent 60%);
}

/* Shipping notification bubbles */
.shipping-bubble {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(10,10,10,0.85);
  border: 1px solid var(--gold-dim);
  font-size: 0.7rem;
  color: var(--white);
  white-space: nowrap;
  animation: bubbleFadeIn var(--dur-slow) var(--ease-out);
  backdrop-filter: blur(8px);
}

.shipping-bubble .dot {
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 50%;
  animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.6); }
}

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

/* Form */
.delivery-form-wrapper {
  padding: 2rem;
  border: 1px solid var(--border);
  background: var(--bg-primary);
}

.form-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.form-hint {
  font-size: 0.85rem;
  color: var(--red);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--dur-mid) var(--ease-out);
}

.form-input::placeholder {
  color: #555;
}

.form-input:focus {
  border-color: var(--gold);
}

.form-submit {
  width: 100%;
  padding: 1rem;
  background: var(--gold);
  border: none;
  color: var(--bg-primary);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--dur-mid) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

.form-submit:hover {
  background: #D4B55A;
}

.form-submit:active {
  transform: scale(0.98);
}

/* Form success state */
.form-success {
  display: none;
  text-align: center;
  padding: 2rem 0;
}

.form-success.visible {
  display: block;
  animation: fadeInUp var(--dur-mid) var(--ease-out);
}

.form-success-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 1rem;
  border: 2px solid var(--teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-success-icon svg {
  stroke: var(--teal);
}

.form-success-text {
  color: var(--teal);
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer-text {
  font-size: 0.7rem;
  color: #444;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: var(--font-display);
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll-triggered reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Engine start flash */
.engine-flash {
  position: fixed;
  inset: 0;
  background: var(--gold);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.1s ease-out;
}

.engine-flash.active {
  opacity: 0.08;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .trust-tags {
    gap: 0.75rem;
  }

  .trust-tag {
    font-size: 0.7rem;
  }

  .car-card {
    width: 260px;
  }

  .car-card-img {
    height: 160px;
  }

  .trust-step-header {
    padding: 1rem 1.25rem;
    gap: 1rem;
  }

  .trust-step-number {
    font-size: 1.5rem;
    min-width: 36px;
  }

  .trust-step-title {
    font-size: 0.9rem;
  }

  .trust-step-body p {
    padding-left: 0;
  }

  .shipping-bubble {
    font-size: 0.6rem;
    padding: 0.35rem 0.65rem;
  }
}

@media (max-width: 480px) {
  .car-card {
    width: 220px;
  }

  .cta-primary {
    padding: 0.85rem 1.75rem;
    font-size: 0.75rem;
  }
}

/* ========================================
   CAR DETAIL MODAL
   ======================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-mid) var(--ease-out), visibility var(--dur-mid) var(--ease-out);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  position: relative;
  width: 94vw;
  max-width: 960px;
  max-height: 92vh;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(24px) scale(0.97);
  transition: transform var(--dur-mid) var(--ease-out);
}

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

/* Close button */
.modal-close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.7);
  border: none;
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}

.modal-close:hover {
  color: var(--gold);
  background: rgba(10, 10, 10, 0.9);
}

.modal-close svg {
  stroke: currentColor;
}

/* Modal gallery */
.modal-gallery {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8;
  min-height: 240px;
  background: var(--bg-primary);
  overflow: hidden;
  flex-shrink: 0;
}

.modal-gallery-main {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--dur-mid) var(--ease-out);
}

.modal-gallery-thumbs {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 2px;
  padding: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-thumb {
  flex: 1;
  height: 56px;
  object-fit: cover;
  opacity: 0.5;
  cursor: pointer;
  transition: opacity var(--dur-fast) var(--ease-out), outline var(--dur-fast) var(--ease-out);
  outline: 2px solid transparent;
  outline-offset: -2px;
}

.modal-thumb:hover {
  opacity: 0.8;
}

.modal-thumb.active {
  opacity: 1;
  outline-color: var(--gold);
}

/* Gallery nav arrows */
.modal-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: var(--white);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
  z-index: 2;
}

.modal-gallery-nav:hover {
  background: rgba(0, 0, 0, 0.8);
  color: var(--gold);
}

.modal-gallery-nav.prev {
  left: 0;
}

.modal-gallery-nav.next {
  right: 0;
}

.modal-gallery-nav svg {
  stroke: currentColor;
}

/* Modal body */
.modal-body {
  padding: clamp(1.25rem, 3vw, 2.5rem);
  overflow-y: auto;
  flex: 1;
}

.modal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.modal-car-name {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--white);
  line-height: 1.15;
}

.modal-car-name .sub {
  display: block;
  font-size: 0.5em;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

.modal-price-block {
  text-align: right;
  flex-shrink: 0;
}

.modal-price-original {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.modal-price-deal {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--gold);
  letter-spacing: 0.03em;
}

.modal-price-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  background: rgba(230, 57, 70, 0.15);
  border: 1px solid rgba(230, 57, 70, 0.3);
  color: var(--red);
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.4rem;
}

/* Specs grid */
.modal-specs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-bottom: 1.75rem;
}

.modal-spec {
  background: var(--bg-primary);
  padding: 1rem;
  text-align: center;
}

.modal-spec-value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.modal-spec-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

/* Description */
.modal-desc-title {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.modal-desc-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.75rem;
}

/* Highlights list */
.modal-highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}

.modal-highlights li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--white);
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.modal-highlights li::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--gold);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  flex-shrink: 0;
}

/* CTA in modal */
.modal-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 2rem;
  background: var(--gold);
  border: none;
  color: var(--bg-primary);
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--dur-mid) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

.modal-cta:hover {
  background: #D4B55A;
}

.modal-cta:active {
  transform: scale(0.97);
}

/* Modal responsive */
@media (max-width: 768px) {
  .modal-container {
    width: 100vw;
    max-width: 100vw;
    max-height: 100vh;
  }

  .modal-gallery {
    aspect-ratio: 16 / 9;
  }

  .modal-header-row {
    flex-direction: column;
  }

  .modal-price-block {
    text-align: left;
  }

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

  .modal-thumb {
    height: 44px;
  }
}

/* ========================================
   NOISE TEXTURE OVERLAY
   ======================================== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}
