:root {
  --bg: #0f1115;
  --surface: #181b22;
  --text: #e8eaed;
  --muted: #9aa0aa;
  --accent: #ffd24d;
  --accent-ink: #1a1a1a;
  --border: #272b33;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container { width: min(1100px, 92%); margin: 0 auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header / footer */
.site-header { border-bottom: 1px solid var(--border); padding: 16px 0; }
.brand { font-size: 1.4rem; font-weight: 800; color: var(--text); }
.site-footer { border-top: 1px solid var(--border); margin-top: 48px; padding: 24px 0; color: var(--muted); }
.disclosure { font-size: .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; }
.copy { font-size: .85rem; }

main.container { padding: 24px 0; }

/* Hero / nav */
.hero h1 { font-size: 2rem; margin: 8px 0; }
.hero p { color: var(--muted); }
.categorias { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 24px; }
.categorias a { background: var(--surface); border: 1px solid var(--border); padding: 6px 12px; border-radius: 999px; color: var(--text); }
.breadcrumb { color: var(--muted); font-size: .9rem; margin-bottom: 16px; }

/* Grid de cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; padding-bottom: 12px; }
.card-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #222; }
.card-img--placeholder { background: linear-gradient(135deg, #222, #333); }
.card-title { font-size: 1.05rem; margin: 12px 12px 6px; color: var(--text); }
.card-resumo { color: var(--muted); font-size: .9rem; margin: 0 12px 8px; }
.card-cat { font-size: .8rem; margin: 0 12px; }

/* Paginação */
.pagination { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 32px 0; }
.pagination .current { color: var(--muted); }

/* Produto */
.produto h1 { font-size: 1.8rem; margin-bottom: 4px; }
.atualizado { color: var(--muted); font-size: .85rem; margin-top: 0; }
/* Galeria de imagens */
.galeria { margin: 16px 0; }
.galeria-img-main {
  width: 100%;
  max-width: 600px;
  aspect-ratio: 4/3;
  object-fit: contain;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  display: block;
  cursor: zoom-in;
}
.galeria-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
  max-width: 600px;
}
.galeria-thumb {
  padding: 0;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  transition: border-color .15s;
}
.galeria-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.galeria-thumb:hover,
.galeria-thumb.active { border-color: var(--accent); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.lightbox[hidden] { display: none; }
.lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover { background: rgba(255,255,255,.25); }
.produto section { margin: 28px 0; }
.produto h2 { font-size: 1.3rem; border-bottom: 1px solid var(--border); padding-bottom: 6px; }

.ofertas ul { list-style: none; padding: 0; }
.oferta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; }
.oferta-loja { font-weight: 700; }
.oferta-preco { color: var(--accent); font-weight: 700; font-size: 1.05rem; }
.btn-comprar { margin-left: auto; flex-shrink: 0; background: var(--accent); color: var(--accent-ink); padding: 8px 20px; border-radius: 999px; font-weight: 700; }
.btn-comprar:hover { text-decoration: none; opacity: .9; }
.oferta-aviso { color: var(--muted); font-size: .82rem; }
.historico-precos { flex-basis: 100%; border-top: 1px solid var(--border); padding-top: 10px; font-size: .82rem; color: var(--muted); }
.historico-precos summary { cursor: pointer; user-select: none; list-style: none; }
.historico-precos summary::-webkit-details-marker { display: none; }
.historico-precos summary::before { content: "▸ "; }
details[open].historico-precos summary::before { content: "▾ "; }
.historico-precos ul { list-style: none; padding: 0; margin: 8px 0 0; }
.historico-precos li { display: flex; gap: 16px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.historico-precos li:last-child { border-bottom: none; }
.historico-precos li span { min-width: 90px; opacity: .75; }

.pc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pc-pros h3 { color: #6ee7a8; }
.pc-contras h3 { color: #ff8f8f; }

.specs table { width: 100%; border-collapse: collapse; }
.specs th, .specs td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.specs th { color: var(--muted); width: 40%; }

.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 600; }

.comentario { border-bottom: 1px solid var(--border); padding: 12px 0; }
.comentario-autor { font-weight: 600; margin-bottom: 4px; }
.comentario-autor span { color: var(--muted); font-weight: 400; font-size: .85rem; }

.empty { color: var(--muted); }

/* Mensagens (flash) */
.messages { list-style: none; padding: 0; margin: 0 0 20px; }
.msg { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 8px; border: 1px solid var(--border); }
.msg--success { background: #143524; border-color: #1f5c3d; color: #c7f9dc; }
.msg--error { background: #3a1a1a; border-color: #6b2b2b; color: #ffd2d2; }

/* Formulário de comentário */
.form-comentario { margin-top: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
.form-comentario h3 { margin-top: 0; }
.form-aviso { color: var(--muted); font-size: .85rem; }
.form-comentario label { display: block; margin: 12px 0 4px; font-size: .9rem; }
.form-comentario input[type="text"],
.form-comentario textarea {
  width: 100%; padding: 10px 12px; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; font: inherit;
}
.form-comentario button {
  margin-top: 14px; background: var(--accent); color: var(--accent-ink);
  border: 0; padding: 10px 20px; border-radius: 999px; font-weight: 700; cursor: pointer;
}
/* Honeypot: invisível para humanos, presente para bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Header com busca */
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.header-busca { display: flex; gap: 6px; }
.header-busca input { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.header-busca button { border: 0; background: var(--surface); border-radius: 999px; padding: 6px 12px; cursor: pointer; }

/* Filtros da busca */
.filtros { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 24px; }
.filtros input, .filtros select {
  padding: 9px 12px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; font: inherit;
}
.filtros input[type="number"] { width: 110px; }
.filtros button { background: var(--accent); color: var(--accent-ink); border: 0; padding: 9px 18px; border-radius: 8px; font-weight: 700; cursor: pointer; }
.resultado-info { color: var(--muted); }

/* Newsletter no rodapé */
.newsletter { margin-bottom: 18px; }
.nl-row { display: flex; gap: 8px; max-width: 420px; margin-top: 6px; }
.nl-row input { flex: 1; padding: 10px 12px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; }
.nl-row button { background: var(--accent); color: var(--accent-ink); border: 0; padding: 10px 18px; border-radius: 8px; font-weight: 700; cursor: pointer; }

/* Painel (KPIs) */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px; margin: 20px 0; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.kpi-num { font-size: 1.8rem; font-weight: 800; color: var(--accent); }
.kpi span:last-child { color: var(--muted); font-size: .85rem; }

@media (max-width: 560px) {
  .header-inner { flex-direction: column; align-items: stretch; }
}

@media (max-width: 560px) {
  .pc-cols { grid-template-columns: 1fr; }
  .oferta { flex-wrap: wrap; }
  .btn-comprar { margin-left: 0; }
}

/* Vídeos do YouTube */
.videos-section { margin: 28px 0; }
.videos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 14px; }
.video-item { margin: 0; }
.video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius); }
.video-item figcaption { margin-top: 8px; font-size: .875rem; color: var(--muted); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.video-yt-link { color: var(--accent); text-decoration: none; font-size: .8rem; }
.video-yt-link:hover { text-decoration: underline; }

/* Recomendações no final da página de produto */
.recomendados { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.recomendados h2 { font-size: 1.3rem; margin-bottom: 20px; }
