/* =============================================
   VALORS — Premium Car Market
   styles/style.css
   ============================================= */

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #fff;
  color: #0d0d0d;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeSpeed;
}
h1, h2, h3, h4 { font-family: 'Montserrat', sans-serif; font-weight: 600; line-height: 1.2; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ---- PERFORMANCE: lazy render off-screen sections ---- */
.why, .cars-section, .how, .faq, .lead-section, footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

/* ---- DESIGN TOKENS ---- */
:root {
  --gold: #c2a265; /* Slighlty more muted, luxurious gold */
  --gold2: #ad8641;
  --gold-light: #f6efe0;
  --border: #e3ded6; /* Softer, warmer border */
  --muted: #6b6b6b;
  --light: #fafafa;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow: 0 4px 24px rgba(0,0,0,.07);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.10);
  --nav-h: 60px;
}

/* ---- ANIMATIONS ---- */
@keyframes shimmer { 0% { left: -120% } 100% { left: 180% } }
@keyframes fadeUp { from { opacity:0; transform:translateY(32px) } to { opacity:1; transform:none } }
@keyframes menuSlide { from { opacity:0; transform:translateY(-10px) } to { opacity:1; transform:none } }

/* ---- GLOBAL BUTTON SHIMMER EFFECT ---- */
.nav-cta, .nav-mobile-cta, .btn-primary, .btn-show, .btn-card, .btn-lead, .btn-max, .mobile-sticky-cta button {
  position: relative; 
  overflow: hidden;
}
.nav-cta::after, .nav-mobile-cta::after, .btn-primary::after, .btn-show::after, .btn-card::after, .btn-lead::after, .btn-max::after, .mobile-sticky-cta button::after {
  content: '';
  position: absolute; top: 0; left: -120%;
  width: 55%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), rgba(255,255,255,.2), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
  z-index: 2; /* To sit above button text if needed, though typically below is better, but pointer-events: none handles clicks */
}
.nav-cta:hover::after, .nav-mobile-cta:hover::after, .btn-primary:hover::after, .btn-show:hover::after, .btn-card:hover::after, .btn-lead:hover::after, .btn-max:hover::after, .mobile-sticky-cta button:hover::after {
  animation: shimmer .8s ease-in-out forwards;
}

/* ---- REVEAL ON SCROLL ---- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .75s ease, transform .75s ease; }
.reveal.on { opacity: 1; transform: none; }
.d1 { transition-delay: .1s }
.d2 { transition-delay: .2s }
.d3 { transition-delay: .3s }

/* ---- LAYOUT ---- */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* =============================================
   NAVIGATION
   ============================================= */
nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  display: flex;
  align-items: center;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
}
.nav-logo {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 1px;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--muted);
}
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: #111; }
.nav-phone-cta {
  background: #fff;
  color: #000;
  padding: 8px 22px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: all .35s;
  white-space: nowrap;
  flex-shrink: 0;
  border: 2px solid var(--gold);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.cta-phone-icon {
  width: 18px;
  height: 18px;
  stroke: var(--gold2);
  flex-shrink: 0;
  display: block;
  animation: iconShake 3s infinite ease-in-out;
}
.cta-mobile { display: none; }

@keyframes iconShake {
  0%, 80%, 100% { transform: rotate(0); }
  85%, 95% { transform: rotate(-15deg); }
  90% { transform: rotate(15deg); }
}

.nav-phone-cta::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -100%;
  width: 60%;
  height: 200%;
  background: linear-gradient(
    to right, 
    rgba(194, 162, 101, 0) 0%, 
    rgba(194, 162, 101, 0.2) 50%, 
    rgba(194, 162, 101, 0) 100%
  );
  transform: rotate(25deg);
  animation: loopedShine 4s infinite ease-in-out;
}

@keyframes loopedShine {
  0% { left: -120%; }
  30% { left: 120%; }
  100% { left: 120%; }
}

.nav-phone-cta:hover { 
  transform: translateY(-1px); 
  box-shadow: 0 6px 20px rgba(194, 162, 101, 0.2);
  border-color: var(--gold2);
  color: #000;
}

/* Hamburger (mobile) */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #111;
  border-radius: 2px;
  transition: all .3s ease;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 20px;
  z-index: 199;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
  animation: menuSlide .25s ease;
}
.nav-mobile.open { display: flex; flex-direction: column; gap: 0; }
.nav-mobile a {
  display: block;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  color: #111;
}
.nav-mobile a:last-of-type { border-bottom: none; }
.nav-mobile .nav-mobile-cta {
  margin-top: 16px;
  background: var(--gold);
  color: #fff;
  padding: 14px;
  border-radius: 6px;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(194, 162, 101, 0.25);
}

/* =============================================
   HERO
   ============================================= */
.hero {
  padding: 48px 0 40px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.hero-text { flex: 0 0 44%; min-width: 280px; position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gold-light);
  color: var(--gold2);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  margin-bottom: 24px;
}
.hero-badge svg { width: 12px; height: 12px; fill: currentColor; }

.hero-brand {
  display: inline;
  font-size: inherit;
  font-family: 'Raleway', sans-serif;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1;
}
.text-gold { color: var(--gold2); }

.hero-text h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 400;
  margin-bottom: 24px;
  line-height: 1.3;
  letter-spacing: 0;
}

.hero-features { list-style: none; display: flex; flex-direction: column; gap: 16px; margin-bottom: 40px; }
.hero-features li { display: flex; align-items: center; gap: 14px; }
.hf-circle {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--gold-light); color: var(--gold2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s;
}
.hf-circle svg { width: 14px; height: 14px; stroke: currentColor; }
.hero-features li:hover .hf-circle { transform: scale(1.1); }
.hero-features strong { font-size: 15px; font-weight: 500; color: #1a1a1a; }

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.btn-primary {
  padding: 16px 32px; background: var(--gold); color: #fff;
  border: none; border-radius: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .35s;
  box-shadow: 0 8px 24px rgba(194, 162, 101, 0.25);
}
.btn-primary:hover { background: var(--gold2); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(194, 162, 101, 0.4); }
.btn-secondary {
  padding: 16px 28px; background: #fff; color: #0d0d0d;
  border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .35s;
}
.btn-secondary:hover { background: #fbfaf8; border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,0.05); }
.hero-img {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  overflow: hidden;
  position: relative;
  z-index: 1;
  margin-right: 0;
}
.hero-img img {
  width: 100%; max-width: 100%;
  height: 480px;
  object-fit: contain;
  object-position: center right;
  background: transparent;
  border-radius: 20px;
  animation: slowZoom 8s ease-out forwards;
}
@keyframes slowZoom {
  from { transform: scale(1.0) }
  to { transform: scale(1.08) }
}

/* =============================================
   FILTER BAR
   ============================================= */
.filter-wrap { margin-top: 5px; margin-bottom: 64px; }
.filter-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.f-cell {
  padding: 14px 18px;
  border-right: 1px solid var(--border);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: relative;
}
.f-cell:has(.custom-select-wrapper.open) {
  z-index: 1001;
}
.f-cell:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.f-cell:nth-child(4) { border-right: none; }
.f-cell:last-child { border-right: none; border-radius: 0 var(--radius) var(--radius) 0; }
.f-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  font-weight: 600;
}
.f-cell select, .f-cell input, .custom-select-wrapper select {
  display: none !important;
}

/* Custom Select Styles */
.custom-select-wrapper {
  position: relative;
  width: 100%;
}
.custom-select-wrapper.open {
  z-index: 1002;
}
.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  background: transparent;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #111;
  transition: all 0.2s;
  min-height: 24px;
}

/* Specific styles for lead form context */
.lead-form .custom-select-wrapper {
  flex: 1;
  min-width: 185px;
}
.lead-form .custom-select-trigger {
  padding: 14px 18px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  min-height: 48px;
}
.lead-form .custom-select-trigger span {
  color: #111;
}
.lead-form .custom-select-wrapper.open .custom-select-trigger {
  border-color: var(--gold);
}
.lead-form .custom-options {
  left: 0;
  right: 0;
  top: calc(100% + 5px);
}

.custom-select-trigger::after {
  content: "";
  width: 10px;
  height: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23C2A265' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
  transition: transform 0.3s ease;
  margin-left: 8px;
}
.custom-select-wrapper.open .custom-select-trigger::after {
  transform: rotate(180deg);
}

.custom-options {
  position: absolute;
  top: calc(100% + 14px);
  left: -18px;
  right: -18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  z-index: 1000;
  max-height: 280px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  padding: 8px 0;
}
.custom-select-wrapper.open .custom-options {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.custom-option {
  padding: 10px 18px;
  font-size: 13px;
  color: #444;
  cursor: pointer;
  transition: all 0.2s;
}
.custom-option:hover {
  background: #fdfaf4;
  color: var(--gold);
}
.custom-option.selected {
  background: #fdfaf4;
  color: var(--gold);
  font-weight: 600;
}

.btn-show {
  padding: 0 32px;
  background: var(--gold);
  color: #fff;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .25s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-show:hover { background: var(--gold2); }

/* =============================================
   STATS
   ============================================= */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 72px;
}
.stat-item { background: #fff; padding: 28px 20px; text-align: center; }
.stat-num {
  font-family: 'Montserrat', sans-serif;
  font-size: 32px; font-weight: 800; margin-bottom: 4px;
}
.stat-label { font-size: 13px; color: var(--muted); }

/* =============================================
   WHY SECTION
   ============================================= */
.why { padding: 64px 0; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: clamp(20px, 2.8vw, 28px); font-weight: 600; margin-bottom: 8px; }
.section-header p { font-size: 18px; color: #555; line-height: 1.5; }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.why-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px; background: #fff;
  transition: all .35s ease;
}
.why-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.why-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.why-icon svg { width: 22px; height: 22px; stroke: var(--gold2); fill: none; stroke-width: 2; }
.why-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.why-card p { font-size: 13px; color: var(--muted); line-height: 1.65; }

/* =============================================
   CAR CARDS
   ============================================= */
.cars-section { padding: 64px 0; }
.cars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.car-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden; background: #fff;
  transition: all .4s cubic-bezier(.25,.46,.45,.94);
}
.car-card:hover { 
  box-shadow: 0 20px 40px rgba(0,0,0,0.08); 
  transform: translateY(-4px);
}
.car-photo {
  background: #fdfdfd;
  padding: 15px; 
  height: 280px;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}
.car-photo img {
  width: 100%; height: 100%;
  object-fit: contain; object-position: center;
  transition: transform .4s ease;
}
.car-card:hover .car-photo img { transform: scale(1.05); }
.car-body { padding: 24px; }
.car-name { font-weight: 700; font-size: 16px; margin-bottom: 6px; font-family: 'Montserrat', sans-serif; color: #1a1a1a; }
.car-specs {
  font-size: 11px; color: var(--muted);
  margin-bottom: 20px;
  display: flex; gap: 6px; align-items: center;
  flex-wrap: wrap;
}
.car-specs span { 
  background: #fcfcfc; 
  padding: 3px 10px; 
  border-radius: 4px; 
  border: 1px solid #eee;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #666;
}
.price-line {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; padding: 7px 0;
  border-bottom: 1px solid #f3f3f3;
}
.price-line:last-of-type { border-bottom: none; }
.price-source { color: var(--muted); }
.price-val { font-weight: 600; font-size: 14px; }
.price-line.valors-row .price-source { color: var(--gold2); font-weight: 500; }
.price-line.valors-row .price-val { color: var(--gold2); }
.save-box {
  margin-top: 20px; 
  background: linear-gradient(135deg, var(--gold-light) 0%, #fffbf2 100%);
  color: var(--gold2);
  text-align: center; padding: 20px 16px; border-radius: 12px;
  font-weight: 600; font-size: 13px; line-height: 1.25;
  border: 1px solid rgba(197, 161, 104, 0.1);
}
.save-amount { font-size: 26px; font-weight: 800; display: block; margin-top: 6px; color: var(--gold2); letter-spacing: -0.02em; }

.btn-card {
  width: 100%; margin-top: 12px;
  padding: 14px; background: var(--gold); color: #fff;
  border: none; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .25s, transform .2s;
}
.btn-card:hover { background: var(--gold2); }
.btn-card:active { transform: scale(0.98); }

/* =============================================
   HOW IT WORKS
   ============================================= */
.how { padding: 72px 0; background: var(--light); }
.how-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.how-steps {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 32px; margin-top: 48px;
  position: relative;
}
.how-steps::before {
  content: '';
  position: absolute; top: 28px;
  left: calc(12.5% + 16px); right: calc(12.5% + 16px);
  height: 1px; background: var(--border); z-index: 0;
}
.step { text-align: center; position: relative; z-index: 1; }
.step-num {
  width: 56px; height: 56px; border-radius: 50%;
  background: #fff; border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: 700;
  box-shadow: var(--shadow);
}
.step h3 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.step p { font-size: 12px; color: var(--muted); line-height: 1.6; }

/* =============================================
   REVIEWS
   ============================================= */
.trust { padding: 72px 0 24px; }
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.review-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; background: #fff; transition: all .3s ease;
}
.review-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.stars { color: var(--gold); font-size: 16px; margin-bottom: 12px; letter-spacing: 2px; }
.review-text { font-size: 13px; color: #444; line-height: 1.7; margin-bottom: 16px; }
.reviewer { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: var(--gold2); flex-shrink: 0;
}
.reviewer-info strong { display: block; font-size: 13px; font-weight: 600; }
.reviewer-info span { font-size: 12px; color: var(--muted); }

/* =============================================
   BRANDS
   ============================================= */
.brands { padding: 48px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.brands-label {
  text-align: center; font-size: 12px;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--muted); margin-bottom: 28px; font-weight: 600;
}
.brands-marquee {
  overflow: hidden;
  padding: 10px 0;
  position: relative;
  width: 100%;
}
.brands-marquee::before,
.brands-marquee::after {
  content: ""; height: 100%; width: 100px;
  position: absolute; top: 0; z-index: 2;
  pointer-events: none;
}
.brands-marquee::before { left: 0; background: linear-gradient(to right, #fff, rgba(255,255,255,0)); }
.brands-marquee::after { right: 0; background: linear-gradient(to left, #fff, rgba(255,255,255,0)); }

.brands-track {
  display: flex;
  width: max-content;
  animation: marquee 40s linear infinite;
  gap: 80px;
  align-items: center;
}
.brand-logo {
  padding: 0 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-logo img {
  height: 80px;
  width: auto;
  max-width: 180px;
  filter: grayscale(1) opacity(0.4);
  transition: all 0.4s ease;
  object-fit: contain;
}
.brand-logo:hover img {
  filter: grayscale(0) opacity(1);
  transform: scale(1.1);
}

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

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

/* =============================================
   FAQ
   ============================================= */
.faq { padding: 72px 0; }
.faq-list { max-width: 720px; margin: 48px auto 0; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; background: none; border: none;
  text-align: left; padding: 20px 0;
  font-size: 15px; font-weight: 600; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; color: #111;
}
.faq-icon {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all .25s;
}
.faq-icon svg { width: 10px; height: 10px; stroke: #777; stroke-width: 2.5; fill: none; transition: transform .25s; }
.faq-item.open .faq-icon { background: var(--gold); border-color: var(--gold); }
.faq-item.open .faq-icon svg { stroke: #fff; transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-a-inner { padding: 0 0 18px; font-size: 14px; color: var(--muted); line-height: 1.7; }

/* =============================================
   LEAD FORM
   ============================================= */
.lead { padding: 13px 0 26px; text-align: center; }
.lead-box { max-width: 540px; margin: 0 auto; }
.lead h2 { font-size: clamp(18px, 2.5vw, 24px); font-weight: 500; margin-bottom: 8px; }
.lead-sub { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.lead-form { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.input-group {
  position: relative;
  flex: 1;
  min-width: 185px;
}
.input-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  fill: var(--gold);
  pointer-events: none;
  z-index: 5;
  opacity: 0.7;
}
.lead-form input {
  width: 100%;
  padding: 14px 18px 14px 44px !important;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  transition: all .2s;
  background: #fff;
}
.lead-form input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(194,162,101,0.1);
}
.lead-form input.error {
  border-color: #e74c3c !important;
  box-shadow: 0 0 0 3px rgba(231,76,60,0.1) !important;
}
.btn-lead {
  padding: 14px 28px; background: var(--gold); color: #fff;
  border: none; border-radius: 6px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .25s; white-space: nowrap;
  min-width: 200px;
}
.btn-lead:hover { background: var(--gold2); }
.consent { font-size: 11px; color: var(--muted); margin-top: 4px; }
.consent a { text-decoration: underline; }

/* =============================================
   FOOTER
   ============================================= */
footer { background: #111; color: #fff; padding: 48px 0 24px; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 48px; margin-bottom: 40px;
}
.footer-brand { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 20px; margin-bottom: 12px; }
.footer-desc { font-size: 13px; color: rgba(255,255,255,.5); line-height: 1.7; }
.footer-col h4 {
  font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px;
  color: rgba(255,255,255,.4); margin-bottom: 16px; font-weight: 600;
}
.footer-col a { display: block; font-size: 13px; color: rgba(255,255,255,.7); margin-bottom: 10px; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: rgba(255,255,255,.35);
  flex-wrap: wrap; gap: 8px;
}

/* =============================================
   SCROLL TOP
   ============================================= */
.scroll-top {
  position: fixed; bottom: 28px; right: 28px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--gold); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; visibility: hidden;
  transform: translateY(10px); transition: all .3s;
  box-shadow: var(--shadow-lg); z-index: 100;
}
.scroll-top.show { opacity: 1; visibility: visible; transform: none; }
.scroll-top:hover { background: var(--gold2); }
.scroll-top svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.5; fill: none; }

/* =============================================
   MODAL
   ============================================= */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; opacity: 0; visibility: hidden; transition: all .3s;
}
.overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: #fff; border-radius: var(--radius-lg);
  padding: 48px 40px; max-width: 460px; width: 90%;
  text-align: center; position: relative;
  transform: translateY(30px) scale(0.9); transition: all .4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 40px 100px rgba(0,0,0,.25);
}
.overlay.open .modal { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  background: #f3f3f3; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.modal-close:hover { background: #e8e8e8; }
.modal-close svg { width: 14px; height: 14px; stroke: #777; stroke-width: 2.5; fill: none; }
.modal-icon {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.modal-icon svg { width: 30px; height: 30px; stroke: var(--gold2); fill: none; stroke-width: 2; }
.modal h3 { 
  font-size: 18px; 
  font-weight: 700; 
  margin-bottom: 20px; 
  font-family: 'Montserrat', sans-serif; 
  line-height: 1.4;
  padding: 0 10px;
}
.modal p { font-size: 15px; color: var(--muted); margin-bottom: 32px; line-height: 1.5; }

/* Radar & Search State */
.modal-search {
  padding: 20px 0;
  text-align: center;
}
.radar {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 32px;
}
.radar-circle {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid var(--gold);
  border-radius: 50%;
  animation: radarPulse 2s linear infinite;
  opacity: 0;
}
.radar-circle:nth-child(2) { animation-delay: 0.6s; }
.radar-circle:nth-child(3) { animation-delay: 1.2s; }

@keyframes radarPulse {
  0% { width: 0; height: 0; opacity: 1; }
  100% { width: 100px; height: 100px; opacity: 0; }
}

.loader-status {
  font-size: 15px;
  color: #111;
  font-weight: 500;
  min-height: 1.5em;
  animation: fadeStatus 0.5s ease-in-out forwards;
}

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

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 100%;
  margin: 0 auto;
}
.modal-form .input-group {
  width: 100%;
  flex: none;
  margin-bottom: 0;
  position: relative;
}
.modal-form .input-icon {
  left: 18px;
  width: 20px;
  height: 20px;
}
.modal-form input {
  width: 100%;
  padding: 15px 20px 15px 50px !important;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 15px;
  background: #fcfcfc;
  transition: all 0.2s;
}
.modal-form input:focus { 
  border-color: var(--gold); 
  background: #fff; 
  outline: none; 
  box-shadow: 0 0 0 4px rgba(194,162,101,0.05); 
}
.btn-modal-submit {
  background: var(--gold);
  color: #fff;
  border: none;
  padding: 18px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 12px rgba(194,162,101,0.2);
  margin-top: 4px;
}
.btn-modal-submit:hover { background: var(--gold2); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(194,162,101,0.3); }

.modal-success {
  text-align: center;
  padding: 10px 0;
  animation: modalSuccessIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes modalSuccessIn {
  from { opacity: 0; transform: scale(0.9) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #10b981;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.success-icon svg { width: 32px; height: 32px; stroke: currentColor; stroke-width: 3; fill: none; }


/* =============================================
   RESPONSIVE — TABLET (≤ 960px)
   ============================================= */
@media (max-width: 960px) {
  /* Hero: при ширине <960px колонка; фото под кнопками давало большой разрыв (в т.ч. альбом телефона 601–960px). */
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 36px 0 12px;
    gap: 0;
  }
  .hero-text { flex: none; width: 100%; }
  .checks { align-items: center; }
  .hero-img { display: none; }

  /* Brands: базовый padding 48px давал большой зазор до «В нашем каталоге» при 601–960px */
  .brands {
    padding: 8px 0 36px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }
  .brands-label { margin-bottom: 18px; }

  /* Filter */
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-bar .f-cell:nth-child(2) { border-right: none; }
  .filter-bar .f-cell:nth-child(4) { border-right: none; }
  .btn-show { grid-column: 1 / -1; padding: 16px; }

  /* Stats */
  .stats { grid-template-columns: repeat(2, 1fr); }

  /* Grids */
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .cars-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }

  /* How */
  .how-steps { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .how-steps::before { display: none; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }

  /* Nav */
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-cta { display: none; }
  .nav-inner { gap: 10px; }
  .nav-logo { font-size: 18px; }
}

/* =============================================
   RESPONSIVE — MOBILE (≤ 600px)
   ============================================= */
@media (max-width: 600px) {
  .wrap { padding: 0 20px; }

  /* Hero */
  .hero { 
    padding: 24px 0 0; 
    gap: 0; 
    text-align: left; 
    background: #fff;
    border-radius: 0;
    margin-bottom: 0;
  }
  .hero-text { text-align: left; }
  .hero-text h1 { 
    font-size: 23px;
    line-height: 1.2; 
    margin-bottom: 20px;
    letter-spacing: -0.01em;
  }
  .hero-brand { 
    font-size: 28px;
    display: inline;
    margin-top: 0;
    letter-spacing: 0.1em;
  }
  
  .hero-features { 
    gap: 14px; 
    margin-bottom: 16px; 
    align-items: flex-start;
  }
  .hero-features li { 
    flex-direction: row; 
    align-items: center; 
    gap: 10px; 
    text-align: left;
  }
  .hf-circle { 
    width: 22px; 
    height: 22px; 
    background: none;
    box-shadow: none;
    border: none;
    color: var(--gold2);
  }
  .hf-circle svg { width: 16px; height: 16px; stroke-width: 3.5; }
  .hero-features strong { font-size: 14px; color: #111; font-weight: 500; }
  
  .hero-actions { flex-direction: column; gap: 12px; }
  .btn-primary, .btn-secondary { 
    width: 100%; 
    padding: 14px; 
    border-radius: 8px; 
    font-size: 15px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
  }
  .btn-primary { box-shadow: 0 4px 12px rgba(194, 162, 101, 0.2); }

  /* Filter */
  .filter-wrap { margin-top: 5px; margin-bottom: 64px; }
  .filter-bar { 
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    border-radius: 16px; 
    box-shadow: 0 16px 40px rgba(0,0,0,0.06); 
    border: 1px solid var(--border); 
    background: #fff;
    overflow: visible;
  }
  .f-cell { 
    border-right: none; 
    border-bottom: 1px solid var(--border); 
    padding: 16px 20px; 
    border-radius: 0 !important;
  }
  .f-cell:first-child { border-radius: 15px 15px 0 0 !important; }
  .f-cell:nth-child(4) { border-bottom: 1px solid var(--border); }
  .f-cell select { font-size: 16px; padding: 4px 0; }
  .f-cell label { font-size: 12px; }
  .btn-show { 
    border-radius: 0 0 15px 15px !important; 
    padding: 20px; 
    font-size: 16px;
    border: none;
    width: 100%;
  }

  /* Stats */
  .stats { grid-template-columns: 1fr; margin-bottom: 64px; border-radius: 16px; }
  .stat-item { padding: 28px 24px; border-right: none; border-bottom: 1px solid var(--border); text-align: center; }
  .stat-item:last-child { border-bottom: none; }
  .stat-num { font-size: 34px; margin-bottom: 8px; }
  .stat-desc { font-size: 15px; }

  /* Sections headers */
  .section-header { margin-bottom: 40px; text-align: left; }
  .section-header h2 { font-size: clamp(28px, 7vw, 32px); line-height: 1.25; margin-bottom: 16px; }
  .section-header p { font-size: 16px; line-height: 1.6; color: #555; }

  /* Why */
  .why { padding: 64px 0; }
  .why-grid { grid-template-columns: 1fr; gap: 24px; }
  .why-card { padding: 32px 24px; border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,0.05); }
  .why-icon { width: 56px; height: 56px; margin-bottom: 24px; }
  .why-card h3 { font-size: 20px; margin-bottom: 12px; }
  .why-card p { font-size: 15px; }

  /* Cars */
  .cars-section { padding: 64px 0; }
  .cars-grid { grid-template-columns: 1fr; gap: 32px; }
  .car-card { border-radius: 16px; box-shadow: 0 12px 32px rgba(0,0,0,0.07); }
  .car-photo { height: auto; min-height: 240px; padding: 12px; aspect-ratio: 4/3; overflow: hidden; background: #fdfdfd; border-radius: 14px 14px 0 0; }
  .car-photo img { height: 100%; width: 100%; object-fit: contain; }
  .car-body { padding: 24px; }
  .car-name { font-size: 18px; margin-bottom: 16px; }
  .price-line { font-size: 14px; margin-bottom: 12px; }
  .price-line.valors-row { font-size: 15px; }
  .price-val { font-size: 16px; }
  .save-box { font-size: 14px; padding: 16px; border-radius: 12px; margin-top: 24px; margin-bottom: 16px; }
  .save-amount { font-size: 20px; }
  .btn-card { padding: 18px; font-size: 16px; border-radius: 12px; }

  /* How */
  .how { padding: 64px 0; }
  .how-steps { 
    grid-template-columns: 1fr; 
    gap: 40px; 
    position: relative; 
    margin-top: 48px; 
  }
  .how-steps::before {
    content: ''; position: absolute;
    top: 32px; bottom: 32px; left: 31px; right: auto;
    width: 2px; height: auto; background: var(--border);
    z-index: 0; display: block;
  }
  .how-steps .step { display: grid; grid-template-columns: 64px 1fr; gap: 4px 24px; text-align: left; align-items: center; }
  .step-num { grid-column: 1; grid-row: 1 / 3; margin: 0; width: 64px; height: 64px; font-size: 20px; z-index: 1; position: relative; }
  .step h3 { grid-column: 2; grid-row: 1; margin: 0; font-size: 19px; line-height: 1.2; align-self: end; }
  .step p { grid-column: 2; grid-row: 2; margin: 0; font-size: 15px; line-height: 1.5; align-self: start; color: var(--muted); }

  /* Reviews */
  .trust { padding: 64px 0 20px; }
  .reviews-grid { grid-template-columns: 1fr; gap: 24px; }
  .review-card { padding: 32px 24px; border-radius: 16px; }
  .rev-head { margin-bottom: 16px; }
  .rev-name { font-size: 16px; }
  .review-card p { font-size: 15px; line-height: 1.6; }

  /* Brands */
  .brands { padding: 8px 0 20px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .brands-label { margin-bottom: 12px; font-size: 12px; }
  .brands-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 60px;
    animation: marquee 30s linear infinite;
  }
  .brand-logo img {
    height: 70px;
    opacity: 0.7;
  }

  /* FAQ */
  .faq { padding: 64px 0; }
  .faq-q { font-size: 18px; padding: 24px 0; line-height: 1.4; }
  .faq-a-inner { font-size: 15px; line-height: 1.65; padding-bottom: 24px; }
  .faq-icon { width: 24px; height: 24px; flex-shrink: 0; }

  /* Lead form */
  .lead { padding: 10px 0 20px; text-align: left; }
  .lead-box { max-width: 100%; padding: 40px 24px; border-radius: 20px; }
  .lead h2 { font-size: clamp(26px, 7vw, 30px); margin-bottom: 16px; }
  .lead-sub { font-size: 16px; margin-bottom: 10px; line-height: 1.5; }
  .lead-form { flex-direction: column; gap: 8px; }
  .lead-form input { min-width: auto; width: 100%; padding: 18px 24px; border-radius: 12px; font-size: 16px; }
  .btn-lead { width: 100%; padding: 20px; border-radius: 12px; font-size: 16px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 40px; margin-bottom: 40px; text-align: left; }
  footer { padding: 64px 0 32px; }
  .footer-col h4 { font-size: 14px; margin-bottom: 20px; color: rgba(255,255,255,0.7); }
  .footer-col a { font-size: 16px; margin-bottom: 16px; padding: 4px 0; }
  .footer-bottom { 
    flex-direction: column; 
    align-items: flex-start; 
    gap: 16px; 
    border-top: 1px solid rgba(255,255,255,.1); 
    padding-top: 32px; 
    font-size: 13px;
    line-height: 1.5;
  }

  /* Modal */
  .modal { padding: 40px 24px; border-radius: 20px; width: calc(100% - 32px); }
  #mTitle { font-size: 24px; margin-bottom: 12px; }
  .modal p { font-size: 15px; margin-bottom: 32px; }
  .modal-btns { flex-direction: column; gap: 16px; }
  .modal-btns a { max-width: 100%; padding: 18px; border-radius: 12px; font-size: 16px; }

  /* Scroll top - fixed bottom margin since sticky CTA is removed */
  .scroll-top { bottom: 24px; right: 20px; width: 48px; height: 48px; box-shadow: 0 8px 24px rgba(0,0,0,.15); }

  .cta-desktop { display: none; }
  .cta-mobile { display: inline-block; }
  .nav-phone-cta { 
    padding: 6px 12px; 
    border-radius: 20px; 
    font-size: 14px; 
    gap: 7px;
    height: 36px;
    max-height: 38px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
  }
  .cta-phone-icon { width: 16px !important; height: 16px !important; }
}

/* =============================================
   RESPONSIVE — SMALL MOBILE (≤ 380px)
   ============================================= */
@media (max-width: 380px) {
  .hero-text h1 { font-size: 28px; }
  .hero-features li span { font-size: 14px; }
  .car-photo img { height: 160px; }
  .stat-item { padding: 24px 20px; }
  .how-steps::before { left: 28px; }
  .step-num { width: 56px; height: 56px; font-size: 18px; }
  .section-header h2 { font-size: 24px; }
}
/* =============================================
   SOCIAL WIDGET
   ============================================= */
.social-widget {
  position: fixed;
  bottom: 25px;
  left: 25px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sw-item {
  width: 54px; height: 54px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}
.sw-item svg { width: 26px; height: 26px; fill: #fff; }
.sw-item.tg { background: #0088cc; }
.sw-item.mx { background: transparent; border: none; }
.sw-item.mx svg { width: 100%; height: 100%; }
.sw-item:hover { transform: scale(1.1) translateY(-5px); }

/* Pulse Animation */
.sw-item.tg { animation: swPulse 2.5s infinite; }
@keyframes swPulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 136, 204, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(0, 136, 204, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 136, 204, 0); }
}

@media (max-width: 600px) {
  .social-widget { bottom: 20px; left: 20px; gap: 10px; }
  .sw-item { width: 48px; height: 48px; }
  .sw-item svg { width: 22px; height: 22px; }
}
