/* Lulute Veículos — "classic" template */
:root {
  --red: #c41e24;
  --red-dark: #8f1519;
  --ink: #1c1c1c;
  --gray: #6b7280;
  --gray-light: #e5e7eb;
  --bg: #faf9f7;
  --white: #fff;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--gray-light); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; }
.logo { height: 44px; width: auto; }
.logo-footer { height: 52px; width: auto; filter: brightness(0) invert(1); opacity: .9; margin-bottom: 12px; }

.main-nav ul { list-style: none; display: flex; gap: 24px; margin: 0; padding: 0; }
.main-nav a { font-weight: 600; }
.main-nav a:hover { color: var(--red); }
.nav-toggle, .nav-toggle-btn { display: none; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%); color: var(--white); padding: 64px 0; }
.hero h1 { font-size: 2.4rem; max-width: 700px; }
.hero p { font-size: 1.1rem; opacity: .95; max-width: 600px; }
.hero-search { display: flex; gap: 8px; max-width: 520px; margin-top: 24px; }
.hero-search input { flex: 1; padding: 14px 16px; border-radius: var(--radius); border: none; font-size: 1rem; }
.hero-search button { padding: 14px 24px; border-radius: var(--radius); border: none; background: var(--ink); color: var(--white); font-weight: 700; cursor: pointer; }
.hero-count { margin-top: 16px; font-weight: 600; }

/* Brand chips */
.brand-chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 24px 20px; }
.chip { background: var(--white); border: 1px solid var(--gray-light); padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: .9rem; }
.chip:hover { border-color: var(--red); color: var(--red); }

/* Sections */
.section-title { font-size: 1.6rem; margin: 40px 0 20px; }
.see-all { text-align: center; margin: 24px 0; font-weight: 700; }
.see-all a:hover { color: var(--red); }

/* Vehicle grid & cards */
.vehicle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
/* Home only: fixed 4 columns so the 2 extra 0km highlights fill out the
   last row of the used-stock grid instead of spilling onto a mostly-empty
   line by themselves. Breakpoints stay divisors of the 8 total cards
   (6 featured + 2 highlights) for the same reason - 3 columns would leave
   its own dangling 2-card row, so this goes straight to 2. */
.home-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .home-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .home-grid { grid-template-columns: 1fr; } }
.vehicle-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); transition: transform .15s, box-shadow .15s; }
.vehicle-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.vehicle-card-img { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--gray-light); }
.vehicle-card-img img { width: 100%; height: 100%; object-fit: cover; }
.badge-0km { position: absolute; top: 8px; left: 8px; z-index: 1; background: var(--red); color: #fff; font-weight: 800; font-size: .72rem; padding: 3px 9px; border-radius: 999px; }
.vehicle-card-body { padding: 14px 16px; }
.vehicle-card-body h3 { font-size: 1.05rem; }
.vehicle-meta { color: var(--gray); font-size: .9rem; margin: 4px 0; }
.vehicle-price { color: var(--red); font-weight: 800; font-size: 1.15rem; margin: 6px 0 0; }

/* CTA */
.cta-new { margin: 48px auto; }
.cta-box { background: var(--ink); color: var(--white); border-radius: var(--radius); padding: 40px; text-align: center; }
.btn { display: inline-block; background: var(--red); color: var(--white); padding: 14px 28px; border-radius: var(--radius); font-weight: 700; margin-top: 16px; }
.btn:hover { background: var(--red-dark); }
.btn-whatsapp { background: #25d366; color: #08331d; }
.btn-whatsapp:hover { background: #1ebe5a; }
.btn-lg { font-size: 1.1rem; padding: 16px 32px; }

/* Filter form */
.filter-form { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 30px; background: var(--white); padding: 16px; border-radius: var(--radius); border: 1px solid var(--gray-light); }
.filter-form input, .filter-form select { padding: 10px 12px; border-radius: 6px; border: 1px solid var(--gray-light); font-size: .95rem; }
.filter-form input[type="number"] { width: 130px; }
.filter-form button { padding: 10px 20px; border-radius: 6px; border: none; background: var(--ink); color: var(--white); font-weight: 700; cursor: pointer; }

.pagination { display: flex; gap: 8px; justify-content: center; margin: 32px 0; }
.pagination a { padding: 8px 14px; border-radius: 6px; border: 1px solid var(--gray-light); background: var(--white); font-weight: 600; }
.pagination a.active { background: var(--red); color: var(--white); border-color: var(--red); }

/* Vehicle detail */
.breadcrumb { color: var(--gray); font-size: .9rem; margin: 16px 0; }
.vehicle-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; margin-bottom: 60px; align-items: start; }
/* Two copies of .vehicle-description exist (see vehicle.php) so its position
   can differ desktop vs mobile without a grid item spanning multiple rows -
   spanning caused the row above it to inflate to the tall .vehicle-info
   column's height, leaving a large blank gap under the photos. Only one
   copy is ever visible at a time. */
.vehicle-description-bottom { display: none; }
.gallery-main-wrap { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--gray-light); cursor: zoom-in; }
.gallery-main { border-radius: var(--radius); width: 100%; height: auto; aspect-ratio: 4/3; object-fit: contain; display: block; background: var(--gray-light); }
.gallery-expand-hint { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; pointer-events: none; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumb-btn { border: 2px solid transparent; background: none; padding: 0; border-radius: 6px; cursor: pointer; flex-shrink: 0; line-height: 0; }
.thumb-btn img { width: 80px; height: 60px; object-fit: cover; border-radius: 4px; display: block; }
.thumb-btn:hover { border-color: var(--gray-light); }
.thumb-btn.active { border-color: var(--red); }
.vehicle-version { color: var(--gray); }
.vehicle-description { line-height: 1.6; margin: 16px 0; }
.vehicle-price-big { font-size: 2rem; font-weight: 800; color: var(--red); margin: 8px 0 20px; }
.vehicle-contact-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.vehicle-contact-actions .btn { margin-top: 0; }
.btn-email { background: var(--white); color: var(--red); border: 2px solid var(--red); padding: 12px 26px; }
.btn-email:hover { background: var(--red); color: var(--white); }

.lead-modal { display: none; position: fixed; inset: 0; z-index: 9997; }
.lead-modal.open { display: block; }
.lead-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.lead-modal-box { position: relative; z-index: 1; background: var(--white); max-width: 420px; margin: 8vh auto; padding: 28px 24px 20px; border-radius: var(--radius); max-height: 84vh; overflow-y: auto; }
.lead-modal-close { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border: none; background: var(--gray-light); border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; }
.lead-modal-box h3 { margin: 0 0 4px; }
.lead-modal-box .muted { color: var(--gray); font-size: .9rem; margin: 0 0 12px; }
.lead-modal-box label { display: block; margin: 12px 0 4px; font-size: .85rem; font-weight: 600; color: var(--gray); }
.lead-modal-box input, .lead-modal-box textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--gray-light); border-radius: 6px; font: inherit; box-sizing: border-box; }
.lead-modal-box button[type="submit"] { margin-top: 16px; border: none; cursor: pointer; }
.lead-honeypot { position: absolute; left: -9999px; top: -9999px; }
.lead-form-status { margin-top: 10px; font-size: .9rem; min-height: 1.2em; }
.lead-form-status.success { color: #1a7f37; }
.lead-form-status.error { color: var(--red); }
.specs-table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.specs-table th, .specs-table td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--gray-light); }
.specs-table th { color: var(--gray); font-weight: 600; width: 40%; }

/* New vehicles */
.new-vehicle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; margin-top: 24px; }
.new-vehicle-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.new-vehicle-card img { aspect-ratio: 4/3; object-fit: cover; background: var(--gray-light); }

/* Top-10 0km ranking (docs/veiculosNovos/) */
.veiculos-novos-top10 .vn-mes { color: var(--gray); font-weight: 600; margin: -8px 0 20px; }
.veiculos-novos-top10 .vn-intro p { max-width: 760px; }
.vn-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; margin: 28px 0; }
.vn-card { background: var(--white); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(0,0,0,.08); padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.vn-card-topo { display: flex; align-items: baseline; gap: 10px; }
.vn-posicao { background: var(--red); color: var(--white); font-weight: 800; font-size: .85rem; padding: 3px 10px; border-radius: 999px; flex: none; }
.vn-nome { font-size: 1.15rem; margin: 0; }
.vn-vendas { color: var(--gray); font-size: .85rem; margin: 0; }
.vn-preco { font-size: 1.1rem; margin: 4px 0; }
.vn-preco strong { color: var(--red); font-weight: 800; }
.vn-versao { color: var(--gray); font-weight: 400; font-size: .9rem; }
.vn-resumo { color: var(--ink); font-size: .92rem; margin: 0; }
.vn-specs, .vn-itens { list-style: none; padding: 0; margin: 6px 0; font-size: .87rem; color: var(--gray); display: flex; flex-direction: column; gap: 3px; }
.vn-specs strong { color: var(--ink); }
.vn-itens { border-top: 1px solid var(--gray-light); padding-top: 8px; }
.vn-itens li::before { content: "✓ "; color: var(--red); font-weight: 700; }
.vn-cta { display: inline-block; background: #25d366; color: #08331d; text-align: center; padding: 12px 20px; border-radius: var(--radius); font-weight: 700; margin-top: auto; }
.vn-cta:hover { background: #1ebe5a; }
.vn-rodape { color: var(--gray); font-size: .85rem; margin-top: 20px; max-width: 760px; }
.new-vehicle-body { padding: 16px; }
.highlights { padding-left: 18px; color: var(--gray); font-size: .92rem; margin: 10px 0; }

/* About / Contact */
.page-about, .page-contact { padding: 40px 20px 60px; max-width: 800px; }
.tagline { font-size: 1.2rem; color: var(--red); font-weight: 700; }
.location-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 16px 0 32px; }
.location-card { background: var(--white); border: 1px solid var(--gray-light); border-radius: var(--radius); padding: 18px; }
.services { padding-left: 20px; }
.social-links a { margin-right: 16px; font-weight: 600; }
.social-links a:hover { color: var(--red); }

.page-404 { text-align: center; padding: 80px 20px; }
.page-404 .btn { margin: 8px; }

/* WhatsApp floating button */
.whatsapp-fab {
  position: fixed; bottom: 20px; right: 20px; width: 56px; height: 56px;
  background: #25d366; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.25); z-index: 50;
}
.whatsapp-fab:hover { background: #1ebe5a; }

.site-footer { background: var(--ink); color: var(--gray-light); padding: 40px 0; margin-top: 40px; }
.footer-inner { text-align: center; }
.footer-inner p { margin: 6px 0; }
.footer-inner a:hover { color: var(--white); text-decoration: underline; }
.copy { color: #8a8a8a; font-size: .85rem; margin-top: 16px; }

/* Mobile */
@media (max-width: 820px) {
  .vehicle-layout { grid-template-columns: 1fr; }
  .vehicle-description-top { display: none; }
  .vehicle-description-bottom { display: block; }
  /* On mobile, size the photo box to the actual picture instead of a fixed
     4:3 frame - a portrait ("standing") photo inside a 4:3 landscape box gets
     heavily pillarboxed, wasting most of a small screen on grey fill. Desktop
     keeps the fixed box so the gallery doesn't jump around next to the info
     column as different-shaped photos are selected. */
  .gallery-main { aspect-ratio: auto; height: auto; }
  .hero h1 { font-size: 1.8rem; }
  .main-nav ul { display: none; flex-direction: column; gap: 0; position: absolute; top: 68px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--gray-light); padding: 8px 20px; }
  .nav-toggle:checked ~ ul { display: flex; }
  .nav-toggle-btn { display: block; font-size: 1.6rem; cursor: pointer; }
  .main-nav ul li { padding: 10px 0; border-bottom: 1px solid var(--gray-light); }
  .hero-search { flex-direction: column; }
}
