/* ==========================================================================
   AutoElite — Tema Luxo Escuro (Premium)
   Compartilhado entre index.html, catalogo.html e admin.html
   ========================================================================== */

:root {
  /* Paleta */
  --bg:        #0b0d10;
  --bg-2:      #111418;
  --surface:   #161a20;
  --surface-2: #1d222a;
  --border:    #262c36;
  --border-2:  #333b47;

  --text:      #eef1f5;
  --muted:     #9aa4b2;
  --muted-2:   #6b7482;

  --gold:      #e4fb00;
  --gold-2:    #eaff3c;
  --gold-soft: rgba(228, 251, 0, 0.14);

  --green:     #37b26a;
  --red:       #e2564d;
  --blue:      #4a90d9;

  --shadow:    0 20px 45px -20px rgba(0,0,0,0.7);
  --shadow-sm: 0 6px 20px -10px rgba(0,0,0,0.6);
  --radius:    16px;
  --radius-sm: 10px;
  --maxw:      1240px;

  --ff-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ff-serif: "Playfair Display", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--ff-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}

/* ------- Tipografia ------- */
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.15; font-weight: 700; }
.serif { font-family: var(--ff-serif); font-weight: 700; letter-spacing: .3px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 14px;
}
.text-gold { color: var(--gold-2); }
.muted { color: var(--muted); }

/* ==========================================================================
   Header / Navegação
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11,13,16,0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--ff-serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .5px;
}
.brand .logo-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #0b0d10;
  font-weight: 800;
  font-family: var(--ff-sans);
  font-size: 18px;
  box-shadow: 0 6px 18px -6px rgba(228,251,0,.6);
}
.brand span.hl { color: var(--gold-2); }

.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  padding: 9px 16px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  transition: .2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active { color: var(--gold-2); }

.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #0b0d10;
  font-weight: 700;
  font-size: 14px;
  border: none;
  transition: .2s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgba(228,251,0,.7); }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--border-2);
  border-radius: 8px; color: var(--text);
  width: 44px; height: 42px; font-size: 20px;
}

/* ==========================================================================
   Botões
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 22px;
  border-radius: 10px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text);
  font-weight: 600; font-size: 15px;
  transition: .2s;
}
.btn:hover { border-color: var(--gold); color: var(--gold-2); }
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #0b0d10; border: none;
}
.btn-primary:hover { transform: translateY(-1px); color: #0b0d10; box-shadow: 0 12px 26px -12px rgba(228,251,0,.7); }
.btn-ghost { background: transparent; }
.btn-danger { border-color: rgba(226,86,77,.4); color: #f0918a; }
.btn-danger:hover { background: rgba(226,86,77,.12); border-color: var(--red); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* ==========================================================================
   Hero (Home)
   ========================================================================== */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex; align-items: center;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(228,251,0,.14), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M0 59h60M59 0v60' fill='none' stroke='%23ffffff08' stroke-width='1'/%3E%3C/svg%3E");
  opacity: .5; pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; max-width: 720px; padding: 60px 22px; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); margin-bottom: 18px; }
.hero p { font-size: clamp(1rem, 2vw, 1.25rem); color: var(--muted); max-width: 560px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats {
  display: flex; gap: 42px; margin-top: 54px; flex-wrap: wrap;
}
.hero-stats .stat b { display: block; font-family: var(--ff-serif); font-size: 2rem; color: var(--gold-2); }
.hero-stats .stat span { color: var(--muted); font-size: 14px; }

/* ==========================================================================
   Seções genéricas
   ========================================================================== */
.section { padding: 90px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 42px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.section-head p { color: var(--muted); max-width: 520px; margin: 0; }

.bg-alt { background: var(--bg-2); }

/* Faixa de destaques / benefícios */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 20px; }
.feature {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 24px; transition: .25s;
}
.feature:hover { border-color: var(--border-2); transform: translateY(-4px); }
.feature .ico {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 16px;
  background: var(--gold-soft); color: var(--gold-2); font-size: 22px;
}
.feature h3 { font-size: 18px; }
.feature p { color: var(--muted); font-size: 14px; margin: 0; }

/* ==========================================================================
   Grid de veículos / Cards
   ========================================================================== */
.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 26px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: .25s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); border-color: var(--border-2); box-shadow: var(--shadow); }
.card-media { position: relative; aspect-ratio: 16/10; background: var(--surface-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: .4s; }
.card:hover .card-media img { transform: scale(1.06); }
.card-media .no-photo { width:100%; height:100%; display:grid; place-items:center; color: var(--muted-2); font-size: 40px; }

.badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; backdrop-filter: blur(6px);
}
.badge-armor { background: rgba(74,144,217,.85); color: #fff; }
.badge-feat  { background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #0b0d10; }
.badge-sold  { background: rgba(226,86,77,.9); color:#fff; }

.card-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-title { font-size: 19px; font-weight: 700; }
.card-sub { color: var(--muted); font-size: 13px; margin-top: -6px; }
.card-specs { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 13px; }
.card-specs span { display: inline-flex; align-items: center; gap: 6px; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--border); }
.card-price { font-family: var(--ff-serif); font-size: 22px; color: var(--gold-2); font-weight: 700; }

/* ==========================================================================
   Catálogo — layout com filtros
   ========================================================================== */
.catalog-layout { display: grid; grid-template-columns: 290px 1fr; gap: 32px; align-items: start; }

.filters {
  position: sticky; top: 92px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.filters h3 { font-size: 16px; display: flex; align-items: center; justify-content: space-between; }
.filter-group { margin-top: 22px; }
.filter-group > label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 10px; font-weight: 600; }

.field {
  width: 100%; padding: 11px 13px;
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); color: var(--text); font-size: 14px;
  transition: .2s;
}
.field:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
select.field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239aa4b2' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px; }

.range-row { display: flex; align-items: center; gap: 10px; }
.range-row .field { text-align: center; }
.range-row span { color: var(--muted-2); }

.chip-toggle { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-2);
  background: var(--bg-2); color: var(--muted); font-size: 13px; font-weight: 600; transition: .2s;
}
.chip.active { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-2); }

.catalog-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 24px; flex-wrap: wrap;
}
.result-count { color: var(--muted); font-size: 14px; }
.result-count b { color: var(--text); }

.search-box { position: relative; flex: 1; max-width: 420px; }
.search-box .field { padding-left: 42px; }
.search-box .s-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted-2); }

.empty-state {
  text-align: center; padding: 80px 20px; color: var(--muted);
  border: 1px dashed var(--border-2); border-radius: var(--radius); background: var(--surface);
}
.empty-state .ico { font-size: 48px; margin-bottom: 14px; opacity:.6; }

.mobile-filter-btn { display: none; }

/* ==========================================================================
   Modal (detalhe do veículo)
   ========================================================================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(4,6,9,.78); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--radius); width: 100%; max-width: 940px; max-height: 92vh;
  overflow: auto; box-shadow: var(--shadow);
}
.modal-media { position: relative; }
.modal-gallery { aspect-ratio: 16/9; background: var(--bg); }
.modal-gallery img { width: 100%; height: 100%; object-fit: cover; }
.modal-thumbs { display: flex; gap: 10px; padding: 12px; overflow-x: auto; background: var(--bg-2); }
.modal-thumbs img { width: 84px; height: 58px; object-fit: cover; border-radius: 8px; border: 2px solid transparent; cursor: pointer; opacity:.6; }
.modal-thumbs img.active { border-color: var(--gold); opacity: 1; }
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 42px; height: 42px; border-radius: 50%; border: none;
  background: rgba(0,0,0,.55); color: #fff; font-size: 22px; backdrop-filter: blur(4px);
}
.modal-body { padding: 28px; }
.modal-body h2 { font-size: 28px; }
.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0; }
.spec-item { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; }
.spec-item small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.spec-item b { display: block; margin-top: 4px; font-size: 15px; }
.modal-price { font-family: var(--ff-serif); font-size: 34px; color: var(--gold-2); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--border); padding: 60px 0 30px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-grid p { color: var(--muted); font-size: 14px; max-width: 320px; }
.footer-col h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 16px; }
.footer-col a { display: block; color: var(--text); padding: 5px 0; font-size: 14px; }
.footer-col a:hover { color: var(--gold-2); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted-2); font-size: 13px; }

/* ==========================================================================
   Admin / cPanel
   ========================================================================== */
.admin-body { background: var(--bg); }
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side {
  background: var(--bg-2); border-right: 1px solid var(--border); padding: 22px 16px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-side .brand { font-size: 18px; margin-bottom: 30px; }
.admin-nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px;
  color: var(--muted); font-weight: 500; font-size: 15px; margin-bottom: 4px; transition: .2s;
}
.admin-nav a:hover { background: var(--surface); color: var(--text); }
.admin-nav a.active { background: var(--gold-soft); color: var(--gold-2); }
.admin-main { padding: 32px; max-width: 1100px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; flex-wrap: wrap; gap: 16px; }
.admin-topbar h1 { font-size: 26px; margin: 0; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 34px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.stat-card small { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.stat-card b { display: block; font-family: var(--ff-serif); font-size: 2.1rem; color: var(--text); margin-top: 6px; }
.stat-card.gold b { color: var(--gold-2); }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; margin-bottom: 26px; }
.panel > h2 { font-size: 20px; margin-bottom: 4px; }
.panel > .sub { color: var(--muted); font-size: 14px; margin-bottom: 22px; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.form-field .req { color: var(--gold-2); }
textarea.field { resize: vertical; min-height: 90px; font-family: inherit; }

.switch-field { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--border-2); border-radius: 999px; transition: .2s; }
.switch .track::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .track { background: var(--gold); }
.switch input:checked + .track::before { transform: translateX(20px); }

/* Uploader / Compressor */
.dropzone {
  border: 2px dashed var(--border-2); border-radius: var(--radius);
  padding: 34px; text-align: center; color: var(--muted); transition: .2s; cursor: pointer;
  background: var(--bg-2);
}
.dropzone:hover, .dropzone.drag { border-color: var(--gold); color: var(--gold-2); background: var(--gold-soft); }
.dropzone .big { font-size: 40px; margin-bottom: 10px; opacity:.7; }
.dropzone small { display:block; margin-top: 6px; font-size: 12px; color: var(--muted-2); }

.thumbs-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(120px, 100%), 1fr)); gap: 14px; margin-top: 18px; }
.thumb-card { position: relative; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border-2); background: var(--bg-2); }
.thumb-card img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.thumb-card .meta { padding: 7px 8px; font-size: 11px; color: var(--muted); }
.thumb-card .meta .save { color: var(--green); font-weight: 700; }
.thumb-card .rm { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: none; background: rgba(0,0,0,.6); color: #fff; font-size: 15px; }
.thumb-card .cover-tag { position: absolute; bottom: 34px; left: 6px; background: var(--gold); color:#0b0d10; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px; text-transform: uppercase; }

.compress-summary { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 16px; padding: 14px 18px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; }
.compress-summary .s b { color: var(--gold-2); font-size: 17px; display:block; }
.compress-summary .s small { color: var(--muted); }

/* Tabela de veículos (admin) */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--border); }
table.data th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
table.data tr:hover td { background: var(--bg-2); }
table.data .t-media { width: 64px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.pill { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.pill-on { background: rgba(55,178,106,.15); color: #5cd08a; }
.pill-off { background: rgba(226,86,77,.15); color: #f0918a; }
.row-actions { display: flex; gap: 8px; }
.icon-btn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border-2); background: var(--bg-2); color: var(--muted); display: grid; place-items: center; font-size: 15px; transition:.2s; }
.icon-btn:hover { color: var(--text); border-color: var(--gold); }
.icon-btn.danger:hover { color: #fff; background: rgba(226,86,77,.2); border-color: var(--red); }

/* Toast */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 500; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--surface-2); border: 1px solid var(--border-2); border-left: 3px solid var(--gold);
  border-radius: 10px; padding: 14px 18px; min-width: 240px; box-shadow: var(--shadow);
  animation: slideIn .25s ease; font-size: 14px;
}
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: none; opacity: 1; } }

/* Login gate */
.login-gate { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--radius); padding: 34px; text-align: center; box-shadow: var(--shadow); }
.login-card .brand { justify-content: center; margin-bottom: 8px; }
.login-card p { color: var(--muted); font-size: 14px; margin-bottom: 24px; }

.helper { font-size: 12px; color: var(--muted-2); margin-top: 6px; }

/* Utilidades */
.hidden { display: none !important; }
.flex { display: flex; }
.gap-12 { gap: 12px; }
.mt-20 { margin-top: 20px; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Responsivo
   ========================================================================== */
@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .catalog-layout { grid-template-columns: 1fr; }
  .filters {
    position: fixed; inset: 0; z-index: 250; border-radius: 0;
    transform: translateX(-100%); transition: transform .3s; overflow-y: auto; max-width: 340px;
  }
  .filters.open { transform: none; }
  .mobile-filter-btn { display: inline-flex; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side {
    position: fixed; z-index: 260; transform: translateX(-100%); transition: .3s; width: 240px;
  }
  .admin-side.open { transform: none; }
  .admin-main { padding: 20px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-links, .nav > .nav-cta { display: none; }
  .nav-links.open {
    display: flex; position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 12px 22px 20px;
  }
  .nav-links.open a { padding: 12px 14px; }
  .nav-toggle { display: block; }
  .hero { min-height: 80vh; }
  .hero-stats { gap: 26px; }
  .section { padding: 60px 0; }
  .form-grid { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .admin-main { padding: 16px; }
}

/* ==========================================================================
   Logo (marca 2B Motors)
   ========================================================================== */
.brand .logo-img { height: 44px; width: auto; display: block; }
.site-footer .brand .logo-img { height: 62px; }
.login-card .brand .logo-img { height: 58px; }
.admin-side .brand .logo-img { height: 40px; }
@media (max-width: 720px) { .brand .logo-img { height: 38px; } }

/* ==========================================================================
   Seção social — Instagram (carrossel) + YouTube
   ========================================================================== */
.social-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: stretch; }
.social-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
}
.social-card-head { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.ig-avatar {
  width: 48px; height: 48px; border-radius: 50%; flex: none; padding: 2px;
  background: linear-gradient(45deg,#feda75,#fa7e1e,#d62976,#962fbf,#4f5bd5);
}
.ig-avatar img, .ig-avatar span {
  width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); object-fit: cover;
}
.ig-avatar span { font-weight: 800; color: var(--gold-2); font-size: 15px; }
.social-handle b { display: block; font-size: 15px; }
.social-handle small { color: var(--muted); font-size: 13px; }
.social-card-head .btn { margin-left: auto; }
.social-card-head .yt-logo { color: #ff0033; font-size: 26px; margin-right: 2px; }

/* Carrossel IG */
.ig-carousel { position: relative; flex: 1; }
.ig-track {
  display: flex; gap: 3px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; scrollbar-width: none;
}
.ig-track::-webkit-scrollbar { display: none; }
.ig-post {
  position: relative; flex: 0 0 calc(33.333% - 2px); aspect-ratio: 1;
  scroll-snap-align: start; overflow: hidden; background: var(--surface-2);
}
.ig-post img { width: 100%; height: 100%; object-fit: cover; transition: .4s; }
.ig-post:hover img { transform: scale(1.07); }
.ig-post .ig-ov {
  position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 12px;
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.72));
  color: #fff; font-size: 12px; opacity: 0; transition: .25s;
}
.ig-post:hover .ig-ov { opacity: 1; }
.ig-post .ig-tag { position: absolute; top: 8px; right: 8px; font-size: 14px; opacity: .9; }
.ig-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(11,13,16,.75); color: #fff; font-size: 18px; backdrop-filter: blur(4px);
  display: grid; place-items: center; transition: .2s;
}
.ig-nav:hover { background: var(--gold); color: #0b0d10; }
.ig-nav.prev { left: 10px; } .ig-nav.next { right: 10px; }
.ig-foot { padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }

/* YouTube lite (carrega o player só ao clicar → site leve) */
.yt-lite {
  position: relative; flex: 1; min-height: 300px; cursor: pointer;
  background-size: cover; background-position: center; background-color: #000;
}
.yt-lite::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.5));
}
.yt-lite .yt-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 78px; height: 54px; border-radius: 14px; border: none;
  background: #ff0033; color: #fff; font-size: 26px; display: grid; place-items: center;
  box-shadow: 0 10px 30px -8px rgba(255,0,51,.6); transition: .2s;
}
.yt-lite:hover .yt-play { transform: translate(-50%,-50%) scale(1.08); background: #ff1a47; }
.yt-lite iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ==========================================================================
   Seção Endereço & Contato
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 26px; align-items: stretch; }
.contact-info { display: flex; flex-direction: column; gap: 6px; }
.contact-item {
  display: flex; gap: 16px; align-items: flex-start; padding: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: .2s;
}
.contact-item + .contact-item { margin-top: 14px; }
.contact-item:hover { border-color: var(--border-2); }
.contact-item .ci-ico {
  width: 46px; height: 46px; flex: none; border-radius: 12px;
  display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-2); font-size: 20px;
}
.contact-item small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.contact-item b { display: block; font-size: 16px; margin-top: 3px; }
.contact-item a { color: var(--text); }
.contact-item a:hover { color: var(--gold-2); }
.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); min-height: 340px; }
.map-embed iframe { width: 100%; height: 100%; min-height: 340px; border: 0; display: block; filter: grayscale(.3) contrast(1.05); }

@media (max-width: 900px) {
  .social-grid, .contact-grid { grid-template-columns: 1fr; }
  .ig-post { flex: 0 0 calc(50% - 2px); }
  .yt-lite { min-height: 240px; }
}
@media (max-width: 560px) {
  .ig-post { flex: 0 0 calc(75% - 2px); }
}

/* Área do feed do Instagram (conteúdo servido pelo próprio site) */
.ig-widget { flex: 1; min-height: 360px; padding: 4px 4px 0; }
@media (max-width: 900px) { .ig-widget { min-height: 300px; } }


/* ==========================================================================
   Correções e componentes adicionados na revisão
   ========================================================================== */

/* Impede qualquer rolagem horizontal acidental */
html, body { max-width: 100%; overflow-x: hidden; }
img, iframe, video, canvas { max-width: 100%; }

/* Link de pular navegação (acessibilidade / teclado) */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--gold, #e6ff00); color: #0b0d10;
  padding: 12px 18px; font-weight: 700; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Texto só para leitor de tela */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Foco visível em todos os controles */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, .card:focus-visible,
.dropzone:focus-visible, .yt-lite:focus-visible {
  outline: 2px solid var(--gold, #e6ff00);
  outline-offset: 3px;
}

/* Botão flutuante de WhatsApp */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: #25d366; color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
  transition: transform .2s, box-shadow .2s;
}
.wa-float:hover { transform: scale(1.07); box-shadow: 0 10px 30px rgba(0, 0, 0, .55); }
@media (max-width: 720px) { .wa-float { right: 16px; bottom: 16px; } }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Esqueleto do feed do Instagram enquanto o iframe não carrega */
.ig-skeleton {
  min-height: 340px; display: grid; place-items: center;
  color: var(--muted, #8b94a3); font-size: 14px;
  background: linear-gradient(90deg, rgba(255,255,255,.02), rgba(255,255,255,.05), rgba(255,255,255,.02));
}

/* Painel de aviso do admin */
.panel.aviso {
  border-color: rgba(230, 255, 0, .35);
  background: rgba(230, 255, 0, .05);
}

/* Indicador de progresso do compressor */
.spin { display: inline-block; animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Telas bem estreitas */
@media (max-width: 560px) {
  .hero-stats { flex-wrap: wrap; gap: 20px; }
  .spec-grid { grid-template-columns: 1fr 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
}

/* Galeria das páginas estáticas por veículo */
.veiculo-galeria {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}
.veiculo-galeria img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  border-radius: var(--radius, 14px); border: 1px solid var(--border, rgba(255,255,255,.08));
}
.veiculo-galeria img:first-child { grid-column: 1 / -1; aspect-ratio: 16/9; }

/* Telas muito estreitas (iPhone SE e similares) */
@media (max-width: 380px) {
  .container { padding: 0 16px; }
  .hero-inner { padding: 48px 16px; }
  .contact-item { padding: 16px; gap: 12px; }
  .contact-item .ci-ico { width: 38px; height: 38px; font-size: 17px; }
  .contact-item > div { min-width: 0; }
  .contact-item b { word-break: break-word; }
}

/* Cabeçalhos de seção não podem estourar a largura em telas estreitas */
.section-head { flex-wrap: wrap; }
.section-head > * { min-width: 0; max-width: 100%; }
.section-head p, .section-head h1, .section-head h2 { overflow-wrap: break-word; }

/* ==========================================================================
   Banner de consentimento (LGPD)
   ========================================================================== */
.consent-bar {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 400;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  padding: 18px 22px;
  background: var(--bg-2, #12151a);
  border: 1px solid var(--border, rgba(255,255,255,.1));
  border-radius: var(--radius, 14px);
  box-shadow: 0 18px 50px rgba(0,0,0,.55);
  transform: translateY(140%); opacity: 0;
  transition: transform .35s ease, opacity .35s ease;
}
.consent-bar.visivel { transform: none; opacity: 1; }
.consent-txt { display: flex; flex-direction: column; gap: 4px; max-width: 640px; min-width: 0; }
.consent-txt b { font-size: 15px; }
.consent-txt span { color: var(--muted, #8b94a3); font-size: 13.5px; line-height: 1.5; }
.consent-acoes { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.consent-link { color: var(--muted, #8b94a3); font-size: 13px; text-decoration: underline; }
.consent-link:hover { color: var(--gold-2, #e4fb00); }
@media (max-width: 720px) {
  .consent-bar { left: 10px; right: 10px; bottom: 10px; padding: 16px; }
  .consent-acoes { width: 100%; }
  .consent-acoes .btn { flex: 1; justify-content: center; }
  .consent-link { width: 100%; text-align: center; margin-top: 4px; }
}

/* ==========================================================================
   Perguntas frequentes
   ========================================================================== */
.faq { display: grid; gap: 12px; max-width: 860px; }
.faq-item {
  background: var(--surface, #12151a);
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: var(--radius, 14px);
  overflow: hidden; transition: border-color .2s;
}
.faq-item[open] { border-color: var(--border-2, rgba(255,255,255,.16)); }
.faq-item summary {
  cursor: pointer; list-style: none;
  padding: 20px 56px 20px 22px; position: relative;
  font-weight: 600; font-size: 16.5px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%;
  transform: translateY(-50%); font-size: 22px; line-height: 1;
  color: var(--gold-2, #e4fb00); transition: transform .2s;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item summary:hover { background: rgba(255,255,255,.02); }
.faq-resposta { padding: 0 22px 22px; }
.faq-resposta p { color: var(--muted, #8b94a3); margin: 0; line-height: 1.65; max-width: 68ch; }

/* Lista de links rastreáveis (injetada pelo gerador de páginas) */
.indice-seo { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border, rgba(255,255,255,.08)); }
.indice-seo h2 { font-size: 15px; color: var(--muted, #8b94a3); margin-bottom: 14px; font-weight: 600; }
.indice-seo ul { display: flex; flex-wrap: wrap; gap: 8px 16px; list-style: none; padding: 0; margin: 0; }
.indice-seo a { color: var(--muted, #8b94a3); font-size: 13.5px; }
.indice-seo a:hover { color: var(--gold-2, #e4fb00); }

/* ==========================================================================
   Feed do Instagram servido pelo próprio site
   ========================================================================== */
.ig-grade {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
}
.ig-item {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: rgba(255, 255, 255, .03);
  border-radius: 6px;
}
.ig-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s ease, opacity .25s ease;
}
.ig-item:hover img { transform: scale(1.06); opacity: .82; }
.ig-item::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(transparent 62%, rgba(0, 0, 0, .35));
  opacity: 0; transition: opacity .25s;
}
.ig-item:hover::after { opacity: 1; }
.ig-video, .ig-carrossel {
  position: absolute; top: 7px; right: 8px; z-index: 2;
  font-size: 12px; line-height: 1;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .8);
  pointer-events: none;
}
@media (max-width: 420px) {
  .ig-grade { gap: 3px; padding: 3px; }
}

/* Estado da seção do Instagram quando o feed ainda não está configurado */
.ig-convite {
  min-height: 340px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px; padding: 30px 24px; text-align: center;
}
.ig-convite-ico { font-size: 30px; opacity: .55; }
.ig-convite p { color: var(--muted, #8b94a3); font-size: 14.5px; max-width: 34ch; margin: 0; }

/* ==========================================================================
   Revisão de interface e desempenho
   ========================================================================== */

/* O atributo hidden perdia para display:inline-flex dos botões — o
   "Carregar mais" aparecia mesmo sem mais nada para carregar. */
[hidden] { display: none !important; }

/* Títulos com quebra de linha equilibrada (evita uma palavra órfã) */
h1, h2, h3, .hero p, .section-head p { text-wrap: balance; }


/* --- Esqueleto de carregamento --- */
.card-skel { pointer-events: none; }
.skel {
  background: linear-gradient(90deg, var(--surface-2) 25%, #252b34 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: skel 1.4s ease-in-out infinite;
  border-radius: 6px;
}
.skel-t { height: 14px; margin: 6px 0; }
@keyframes skel { to { background-position: -200% 0; } }

/* --- Entrada suave das seções --- */
/* Só esconde quando o JavaScript está rodando (classe .js no <html>).
   Sem JS, nada fica invisível. */
.js .revelar { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.js .revelar.visivel { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .revelar { opacity: 1; transform: none; transition: none; } }

/* --- Hero: mais respiro e uma foto opcional ---
   Para usar uma foto, salve assets/img/hero.jpg (1920px de largura,
   escura de preferência). Sem o arquivo, fica o degradê. */
.hero { min-height: min(88vh, 860px); }
.hero.tem-foto {
  background:
    linear-gradient(90deg, rgba(11,13,16,.96) 0%, rgba(11,13,16,.82) 45%, rgba(11,13,16,.35) 100%),
    var(--hero-foto) center/cover no-repeat;
}
.hero.tem-foto::after { opacity: .25; }
.hero h1 { line-height: 1.05; letter-spacing: -.01em; }
.hero-stats .stat b { font-size: clamp(1.6rem, 3vw, 2.1rem); }

/* --- Cards: hierarquia mais clara --- */
.card { transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease; }
.card-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(11,13,16,.45));
  pointer-events: none;
}
.card-title { line-height: 1.25; }
.card-price { letter-spacing: -.01em; }
.badge { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* --- Botões: resposta ao toque --- */
.btn { transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary:hover { box-shadow: 0 12px 28px -12px rgba(228,251,0,.7); }

/* --- Cabeçalho: linha de destaque sutil ao rolar --- */
.site-header { transition: box-shadow .25s, background .25s; }
.site-header.rolou { box-shadow: 0 8px 30px -18px rgba(0,0,0,.9); background: rgba(11,13,16,.92); }

/* --- Mapa leve (antes de carregar o iframe) --- */
.map-lite {
  cursor: pointer;
  display: grid; place-items: center;
  min-height: 320px;
  background:
    radial-gradient(400px 220px at 70% 30%, rgba(228,251,0,.08), transparent 70%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s, transform .2s;
}
.map-lite:hover { border-color: var(--border-2); }
.map-lite-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 28px; }
.map-lite-inner b { font-size: 15px; max-width: 30ch; }
.map-pin { font-size: 34px; margin-bottom: 4px; }
.map-lite-link { font-size: 13px; color: var(--muted); text-decoration: underline; margin-top: 10px; }
.map-lite-link:hover { color: var(--gold-2); }
.map-embed iframe { width: 100%; min-height: 320px; height: 100%; border: 0; border-radius: var(--radius); }

/* --- Catálogo: filtros fixos no desktop --- */
@media (min-width: 981px) {
  .filters { position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow-y: auto; }
}
.chip.active { box-shadow: 0 0 0 1px var(--gold) inset; }

/* --- Modal: entrada mais suave --- */
.modal-overlay .modal { transform: translateY(14px) scale(.985); opacity: 0; transition: transform .28s ease, opacity .22s ease; }
.modal-overlay.open .modal { transform: none; opacity: 1; }

/* --- Ritmo de espaçamento no celular --- */
@media (max-width: 720px) {
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 28px; }
  .hero { min-height: min(80vh, 720px); }
  .hero-inner { padding-top: 40px; padding-bottom: 40px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
}
