/* ============================================================
   AVENIDA VEÍCULOS LINS — Main CSS (Design System + Global)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── Design Tokens ───────────────────────────────────────── */
:root {
  --color-primary:      #000000;
  --color-primary-dark: #424242;
  --color-primary-light:#262626;
  --color-accent:       #424242;
  --color-accent-light: #ADADAD;
  --color-header:       linear-gradient(90deg, #000000, #424242);
  --color-footer:       #3B3B3B;
  --color-success:      #10b981;
  --color-success-light:#d1fae5;
  --color-warning:      #f59e0b;
  --color-warning-light:#fef3c7;
  --color-danger:       #ef4444;
  --color-danger-light: #fee2e2;
  --color-surface:      #f1f5f9;
  --color-surface-2:    #e8edf2;
  --color-card:         #ffffff;
  --color-text:         #1e293b;
  --color-text-muted:   #64748b;
  --color-text-light:   #94a3b8;
  --color-border:       #e2e8f0;
  --color-overlay:      rgba(0,0,0,0.55);

  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  --shadow-xs:   0 1px 3px rgba(0,0,0,.06);
  --shadow-sm:   0 2px 8px rgba(0,0,0,.08);
  --shadow-md:   0 4px 16px rgba(0,0,0,.12);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.16);
  --shadow-xl:   0 16px 48px rgba(0,0,0,.20);

  --transition: 0.2s ease;
  --transition-slow: 0.35s ease;

  --sidebar-w: 300px;
  --topbar-h: 32px;
  --header-h: 68px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-surface);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }
input, select, textarea { font-family: inherit; }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--color-text-light); }

/* ── Top Bar ─────────────────────────────────────────────── */
#top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: #fff;
  z-index: 1001;
  border-bottom: 1px solid var(--color-border);
}

.top-bar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* ── Header ──────────────────────────────────────────────── */
#main-header {
  position: fixed;
  top: var(--topbar-h); left: 0; right: 0;
  height: var(--header-h);
  background: var(--color-header, var(--color-primary));
  z-index: 1000;
  display: flex;
  align-items: center;
  /* Menu alinhado à esquerda, logo à esquerda de tudo.
     O que vai para a direita usa margin-left:auto (CTA / hambúrguer). */
  justify-content: flex-start;
  padding: 0 2rem;
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
}

.header-logo-icon {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.25);
}

.header-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.header-logo-text .brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.header-logo-text .brand-tagline {
  font-size: 0.65rem;
  font-weight: 400;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  /* Respiro entre a logo e o primeiro item do menu. O primeiro link já
     tem 0.875rem de padding próprio, então o afastamento visual real
     fica em ~3rem — perto sem colar. */
  margin-left: 2.25rem;
}

/* ── Busca no cabeçalho (somente na página de Estoque) ───── */
/* Branco sólido e cantos pouco arredondados, para destacar do
   cabeçalho escuro em vez de se dissolver nele. */
.header-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 1 330px;
  min-width: 190px;
  margin-left: 1.75rem;
  padding: 0.6rem 0.9rem;
  background: #fff;
  border: 1px solid #fff;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 10px rgba(0,0,0,0.22);
  transition: var(--transition);
}

.header-search:focus-within {
  border-color: var(--color-accent-light);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.28), 0 2px 10px rgba(0,0,0,0.22);
}

.header-search svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.header-search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--color-text);
  font-size: 0.85rem;
  font-weight: 500;
}
.header-search input::placeholder { color: var(--color-text-light); }

.header-nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.header-nav a:hover,
.header-nav a.active {
  color: #fff;
  background: rgba(255,255,255,0.12);
}

.header-cta-btn {
  /* Empurra o CTA para a extremidade direita, já que o header
     agora alinha tudo à esquerda. */
  margin-left: auto;
  background: #fff;
  color: var(--color-primary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.5rem 1.125rem;
  border-radius: var(--radius-full);
  transition: var(--transition);
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-cta-btn:hover {
  background: var(--color-accent-light);
  /* Texto escuro: a cor de destaque clara (#ADADAD) é clara demais para
     texto branco — daria ~2.2:1 de contraste, ilegível. */
  color: var(--color-primary);
  transform: translateY(-1px);
}

/* ── Page Shell ───────────────────────────────────────────────── */
#app {
  padding-top: calc(var(--header-h) + var(--topbar-h));
  min-height: 100vh;
}

/* Bio page — remove header offset so banner starts at very top */
#app.bio-page {
  padding-top: 0 !important;
  min-height: 100vh;
}

body.hide-layout #main-header,
body.hide-layout #top-bar,
body.hide-layout #main-footer,
body.hide-layout #whatsapp-float {
  display: none !important;
}

/* Sem cabecalho fixo nos paineis, o espaco reservado para ele vira um vazio. */
body.hide-layout #app {
  padding-top: 0;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
  line-height: 1;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-accent {
  background: var(--color-accent);
  color: #fff;
}
.btn-accent:hover { background: var(--color-accent-light); color: var(--color-primary); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #fff;
  font-size: 1rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
}
.btn-whatsapp:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(37,211,102,0.5); }

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
}
.btn-ghost:hover { background: var(--color-surface); color: var(--color-text); }

.btn-sm { padding: 0.4rem 0.875rem; font-size: 0.8rem; }
.btn-lg { padding: 0.875rem 2rem; font-size: 1rem; }
.btn-full { width: 100%; }

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-success { background: var(--color-success-light); color: #065f46; }
.badge-warning { background: var(--color-warning-light); color: #92400e; }
.badge-primary { background: rgba(5,67,106,0.1); color: var(--color-primary); }
.badge-accent  { background: rgba(30,123,191,0.1); color: var(--color-accent); }
.badge-gray    { background: var(--color-surface-2); color: var(--color-text-muted); }
.badge-new     { background: linear-gradient(135deg,#000000,#424242); color:#fff; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* ── Vehicle Card ─────────────────────────────────────────── */
.vehicle-card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--color-border);
  transition: var(--transition-slow);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.vehicle-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-accent);
}

.vehicle-card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--color-surface);
}

.vehicle-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.vehicle-card:hover .vehicle-card-img-wrap img {
  transform: scale(1.05);
}

.vehicle-card-badges {
  position: absolute;
  top: 0.625rem;
  left: 0.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.vehicle-card-fav {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.9);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}
.vehicle-card-fav:hover { background: #fff; transform: scale(1.1); }

.vehicle-card-body {
  padding: 0.875rem 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.vehicle-card-brand {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.15rem;
}

.vehicle-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.2rem;
  line-height: 1.2;
}

.vehicle-card-version {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 0.625rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vehicle-card-specs {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.625rem;
  flex-wrap: wrap;
}

.vehicle-card-spec {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.vehicle-card-spec span.icon { font-size: 0.85rem; }

.vehicle-card-price-wrap {
  margin-top: auto;
  padding-top: 0.625rem;
  border-top: 1px solid var(--color-border);
}

.vehicle-card-fipe-note {
  font-size: 0.7rem;
  color: var(--color-success);
  font-weight: 600;
  margin-bottom: 0.15rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.vehicle-card-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.vehicle-card-actions {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: 0.5rem;
}

/* ── Testimonials Carousel ───────────────────────────────── */
.testimonials-carousel-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.testimonials-carousel-wrap .carousel-track-container {
  overflow: hidden;
  flex: 1;
}
.testimonials-track {
  display: flex;
  gap: 20px;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}
.testimonial-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex-shrink: 0;
  min-height: 240px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  /* width is set dynamically by JS */
}
.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.testimonial-quote {
  font-size: 2.5rem;
  line-height: 1;
  color: var(--color-primary);
  opacity: 0.3;
  font-family: Georgia, serif;
}
.testimonial-text {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  flex: 1;
  font-style: italic;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-top: 1px solid var(--color-border);
  padding-top: 1rem;
}
.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-primary);
  flex-shrink: 0;
}
.testimonial-avatar-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  flex-shrink: 0;
}
.testimonial-name {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--color-text);
}
.testimonial-location {
  font-size: 0.75rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 2px;
}
.testimonial-stars {
  font-size: 0.85rem;
  color: #f59e0b;
  letter-spacing: 1px;
}

/* ── Instagram Grid ──────────────────────────────── */
.instagram-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

/* Embeds oficiais do Instagram. O embed.js define a altura de cada post,
   então aqui só controlamos as colunas. */
.instagram-embeds {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  align-items: start;
}

/* O card é o item da grade. O <blockquote> original fica escondido dentro
   dele depois do processamento, sem abrir buraco no layout. */
.insta-embed-card {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
}

/* Após processar, o embed.js troca a classe do <blockquote> para
   "instagram-media-registered". Escondemos só nesse estado — esconder
   antes poderia fazer o script ignorar o elemento. */
.insta-embed-card > blockquote.instagram-media-registered {
  display: none !important;
}

.insta-embed-card iframe.instagram-media {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
}

.insta-post:hover img {
  transform: scale(1.05);
}
.insta-post:hover .insta-overlay {
  opacity: 1 !important;
}

@media (max-width: 768px) {
  .instagram-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .instagram-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Footer ──────────────────────────────────────────────── */
#main-footer {
  background: transparent;
  color: rgba(255,255,255,0.85);
  padding: 0;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
}

.footer-brand .footer-logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
}
.footer-brand p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  max-width: 260px;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1rem;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}
.footer-col ul li a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.75);
  transition: var(--transition);
}
.footer-col ul li a:hover { color: #fff; }

.footer-info p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.625rem;
  line-height: 1.5;
}
.footer-info p .icon { font-size: 1rem; margin-top: 0.1rem; flex-shrink: 0; }

.footer-map {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding: 0 2rem;
}

.footer-map-box {
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}

.footer-map-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(5,67,106,0.5), rgba(5,67,106,0.5)),
    repeating-linear-gradient(0deg, transparent, transparent 30px, rgba(255,255,255,0.04) 30px, rgba(255,255,255,0.04) 31px),
    repeating-linear-gradient(90deg, transparent, transparent 30px, rgba(255,255,255,0.04) 30px, rgba(255,255,255,0.04) 31px);
}

.footer-map-pin {
  position: relative;
  z-index: 1;
  text-align: center;
}

.footer-map-pin .pin-icon {
  font-size: 2.5rem;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
  animation: bounce-pin 2s infinite;
}

.footer-map-pin p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  margin-top: 0.25rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.footer-map-open-btn {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.875rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: none;
  transition: var(--transition);
}
.footer-map-open-btn:hover { background: var(--color-accent-light); }

@keyframes bounce-pin {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding: 1.5rem 2rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-h);
}

.top-bar-ticker-container {
  flex: 1;
  overflow: hidden;
  margin: 0 1rem;
  white-space: nowrap;
  position: relative;
  display: flex;
  align-items: center;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.top-bar-ticker-track {
  display: inline-block;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
  padding-left: 100%;
}

.top-bar-ticker-item {
  display: inline-block;
  padding: 0 2rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
}

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

.top-bar-left {
}

.footer-bottom p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
}

/* ── WhatsApp Float ──────────────────────────────────────── */
#whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9000;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(37,211,102,0.5);
  cursor: pointer;
  transition: var(--transition);
  animation: float-pulse 3s infinite;
}

#whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 32px rgba(37,211,102,0.65);
}

#whatsapp-float svg {
  width: 30px;
  height: 30px;
  fill: #fff;
}

@keyframes float-pulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(37,211,102,0.5); }
  50%       { box-shadow: 0 6px 36px rgba(37,211,102,0.75), 0 0 0 12px rgba(37,211,102,0.1); }
}

/* ── Lead Modal ──────────────────────────────────────────── */
#lead-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
  animation: fade-in 0.2s ease;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

#lead-modal {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 2rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-xl);
  animation: slide-up 0.3s ease;
}

@keyframes slide-up { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.lead-modal-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.lead-modal-header .wpp-icon-big {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.75rem;
}

.lead-modal-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 0.375rem;
}

.lead-modal-header p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.lead-modal-car-preview {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--color-border);
}

.lead-modal-car-preview img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.lead-modal-car-preview .car-info p {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text);
}
.lead-modal-car-preview .car-info span {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

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

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.375rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--color-text);
  background: #fff;
  transition: var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(5,67,106,0.1);
}

.lead-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-top: 1.25rem;
}

.lead-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--color-surface);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: var(--transition);
}
.lead-modal-close:hover { background: var(--color-surface-2); color: var(--color-text); }
#lead-modal { position: relative; }

/* ── Toast ───────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  top: calc(var(--header-h) + 1rem);
  right: 1rem;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--color-text);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.3s ease;
  max-width: 320px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.toast.success { background: var(--color-success); }
.toast.error   { background: var(--color-danger); }

@keyframes toast-in { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Utils ───────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.text-primary { color: var(--color-primary); }
.text-muted { color: var(--color-text-muted); }
.text-success { color: var(--color-success); }
.fw-bold { font-weight: 700; }
.fw-black { font-weight: 900; }

.divider {
  height: 1px;
  background: var(--color-border);
  margin: 1.5rem 0;
}

/* ── Login Page ──────────────────────────────────────────── */
.login-page {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-surface) 0%, #dce8f5 100%);
  padding: 2rem;
}

.login-card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-xl);
}

.login-card-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-card-header .login-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 1rem;
  box-shadow: 0 8px 24px rgba(5,67,106,0.3);
}

.login-card-header h2 {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--color-text);
}
.login-card-header p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.login-error {
  background: var(--color-danger-light);
  color: var(--color-danger);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: none;
}
.login-error.visible { display: block; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* ── Mobile Menu ─────────────────────────────────────────── */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.2);
  transition: var(--transition);
}
.hamburger-btn:hover { background: rgba(255,255,255,0.2); }
.hamburger-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: var(--transition);
}

#mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1999;
  backdrop-filter: blur(4px);
}
#mobile-nav-overlay.open { display: block; }

#mobile-nav {
  position: fixed;
  top: 0;
  left: -100%;
  width: 280px;
  height: 100vh;
  background: var(--color-header, var(--color-primary));
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transition: left 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
}
#mobile-nav.open { left: 0; }

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.mobile-nav-close {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  border: none;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 0.25rem;
  flex: 1;
}

.mobile-nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.mobile-nav-links a:hover,
.mobile-nav-links a.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.mobile-nav-cta {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.15);
}

@media (max-width: 768px) {
  :root {
    --header-h: 60px;
    --topbar-h: 0px;
    --sidebar-w: 100%;
  }

  /* Hide top bar on mobile */
  #top-bar { display: none; }

  /* Header mobile */
  #main-header {
    top: 0;
    padding: 0 1rem;
  }
  .header-logo img { height: 48px !important; }
  .header-nav { display: none; }
  .header-cta-btn { display: none; }
  /* A busca da listagem some aqui: a sidebar de filtros já tem a dela. */
  .header-search { display: none; }
  /* Logo centralizada no cabeçalho mobile. Posicionamento absoluto para
     centralizar em relação à tela inteira — no fluxo normal o hambúrguer
     ocuparia espaço à direita e empurraria a logo para a esquerda. */
  .header-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  /* Sem o CTA, é o hambúrguer que empurra para a direita. */
  .hamburger-btn { display: flex; margin-left: auto; }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1.25rem;
  }
  .footer-map { padding: 0 1.25rem; }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    padding: 1.25rem;
  }

  /* Instagram section */
  .instagram-feed-section { padding: 2rem 0; }

  /* Listing */
  .listing-page { flex-direction: column; }
  .listing-sidebar {
    width: 100%;
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    display: none;
  }
  .listing-sidebar.open { display: block; }
  .listing-grid { grid-template-columns: 1fr; }

  /* Home sections */
  .why-grid { grid-template-columns: 1fr 1fr; }
  .carousel-track .vehicle-card { flex: 0 0 calc(50% - 0.625rem); }
  .cta-banner {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
  }
  .cta-banner-actions { justify-content: center; }

  /* Home section header stack */
  .home-section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Detail */
  .detail-layout { grid-template-columns: 1fr; }
  .detail-info { order: -1; }
  .ficha-grid { grid-template-columns: repeat(2, 1fr); }
  .ficha-item:nth-child(3n) { border-right: 1px solid var(--color-border); }
  .ficha-item:nth-child(2n) { border-right: none; }

  /* General container padding */
  .container { padding: 0 1rem; }
  .home-section { padding: 2.5rem 0; }
}

@media (max-width: 480px) {
  .why-grid { grid-template-columns: 1fr; }
  .carousel-track .vehicle-card { flex: 0 0 82vw; }
  .section-title { font-size: 1.25rem; }
  .cta-banner-content h2 { font-size: 1.25rem; }
  .hero-slide-content { padding: 0 1.5rem; }
  .hero-nav-btn { width: 38px; height: 38px; font-size: 1.1rem; }
  .hero-nav-btn.prev { left: 0.75rem; }
  .hero-nav-btn.next { right: 0.75rem; }
}

/* ── Page transition ─────────────────────────────────────── */
.page-enter {
  animation: page-fade 0.3s ease;
}
@keyframes page-fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Skeleton loading ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--color-surface) 25%, var(--color-surface-2) 50%, var(--color-surface) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ── Brand Logo Grid (Listing Filter) ───────────────────────── */
.brand-logo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.brand-logo-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px 6px;
  background: #fff;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all .18s ease;
  min-height: 60px;
  text-align: center;
}
.brand-logo-chip:hover {
  border-color: var(--color-primary);
  background: #f0f6ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5,67,106,.12);
}
.brand-logo-chip.active {
  border-color: var(--color-primary);
  background: #e8f2fa;
  box-shadow: 0 0 0 2px rgba(5,67,106,.2);
}
.brand-chip-name {
  font-size: .6rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .03em;
  line-height: 1;
}
.brand-logo-chip.active .brand-chip-name {
  color: var(--color-primary);
}
.brand-logo-chip img {
  display: block;
  pointer-events: none;
}

/* ── Brand Badge (Detail Page & Cards) ──────────────────────── */
.brand-logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}
.brand-logo-badge img {
  width: 36px;
  height: 24px;
  object-fit: contain;
}
.brand-logo-badge span {
  font-weight: 700;
  font-size: .85rem;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.brand-logo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  background: var(--color-primary);
  color: #fff;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── Brand Selector (Admin Form) ────────────────────────────── */
.brand-selector-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px 2px;
}
.brand-selector-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 6px 8px;
  background: #fff;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  cursor: pointer;
  transition: all .15s ease;
  min-height: 72px;
  text-align: center;
}
.brand-selector-chip:hover {
  border-color: var(--color-primary);
  background: #f0f6ff;
}
.brand-selector-chip.selected {
  border-color: var(--color-primary);
  background: var(--color-primary);
}
.brand-selector-chip.selected .brand-chip-name {
  color: #fff;
}
.brand-selector-chip img {
  width: 38px;
  height: 26px;
  object-fit: contain;
  display: block;
}

/* ── Hero Search Box (Webmotors Style) ────────────────────── */
.search-strip-hero {
  position: relative;
  margin-top: -60px; /* Overlaps the bottom of the hero banner */
  z-index: 20;
  padding: 0 1rem;
}

.search-box-hero {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.search-box-hero-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
}

.search-box-hero-tabs {
  display: flex;
  gap: 1rem;
}

.search-tab {
  background: rgba(30,123,191,0.1);
  color: var(--color-primary);
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.search-tab.active {
  background: var(--color-primary);
  color: #fff;
}

.search-bar-hero-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 2px solid var(--color-primary);
  border-radius: 30px;
  padding: 0.8rem 1.5rem;
  background: #fff;
  transition: box-shadow 0.2s ease;
}
.search-bar-hero-inner:focus-within {
  box-shadow: 0 0 0 4px rgba(30,123,191,0.15);
}

.search-bar-hero-inner input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 1rem;
  color: var(--color-text);
}
.search-bar-hero-inner input::placeholder {
  color: var(--color-text-muted);
}

.search-hero-btn {
  padding: 1rem;
  font-size: 1.1rem;
  border-radius: 12px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  margin-top: 0.5rem;
  box-shadow: 0 4px 12px rgba(5,67,106,0.3);
  width: 100%;
}
.search-hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(5,67,106,0.4);
}

@media (max-width: 768px) {
  .search-strip-hero {
    margin-top: -30px;
  }
  .search-box-hero {
    padding: 1.5rem;
  }
  .search-box-hero-title {
    font-size: 1.25rem;
  }
  .search-bar-hero-inner {
    padding: 0.6rem 1rem;
  }
}

/* ── Autocomplete Dropdown ────────────────────────────── */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  max-height: 320px;
  overflow-y: auto;
  z-index: 100;
  border: 1px solid var(--color-border);
}
.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.2s;
  text-align: left;
}
.autocomplete-item:last-child {
  border-bottom: none;
}
.autocomplete-item:hover {
  background: var(--color-surface);
}
.ac-brand {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}
.ac-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ac-title {
  color: var(--color-text);
  font-size: 0.95rem;
}
.ac-subtitle {
  color: var(--color-text-muted);
  font-size: 0.75rem;
}


