/* ============================================================
   css/style.css — Sale
   Identidade: azul + preto, cantos arredondados,
   tipografia redonda e macia (Baloo 2 / Nunito).
   ============================================================ */

:root {
  --bg: #0a0e17;            /* fundo: azul-noite quase preto */
  --bg-alt: #101624;        /* superfície alternativa */
  --card: #151c2e;          /* cartões */
  --card-hover: #1a2240;
  --line: #243047;          /* bordas sutis */
  --text: #eef2ff;          /* texto principal: branco-azulado */
  --muted: #94a0c3;         /* texto secundário */
  --accent: #4f7dff;        /* azul elétrico (vivo, da logo) */
  --accent-hi: #6b92ff;
  --accent-inv: #ffffff;
  --accent-soft: #1b2a52;   /* chip/fundo de destaque suave */
  --badge-bg: #16305e;
  --badge: #6f9bff;
  --radius: 20px;           /* cantos bem redondos */
  --radius-sm: 14px;
  --nav-h: 68px;
  --maxw: 1120px;
  --grad: linear-gradient(135deg, #4f7dff 0%, #2f55d4 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: min(var(--maxw), 90%); margin: 0 auto; }
.narrow { max-width: 720px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* Skip link */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ================= HEADER / NAV ================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,14,23,.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { height: var(--nav-h); display: flex; align-items: center; gap: 24px; }
.brand-logo { height: 42px; width: auto; display: block; border-radius: 12px; }

.nav-links { display: flex; gap: 4px; margin: 0 auto; }
.nav-links a {
  padding: 9px 15px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: .95rem;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: var(--bg-alt); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: 999px; font-weight: 700; font-size: .95rem;
  font-family: 'Nunito', sans-serif;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s, opacity .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); opacity: .92; }
.btn-primary {
  background: var(--grad); color: var(--accent-inv);
  box-shadow: 0 6px 18px rgba(79,125,255,.28);
}
.btn-primary:hover { box-shadow: 0 8px 22px rgba(79,125,255,.4); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--line); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-hi); opacity: 1; }

/* Toggle mobile */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; margin-left: auto;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .2s; }

/* ================= HERO ================= */
.hero {
  padding: 110px 0 90px; border-bottom: 1px solid var(--line);
  background:
    radial-gradient(800px 320px at 70% -10%, rgba(79,125,255,.18), transparent 60%),
    radial-gradient(600px 260px at 10% 10%, rgba(79,125,255,.12), transparent 55%);
}
.hero-copy { max-width: 720px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .2em; font-size: .78rem; font-weight: 700;
  color: var(--accent-hi); margin-bottom: 20px;
}
.hero-logo {
  width: min(400px, 74vw); height: auto; display: block; margin: 4px 0 10px;
  border-radius: 22px;
  filter: drop-shadow(0 12px 30px rgba(79,125,255,.35));
}
.lead { color: var(--muted); font-size: 1.18rem; margin: 24px 0 32px; max-width: 46ch; font-weight: 500; }

/* ================= SEÇÕES ================= */
.section { padding: 96px 0; }
.section-head { margin-bottom: 40px; max-width: 640px; }
.section-head.center { margin-left: auto; margin-right: auto; }
.section-head h2 {
  font-family: 'Baloo 2', sans-serif; font-weight: 700;
  font-size: clamp(1.7rem, 3vw, 2.3rem); letter-spacing: -.01em; line-height: 1.12; color: var(--text);
}
.section-head .eyebrow { margin-bottom: 12px; }

/* ================= CATEGORIAS ================= */
.cats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.cat {
  padding: 10px 20px; border-radius: 999px; background: var(--card); color: var(--muted);
  border: 1px solid var(--line); cursor: pointer; font-weight: 600; font-size: .92rem; transition: .18s;
}
.cat:hover { color: var(--text); border-color: var(--accent); transform: translateY(-1px); }
.cat.active {
  background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: 0 6px 16px rgba(79,125,255,.3);
}
.cat .n { color: inherit; opacity: .7; font-weight: 600; margin-left: 3px; }

/* ================= GRADE / CARD ================= */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; padding: 0 0 20px;
  transition: transform .18s, border-color .18s, box-shadow .18s;
  cursor: pointer; color: inherit; text-decoration: none;
}
.card:hover {
  transform: translateY(-4px); border-color: var(--accent);
  box-shadow: 0 16px 34px rgba(0,0,0,.35);
}
.card h3 { text-decoration: none; }

.card-media { aspect-ratio: 16/9; overflow: hidden; background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-top {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 20px 4px;
}
.card-tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.badge {
  flex-shrink: 0; font-size: .74rem; font-weight: 700; padding: 5px 11px; border-radius: 999px;
  background: var(--badge-bg); color: var(--badge); border: 1px solid rgba(111,155,255,.3);
}
.card h3 {
  font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 1.2rem; letter-spacing: -.01em;
  padding: 4px 20px 0;
}
.card .desc { color: var(--muted); font-size: .92rem; margin: 6px 20px 16px; font-weight: 500; }

.card-foot {
  margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 6px 20px 0;
}
.preco { display: flex; flex-direction: column; line-height: 1.2; }
.preco .de { color: var(--muted); font-size: .78rem; text-decoration: line-through; }
.preco .por { font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 1.3rem; color: var(--accent-hi); }
.preco .vr { display: flex; gap: 6px; align-items: baseline; }
.preco .nome-vr { font-size: .82rem; color: var(--muted); font-weight: 600; }
.btn-compra { padding: 10px 20px; }
.btn-compra:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.grid-status { margin-top: 18px; color: var(--muted); font-size: .92rem; }

/* ================= COMO COMPRAR ================= */
.passos { text-align: left; margin: 8px auto 0; max-width: 540px; counter-reset: passo; display: grid; gap: 16px; }
.passos li {
  list-style: none; counter-increment: passo; display: flex; gap: 16px; align-items: baseline;
  color: var(--muted); font-size: 1rem; font-weight: 500;
}
.passos li::before {
  content: counter(passo); flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--grad); color: #fff; font-size: .9rem; font-weight: 700;
  display: grid; place-items: center; transform: translateY(5px);
  box-shadow: 0 4px 12px rgba(79,125,255,.3);
}

/* ================= MODAL ================= */
.modal { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(4,7,14,.72); backdrop-filter: blur(4px);
}
.modal-panel {
  position: relative; width: min(470px, 100%); background: var(--card);
  border: 1px solid var(--line); border-radius: 24px; padding: 30px;
  box-shadow: 0 30px 70px rgba(0,0,0,.5); animation: pop .18s ease;
}
@keyframes pop { from { transform: translateY(12px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close {
  position: absolute; top: 14px; right: 16px; background: none; border: 0; cursor: pointer;
  font-size: 28px; line-height: 1; color: var(--muted); padding: 4px; width: 40px; height: 40px;
  display: grid; place-items: center; border-radius: 50%;
}
.modal-close:hover { color: var(--text); background: var(--bg-alt); }
.modal-title {
  font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 1.45rem; margin-bottom: 18px;
  color: var(--text);
}
.modal .eyebrow { font-size: .7rem; }

.modal-field { margin-bottom: 18px; }
.modal-field label { display: block; font-size: .9rem; font-weight: 700; margin-bottom: 8px; }
.radio-group { display: grid; gap: 9px; }
.rg {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 15px; cursor: pointer; transition: .15s;
  background: var(--bg);
}
.rg:hover { border-color: var(--accent); }
.rg input { position: absolute; opacity: 0; pointer-events: none; }
.rg .rg-l { font-size: .94rem; font-weight: 600; }
.rg .rg-r { font-size: .94rem; font-weight: 700; color: var(--accent-hi); white-space: nowrap; }
.rg:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.rg:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--bg); }
.qty button {
  width: 44px; height: 44px; background: transparent; border: 0; cursor: pointer;
  font-size: 1.3rem; color: var(--text); transition: background .15s;
}
.qty button:hover { background: var(--bg-alt); }
.qty input {
  width: 60px; height: 44px; border: 0; text-align: center;
  font: inherit; font-weight: 700; background: transparent; color: var(--text); -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field-hint { margin-top: 8px; font-size: .82rem; color: var(--muted); }

.total {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px solid var(--line); padding-top: 16px; margin: 20px 0 18px;
}
.total span { color: var(--muted); font-weight: 700; }
.total strong { font-family: 'Baloo 2', sans-serif; font-size: 1.7rem; font-weight: 700; color: var(--accent-hi); }

.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; }
.btn-block { width: 100%; }

.modal-banner {
  width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover;
  border-radius: 16px; border: 1px solid var(--line); margin: 0 0 18px; display: block;
}
.modal-desc { color: var(--muted); font-size: .97rem; margin-bottom: 20px; font-weight: 500; }
.form-status { margin-top: 12px; font-size: .9rem; min-height: 1.2em; font-weight: 600; }
.form-status.ok { color: #5ee08c; }
.form-status.err { color: #ff7a7a; }

/* ================= PÁGINA DE PRODUTO ================= */
.nav-back {
  padding: 9px 17px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--muted); font-weight: 600; font-size: .9rem; margin-left: auto;
  transition: .15s;
}
.nav-back:hover { color: var(--text); border-color: var(--accent); }

.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px; color: var(--muted); font-weight: 600; transition: .15s; }
.back-link:hover { color: var(--accent-hi); }

.produto-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; align-items: start; }
.produto-media {}
.produto-banner { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; border-radius: 22px; border: 1px solid var(--line); margin-bottom: 14px; }
.produto-desc { color: var(--muted); font-size: 1rem; font-weight: 500; }
.produto-info {}
.produto-tag { display: flex; align-items: center; gap: 10px; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 12px; }
.produto-nome { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: clamp(1.6rem, 3.5vw, 2.4rem); line-height: 1.1; letter-spacing: -.01em; margin-bottom: 14px; color: var(--text); }

.produto-preco {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: 18px;
  padding: 18px 20px; margin-bottom: 24px;
}
.produto-preco .de { color: var(--muted); font-size: .95rem; text-decoration: line-through; }
.produto-preco .por { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 1.8rem; color: var(--accent-hi); }
.produto-preco .apartir { color: var(--muted); font-size: .9rem; font-weight: 600; }

.produto-buy { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 24px; }

.nao-encontrado { text-align: center; padding: 60px 20px; }
.nao-encontrado p { color: var(--muted); margin-bottom: 20px; }

@media (max-width: 820px) {
  .produto-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ================= FOOTER ================= */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0; background: var(--bg-alt); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-logo { height: 36px; width: auto; display: block; border-radius: 10px; }
.footer-tag { color: var(--muted); font-size: .9rem; }

/* ================= RESPONSIVO ================= */
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; gap: 4px;
    background: var(--bg); padding: 16px; border-bottom: 1px solid var(--line);
    transform: translateY(-130%); transition: transform .25s ease; z-index: 99;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 12px; border-radius: 12px; }
  .hero { padding: 80px 0 64px; }
  .section { padding: 64px 0; }
  .grid { grid-template-columns: 1fr; }
}

/* Reduz movimento */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .modal-panel { transform: none; }
}