/* ============================================================
   AUTO CERTO PELOTAS — site público (vitrine de estoque)
   Direção: sóbrio, automotivo, estoque em primeiro lugar.
   Tipos: Archivo (display) + Instrument Sans (texto)
   ============================================================ */

:root {
  --bg: #f4f3f1;
  --surface: #ffffff;
  --ink: #17171a;
  --ink-2: #595962;
  --ink-3: #8b8b94;
  --line: #e4e3df;
  --line-strong: #d2d1cc;
  --red: oklch(0.51 0.19 18);
  --red-deep: oklch(0.44 0.18 18);
  --red-soft: oklch(0.51 0.19 18 / 0.08);
  --green: #1faa53;
  --green-deep: #178a43;
  --dark: #141417;
  --dark-2: #1c1c21;
  --dark-line: #2a2a31;
  --dark-text: #a3a3ad;
  --display: "Archivo", "Helvetica Neue", Helvetica, sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Helvetica, sans-serif;
  --radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.lucide { width: 18px; height: 18px; stroke-width: 1.8; flex: none; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--body); font-weight: 600; font-size: 15px;
  padding: 13px 24px; border-radius: 8px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn .lucide { width: 17px; height: 17px; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-deep); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgb(255 255 255 / 0.35); }
.btn-ghost-light:hover { border-color: #fff; }
.btn-whats { background: var(--green); color: #fff; }
.btn-whats:hover { background: var(--green-deep); }
.btn-sm { padding: 9px 16px; font-size: 14px; border-radius: 7px; }

/* ---------- header ---------- */
.topbar {
  background: var(--dark); color: var(--dark-text);
  font-size: 13px; padding: 8px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.topbar-info { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar-item { display: inline-flex; align-items: center; gap: 7px; }
.topbar-item .lucide { width: 14px; height: 14px; opacity: .7; }
.topbar-social { display: flex; gap: 16px; }
.topbar-social a { color: var(--dark-text); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.topbar-social a:hover { color: #fff; }

.navbar {
  background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 68px; min-width: 0; }
.brand { text-decoration: none; line-height: 1; }
.brand-main {
  font-family: var(--display); font-weight: 800; font-size: 22px;
  letter-spacing: 0.01em; color: var(--ink);
}
.brand-main em { font-style: normal; color: var(--red); }
.brand-sub { font-size: 10px; letter-spacing: 0.34em; color: var(--ink-3); font-weight: 600; margin-top: 3px; }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  text-decoration: none; font-size: 14px; font-weight: 600; color: var(--ink-2);
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; gap: 10px; align-items: center; }

/* ---------- hero ---------- */
.hero { background: var(--dark); color: #fff; position: relative; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px; align-items: center; padding: 72px 0 76px;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: oklch(0.72 0.13 18); margin-bottom: 20px;
}
.hero-kicker::before { content: ""; width: 22px; height: 2px; background: var(--red); }
.hero h1 {
  font-family: var(--display); font-weight: 800; font-size: clamp(38px, 4.6vw, 56px);
  line-height: 1.04; letter-spacing: -0.015em; text-wrap: balance; margin-bottom: 18px;
}
.hero h1 em { font-style: normal; color: oklch(0.66 0.19 18); }
.hero-sub { font-size: 17px; color: rgb(255 255 255 / 0.66); max-width: 46ch; text-wrap: pretty; margin-bottom: 30px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 34px; }
.hero-points { display: flex; gap: 24px; flex-wrap: wrap; }
.hero-point { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: rgb(255 255 255 / 0.6); }
.hero-point .lucide { width: 15px; height: 15px; color: oklch(0.66 0.19 18); }

.hero-photo { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--dark-line); }
.hero-photo img { width: 100%; height: 380px; object-fit: cover; }
.hero-photo-tag {
  position: absolute; left: 14px; bottom: 14px;
  background: rgb(20 20 23 / 0.82); backdrop-filter: blur(6px);
  border: 1px solid rgb(255 255 255 / 0.12); border-radius: 8px;
  padding: 10px 14px; font-size: 13px;
}
.hero-photo-tag strong { display: block; font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: 0.01em; }
.hero-photo-tag span { color: rgb(255 255 255 / 0.6); font-size: 12.5px; }

/* ---------- faixa de confiança ---------- */
.trust { background: var(--surface); border-bottom: 1px solid var(--line); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust-item { display: flex; gap: 14px; padding: 26px 24px; align-items: flex-start; }
.trust-item + .trust-item { border-left: 1px solid var(--line); }
.trust-item .lucide { width: 22px; height: 22px; color: var(--red); margin-top: 2px; }
.trust-item h3 { font-family: var(--display); font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.trust-item p { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }

/* ---------- estoque ---------- */
.stock { padding: 64px 0 80px; }
.stock-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; flex-wrap: wrap; }
.section-kicker {
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--red); margin-bottom: 8px;
}
.stock-head h2, .section-title {
  font-family: var(--display); font-weight: 800; font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.01em; line-height: 1.1;
}
.stock-count { font-size: 14px; color: var(--ink-2); }
.stock-count strong { color: var(--ink); font-weight: 700; }
.stock-updated { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-3); }
.stock-updated .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.stock-toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; margin-bottom: 28px;
}
.stock-search { position: relative; flex: 1 1 240px; }
.stock-search .lucide { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-3); }
.stock-search input {
  width: 100%; padding: 11px 12px 11px 38px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  font-family: var(--body); font-size: 14.5px; background: var(--bg); color: var(--ink);
}
.stock-search input:focus { outline: 2px solid var(--red-soft); border-color: var(--red); }
.stock-toolbar select {
  padding: 11px 34px 11px 12px; border: 1px solid var(--line-strong); border-radius: 8px;
  font-family: var(--body); font-size: 14px; font-weight: 500; color: var(--ink);
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23595962' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none; cursor: pointer;
}
.toolbar-clear { font-size: 13.5px; font-weight: 600; color: var(--ink-3); background: none; border: none; cursor: pointer; padding: 8px 10px; font-family: var(--body); display: none; }
.toolbar-clear:hover { color: var(--red); }
.toolbar-clear.visible { display: inline-block; }

.stock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; }

.car-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; display: flex; flex-direction: column;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.car-card:hover { border-color: var(--line-strong); box-shadow: 0 10px 28px rgb(23 23 26 / 0.09); transform: translateY(-2px); }
.car-photo { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #e9e8e4; }
.car-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.car-card:hover .car-photo img { transform: scale(1.03); }
.car-photo-empty {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 800; letter-spacing: 0.1em; color: var(--ink-3); font-size: 14px;
  background: repeating-linear-gradient(45deg, #ecebe7 0 14px, #e6e5e1 14px 28px);
}
.car-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--dark); color: #fff; font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 6px;
}
.car-photos-count {
  position: absolute; right: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 5px;
  background: rgb(20 20 23 / 0.7); color: #fff; font-size: 12px; font-weight: 600;
  padding: 5px 9px; border-radius: 6px; backdrop-filter: blur(4px);
}
.car-photos-count .lucide { width: 13px; height: 13px; }
.car-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.car-title-row { display: flex; flex-direction: column; gap: 2px; }
.car-brand { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.car-title {
  font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1.25;
  letter-spacing: 0.005em; text-transform: uppercase;
}
.car-specs { display: flex; flex-wrap: wrap; gap: 6px; }
.car-spec {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 4px 9px;
}
.car-spec .lucide { width: 13px; height: 13px; color: var(--ink-3); }
.car-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 4px; }
.car-price-label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.car-price { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.car-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 700; color: var(--red); text-decoration: none;
}
.car-cta .lucide { width: 15px; height: 15px; transition: transform .15s; }
.car-card:hover .car-cta .lucide { transform: translateX(3px); }

.stock-empty {
  grid-column: 1 / -1; background: var(--surface); border: 1px dashed var(--line-strong);
  border-radius: var(--radius); padding: 48px 24px; text-align: center; color: var(--ink-2);
}
.stock-empty strong { display: block; font-family: var(--display); font-size: 17px; color: var(--ink); margin-bottom: 6px; }

/* ---------- modal de detalhe ---------- */
.detail-overlay {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgb(20 20 23 / 0.62); backdrop-filter: blur(4px);
  padding: 4vh 20px; overflow-y: auto;
}
.detail-overlay.open { display: block; }
.detail-sheet {
  max-width: 1060px; margin: 0 auto; background: var(--surface);
  border-radius: 14px; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}
.detail-gallery { background: var(--dark); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.detail-main-photo { border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; background: #232328; }
.detail-main-photo img { width: 100%; height: 100%; object-fit: cover; }
.detail-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.detail-thumb {
  border-radius: 7px; overflow: hidden; aspect-ratio: 4 / 3; cursor: pointer;
  border: 2px solid transparent; padding: 0; background: #232328;
}
.detail-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .65; transition: opacity .15s; }
.detail-thumb:hover img { opacity: .9; }
.detail-thumb.active { border-color: var(--red); }
.detail-thumb.active img { opacity: 1; }
.detail-info { padding: 28px 28px 26px; display: flex; flex-direction: column; gap: 18px; position: relative; }
.detail-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--ink-2);
}
.detail-close:hover { border-color: var(--ink); color: var(--ink); }
.detail-brand { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.detail-title { font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1.15; text-transform: uppercase; letter-spacing: 0; padding-right: 40px; }
.detail-price-row { display: flex; align-items: baseline; gap: 10px; }
.detail-price { font-family: var(--display); font-weight: 800; font-size: 32px; letter-spacing: -0.01em; color: var(--red); }
.detail-price-note { font-size: 13px; color: var(--ink-3); }
.detail-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.detail-spec { background: var(--surface); padding: 11px 14px; }
.detail-spec dt { font-size: 11.5px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 1px; }
.detail-spec dd { font-size: 14.5px; font-weight: 600; }
.detail-opts h4, .detail-obs h4 { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.detail-opts-list { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-opt { font-size: 13px; font-weight: 500; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; }
.detail-obs p { font-size: 14.5px; color: var(--ink-2); }
.detail-ctas { display: flex; flex-direction: column; gap: 9px; margin-top: auto; }
.detail-ctas .btn { width: 100%; }
.detail-foot-note { font-size: 12.5px; color: var(--ink-3); text-align: center; }

/* ---------- avaliação / troca ---------- */
.trade { background: var(--dark); color: #fff; padding: 68px 0; }
.trade-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.trade h2 { font-family: var(--display); font-weight: 800; font-size: clamp(26px, 3vw, 34px); line-height: 1.12; letter-spacing: -0.01em; margin-bottom: 14px; }
.trade p { color: rgb(255 255 255 / 0.62); font-size: 16px; text-wrap: pretty; max-width: 42ch; }
.trade-steps { margin-top: 26px; display: flex; flex-direction: column; gap: 12px; }
.trade-step { display: flex; gap: 12px; align-items: baseline; font-size: 14.5px; color: rgb(255 255 255 / 0.78); }
.trade-step b { font-family: var(--display); color: oklch(0.66 0.19 18); font-size: 13px; }
.trade-form {
  background: var(--dark-2); border: 1px solid var(--dark-line); border-radius: 14px; padding: 26px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.trade-field { display: flex; flex-direction: column; gap: 6px; }
.trade-field.full { grid-column: 1 / -1; }
.trade-field label { font-size: 12.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--dark-text); }
.trade-field input, .trade-field select {
  padding: 12px 14px; border-radius: 8px; border: 1px solid var(--dark-line);
  background: var(--dark); color: #fff; font-family: var(--body); font-size: 15px;
}
.trade-field input::placeholder { color: #5b5b66; }
.trade-field input:focus, .trade-field select:focus { outline: none; border-color: var(--red); }
.trade-form .btn { grid-column: 1 / -1; margin-top: 4px; }
.trade-privacy { grid-column: 1 / -1; font-size: 12px; color: #6b6b76; text-align: center; }

/* ---------- a loja ---------- */
.store { padding: 72px 0; }
.store-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.store h2 { margin-bottom: 16px; }
.store-text p { color: var(--ink-2); margin-bottom: 14px; text-wrap: pretty; }
.store-text blockquote {
  border-left: 3px solid var(--red); padding: 4px 0 4px 18px; margin: 22px 0;
  font-size: 16.5px; font-style: italic; color: var(--ink);
}
.store-text cite { display: block; font-style: normal; font-size: 13.5px; color: var(--ink-3); margin-top: 6px; }
.store-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 24px; }
.store-fact { background: var(--surface); padding: 16px; display: flex; gap: 11px; align-items: flex-start; }
.store-fact .lucide { width: 18px; height: 18px; color: var(--red); margin-top: 2px; }
.store-fact strong { display: block; font-size: 14px; }
.store-fact span { font-size: 13px; color: var(--ink-2); }
.store-map {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface);
}
.store-map-canvas {
  aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, #efeeea 0 16px, #e9e8e4 16px 32px);
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; color: var(--ink-3);
  text-align: center; padding: 20px;
}
.store-map-foot { padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.store-map-foot strong { font-size: 14.5px; display: block; }
.store-map-foot span { font-size: 13px; color: var(--ink-2); }

/* ---------- footer ---------- */
.footer { background: var(--dark); color: var(--dark-text); padding: 56px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 44px; }
.footer-brand .brand-main { color: #fff; }
.footer-brand p { font-size: 14px; margin-top: 14px; max-width: 36ch; text-wrap: pretty; }
.footer h4 { font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer a { color: var(--dark-text); text-decoration: none; font-size: 14px; }
.footer a:hover { color: #fff; }
.footer li { font-size: 14px; }
.footer-bottom { border-top: 1px solid var(--dark-line); padding: 18px 0; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: #6b6b76; }

/* ---------- whatsapp flutuante ---------- */
.whats-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 150;
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--green); color: #fff; text-decoration: none;
  font-weight: 700; font-size: 14.5px; padding: 14px 20px; border-radius: 999px;
  box-shadow: 0 10px 26px rgb(31 170 83 / 0.4);
  transition: transform .15s, background .15s;
}
.whats-float:hover { transform: translateY(-2px); background: var(--green-deep); }
.whats-float .lucide { width: 19px; height: 19px; }

/* ---------- responsivo ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; padding: 52px 0 56px; gap: 32px; }
  .hero-photo img { height: 300px; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .trust-item:nth-child(3) { border-left: none; }
  .trust-item:nth-child(n+3) { border-top: 1px solid var(--line); }
  .detail-sheet { grid-template-columns: 1fr; }
  .trade-grid, .store-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 620px) {
  .topbar-social { display: none; }
  .nav-actions .btn-phone-top { display: none; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-item { border-left: none !important; }
  .trust-item + .trust-item { border-top: 1px solid var(--line); }
  .trade-form { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .stock-grid { grid-template-columns: 1fr; }
  .detail-overlay { padding: 0; }
  .detail-sheet { border-radius: 0; min-height: 100vh; }
}
