﻿:root {
  --bg-primary: #0A0A0A;
  --bg-secondary: #141414;
  --bg-tertiary: #1C1C1C;
  --red: #DC2626;
  --red-light: #EF4444;
  --red-dark: #991B1B;
  --text-primary: #FFFFFF;
  --text-secondary: #B8B8B8;
  --text-muted: #6B6B6B;
  --border: #2A2A2A;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font-family: inherit; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ===== HEADER (mesmo da landing) ===== */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.logo { display: inline-flex; align-items: center; }
.logo img { height: 48px; width: auto; }
nav ul { list-style: none; display: flex; gap: 32px; }
nav a { font-size: 14px; font-weight: 500; color: var(--text-secondary); transition: color 0.2s; position: relative; }
nav a:hover, nav a.active { color: var(--red-light); }
nav a::after { content: ''; position: absolute; bottom: -6px; left: 0; width: 0; height: 2px; background: var(--red); transition: width 0.3s; }
nav a:hover::after, nav a.active::after { width: 100%; }
.btn-header {
  background: var(--red);
  color: var(--text-primary);
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-header:hover {
  background: var(--red-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.35);
}
.mobile-toggle {
  display: none;
  font-size: 26px;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.mobile-toggle:hover { border-color: var(--red); color: var(--red-light); }

/* MOBILE MENU */
.mobile-menu-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 199;
}
.mobile-menu-overlay.open { opacity: 1; pointer-events: auto; }
.mobile-menu {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 88%; max-width: 380px;
  background: var(--bg-primary);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 200;
  padding: 24px;
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 36px; padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.mobile-menu-header img { height: 36px; }
.mobile-menu-close {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; line-height: 1;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.2s;
}
.mobile-menu-close:hover { border-color: var(--red); color: var(--red-light); }
.mobile-menu-nav { list-style: none; margin-bottom: 32px; }
.mobile-menu-nav li { border-bottom: 1px solid var(--border); }
.mobile-menu-nav a {
  display: block; padding: 18px 0; font-size: 18px;
  font-weight: 500; color: var(--text-primary);
  letter-spacing: 0.3px; transition: color 0.2s, padding-left 0.2s;
}
.mobile-menu-nav a:hover, .mobile-menu-nav a.active { color: var(--red-light); padding-left: 8px; }
.mobile-menu-cta { margin-top: auto; }
.mobile-menu-cta .btn-primary { width: 100%; justify-content: center; padding: 16px; }
body.menu-open { overflow: hidden; }

/* ===== PAGE HERO ===== */
.page-hero {
  position: relative;
  padding: 140px 0 60px;
  overflow: hidden;
  background: linear-gradient(180deg, #0a0a0a 0%, #141414 100%);
}
.page-hero-bg {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
  mask-image: linear-gradient(180deg, black 0%, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, black 0%, black 70%, transparent 100%);
}
.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
}
.bg-blob-1 {
  width: 460px; height: 460px;
  background: rgba(220, 38, 38, 0.30);
  top: -100px; right: -120px;
  animation: floatA 22s ease-in-out infinite alternate;
}
.bg-blob-2 {
  width: 380px; height: 380px;
  background: rgba(153, 27, 27, 0.25);
  bottom: -150px; left: -100px;
  animation: floatB 28s ease-in-out infinite alternate;
}
@keyframes floatA {
  0% { transform: translate(0,0) scale(1); }
  100% { transform: translate(60px,40px) scale(1.10); }
}
@keyframes floatB {
  0% { transform: translate(0,0) scale(1); }
  100% { transform: translate(-50px,-40px) scale(1.08); }
}
.page-hero-content {
  position: relative; z-index: 2;
  text-align: center;
}
.section-eyebrow {
  display: inline-block;
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.page-hero h1 {
  font-family: 'Inter', sans-serif;
  font-size: clamp(38px, 5.5vw, 60px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}
.page-hero h1 span { color: var(--red); }
.page-hero p {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== FILTERS ===== */
.inventory {
  padding: 40px 0 100px;
  background: var(--bg-primary);
}
.filters-bar {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 14px;
  align-items: end;
}
.filter-group { display: flex; flex-direction: column; gap: 8px; }
.filter-group label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}
.filter-input, .filter-select {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: 14px;
  width: 100%;
  transition: border-color 0.2s;
}
.filter-input:focus, .filter-select:focus {
  outline: none;
  border-color: var(--red);
}
.filter-input::placeholder { color: var(--text-muted); }
.filter-select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236B6B6B'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 36px;
}
.btn-reset {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-reset:hover {
  border-color: var(--red);
  color: var(--red-light);
}

.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.results-count {
  color: var(--text-secondary);
  font-size: 15px;
}
.results-count strong { color: var(--text-primary); }
.sort-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sort-group label {
  font-size: 13px;
  color: var(--text-muted);
}
.sort-select {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 36px 8px 12px;
  color: var(--text-primary);
  font-size: 13px;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236B6B6B'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 12px 0;
}
.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--red);
  cursor: pointer;
}
.checkbox-group span { font-size: 13px; color: var(--text-secondary); }

/* ===== CARS GRID ===== */
.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}
.car-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}
.car-card:hover {
  transform: translateY(-6px);
  border-color: var(--red);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(220, 38, 38, 0.25);
}
.car-image {
  position: relative;
  height: 220px;
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  overflow: hidden;
}
.car-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.car-card:hover .car-image img { transform: scale(1.06); }
.car-badge {
  position: absolute;
  top: 16px; left: 16px;
  background: var(--red);
  color: white;
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.car-badge.colecionador { background: #2a2a2a; border: 1px solid var(--red); }
.car-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.car-brand {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.car-title {
  font-family: 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.2;
}
.car-version {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
}
.car-specs {
  display: flex; gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.car-spec { flex: 1; text-align: center; }
.car-spec .spec-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.car-spec .spec-value { font-size: 14px; font-weight: 600; }
.car-price { margin-top: auto; }
.car-price-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.car-price-value {
  font-family: 'Inter', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 16px;
}
.car-actions { display: flex; gap: 8px; }
.car-actions .btn-primary,
.car-actions .btn-whatsapp {
  flex: 1;
  padding: 12px;
  font-size: 14px;
  justify-content: center;
}

.btn-primary {
  background: var(--red);
  color: var(--text-primary);
  border-radius: 8px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: var(--red-light); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(220, 38, 38, 0.45); }
.btn-primary:active { transform: translateY(0) scale(0.97); }
.btn-whatsapp {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--red);
  border-radius: 8px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}
.btn-whatsapp:hover { background: var(--red); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(220, 38, 38, 0.35); }

.no-results {
  text-align: center;
  padding: 80px 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: none;
}
.no-results.visible { display: block; }
.no-results h3 {
  font-family: 'Inter', sans-serif;
  font-size: 28px;
  margin-bottom: 12px;
}
.no-results p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* ===== FOOTER (mesmo da landing) ===== */
footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo img { height: 64px; }
.footer-brand p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 16px;
  max-width: 320px;
}
.footer-col h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
  color: var(--red);
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 12px; color: var(--text-secondary); font-size: 14px; }
.footer-col a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--red-light); }
.social-links { display: flex; gap: 12px; margin-top: 16px; }
.social-links a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.social-links a svg {
  width: 18px; height: 18px;
  fill: var(--text-secondary);
  transition: fill 0.2s;
}
.social-links a:hover { background: var(--red); transform: translateY(-2px); }
.social-links a:hover svg { fill: white; }
.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* WhatsApp Float */
.whatsapp-float {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 60px; height: 60px;
  background: transparent;
  border: 1.5px solid var(--red);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(220, 38, 38, 0.35);
  z-index: 99;
  cursor: pointer;
  transition: all 0.2s;
  animation: pulse 2s infinite;
  backdrop-filter: blur(8px);
}
.whatsapp-float:hover { transform: scale(1.1); background: var(--red); }
.whatsapp-float:hover svg { fill: white; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(220, 38, 38, 0.35); }
  50% { box-shadow: 0 10px 30px rgba(220, 38, 38, 0.6), 0 0 0 12px rgba(220, 38, 38, 0.10); }
}
.whatsapp-float svg { width: 32px; height: 32px; fill: var(--red); transition: fill 0.2s; }

/* Responsivo */
@media (max-width: 968px) {
  nav ul { display: none; }
  .btn-header { display: none; }
  .mobile-toggle { display: flex; }
  .filters-bar {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .filters-bar .filter-group:first-child { grid-column: 1 / -1; }
  .filters-bar .btn-reset { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .page-hero { padding: 110px 0 50px; }
}
@media (max-width: 580px) {
  .container { padding: 0 16px; }
  .filters-bar { grid-template-columns: 1fr; padding: 18px; }
  .cars-grid { grid-template-columns: 1fr; gap: 20px; }
  .car-actions { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .results-bar { flex-direction: column; align-items: flex-start; }
  .page-hero h1 { font-size: 34px; }
  .whatsapp-float { width: 56px; height: 56px; bottom: 16px; right: 16px; }
  .whatsapp-float svg { width: 28px; height: 28px; }
}

/* ============================================================
   PERFORMANCE OVERRIDES (mobile + reduced-motion + paint)
   Carregado por último — vence as regras anteriores sem
   precisar alterar o restante do CSS.
   ============================================================ */

/* 1) Respeita preferência do usuário por menos movimento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
  .bg-blob,
  .whatsapp-float,
  .testimonials-track { animation: none !important; }
}

/* 2) Mobile: corta efeitos caros (blur grande, animações infinitas,
   backdrop-filter pesado) para reduzir GPU/paint e poupar bateria */
@media (max-width: 768px) {
  /* Header sem backdrop-filter — usa cor sólida quase opaca */
  header {
    background: rgba(10, 10, 10, 0.96) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Mobile menu overlay: tira blur */
  .mobile-menu-overlay {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(0, 0, 0, 0.78) !important;
  }

  /* Blobs do fundo: blur menor e sem animação infinita */
  .bg-blob {
    filter: blur(50px) !important;
    animation: none !important;
    opacity: 0.6;
  }
  .bg-blob-3 { display: none; } /* terceiro blob é redundante no mobile */

  /* Foto decorativa de fundo: dispensável no mobile */
  .section-bg-photo { display: none !important; }

  /* Grid decorativo: desligado para reduzir paint */
  .bg-grid { display: none !important; }

  /* WhatsApp float: pulse desligado, blur removido */
  .whatsapp-float {
    animation: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Cards de depoimento: tira backdrop-filter */
  .testimonial {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #141414 !important;
  }

  /* Carrossel de depoimentos mais lento (menos repaint) */
  .testimonials-track { animation-duration: 90s !important; }

  /* Car-fav blur removido */
  .car-fav { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
}

/* 3) Pinta apenas o necessário: seções fora da viewport
   não precisam ser pintadas até estarem perto da tela */
.structure-section,
.contact-section,
.map-section,
.cars-section,
footer,
#diferenciais,
#depoimentos {
  content-visibility: auto;
  contain-intrinsic-size: 1px 800px;
}

/* 4) Hint de composição para o que realmente anima no hover/scroll */
.car-card, .benefit-card, .structure-card img, .btn-primary, .btn-whatsapp {
  will-change: auto;
}

/* 5) Imagens com aspect-ratio explícito evitam CLS */
.car-image img.car-photo { aspect-ratio: 16 / 11; }

