/* Vitrine pública (loja.garimpo-ia.com) — docs/PLANO-VITRINE.md, Fase 3.
   Página do comprador, separada do painel: a identidade é a do cliente
   (--marca vem da loja, escolhida por ele) e o tema é o que ele escolheu. */

:root {
  --marca: #f5b000;
  --marca-texto: #000;
  --fonte: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --raio: 10px;
  --raio-sm: 8px;
  --bg: #0b0b0c;
  --card: #151517;
  --sunk: #1d1d20;
  --ink: #f4f4f5;
  --ink-2: #d4d4d8;
  --muted: #a1a1aa;
  --line: #27272a;
  --foto-bg: #ffffff;
}
[data-tema="claro"] {
  --bg: #f4f4f5;
  --card: #ffffff;
  --sunk: #ececee;
  --ink: #18181b;
  --ink-2: #3f3f46;
  --muted: #5f5f68;
  --line: #e4e4e7;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 400 15px/1.5 var(--fonte); -webkit-font-smoothing: antialiased;
}
::selection { background: var(--marca); color: var(--marca-texto); }
a { color: inherit; }
img { display: block; max-width: 100%; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--marca); outline-offset: 2px; }
.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; }
.vp-pular { position: absolute; left: 16px; top: -48px; z-index: 10; padding: 8px 12px; border-radius: var(--raio-sm); background: var(--marca); color: var(--marca-texto); font-weight: 700; text-decoration: none; }
.vp-pular:focus { top: 12px; }

/* Topo */
.vp-topo { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.vp-capa { margin: 0 -16px; aspect-ratio: 3 / 1; max-height: 300px; overflow: hidden; background: var(--sunk); }
.vp-capa img { width: 100%; height: 100%; object-fit: cover; }
.vp-id { display: flex; align-items: center; gap: 16px; padding: 28px 0 20px; }
.vp-id.tem-capa { align-items: flex-end; margin-top: -36px; padding-top: 0; }
.vp-marca {
  flex: none; width: 64px; height: 64px; border-radius: 14px; overflow: hidden;
  display: grid; place-items: center; background: var(--marca); color: var(--marca-texto);
  font-size: 28px; font-weight: 800; border: 3px solid var(--bg);
}
.vp-marca img { width: 100%; height: 100%; object-fit: cover; background: var(--card); }
.vp-id-txt { min-width: 0; }
.vp-id h1 { margin: 0; font-size: 26px; line-height: 1.15; font-weight: 800; overflow-wrap: anywhere; text-wrap: balance; }
.vp-id p { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; }

/* Barra de busca + categorias (fica presa no topo ao rolar) */
.vp-main { max-width: 1200px; margin: 0 auto; padding: 0 16px 40px; }
.vp-barra {
  position: sticky; top: 0; z-index: 5; margin: 0 -16px 16px; padding: 12px 16px;
  background: var(--bg); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.vp-busca { position: relative; display: block; }
.vp-busca svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.vp-busca input {
  width: 100%; height: 44px; padding: 0 14px 0 40px; border-radius: var(--raio-sm);
  border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 15px;
}
.vp-busca input::placeholder { color: var(--muted); }
.vp-busca input:focus { outline: none; border-color: var(--marca); box-shadow: 0 0 0 3px color-mix(in srgb, var(--marca) 30%, transparent); }
.vp-cats { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.vp-cats::-webkit-scrollbar { display: none; }
.vp-cat {
  flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink-2); font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: border-color .15s ease-out, background-color .15s ease-out;
}
.vp-cat:hover { border-color: var(--muted); }
.vp-cat.on { background: var(--marca); border-color: var(--marca); color: var(--marca-texto); }

/* Grade de ofertas */
.vp-grade { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.vp-card {
  display: flex; flex-direction: column; min-width: 0; border-radius: var(--raio);
  background: var(--card); border: 1px solid var(--line); overflow: hidden;
  transition: border-color .2s ease-out, transform .2s ease-out;
}
.vp-card[hidden] { display: none; }
.vp-card:hover { border-color: color-mix(in srgb, var(--marca) 55%, var(--line)); }
.vp-foto { position: relative; display: grid; place-items: center; aspect-ratio: 1; background: var(--foto-bg); overflow: hidden; }
.vp-foto img { width: 100%; height: 100%; object-fit: contain; padding: 10px; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.vp-card:hover .vp-foto img { transform: scale(1.04); }
.vp-foto > svg { width: 40%; height: 40%; color: #a1a1aa; }
.vp-off {
  position: absolute; left: 8px; top: 8px; padding: 3px 8px; border-radius: 6px;
  background: var(--marca); color: var(--marca-texto); font-size: 12.5px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.vp-info { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.vp-nome {
  margin: 0; font-size: 13.5px; line-height: 1.4; font-weight: 500; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em;
}
.vp-precos { display: flex; flex-direction: column; margin-top: auto; font-variant-numeric: tabular-nums; }
.vp-de { color: var(--muted); font-size: 12.5px; }
.vp-preco { font-size: 20px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.vp-ver { font-size: 13px; color: var(--muted); font-weight: 600; }
.vp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 14px;
  border-radius: var(--raio-sm); background: var(--marca); color: var(--marca-texto);
  font-weight: 700; font-size: 14px; text-decoration: none;
  transition: filter .15s ease-out, transform .1s ease-out;
}
.vp-btn svg { width: 16px; height: 16px; stroke-width: 2.2; }
.vp-btn:hover { filter: brightness(1.08); }
.vp-btn:active { transform: translateY(1px); }

.vp-vazio { margin: 32px 0; text-align: center; color: var(--muted); }
.vp-vazio-loja { margin: 24px 0; padding: 48px 20px; text-align: center; border: 1px dashed var(--line); border-radius: var(--raio); }
.vp-vazio-loja h2 { margin: 0 0 6px; font-size: 18px; }
.vp-vazio-loja p { margin: 0; color: var(--muted); }

.vp-rodape { max-width: 1200px; margin: 0 auto; padding: 24px 16px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.vp-rodape p { margin: 0 0 8px; max-width: 72ch; }
.vp-rodape a { color: var(--ink-2); text-underline-offset: 3px; }

.vp-404 { max-width: 520px; margin: 0 auto; padding: 18vh 24px 40px; text-align: center; }
.vp-404 h1 { margin: 0 0 10px; font-size: 26px; font-weight: 800; }
.vp-404 p { margin: 0 0 24px; color: var(--muted); }

@media (min-width: 720px) {
  .vp-topo, .vp-main { padding-left: 24px; padding-right: 24px; }
  .vp-capa { margin: 16px 0 0; border-radius: var(--raio); }
  .vp-id.tem-capa { margin-top: -40px; padding-left: 20px; }
  .vp-marca { width: 80px; height: 80px; font-size: 34px; border-radius: 16px; }
  .vp-id h1 { font-size: 32px; }
  .vp-barra { flex-direction: row; align-items: center; margin: 0 -24px 20px; padding: 14px 24px; }
  .vp-busca { flex: 0 0 320px; }
  .vp-cats { margin: 0; padding: 0; }
  .vp-grade { gap: 16px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
  .vp-nome { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
