/* Zé Maria Automóveis — Fonte 5 (stack de sistema) */
:root {
  --navy: #002878;
  --navy-dark: #001a52;
  --red: #dc0014;
  --red-dark: #b3000f;
  --bg: #f7f8fa;
  --white: #ffffff;
  --text: #1b1f27;
  --text-muted: #5b6472;
  --border: #e2e5ea;
  --radius: 10px;
  --font: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: opacity 0.15s, background-color 0.15s;
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { opacity: 0.88; }
.btn-secondary { background: var(--white); color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: var(--white); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; border-radius: 8px; }

.icon-link { display: inline-flex; align-items: center; gap: 6px; }
.icon-inline { width: 16px; height: 16px; flex-shrink: 0; }

/* Topbar (I1) */
.topbar {
  background: var(--navy-dark);
  color: #cdd8f5;
  font-size: 0.8rem;
}
.topbar .container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
}
.topbar a:hover { color: #fff; }

/* Header (J2 — 2 linhas) */
.site-header { background: var(--white); border-bottom: 1px solid var(--border); }
.header-row-1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--navy); }
.brand img { height: 42px; width: auto; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.header-phone { display: none; font-weight: 600; color: var(--navy); white-space: nowrap; }

.header-row-2 { border-top: 1px solid var(--border); }
.nav-full {
  display: flex;
  justify-content: center;
}
.nav-links {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 28px;
}
.nav-links a {
  display: block;
  padding: 12px 0;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  border-bottom: 3px solid transparent;
}
.nav-links a:hover, .nav-links a.active { color: var(--navy); border-color: var(--red); }

.menu-toggle {
  background: none;
  border: 2px solid var(--navy);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.menu-toggle span { display: block; width: 20px; height: 2px; background: var(--navy); margin: 4px 0; }

.mobile-nav {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--border);
  padding: 6px 0;
}
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 12px 20px; font-weight: 600; border-bottom: 1px solid var(--border); }

@media (min-width: 760px) {
  .header-phone { display: block; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none !important; }
  .nav-links { display: flex; }
}

/* Hero estático (imagem Unsplash) */
.hero-static {
  position: relative;
  height: 300px;
  color: #fff;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}
.hero-static::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,20,60,0.35) 0%, rgba(0,10,40,0.85) 100%);
}
.hero-static-content { position: relative; padding: 28px 20px 34px; max-width: 640px; }
.hero-static-content h1 { font-size: 1.5rem; margin: 0 0 10px; line-height: 1.25; }
.hero-static-content p { margin: 0 0 18px; color: #dfe6f7; font-size: 0.92rem; }

@media (min-width: 760px) {
  .hero-static { height: 360px; }
  .hero-static-content h1 { font-size: 2rem; }
  .hero-static-content p { font-size: 1rem; }
}

/* Busca horizontal (home) — sobrepõe a base do hero */
.home-busca-wrap { padding: 0; margin-top: -28px; position: relative; z-index: 3; }
.home-busca {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0,20,60,0.12);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.home-busca-field { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.home-busca-field label { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.home-busca-field input, .home-busca-field select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
}
.home-busca-field input:focus, .home-busca-field select:focus { outline: none; border-color: var(--navy); }
.home-busca-btn { white-space: nowrap; }

@media (min-width: 760px) {
  .home-busca-wrap { margin-top: -32px; }
  .home-busca { flex-direction: row; align-items: flex-end; padding: 20px; }
  .home-busca-field-search { flex: 2; }
}

/* Section shell */
section { padding: 48px 0; }
.section-head { margin-bottom: 26px; text-align: center; }
.section-head h2 { font-size: 1.5rem; margin: 0 0 8px; color: var(--navy); }
.section-head p { color: var(--text-muted); margin: 0; }

/* Vitrine (C2) */
.grid-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 560px) { .grid-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-cards { grid-template-columns: repeat(3, 1fr); } }

/* Card de veículo (E1: imagem > título > preço > specs > botão) — card inteiro clicável */
.car-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.car-card:hover { border-color: var(--navy); }
.car-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #eef0f4; }
.car-card-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.car-card-body h3 {
  font-size: 1rem;
  margin: 0;
  line-height: 1.3;
  min-height: calc(1.3em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.car-card-price { font-size: 1.15rem; font-weight: 700; color: var(--navy); }
.car-card-specs { font-size: 0.92rem; color: var(--text); font-weight: 600; }
.car-card-body .btn { margin-top: 8px; align-self: flex-start; pointer-events: none; transition: background-color 0.15s, color 0.15s; }
.car-card:hover .car-card-body .btn-secondary { background: var(--navy); color: var(--white); }

.center-cta { text-align: center; margin-top: 28px; }

/* Institucional */
.institucional { background: var(--white); }
.institucional blockquote {
  font-size: 1.3rem;
  font-style: italic;
  color: var(--navy);
  margin: 0 0 18px;
  border-left: 4px solid var(--red);
  padding-left: 18px;
}
.institucional p { color: var(--text-muted); max-width: 720px; }

/* Valores (Qualidade/Honestidade/Atendimento) */
.valores { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 700px) { .valores { grid-template-columns: repeat(3, 1fr); } }
.valor-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
}
.valor-card .icon { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--red); }
.valor-card h3 { margin: 0 0 6px; font-size: 1.05rem; color: var(--navy); }
.valor-card p { margin: 0; font-size: 0.88rem; color: var(--text-muted); }

/* Venda seu veículo */
.venda-cta {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}
.venda-cta h2 { margin: 0; font-size: 1.4rem; }
.venda-cta p { margin: 0; color: #cdd8f5; }
@media (min-width: 760px) {
  .venda-cta { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* Localização */
.mapa-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.mapa-wrap iframe { width: 100%; height: 320px; border: 0; display: block; }

/* Footer (F1) */
.site-footer { background: var(--navy-dark); color: #cdd8f5; padding: 36px 0 22px; margin-top: 20px; }
.site-footer .container { display: flex; flex-direction: column; gap: 14px; }
.site-footer h3 { color: #fff; margin: 0 0 4px; font-size: 1.05rem; }
.footer-contacts { display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 14px; font-size: 0.78rem; color: #93a1c4; }

/* WhatsApp float */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  border: none;
  transition: filter 0.15s;
}
.whatsapp-float:hover { filter: brightness(1.08); }
.whatsapp-float svg { width: 30px; height: 30px; }

/* ===== Listagem (G1 sidebar) ===== */
/* Painel de filtros usa Tailwind CDN (preflight:false) inline em veiculos.html;
   aqui só o container da grade sidebar+conteúdo. */
.listagem-shell { display: block; }
@media (min-width: 860px) {
  .listagem-shell { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
}

/* ===== Detalhe (H1 grid thumbnails) ===== */
.detalhe-shell { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 900px) { .detalhe-shell { grid-template-columns: 1.3fr 1fr; } }

.galeria-principal { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); margin-bottom: 10px; }
.galeria-principal img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.galeria-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.galeria-thumbs img {
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.75;
}
.galeria-thumbs img.active { border-color: var(--red); opacity: 1; }

.detalhe-info h1 { font-size: 1.4rem; margin: 0 0 8px; color: var(--navy); }
.detalhe-price { font-size: 1.7rem; font-weight: 700; color: var(--red); margin: 6px 0 18px; }

.specs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
.spec-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}
.spec-item span { display: block; font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }
.spec-item strong { font-size: 0.95rem; }

.destaques-list { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.destaques-list li { padding-left: 22px; position: relative; font-size: 0.92rem; }
.destaques-list li::before { content: "✓"; position: absolute; left: 0; color: var(--red); font-weight: 700; }

.voltar-link { display: inline-block; margin-bottom: 18px; font-weight: 600; color: var(--navy); }
.voltar-link:hover { color: var(--red); }

.descricao-texto { color: var(--text-muted); margin-bottom: 22px; }

.similares-title { margin-top: 8px; }
