/* Vitrine — Tema 1 (site público). Independente do Tailwind do painel.
   Variáveis de cor da loja (--cor, --cor-texto, --cor-escura) vêm inline no <head>. */
:root {
  --fundo: #f6f6f4;
  --papel: #ffffff;
  --texto: #16181d;
  --mudo: #5b616b;
  --linha: #e4e4de;
  --wa: #11774a;
  --wa-texto: #ffffff;
  --raio: 14px;
  --sombra: 0 1px 2px rgba(20, 22, 28, .06), 0 6px 18px rgba(20, 22, 28, .07);
  --fonte: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Segoe UI", Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--fundo); color: var(--texto);
  font-family: var(--fonte); font-size: 1rem; line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cor-escura); }
h1, h2, h3, p, ul, dl, figure { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--cor-escura); outline-offset: 2px; border-radius: 4px; }
.ico { width: 1.25em; height: 1.25em; flex: none; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.pular { position: absolute; left: -999px; top: 8px; background: var(--papel); color: var(--texto); padding: 10px 14px; border-radius: 8px; z-index: 50; }
.pular:focus { left: 8px; }

/* ---------- topo ---------- */
.topo { background: var(--papel); border-bottom: 1px solid var(--linha); position: sticky; top: 0; z-index: 20; }
.topo-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.marca { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--texto); min-width: 0; }
.logo { height: 56px; width: auto; max-width: 220px; object-fit: contain; object-position: left center; }
@media (max-width: 639px) { .logo { height: 46px; max-width: 170px; } }
/* Topo escuro (Configurar site → Aparência): pra logo com parte branca, que some no topo branco. */
.topo-escuro { background: #111318; border-bottom-color: #111318; }
.topo-escuro .marca { color: #fff; }
.topo-escuro .idiomas { background: rgba(255, 255, 255, .1); }
.topo-escuro .idiomas a { color: #c9cbd0; }
.topo-escuro .idiomas a[aria-current] { background: #fff; color: #111318; }
.marca-nome { font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topo-acoes { display: flex; align-items: center; gap: 8px; flex: none; }
.idiomas { display: flex; background: var(--fundo); border-radius: 999px; padding: 3px; }
.idiomas a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 10px; border-radius: 999px; font-size: .875rem; font-weight: 600; text-decoration: none; color: var(--mudo); }
.idiomas a[aria-current] { background: var(--papel); color: var(--texto); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.btn-icone { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--cor); color: var(--cor-texto); }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px; border-radius: 12px; border: 0; font: inherit; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; text-align: center; line-height: 1.2; }
.btn-wa { background: var(--wa); color: var(--wa-texto); }
.btn-cor { background: var(--cor); color: var(--cor-texto); }
.btn-sec { background: var(--papel); color: var(--texto); border: 1.5px solid var(--linha); }
.btn-bloco { width: 100%; }
.btn:hover { filter: brightness(.94); }

/* ---------- hero ---------- */
.hero { position: relative; color: #fff; background: linear-gradient(135deg, var(--cor-escura), #111318); overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-capa::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, .68)); }
.hero-in { position: relative; z-index: 1; padding-top: 44px; padding-bottom: 44px; min-height: 260px; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 12px; }
.hero h1 { font-size: clamp(1.75rem, 6vw, 2.75rem); line-height: 1.1; letter-spacing: -.02em; }
.hero-sub { max-width: 40rem; font-size: 1.0625rem; opacity: .95; }

/* ---------- seções ---------- */
.secao { padding-top: 28px; padding-bottom: 12px; }
.titulo-secao { font-size: 1.375rem; margin-bottom: 14px; letter-spacing: -.01em; }
.texto-longo, .pre, .descricao { white-space: pre-line; overflow-wrap: anywhere; }
.texto-longo { max-width: 46rem; }

/* ---------- busca da capa e linha de seletores ---------- */
.hero-busca .hero-in { align-items: center; text-align: center; justify-content: center; padding-top: 40px; padding-bottom: 44px; min-height: 0; }
.hero-busca .hero-sub { margin-inline: auto; }
.hero-busca-form { width: 100%; max-width: 640px; margin-top: 8px; display: flex; align-items: center; gap: 8px; background: #fff; color: var(--texto); border-radius: 999px; padding: 6px 6px 6px 20px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.hero-busca-form .ico { color: var(--mudo); }
.hero-busca-form input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--texto); font: inherit; font-size: 1.05rem; min-height: 44px; }
.hero-busca-form:focus-within { box-shadow: 0 0 0 3px var(--cor), 0 10px 30px rgba(0, 0, 0, .3); }
.hero-busca-form button { border: 0; background: var(--cor); color: var(--cor-texto); border-radius: 999px; min-height: 46px; padding: 0 24px; font: inherit; font-weight: 700; cursor: pointer; }
.hero-sug { font-size: .9rem; opacity: .95; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
.hero-sug a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .6); padding: 8px 0 2px; }
.g-meio { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.g-sels { display: flex; gap: 8px; }
.g-sel { position: relative; display: inline-flex; align-items: center; gap: 6px; background: var(--papel); border-radius: 10px; box-shadow: var(--sombra); padding: 0 12px; height: 44px; font-weight: 600; font-size: .9rem; }
.g-sel::after { content: "\25BE"; color: var(--mudo); }
.g-sel select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; /* 16px: o iPhone não dá zoom ao abrir */ }
.g-sel:focus-within { outline: 3px solid var(--cor-escura); outline-offset: 2px; }
.g-sel-val { color: var(--texto); max-width: 9.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-sel-rot { color: var(--mudo); }
.g-meio .link-limpar { padding: 0 2px; }
.link-limpar { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.contador { margin: 0; color: var(--mudo); font-weight: 600; }
.sem-resultado { padding: 28px 0; color: var(--mudo); }
.paginas { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 28px; flex-wrap: wrap; }
.pg-nums { display: flex; gap: 6px; }
.pg-n, .pg-seta { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 10px; background: var(--papel); box-shadow: var(--sombra); color: var(--texto); font-weight: 700; text-decoration: none; }
.pg-atual { background: var(--cor); color: var(--cor-texto); }
.pg-off { opacity: .4; box-shadow: none; }
.pg-reti { display: inline-flex; align-items: end; padding: 0 2px; color: var(--mudo); }
@media (max-width: 639px) { .pg-seta { padding: 0 10px; font-size: .9rem; } }

/* ---------- grade de carros ---------- */
.grade { display: grid; grid-template-columns: 1fr; gap: 18px; }
.card { display: block; background: var(--papel); border-radius: var(--raio); box-shadow: var(--sombra); overflow: hidden; text-decoration: none; color: inherit; height: 100%; transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-2px); }
.card-foto { position: relative; aspect-ratio: 3 / 2; background: #e9e9e4; overflow: hidden; }
.card-foto img { width: 100%; height: 100%; object-fit: cover; }
.card-vendido .card-foto img { filter: grayscale(.55); opacity: .85; }
.card-corpo { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.card-titulo { font-size: 1.1875rem; line-height: 1.25; letter-spacing: -.01em; }
.card-grade { color: var(--mudo); font-size: .9375rem; }
.card-meta { color: var(--mudo); font-size: .9375rem; margin-top: 4px; }
.preco-card { margin-top: 10px; font-size: 1.625rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.selo { position: absolute; top: 12px; left: 12px; background: #16181d; color: #fff; font-weight: 800; font-size: .875rem; letter-spacing: .04em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; }
.selo-grande { top: 14px; left: 14px; font-size: 1rem; padding: 8px 16px; z-index: 2; }

.vazio { background: var(--papel); border-radius: var(--raio); box-shadow: var(--sombra); text-align: center; padding: 44px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.vazio h2 { font-size: 1.5rem; }
.vazio p { color: var(--mudo); max-width: 30rem; }

.faixa-fin { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; padding: 16px 20px; border-radius: var(--raio); background: var(--cor); color: var(--cor-texto); text-decoration: none; margin-top: 12px; }
.faixa-fin::after { content: "\203A"; font-size: 1.75rem; line-height: 1; }

/* ---------- como chegar ---------- */
.chegar { display: grid; gap: 18px; grid-template-columns: 1fr; }
.contatos { display: grid; gap: 14px; align-content: start; }
.contatos dt { font-size: .8125rem; font-weight: 700; color: var(--mudo); text-transform: uppercase; letter-spacing: .04em; }
.contatos dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.contatos a { display: inline-block; padding: 8px 0; }
.mapa { border-radius: var(--raio); overflow: hidden; box-shadow: var(--sombra); aspect-ratio: 4 / 3; background: #e9e9e4; }
.mapa iframe { width: 100%; height: 100%; border: 0; }
.acoes-contato { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.redes { display: flex; gap: 10px; margin-top: 16px; }
.redes a { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--papel); border: 1.5px solid var(--linha); color: var(--texto); }
.redes .ico { width: 1.4rem; height: 1.4rem; }

/* ---------- rodapé ---------- */
.rodape { margin-top: 40px; background: #16181d; color: #d7d9de; padding: 28px 0 36px; }
.rodape a { color: #fff; display: inline-block; padding: 8px 0; }
.rodape-nome { font-weight: 700; color: #fff; font-size: 1.0625rem; }
.rodape-pe { font-size: .875rem; margin-top: 8px; color: #b9bcc4; }

/* ---------- página do carro ---------- */
.carro-pag { padding-top: 12px; padding-bottom: 32px; }
.voltar { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; text-decoration: none; }
/* minmax(0, 1fr) e min-width 0: sem isso a coluna cresce até a largura de TODAS as fotos da
   galeria somadas (min-content) e a página do carro vaza pra direita no celular. */
.carro-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); margin-top: 4px;
  /* Celular: as 4 áreas empilhadas. TEM que estar declarado: com grid-area nomeada e sem
     template, o navegador cria colunas implícitas e a página do carro se desmonta. */
  grid-template-areas: "galeria" "info" "desc" "fin"; }
.galeria-col, .info-col, .desc-col, .fin-col { min-width: 0; }
.galeria-col { grid-area: galeria; }
.info-col { grid-area: info; }
.desc-col { grid-area: desc; }
.fin-col { grid-area: fin; }
.fin-col .faixa-fin { margin-top: 0; }
.desc-col .titulo-bloco { margin-top: 0; }
.galeria-moldura { position: relative; border-radius: var(--raio); overflow: hidden; background: #e9e9e4; box-shadow: var(--sombra); }
.galeria { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.galeria::-webkit-scrollbar { display: none; }
/* Fotos do sistema são 3:2 (2000x1333). Moldura 3:2 + contain: a foto aparece INTEIRA, nunca
   cortada; foto de outro formato ganha faixa neutra em vez de perder pedaço do carro. */
.slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 3 / 2; margin: 0; }
.slide img { width: 100%; height: 100%; object-fit: contain; }
.gal-seta { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 999px;
  border: 0; background: rgba(255, 255, 255, .92); color: #111; box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1.5rem; line-height: 1; }
.gal-seta:hover { background: #fff; }
.gal-seta:disabled { opacity: .35; cursor: default; }
.gal-ant { left: 10px; }
.gal-prox { right: 10px; }
.contador-foto { position: absolute; right: 12px; bottom: 12px; background: rgba(0, 0, 0, .72); color: #fff; font-size: .8125rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.miniaturas { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 4px; scrollbar-width: thin; }
.miniaturas li { flex: none; }
.miniaturas a { display: block; width: 76px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; opacity: .75; }
.miniaturas a.ativa { border-color: var(--cor-escura); opacity: 1; }
.miniaturas img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

.carro-titulo { font-size: clamp(1.5rem, 5vw, 2.125rem); line-height: 1.15; letter-spacing: -.02em; }
.carro-grade { color: var(--mudo); margin-top: 2px; }
.preco-box { background: var(--papel); border-radius: var(--raio); box-shadow: var(--sombra); padding: 18px; margin-top: 16px; border-left: 5px solid var(--cor); }
.preco-grande { font-size: clamp(2.125rem, 9vw, 2.75rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.aviso-vendido { margin-top: 16px; padding: 16px; background: var(--papel); border-radius: var(--raio); box-shadow: var(--sombra); }
.acoes { display: grid; gap: 10px; margin-top: 24px; }
.acoes-desktop { display: none; }

/* Ficha: 3 destaques (ano, km, shaken) + lista leve. <dl>: no DOM a legenda (dt) vem antes do
   valor (dd); na tela o valor fica em cima (order). */
.fb-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.fb-top > div { background: var(--papel); border-radius: 12px; box-shadow: var(--sombra); padding: 12px 6px;
  text-align: center; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.ico-tr { width: 26px; height: 26px; flex: none; color: var(--cor); }
.fb-top .ico-tr { width: 24px; height: 24px; margin-bottom: 4px; }
.fb-top dd { order: 1; margin: 0; font-weight: 700; font-size: 1.05rem; line-height: 1.25; overflow-wrap: anywhere; max-width: 100%; }
.fb-top dt { order: 2; margin-top: 2px; color: var(--mudo); font-size: .75rem; }
.fb-top .dest-longo { font-size: .875rem; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.fb-lista { background: var(--papel); border-radius: 12px; box-shadow: var(--sombra); padding: 4px 16px; }
.fb-lista > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--linha); }
.fb-lista > div:last-child { border-bottom: 0; }
.fb-lista dt { color: var(--mudo); flex: none; }
.fb-lista dd { margin: 0; font-weight: 700; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.titulo-bloco { font-size: 1.125rem; margin: 24px 0 10px; }
/* Equipamentos: blocos com o ícone de cada item, 3 por linha */
.e2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.e2 li { background: var(--papel); border-radius: 12px; box-shadow: var(--sombra); padding: 12px 4px; text-align: center;
  font-size: .8rem; font-weight: 600; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.e2 .ico-tr { display: block; margin: 0 auto 6px; }
.descricao { background: var(--papel); border-radius: var(--raio); padding: 16px; box-shadow: var(--sombra); }

/* botão de WhatsApp fixo no rodapé (celular) */
.barra-fixa { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); border-top: 1px solid var(--linha); backdrop-filter: blur(6px); }
.escolha-whats > summary { list-style: none; }
.escolha-whats > summary::-webkit-details-marker { display: none; }
.escolha-lista { position: absolute; left: 0; right: 0; bottom: 100%; display: grid; gap: 10px; padding: 12px 16px 10px; background: rgba(255, 255, 255, .98); border-top: 1px solid var(--linha); box-shadow: 0 -6px 16px rgba(0, 0, 0, .12); }
.botoes-whats { display: flex; flex-wrap: wrap; gap: 10px; }
body:has(.barra-fixa) .rodape { padding-bottom: 96px; }

/* página simples (privacidade / aviso) */
.texto-pagina, .aviso-pagina { padding-top: 12px; padding-bottom: 20px; }
.texto-pagina h1, .aviso-pagina h1 { font-size: 1.75rem; margin: 8px 0 16px; letter-spacing: -.01em; }
.aviso-pagina { padding-top: 56px; display: grid; gap: 16px; justify-items: start; }

/* ---------- tablet / desktop ---------- */
@media (max-width: 639px) {
  /* Celular: Ordenar vira só o ícone; o <select> segue ali (invisível, cobrindo o botão) pro toque abrir o seletor nativo. */
  .g-sel-ord { width: 44px; padding: 0; justify-content: center; }
  .g-sel-ord::after { content: none; }
  .g-sel-ord .g-sel-val { display: none; }
  .g-sel-val { max-width: 6.5rem; }
  .hero-busca-form button { padding: 0 18px; }
}
@media (min-width: 640px) {
  .logo { max-width: 190px; }
  .grade { grid-template-columns: repeat(2, 1fr); }
  .chegar { grid-template-columns: 1fr 1fr; }
  .hero-in { padding-top: 72px; padding-bottom: 56px; min-height: 340px; }
  .hero-busca .hero-in { padding-top: 64px; padding-bottom: 68px; }
}
@media (min-width: 960px) {
  .grade { grid-template-columns: repeat(3, 1fr); }
  /* A descrição fica na coluna da esquerda, embaixo da galeria; a ficha (info) ocupa as 3 linhas
     da direita. A última linha (1fr) absorve a folga, então nada se estica. Sem position:sticky:
     o item de grid só "gruda" dentro da própria área, e a galeria agora ocupa uma linha só. */
  .carro-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr;
    grid-template-areas: "galeria info" "desc info" "fin info"; column-gap: 32px; row-gap: 0; align-items: start; }
  .desc-col, .fin-col { margin-top: 24px; }
  .acoes-desktop { display: grid; }
  .acoes-mobile, .barra-fixa { display: none; }
  body:has(.barra-fixa) .rodape { padding-bottom: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
}
