﻿: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, textarea { font-family: inherit; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* HEADER */
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; }
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); 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; }
body.menu-open { overflow: hidden; }

/* PAGE LAYOUT */
.detail-section { padding: 110px 0 60px; position: relative; overflow: hidden; }
.bg-blob {
  position: absolute; border-radius: 50%;
  filter: blur(110px); pointer-events: none; z-index: 0;
}
.bg-blob-1 { width: 460px; height: 460px; background: rgba(220,38,38,0.25); top: -100px; right: -120px; }
.bg-blob-2 { width: 380px; height: 380px; background: rgba(153,27,27,0.20); bottom: -150px; left: -100px; }
.detail-section .container { position: relative; z-index: 2; }

.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 24px; flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--red-light); }
.breadcrumb .sep { opacity: 0.5; }
.breadcrumb .current { color: var(--text-primary); }

.detail-grid {
  display: grid; grid-template-columns: 1.5fr 1fr;
  gap: 40px; margin-bottom: 60px;
}

/* GALLERY */
.gallery { display: grid; gap: 12px; }
.gallery-main {
  position: relative; aspect-ratio: 4/3;
  border-radius: 16px; overflow: hidden;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  cursor: pointer;
}
.gallery-main img {
  width: 100%; height: 100%; object-fit: cover;
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 0.6s ease;
}
.gallery-main img.active { opacity: 1; z-index: 1; }
.gallery-main .car-badge {
  position: absolute; top: 20px; left: 20px;
  background: var(--red); color: white;
  padding: 8px 14px; border-radius: 50px;
  font-size: 12px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  z-index: 5;
}
.gallery-main .car-badge.colecionador {
  background: var(--bg-primary);
  border: 1px solid var(--red);
}
.gallery-controls {
  position: absolute; bottom: 16px; right: 16px;
  display: flex; gap: 8px;
  z-index: 5;
}
.gallery-btn {
  width: 40px; height: 40px;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: white; font-size: 18px;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}
.gallery-btn:hover { background: var(--red); border-color: var(--red); }
.gallery-counter {
  position: absolute; bottom: 16px; left: 16px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  border-radius: 50px; padding: 6px 14px;
  font-size: 13px; color: white;
  z-index: 5;
}
.gallery-thumbs {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;
}
.gallery-thumb {
  aspect-ratio: 4/3;
  border-radius: 8px; overflow: hidden;
  cursor: pointer; background: var(--bg-tertiary);
  border: 2px solid transparent;
  transition: border-color 0.2s, transform 0.2s;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover { border-color: var(--red); transform: translateY(-2px); }
.gallery-thumb.active { border-color: var(--red); }
.gallery-more {
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.gallery-more-label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.75); color: white;
  font-weight: 600; font-size: 13px;
  backdrop-filter: blur(2px);
}

/* INFO PANEL */
.info-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  position: sticky; top: 100px;
  height: fit-content;
}
.info-brand {
  font-size: 12px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 2.5px;
  margin-bottom: 8px;
}
.info-title {
  font-size: 36px; font-weight: 700;
  line-height: 1.1; margin-bottom: 6px;
  letter-spacing: -1px;
}
.info-version { color: var(--text-secondary); font-size: 16px; margin-bottom: 24px; }
.info-specs {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.info-spec .label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 4px; }
.info-spec .value { font-size: 15px; font-weight: 600; }
.info-price-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 4px; }
.info-price {
  font-size: 36px; font-weight: 700;
  color: var(--red); margin-bottom: 20px;
  letter-spacing: -0.5px;
}
.info-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

.btn-primary, .btn-whatsapp, .btn-secondary {
  padding: 14px 20px; border-radius: 8px;
  font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.25s ease;
  cursor: pointer; border: none; text-align: center;
}
.btn-primary { background: var(--red); color: var(--text-primary); }
.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); }
.btn-whatsapp:hover { background: var(--red); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(220,38,38,0.35); }
.btn-secondary { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--red); color: var(--red-light); }

.info-trust { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 1px solid var(--border); }
.info-trust-item { display: flex; align-items: flex-start; gap: 12px; font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.info-trust-item svg { width: 18px; height: 18px; stroke: var(--red-light); stroke-width: 2; fill: none; flex-shrink: 0; margin-top: 2px; }

/* DESCRIPTION & SPECS */
.detail-content { display: grid; gap: 40px; margin-bottom: 60px; }
.section-block { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 16px; padding: 40px; }
.section-block h2 { font-size: 28px; margin-bottom: 20px; letter-spacing: -0.5px; font-weight: 700; }
.section-block p { color: var(--text-secondary); margin-bottom: 14px; font-size: 15px; line-height: 1.7; }
.specs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.spec-card {
  background: var(--bg-tertiary); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px 20px;
  transition: border-color 0.2s, transform 0.2s;
}
.spec-card:hover { border-color: var(--red); transform: translateY(-2px); }
.spec-card .spec-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 6px; }
.spec-card .spec-value { font-size: 16px; font-weight: 600; color: var(--text-primary); }

/* OFFER FORM */
.offer-form { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 16px; padding: 40px; }
.offer-form h2 { font-size: 28px; margin-bottom: 8px; font-weight: 700; }
.offer-form > p { color: var(--text-secondary); margin-bottom: 28px; font-size: 15px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; font-weight: 500; }
.form-group input, .form-group textarea {
  width: 100%; background: var(--bg-primary);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 14px 16px; color: var(--text-primary);
  font-size: 15px; transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--red); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-submit { width: 100%; padding: 16px; justify-content: center; }
.form-privacy { font-size: 12px; color: var(--text-muted); margin-top: 14px; text-align: center; }

/* FOOTER */
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); 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;
  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; }

/* LIGHTBOX */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.95); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 24px; }
.lightbox.open { display: flex; }
.lightbox-img { max-width: 92vw; max-height: 90vh; object-fit: contain; border-radius: 8px; }
.lightbox-close { position: absolute; top: 24px; right: 24px; width: 48px; height: 48px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 50%; color: white; font-size: 28px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.lightbox-close:hover { background: var(--red); border-color: var(--red); }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 50%; color: white; font-size: 24px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.lightbox-nav:hover { background: var(--red); border-color: var(--red); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
body.lightbox-open { overflow: hidden; }

/* RESPONSIVO */
@media (max-width: 968px) {
  nav ul { display: none; }
  .btn-header { display: none; }
  .mobile-toggle { display: flex; }
  .detail-grid { grid-template-columns: 1fr; gap: 28px; }
  .info-panel { position: static; }
  .gallery-thumbs { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 580px) {
  .container { padding: 0 16px; }
  .detail-section { padding: 90px 0 40px; }
  .section-block, .offer-form, .info-panel { padding: 24px; }
  .info-title { font-size: 30px; }
  .info-price { font-size: 30px; }
  .section-block h2, .offer-form h2 { font-size: 24px; }
  .gallery-thumbs { grid-template-columns: repeat(3, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .lightbox-nav { width: 44px; height: 44px; }
  .lightbox-prev { left: 12px; }
  .lightbox-next { right: 12px; }
  .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; }

