/* VDV — Vitrine de Vendas — identidade visual (mobile-first, sem framework)
 * Paleta: azul da marca oficial VDV (marinho + azul real) — redesign VDV-20260901-07.
 * Tipografia: Archivo (variable, self-hosted, licença OFL em assets/fonts/OFL.txt). */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/archivo-var.woff2") format("woff2");
}

:root {
  --vdv-primary: #1e3a8a;        /* marinho da logo VDV */
  --vdv-primary-dark: #172554;
  --vdv-accent: #2563eb;         /* azul real — links e detalhes */
  --vdv-cta: #f59e0b;            /* âmbar — só no CTA "Quero vender" */
  --vdv-bg: #f7f8fb;
  --vdv-surface: #ffffff;
  --vdv-text: #101828;
  --vdv-text-muted: #5b6472;
  --vdv-border: #e5e9f0;
  --vdv-danger: #b91c1c;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow-lift: 0 8px 24px rgba(30, 58, 138, .10);
  --space: 1rem;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --vdv-bg: #0b1120;
    --vdv-surface: #151d31;
    --vdv-text: #e5e9f0;
    --vdv-text-muted: #94a3b8;
    --vdv-border: #2a3550;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--vdv-bg);
  color: var(--vdv-text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2 { font-weight: 700; letter-spacing: -0.02em; }

/* ------------------------------------------------------------------ topbar */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .65rem 1rem;
  background: var(--vdv-surface);
  border-bottom: 1px solid var(--vdv-border);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.3rem; height: 2.3rem; border-radius: 8px;
  background: var(--vdv-primary); color: #fff;
  font-weight: 800; font-size: .95rem; letter-spacing: -0.03em;
}
.brand strong { display: block; font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; }
.brand small { color: var(--vdv-text-muted); font-size: .78rem; }
.topnav { display: flex; align-items: center; gap: 1.1rem; margin-left: auto; }
.topnav a {
  color: var(--vdv-text-muted); text-decoration: none;
  font-size: .9rem; font-weight: 600;
}
.topnav a:hover { color: var(--vdv-primary); }
.topbar .btn-sell { margin-left: 0; }

main { max-width: 72rem; margin: 0 auto; padding: 1rem; }

h1 { font-size: 1.5rem; margin: .25rem 0; }
h2 { font-size: 1.15rem; margin: 1.1rem 0 .65rem; }

/* Respiro de vitrine (Home 2.0): seções separadas, títulos editoriais. */
main > section { margin-top: 1.9rem; }
main > section:first-of-type { margin-top: .5rem; }

/* -------------------------------------------------------------------- hero */
/* VDV-20260905-09 — vitrine antes de explicação: título curto + busca, e a
 * primeira dobra mostra produto. Confiança desce para #section-confianca. */
.hero {
  display: flex; flex-direction: column; gap: 1.25rem;
  padding: .75rem 0 0;
}
.hero-copy h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 .6rem; }
/* VDV-20260907-01 — reposicionamento: subtítulo + par de CTAs (oferta/procura)
 * logo no hero, e faixa que equaliza oferta e demanda logo abaixo. */
.hero-sub { margin: -.35rem 0 .8rem; color: var(--vdv-text-muted); font-size: .98rem; max-width: 40rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 .35rem; }
.hero-strip { margin: -.15rem 0 .35rem; color: var(--vdv-text-muted); font-size: .92rem; max-width: 46rem; }
.hero-strip strong { color: var(--vdv-text); }
.trust-row {
  display: flex; flex-wrap: wrap; gap: .45rem .5rem;
  margin: 0 0 .25rem; padding: 0; list-style: none;
}
.trust-row li {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .82rem; font-weight: 600; color: var(--vdv-primary);
  background: rgba(37, 99, 235, .08);
  border: 1px solid rgba(37, 99, 235, .18);
  border-radius: 999px; padding: .25rem .7rem;
}
@media (prefers-color-scheme: dark) {
  .trust-row li { color: #93b4f8; background: rgba(37, 99, 235, .14); border-color: rgba(37, 99, 235, .35); }
}

/* Strip de confiança (desejo → confiança → ação): explicação vem DEPOIS
 * dos produtos, com selos objetivos. */
#section-confianca {
  padding: 1.1rem 1.2rem;
  background: var(--vdv-surface);
  border: 1px solid var(--vdv-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.trust-lead { margin: 0 0 .7rem; color: var(--vdv-text-muted); max-width: 44rem; }
.trust-lead strong { color: var(--vdv-text); }

/* Banner da arte oficial (VDV-20260831-05) — card com moldura coerente.
 * No celular fica fora da primeira dobra (produto é prioridade) e some. */
.hero-banner { display: flex; justify-content: center; margin: 0; }
.hero-banner img {
  width: 100%; max-width: 22rem; height: auto;
  border-radius: var(--radius-lg); background: #fff;
  border: 1px solid var(--vdv-border); box-shadow: var(--shadow-lift);
}
@media (max-width: 719px) {
  .hero-banner { display: none; }
}

.searchbar input {
  width: 100%; box-sizing: border-box;
  padding: .8rem 1.1rem; font-size: 1rem; font-family: inherit;
  border: 1px solid var(--vdv-border); border-radius: 999px;
  background: var(--vdv-surface); color: inherit; margin-top: .5rem;
  box-shadow: var(--shadow);
}
.searchbar input:focus { outline: 2px solid var(--vdv-accent); outline-offset: 1px; }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: .55rem 0; }
.chip {
  border: 1px solid var(--vdv-border); border-radius: 999px;
  padding: .32rem .85rem; font-size: .85rem; font-weight: 500; cursor: pointer;
  background: var(--vdv-surface); color: inherit; font-family: inherit;
  transition: border-color .15s, background .15s;
}
.chip:hover { border-color: var(--vdv-accent); }
.chip[aria-pressed="true"] { background: var(--vdv-primary); border-color: var(--vdv-primary); color: #fff; }

:is(a, button, input, .chip):focus-visible { outline: 2px solid var(--vdv-accent); outline-offset: 2px; }

.status { color: var(--vdv-text-muted); }
/* Status vazio (carregando/sem busca) não ocupa 2 margens de <p>. */
.status:empty { display: none; }

/* -------------------------------------------------------------------- grid */
.grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

/* Card de vitrine (Home 2.0): foto 4:5 dominante, anunciante em evidência,
 * dados objetivos, chamada de ação — sem bordas pesadas nem excesso de info. */
.card {
  background: var(--vdv-surface); border: 1px solid var(--vdv-border);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.card img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block;
  background: var(--vdv-bg);
}
.card-body { padding: .8rem .85rem .9rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.card-title { font-size: .95rem; font-weight: 600; margin: 0; line-height: 1.3; }
.card-seller { font-size: .82rem; font-weight: 700; color: var(--vdv-accent); margin: 0; }
.card-meta { font-size: .78rem; color: var(--vdv-text-muted); margin: 0; }
.card-price { font-size: 1.08rem; font-weight: 700; color: var(--vdv-primary); margin: .15rem 0 0; font-variant-numeric: tabular-nums; }
.card-flags { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin: 0; }
.card-more {
  margin: .45rem 0 0; padding-top: .45rem; border-top: 1px solid var(--vdv-border);
  font-size: .8rem; font-weight: 600; color: var(--vdv-accent);
}
.load-more-row { display: flex; justify-content: center; margin-top: 1.4rem; }
/* VDV-20260907-10 — filtro por categoria na página do fornecedor: o [hidden]
 * nativo perde para o display flex do card — garantir ocultação. */
.card[hidden] { display: none !important; }

/* VDV-20260907-08 (dobra 2) — rodízio "Em exposição agora" com 4 cards:
 * 2×2 no celular, fileira de 4 no desktop — a seção sempre encaixa na tela.
 * Troca animada em 2 tempos: o card antigo esmaece subindo (vdv-card-out,
 * ocupando o próprio espaço — a grade não pula) e o novo entra por cima
 * (vdv-card-in). Com movimento reduzido a troca fica instantânea. */
#grid-exposicao { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) {
  #grid-exposicao { grid-template-columns: repeat(4, 1fr); }
}
.card-entering { animation: vdv-card-in .45s ease both; }
.card-leaving { animation: vdv-card-out .45s ease both; }
@keyframes vdv-card-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes vdv-card-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
  .card-entering, .card-leaving { animation: none; }
}

/* ------------------------------------------------- páginas institucionais */
.prose { max-width: 44rem; }
.prose h1 { font-size: 1.55rem; margin: .5rem 0 .75rem; }
.prose h2 { font-size: 1.1rem; margin: 1.5rem 0 .5rem; }
.prose p, .prose li { color: var(--vdv-text-muted); }
.prose ol, .prose ul { padding-left: 1.2rem; margin: .5rem 0; }
.prose li { margin: .45rem 0; }
.prose .btn-primary { margin-top: 1.25rem; }
.card-price { margin-top: auto; }
.badge {
  display: inline-block; border-radius: 6px; padding: .12rem .5rem;
  font-size: .72rem; font-weight: 600;
  background: rgba(37, 99, 235, .1); color: var(--vdv-accent);
}
.badge-ok { background: rgba(22, 138, 69, .12); color: #15803d; }
.badge-warn { background: #fef3c7; color: #92400e; }
.badge-sale { background: #fce7f3; color: #9d174d; }
@media (prefers-color-scheme: dark) {
  .badge { background: rgba(37, 99, 235, .2); color: #93b4f8; }
  .badge-ok { background: rgba(34, 197, 94, .18); color: #4ade80; }
  .badge-warn { background: rgba(245, 158, 11, .18); color: #fcd34d; }
  .badge-sale { background: rgba(219, 39, 119, .2); color: #f9a8d4; }
}

/* ------------------------------------------------------------------ botões */
.btn {
  display: inline-block; padding: .65rem 1.15rem; border-radius: 999px;
  font-weight: 600; font-size: .95rem; text-decoration: none; text-align: center;
  border: 1px solid var(--vdv-border); cursor: pointer; background: var(--vdv-surface);
  color: inherit; font-family: inherit;
  transition: filter .15s, transform .15s;
}
.btn:hover { filter: brightness(1.05); }
.btn-primary { background: var(--vdv-primary); border-color: var(--vdv-primary); color: #fff; }
.btn-primary:hover { background: var(--vdv-primary-dark); filter: none; }
.btn-sell { background: var(--vdv-cta); border-color: var(--vdv-cta); color: #3b2605; }
.btn-ghost { background: transparent; }
.btn-cta {
  display: block; text-align: center; font-size: 1.05rem; padding: 1rem;
  margin-top: 1.25rem;
}

.cta-procura {
  margin: 2.25rem 0; padding: 1.4rem;
  border: 1px solid rgba(37, 99, 235, .35);
  background: rgba(37, 99, 235, .05);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column; gap: .75rem;
}
@media (prefers-color-scheme: dark) {
  .cta-procura { background: rgba(37, 99, 235, .1); }
}
.cta-procura h2 { margin: 0 0 .25rem; }
.cta-procura p { margin: 0; color: var(--vdv-text-muted); }

/* Seção do fornecedor (Home 2.0): a segunda camada, discreta e no fim. */
.cta-seller {
  margin: 2.25rem 0; padding: 1.4rem;
  border: 1px solid rgba(245, 158, 11, .45);
  background: rgba(245, 158, 11, .06);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column; gap: .75rem;
}
.cta-seller h2 { margin: 0 0 .25rem; }
.cta-seller p { margin: 0; color: var(--vdv-text-muted); }
@media (prefers-color-scheme: dark) {
  .cta-seller { background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .35); }
}

/* Estado vazio positivo (Home 2.0): vazio vira ação. */
.empty-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.empty-actions .btn-primary { background: var(--vdv-primary); border-color: var(--vdv-primary); color: #fff; }

/* Resumo de "Como funciona" na home (Home 2.0): 3 passos compactos. */
.how-steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
}
.how-steps li {
  display: flex; gap: .8rem; align-items: flex-start;
  background: var(--vdv-surface); border: 1px solid var(--vdv-border);
  border-radius: var(--radius-lg); padding: 1rem 1.1rem;
}
.how-num {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 999px;
  background: var(--vdv-primary); color: #fff; font-weight: 800; font-size: .9rem;
}
.how-steps strong { display: block; font-size: .98rem; }
.how-steps p { margin: .15rem 0 0; color: var(--vdv-text-muted); font-size: .88rem; }
.how-more { margin: 1rem 0 0; font-size: .92rem; }
.how-more a { color: var(--vdv-accent); font-weight: 600; text-decoration: none; }
.how-more a:hover { text-decoration: underline; }

/* Selos textuais do rodapé (Home 2.0): confiança como informação. */
.footer-trust {
  list-style: none; padding: 0; margin: 0 0 1rem;
  display: flex; flex-wrap: wrap; gap: .4rem .9rem;
  font-weight: 600; color: var(--vdv-text-muted); font-size: .82rem;
}
.footer-trust li { display: inline-flex; align-items: center; gap: .35rem; }
.footer-trust li::before { content: "✓"; color: #15803d; font-weight: 800; }
@media (prefers-color-scheme: dark) {
  .footer-trust li::before { color: #4ade80; }
}

/* ------------------------------------------------------------------ footer */
footer {
  padding: 1.75rem 1rem 2rem; color: var(--vdv-text-muted); font-size: .85rem;
  border-top: 1px solid var(--vdv-border); margin-top: 2.5rem;
  max-width: 72rem; margin-left: auto; margin-right: auto;
}
footer a { color: var(--vdv-accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer p { margin: .3rem 0; }

/* ---------------------------------------------------------------- produto */
.prod-photo {
  width: 100%; max-width: 32rem; margin: 0 auto;
  border-radius: var(--radius-lg); background: var(--vdv-surface);
  border: 1px solid var(--vdv-border); box-shadow: var(--shadow-lift);
  aspect-ratio: 1 / 1; object-fit: cover; display: block;
}
/* Galeria do produto (VDV-20260903-03): principal + miniaturas clicáveis. */
.prod-gallery { max-width: 32rem; margin: 0 auto; }
.prod-gallery .prod-photo { max-width: 100%; }
.prod-thumbs { display: flex; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }
.prod-thumb {
  width: 4rem; height: 4rem; padding: 0; cursor: pointer;
  border-radius: var(--radius); border: 2px solid var(--vdv-border);
  background: var(--vdv-surface); overflow: hidden; opacity: .75;
}
.prod-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prod-thumb.is-active { border-color: var(--vdv-primary); opacity: 1; }
.prod-thumb:focus-visible { outline: 2px solid var(--vdv-primary); outline-offset: 2px; }
.prod-title { font-size: 1.35rem; margin: 1rem 0 .25rem; letter-spacing: -0.02em; }
.prod-price { font-size: 1.7rem; font-weight: 800; color: var(--vdv-primary); margin: 0; font-variant-numeric: tabular-nums; }
.prod-facts { list-style: none; padding: 0; margin: .8rem 0; color: var(--vdv-text-muted); font-size: .92rem; }
.prod-facts li { margin: .22rem 0; }
.prod-desc { white-space: pre-wrap; }
.prod-seller { font-size: .9rem; color: var(--vdv-text-muted); margin: .25rem 0 0; }
/* Canais de contato (VDV-20260905-05): os dois botões de contato (Telegram /
 * WhatsApp) no MESMO tamanho padrão, lado a lado, com as cores e logos oficiais
 * dos canais — o visitante identifica o canal pela marca antes de ler. */
.contact-channels {
  display: grid; gap: .6rem; margin-top: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
}
.btn-channel {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 3.2rem; padding: .8rem .9rem;
  border-radius: 999px; text-decoration: none; text-align: center;
  font-weight: 700; font-size: .98rem; line-height: 1.2;
  color: #fff; border: 0; cursor: pointer;
  transition: filter .15s;
}
.btn-channel:hover { filter: brightness(1.08); }
.btn-channel svg { width: 1.3rem; height: 1.3rem; flex: 0 0 auto; fill: currentColor; }
/* Cores oficiais das marcas (identificação imediata do canal). */
.btn-channel.tg { background: #229ed9; }
.btn-channel.wa { background: #25d366; }

.share-row { margin: .75rem 0 0; }
.share-row .btn { display: inline-flex; align-items: center; gap: .45rem; }
.share-row .btn svg { width: 1.05rem; height: 1.05rem; fill: currentColor; }
/* Fatia 24 (VDV-20260904-01) — CTA do WhatsApp comercial do anunciante. */
.wa-note { display: block; margin-top: .45rem; font-size: .8rem; color: var(--vdv-text-muted); }
.prod-more { font-size: .95rem; margin: 1rem 0 0; }
.prod-more a { color: var(--vdv-accent); font-weight: 700; text-decoration: none; }
.prod-more a:hover { text-decoration: underline; }
/* VDV-20260905-03 — link de denúncia: discreto, sem destaque de CTA. */
.prod-report { font-size: .85rem; margin: .75rem 0 0; color: var(--vdv-text-muted); }
.prod-report a { color: var(--vdv-text-muted); text-decoration: none; }
.prod-report a:hover { color: var(--vdv-text); text-decoration: underline; }
/* Fatia 29 (VDV-20260908-03) — comentários de visitantes (só aprovados,
 * vindos do export; comentar acontece pelo bot, com moderação no /admin). */
.prod-comments { margin: 1.5rem 0 0; }
.prod-comments h2 { font-size: 1.05rem; margin: 0 0 .6rem; }
.comment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.comment {
  margin: 0; padding: .7rem .9rem;
  border-left: 3px solid var(--vdv-primary); border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--vdv-surface); box-shadow: var(--shadow);
}
.comment-text { margin: 0; font-size: .92rem; line-height: 1.45; }
.comment-meta { margin: .3rem 0 0; font-size: .8rem; color: var(--vdv-text-muted); }
.comment-date { margin-left: .35rem; }
.prod-comment-cta { margin: 1rem 0 0; }
.prod-comment-cta .btn { display: inline-flex; align-items: center; gap: .45rem; }
footer a[data-deep-link="denuncia"] { color: var(--vdv-text-muted); }
.prod-trust {
  margin: 1.5rem 0 0; padding: .9rem 1rem;
  border-left: 3px solid var(--vdv-primary); border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--vdv-surface); box-shadow: var(--shadow);
  color: var(--vdv-text-muted); font-size: .88rem;
}
.back-link {
  display: inline-block; margin: .5rem 0 .25rem;
  color: var(--vdv-accent); font-weight: 600; font-size: .9rem; text-decoration: none;
}
.back-link:hover { text-decoration: underline; }

/* Topbar compacta em telas estreitas (página de produto tem 3 elementos). */
@media (max-width: 560px) {
  .brand small { display: none; }
  .topbar .btn { padding: .45rem .85rem; font-size: .85rem; }
  .topnav { display: none; }
}

@media (min-width: 720px) {
  .hero { flex-direction: row; align-items: center; gap: 2.5rem; padding-top: 1.5rem; }
  .hero-copy { flex: 1 1 55%; }
  .hero-banner { flex: 1 1 45%; }
  .hero-banner img { max-width: 26rem; }
  .hero-copy h1 { font-size: 2.1rem; }
  .cta-procura { flex-direction: row; align-items: center; justify-content: space-between; }
  .cta-seller { flex-direction: row; align-items: center; justify-content: space-between; }
  .how-steps { grid-template-columns: repeat(3, 1fr); }
  .prod-photo { max-width: 26rem; }
}