:root {
  --accent: #2563eb;
  --navy: #0f172a;
  --bg: #f8fafc;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --ok: #16a34a;
}
* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

.topo { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 5; }
.topo .wrap {
  display: flex; align-items: center; gap: 12px; min-height: 56px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px;
}
.logo { font-weight: 800; font-size: 17px; flex: 1; min-width: 0; }
.fresco {
  font-size: 12px; color: #cbd5e1; background: rgba(255,255,255,.08);
  padding: 5px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  display: inline-block; animation: pulse 1s infinite;
}
@keyframes pulse { 0% { opacity: .3; } 50% { opacity: 1; } 100% { opacity: .3; } }

main.wrap { padding-top: 20px; padding-bottom: 40px; }

.busca { display: flex; gap: 8px; margin-bottom: 16px; }
.busca-campo { flex: 1; position: relative; }
.busca input[type=search] {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 16px; background: #fff;
}
.busca-x {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; background: #eef2ff; color: var(--muted);
  font-size: 20px; line-height: 26px; text-align: center; font-weight: 700;
}
.busca button {
  padding: 0 18px; border: 0; border-radius: 10px; background: var(--accent);
  color: #fff; font-weight: 700; cursor: pointer; white-space: nowrap;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chips.subs { background: #eef2ff; padding: 10px 12px; border-radius: 10px; }
.chip {
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 13px;
}
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip small { color: var(--muted); }
.chip.on small { color: #cbd5e1; }

.resultado { color: var(--muted); font-size: 13px; margin: 0 0 14px; }

.menu-toggle { display: none; }
.filtros {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 0 0 14px; padding: 10px 12px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px;
}
.filtros select {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; max-width: 220px;
}
.filtros .faixa { display: inline-flex; align-items: center; gap: 8px; }
.filtros .faixa input {
  width: 96px; min-width: 0; padding: 8px 9px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 14px;
}
.filtros button {
  padding: 8px 16px; border: 0; border-radius: 8px; background: var(--navy);
  color: #fff; font-weight: 700; font-size: 13px; cursor: pointer;
}
.filtros .limpar-filtro { font-size: 13px; color: var(--accent); font-weight: 600; }

.grade {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px;
}
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  transition: .12s; min-height: 110px;
}
.card:hover { border-color: var(--accent); box-shadow: 0 6px 18px rgba(15,23,42,.08); transform: translateY(-1px); }
.card-info { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.nome { font-weight: 700; font-size: 15px; }
.card-meta { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.card-meta .cat { background: #f1f5f9; padding: 2px 7px; border-radius: 6px; }
.card-rod { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.preco { font-weight: 800; color: var(--navy); }
.preco-promo { font-weight: 800; color: var(--ok); }
.preco-regular { font-size: 12px; color: var(--muted); text-decoration: line-through; margin-left: 4px; }
.disp { font-size: 12px; font-weight: 700; }
.disp.ok { color: var(--ok); }
.disp.baixo { color: var(--accent); }

.vazio { color: var(--muted); text-align: center; padding: 30px 0; }
.sentinela { color: var(--muted); font-size: 13px; text-align: center; padding: 20px 0; }
.sentinela[hidden] { display: none; }

.detalhe h1 { margin: .3em 0; font-size: 22px; }
.detalhe-foto { margin: 12px 0 18px; text-align: center; }
.detalhe-foto img {
  max-width: 280px; max-height: 280px; width: 100%; object-fit: contain;
  border-radius: 12px; border: 1px solid var(--line); background: #fff;
  padding: 6px; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.08);
}
.detalhe .meta { margin-bottom: 1em; }
.tag {
  display: inline-block; background: #f1f5f9; font-size: 12px; padding: 3px 9px; border-radius: 6px; margin-right: 6px;
}
.variacoes {
  width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.variacoes th, .variacoes td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.variacoes th { background: #f8fafc; font-size: 12px; color: var(--muted); text-transform: uppercase; }
.variacoes tr:last-child td { border-bottom: 0; }
.variacoes .num { font-weight: 800; }
.variacoes .ok { color: var(--ok); font-weight: 700; }
.variacoes .baixo { color: var(--accent); font-weight: 700; }
.descricao {
  margin-top: 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px;
}

.rodape {
  border-top: 1px solid var(--line); background: #fff; color: var(--muted);
  font-size: 12px; padding: 18px 0; margin-top: 20px; text-align: center;
}
.rodape a { color: var(--accent); font-weight: 600; }

@media (max-width: 600px) {
  .busca { flex-direction: column; }
  .busca button { height: 44px; }
  .menu-toggle {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--line);
    border-radius: 10px; background: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
  }
  .menu-wrap.tem-filtro .menu-toggle { border-color: var(--accent); color: var(--accent); }
  .filtros-toggle b { color: var(--accent); font-size: 12px; }
  .fseta { font-size: 12px; color: var(--muted); transition: transform .15s; }
  .menu-wrap.aberto .fseta { transform: rotate(180deg); }
  .filtros { display: none; gap: 8px; margin-bottom: 8px; min-width: 0; max-width: 100%; }
  .filtros-wrap.aberto .filtros { display: flex; }
  .filtros select { flex: 1 0 100%; max-width: 100%; min-width: 0; width: 100%; }
  .filtros .faixa { flex: 1 0 100%; display: flex; gap: 8px; min-width: 0; max-width: 100%; }
  .filtros .faixa input { flex: 1 1 0; width: auto; min-width: 0; }
  .filtros button { flex: 1 0 100%; }
}
