:root {
  --ink: #0a0a0a;
  --ink-deep: #000000;
  --ink-mid: #1c1c1c;
  --white: #ffffff;
  --gray: #f4f4f5;
  --gray-2: #e4e4e7;
  --silver: #c8c8c8;
  --red: #e10600;
  --red-hover: #b80500;
  --text: #141414;
  --muted: #5c5c5c;
  --danger: #b00020;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.08);
  --radius: 14px;
  --header-h: 4.75rem;
  --max: 1180px;
  --font: "Source Sans 3", "Segoe UI", sans-serif;
  --display: "Cormorant Garamond", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

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

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

a {
  color: inherit;
}

address {
  font-style: normal;
}

button,
input,
select,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 1000;
  background: var(--white);
  color: var(--ink);
  padding: 0.75rem 1rem;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--red-hover);
}

.btn-secondary {
  background: var(--white);
  color: var(--ink);
  border-color: var(--silver);
}

.btn-secondary:hover {
  border-color: var(--red);
  color: var(--red);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-text {
  background: none;
  color: var(--ink-mid);
  min-height: 44px;
  padding-inline: 0.5rem;
}

.btn-text:hover {
  color: var(--red);
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  color: var(--white);
  transition: background 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  background: var(--ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.header-inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.logo-img {
  display: block;
  height: 3.35rem;
  width: auto;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45));
}

.logo-footer .logo-img {
  height: 4.4rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-list {
  display: flex;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  text-decoration: none;
  font-weight: 500;
  color: inherit;
}

.nav-list a:hover {
  color: var(--red);
}

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before {
  top: -7px;
}

.nav-toggle-bars::after {
  top: 7px;
}

.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  align-items: end;
  color: var(--white);
  margin-top: calc(var(--header-h) * -1);
  padding-top: var(--header-h);
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.72) 48%, rgba(0, 0, 0, 0.88) 100%);
}

.hero-content {
  position: relative;
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 5rem 0 7.5rem;
  max-width: 760px;
  justify-self: center;
}

.hero-location {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(225, 6, 0, 0.65);
  border-radius: 999px;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--silver);
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 1rem;
}

.hero-subtitle {
  margin: 0 0 2rem;
  font-size: 1.15rem;
  max-width: 38rem;
  color: rgba(255, 255, 255, 0.88);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.busca-estoque {
  position: relative;
  z-index: 3;
  margin-top: -3.5rem;
  margin-bottom: 1rem;
}

.busca-card {
  background: var(--white);
  border: 1px solid var(--gray-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.busca-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr 0.8fr auto;
  gap: 0.9rem;
  align-items: end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field span,
.field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--gray-2);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  background: var(--white);
  color: var(--text);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--red);
}

.busca-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 12rem;
}

.estoque,
.sobre,
.contato {
  padding: 4.5rem 0;
}

.estoque {
  background: var(--gray);
}

.section-header {
  max-width: 40rem;
  margin-bottom: 2.2rem;
}

.section-header h2,
.sobre-texto h2,
.modal-body h2,
.contato-local h3 {
  font-family: var(--display);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  line-height: 1.15;
  margin: 0 0 0.7rem;
  color: var(--ink);
}

.section-header p,
.sobre-texto p {
  margin: 0;
  color: var(--muted);
}

.result-count {
  margin-top: 1rem !important;
  font-weight: 600;
  color: var(--ink) !important;
}

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.vehicle-card {
  background: var(--white);
  border: 1px solid var(--gray-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.vehicle-card.is-featured {
  border-color: var(--red);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #dfe3e8;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-badge {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  background: var(--red);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--red);
}

.card-body {
  padding: 1.15rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.card-brand {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-body h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.7rem;
  line-height: 1.1;
  color: var(--ink);
}

.card-version,
.card-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.card-price {
  margin: 0.6rem 0 0.9rem;
  font-family: var(--display);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--ink);
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: auto;
}

.card-actions .btn {
  width: 100%;
}

.empty-state {
  text-align: center;
  background: var(--white);
  border: 1px dashed var(--silver);
  border-radius: var(--radius);
  padding: 2.5rem 1rem;
  color: var(--muted);
}

.sobre {
  background: var(--white);
}

.sobre-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.sobre-media img {
  width: 100%;
  height: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.sobre-texto p {
  margin-bottom: 1.5rem !important;
  font-size: 1.08rem;
}

.contato {
  background: var(--gray);
}

.contato-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
}

.contato-form,
.contato-local {
  background: var(--white);
  border: 1px solid var(--gray-2);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
}

.contato-form {
  display: grid;
  gap: 1rem;
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

.field-error {
  margin: 0;
  color: var(--danger);
  font-size: 0.85rem;
}

.form-feedback {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: #f3f3f3;
  color: var(--ink);
  border-left: 3px solid var(--red);
}

.contato-local h3 {
  font-size: 1.8rem;
}

.contato-local address {
  margin: 0 0 1rem;
  color: var(--muted);
}

.canais-contato p {
  margin: 0 0 0.4rem;
  color: var(--muted);
}

.canais-contato a {
  color: var(--red);
}

.mapa {
  margin: 1rem 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--gray-2);
  min-height: 240px;
}

.mapa iframe {
  width: 100%;
  height: 240px;
  border: 0;
}

.site-footer {
  background: var(--ink-deep);
  color: var(--white);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.footer-brand address,
.copyright {
  color: var(--silver);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.footer-links a,
.link-button {
  color: var(--white);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.footer-links a:hover,
.link-button:hover {
  color: var(--red);
}

.copyright {
  width: min(100% - 2rem, var(--max));
  margin: 2rem auto 0;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(197, 205, 214, 0.2);
  font-size: 0.9rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  background: var(--white);
  width: min(100%, 920px);
  max-height: min(92vh, 860px);
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.modal-veiculo {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  max-height: min(92vh, 860px);
  min-height: 0;
}

.modal-privacidade {
  width: min(100%, 640px);
}

.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.modal-gallery {
  position: relative;
  background: #d7dce3;
  min-height: 280px;
  min-width: 0;
}

.modal-gallery img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  max-height: min(92vh, 860px);
  object-fit: cover;
}

.gallery-nav {
  position: absolute;
  inset: auto 0.7rem 3rem;
  display: flex;
  justify-content: space-between;
}

.gallery-nav[hidden] {
  display: none;
}

.gallery-nav button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 1.6rem;
  cursor: pointer;
}

.modal-body {
  padding: 1.35rem 1.4rem 1.4rem;
  overflow: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.modal-body .btn {
  margin-top: auto;
  flex-shrink: 0;
}

.modal-version {
  color: var(--muted);
  margin: 0 0 0.4rem;
}

.ficha {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.35rem 0.8rem;
  margin: 0 0 0.8rem;
}

.ficha dt {
  color: var(--muted);
  font-weight: 600;
}

.ficha dd {
  margin: 0;
}

body.modal-open {
  overflow: hidden;
}

body.modal-open .site-header {
  z-index: 0;
}

@media (max-width: 1024px) {
  .busca-grid {
    grid-template-columns: 1fr 1fr;
  }

  .vehicle-grid {
    grid-template-columns: 1fr 1fr;
  }

  .sobre-grid,
  .contato-grid,
  .modal-veiculo,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav {
    display: none;
    position: absolute;
    inset: var(--header-h) 0 auto;
    background: var(--ink);
    padding: 1rem 1.25rem 1.4rem;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .site-header.is-open .nav {
    display: flex;
  }

  .nav-list {
    flex-direction: column;
    gap: 0.2rem;
  }

  .nav-list a,
  .header-cta {
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  .header-cta {
    justify-content: center;
  }

  .site-header.is-open .header-cta {
    background: var(--red);
    color: var(--white);
  }

  .logo-img {
    height: 2.85rem;
  }

  .busca-grid,
  .vehicle-grid,
  .card-actions {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 80vh;
  }

  .hero-content {
    padding: 4rem 0 6rem;
  }

  .busca-estoque {
    margin-top: -2.2rem;
  }

  .estoque,
  .sobre,
  .contato {
    padding: 3.2rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
