/* ============ Tokens ============ */
:root {
  --bg: #0a0a0c;
  --bg-alt: #111114;
  --surface: #17181c;
  --surface-2: #1e2024;
  --border: #2a2c31;
  --text: #f4f4f5;
  --text-dim: #a8adb5;
  --text-mute: #74787f;
  --red: #d81f2a;
  --red-dark: #a3161f;
  --gold: #f0b429;
  --green: #22c55e;
  --amber: #f59e0b;
  --whatsapp: #25d366;
  --whatsapp-dark: #1da851;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.25);
  --font-heading: "Poppins", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --max-width: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-heading); margin: 0; line-height: 1.2; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ============ Topbar ============ */
.topbar {
  background: #000;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-mute);
}
.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 20px;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 12, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  gap: 20px;
}
.brand { display: flex; align-items: center; }
.brand__logo { height: 46px; width: auto; border-radius: 6px; }
.main-nav { display: flex; gap: 28px; }
.main-nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dim);
  transition: color 0.15s;
  position: relative;
  padding: 6px 0;
}
.main-nav a:hover, .main-nav a.is-active { color: #fff; }
.main-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
}
.site-header__actions { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 20px;
  margin: 0 auto;
  background: #fff;
  border-radius: 2px;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--red); color: #fff; box-shadow: 0 8px 20px rgba(216, 31, 42, 0.35); }
.btn--primary:hover { background: var(--red-dark); }
.btn--ghost { background: transparent; color: #fff; border: 1.5px solid var(--border); }
.btn--ghost:hover { border-color: #fff; }
.btn--whatsapp { background: var(--whatsapp); color: #06210f; }
.btn--whatsapp:hover { background: var(--whatsapp-dark); }
.btn--sm { padding: 9px 16px; font-size: 0.82rem; }
.btn--lg { padding: 16px 34px; font-size: 1.05rem; }
.btn--block { width: 100%; margin-top: 18px; }

/* ============ WhatsApp float ============ */
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #06210f;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.45);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70% { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,12,0.55) 0%, rgba(10,10,12,0.75) 45%, rgba(10,10,12,0.97) 100%);
}
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding: 60px 0;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero__eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--gold); }
.hero__title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero__title span { color: var(--red); }
.hero__subtitle {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 520px;
  margin-bottom: 34px;
}
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero__stats {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 40px;
  margin-top: 56px;
  flex-wrap: wrap;
}
.hero__stat strong { display: block; font-family: var(--font-heading); font-size: 1.7rem; }
.hero__stat span { color: var(--text-mute); font-size: 0.85rem; }

/* ============ Sections ============ */
.section { padding: 76px 0; }
.section--tight { padding: 48px 0; }
.section__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.section__eyebrow {
  color: var(--red);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: block;
}
.section__title { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; }
.section__subtitle { color: var(--text-dim); margin-top: 10px; max-width: 560px; }

/* ============ Marcas ============ */
.brands { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.brands-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (min-width: 640px) { .brands-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 900px) { .brands-grid { grid-template-columns: repeat(9, 1fr); } }
.brand-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 10px;
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.brand-chip:hover { border-color: var(--red); transform: translateY(-3px); background: var(--surface-2); }

/* ============ Car grid / cards ============ */
.car-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.car-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.car-card:hover { transform: translateY(-5px); border-color: #3a3d44; box-shadow: var(--shadow); }
.car-card--sold { opacity: 0.72; }
.car-card__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: #000; }
.car-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.car-card:hover .car-card__media img { transform: scale(1.06); }
.car-card__badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; max-width: calc(100% - 20px); }
.car-card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.car-card__brand { font-size: 0.75rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.car-card__title { font-size: 1.12rem; font-weight: 700; }
.car-card__title a:hover { color: var(--red); }
.car-card__specs { display: flex; flex-wrap: wrap; gap: 6px 10px; color: var(--text-dim); font-size: 0.82rem; margin: 2px 0 6px; }
.car-card__specs li:not(:last-child)::after { content: "•"; margin-left: 10px; color: var(--text-mute); }
.car-card__price { font-family: var(--font-heading); font-size: 1.35rem; font-weight: 800; color: var(--gold); margin-top: 2px; }
.car-card__actions { display: flex; gap: 8px; margin-top: 10px; }
.car-card__actions .btn { flex: 1; }

/* ============ Badges ============ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  backdrop-filter: blur(4px);
}
.badge--selo { background: rgba(240, 180, 41, 0.18); color: var(--gold); border: 1px solid rgba(240, 180, 41, 0.4); }
.badge--disponivel { background: rgba(34, 197, 94, 0.18); color: var(--green); border: 1px solid rgba(34, 197, 94, 0.4); }
.badge--vendido { background: rgba(216, 31, 42, 0.2); color: #ff6b74; border: 1px solid rgba(216, 31, 42, 0.45); }
.badge--reservado { background: rgba(245, 158, 11, 0.18); color: var(--amber); border: 1px solid rgba(245, 158, 11, 0.4); }

/* ============ Filtros ============ */
.filters {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 34px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  align-items: end;
}
.filters__field { display: flex; flex-direction: column; gap: 6px; }
.filters__field label { font-size: 0.75rem; color: var(--text-mute); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.filters input, .filters select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: #fff;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  width: 100%;
}
.filters input:focus, .filters select:focus { outline: none; border-color: var(--red); }
.filters__actions { display: flex; gap: 10px; grid-column: 1 / -1; justify-content: flex-end; }
.filters__count { color: var(--text-dim); margin-bottom: 20px; font-size: 0.9rem; }
.empty-state { text-align: center; padding: 70px 20px; color: var(--text-dim); }
.empty-state h3 { color: #fff; margin-bottom: 10px; font-size: 1.3rem; }

/* ============ Sobre / trust cards ============ */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 44px; align-items: center; }
@media (min-width: 860px) { .about-grid { grid-template-columns: 1fr 1fr; } }
.about-media { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.about-media img { width: 100%; height: 100%; object-fit: cover; }
.about-text p { color: var(--text-dim); margin-top: 16px; font-size: 1.02rem; }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 42px; }
.trust-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
}
.trust-card__icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: rgba(216, 31, 42, 0.15);
  color: var(--red);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.trust-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.trust-card p { color: var(--text-dim); font-size: 0.92rem; }

/* ============ Localização ============ */
.location-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 900px) { .location-grid { grid-template-columns: 1.1fr 0.9fr; } }
.map-frame { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 4/3; }
.map-frame iframe { width: 100%; height: 100%; border: 0; }
.location-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.location-card__row { display: flex; gap: 14px; align-items: flex-start; }
.location-card__icon { color: var(--red); flex-shrink: 0; margin-top: 2px; }
.location-card__row h4 { font-size: 0.95rem; margin-bottom: 4px; }
.location-card__row p { color: var(--text-dim); font-size: 0.92rem; }

/* ============ CTA ============ */
.cta-section {
  background: linear-gradient(135deg, rgba(216,31,42,0.16), rgba(240,180,41,0.08));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta-section__inner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cta-section h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.cta-section p { color: var(--text-dim); max-width: 480px; }

/* ============ Footer ============ */
.site-footer { background: #000; border-top: 1px solid var(--border); padding-top: 56px; }
.footer__grid { display: grid; grid-template-columns: 1fr; gap: 36px; padding-bottom: 40px; }
@media (min-width: 760px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer__logo { height: 40px; margin-bottom: 14px; border-radius: 6px; }
.footer__brand p { color: var(--text-mute); font-size: 0.9rem; max-width: 320px; }
.footer__social { display: flex; gap: 14px; margin-top: 16px; }
.footer__social a { font-size: 0.85rem; font-weight: 700; color: var(--text-dim); border: 1px solid var(--border); padding: 8px 14px; border-radius: 999px; }
.footer__social a:hover { border-color: var(--red); color: #fff; }
.footer__col h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-mute); margin-bottom: 12px; }
.footer__col p { margin-bottom: 10px; color: var(--text-dim); font-size: 0.92rem; }
.footer__col a:hover { color: #fff; }
.footer__bottom {
  border-top: 1px solid var(--border);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-mute);
  font-size: 0.82rem;
}

/* ============ Vehicle detail ============ */
.breadcrumb { padding: 18px 20px 0; color: var(--text-mute); font-size: 0.85rem; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { margin: 0 4px; }
.vehicle-detail__grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 960px) { .vehicle-detail__grid { grid-template-columns: 1.3fr 1fr; } }
.gallery__main { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); position: relative; aspect-ratio: 3/2; background: #000; }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__status { position: absolute; top: 14px; left: 14px; }
.gallery__thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.gallery__thumb { width: 78px; height: 58px; flex-shrink: 0; border-radius: 8px; overflow: hidden; border: 2px solid var(--border); padding: 0; background: none; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb.is-active { border-color: var(--red); }
.vehicle-detail__brand { color: var(--text-mute); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: 0.8rem; }
.vehicle-detail__title { font-size: clamp(1.6rem, 3.4vw, 2.1rem); margin: 6px 0 14px; }
.vehicle-detail__badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.vehicle-detail__price { font-family: var(--font-heading); font-size: 2.1rem; font-weight: 800; color: var(--gold); margin-bottom: 18px; }
.vehicle-detail__quickspecs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 6px; }
.vehicle-detail__quickspecs li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 8px; text-align: center; }
.vehicle-detail__quickspecs strong { display: block; font-size: 0.95rem; }
.vehicle-detail__quickspecs span { display: block; font-size: 0.72rem; color: var(--text-mute); margin-top: 2px; }
.vehicle-detail__subtitle { font-size: 1.15rem; margin: 30px 0 14px; }
.specs-table { display: grid; grid-template-columns: 1fr; gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.specs-table__row { display: flex; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.specs-table__row:last-child { border-bottom: none; }
.specs-table__row dt { color: var(--text-mute); }
.specs-table__row dd { margin: 0; font-weight: 600; }
.vehicle-detail__bottom { display: grid; grid-template-columns: 1fr; gap: 40px; margin-top: 50px; }
@media (min-width: 860px) { .vehicle-detail__bottom { grid-template-columns: 1fr 1fr; } }
.vehicle-detail__description p { color: var(--text-dim); }
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 16px; }
.checklist__item { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--text); }
.checklist__item svg { color: var(--green); flex-shrink: 0; }
.checklist__item--off { color: var(--text-mute); opacity: 0.45; }
.checklist__item--off svg { color: var(--text-mute); }

/* ============ Página inicial extras ============ */
.featured-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 30px; flex-wrap: wrap; gap: 16px; }

/* ============ Responsivo header ============ */
@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(320px, 82vw);
    background: var(--bg-alt);
    border-left: 1px solid var(--border);
    flex-direction: column;
    padding: 90px 28px 28px;
    gap: 22px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 150;
  }
  .main-nav.is-open { transform: translateX(0); }
  .nav-toggle { display: flex; }
  .site-header__actions .btn--sm span { display: none; }
  .vehicle-detail__quickspecs { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .site-header__actions .btn { padding: 10px 14px; }
  .hero { min-height: 92vh; }
}

/* ============ Página 404 ============ */
.notfound { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 18px; padding: 60px 20px; }
.notfound h1 { font-size: 5rem; color: var(--red); }
