/* NexusRJ Loja: paleta oficial (identidade_v1) */
:root {
  --azul: #0064CE;
  --azul-forte: #004a9c;
  --profundo: #001737;
  --grafite: #354B5C;
  --prata: #A6ADB7;
  --fundo: #F4F9FF;
  --branco: #fff;
  --texto: #14202e;
  --suave: #5b6a79;
  --borda: #d9e4f1;
  --claro: #e4f0fe;
  --verde: #0a7a3d;
  --sombra: 0 1px 3px rgba(0, 23, 55, .08), 0 4px 14px rgba(0, 23, 55, .06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--fundo); color: var(--texto); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
img { max-width: 100%; }
a { color: var(--azul); }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button { font: inherit; cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pular { position: absolute; left: -999px; top: 8px; background: var(--profundo); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 100; }
.pular:focus { left: 8px; }
:focus-visible { outline: 3px solid #5aa8ff; outline-offset: 2px; }

/* ---------- Topo ---------- */
.topo { background: var(--branco); border-bottom: 1px solid var(--borda); position: sticky; top: 0; z-index: 30; }
.topo-linha { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--grafite); font-size: 1.45rem; letter-spacing: -.01em; white-space: nowrap; }
.logo img { width: 40px; height: 40px; }
.logo b { color: var(--azul); font-weight: 800; }
.busca { flex: 1; position: relative; max-width: 680px; margin: 0 auto; }
.busca svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--suave); width: 20px; height: 20px; }
.busca input { width: 100%; height: 44px; border: 1.5px solid var(--borda); border-radius: 999px; background: var(--fundo); padding: 0 16px 0 44px; font: inherit; color: var(--texto); }
.busca input:focus { border-color: var(--azul); background: #fff; outline: none; box-shadow: 0 0 0 3px rgba(0, 100, 206, .15); }
.btn-fav { display: flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--texto); font-weight: 600; padding: 8px 10px; border-radius: 8px; position: relative; }
.btn-fav:hover { background: var(--claro); }
.btn-fav[aria-pressed="true"] { color: #c2185b; }
.btn-fav[aria-pressed="true"] svg { fill: #c2185b; }
.btn-fav em { font-style: normal; background: #c2185b; color: #fff; font-size: .72rem; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px; }
.btn-icone { background: none; border: 0; padding: 8px; border-radius: 8px; color: var(--profundo); display: grid; place-items: center; }
.btn-icone:hover { background: var(--claro); }

.menu { border-top: 1px solid var(--borda); background: #fff; }
.menu ul { list-style: none; margin: 0 auto; padding: 0 16px; max-width: 1240px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.menu li { flex: none; }
.menu button { background: none; border: 0; padding: 11px 12px; color: var(--texto); font-weight: 500; font-size: .95rem; border-bottom: 3px solid transparent; white-space: nowrap; }
.menu button:hover { color: var(--azul); }
.menu button[aria-current="true"] { color: var(--azul); border-bottom-color: var(--azul); font-weight: 700; }
.menu { display: flex; align-items: center; }
.menu { position: relative; }
.menu-fonte { display: none; }
@media (min-width: 1100px) {
  .menu ul { justify-content: center; flex-wrap: wrap; overflow: visible; max-width: 1400px; }
  .menu button { padding: 10px 9px; font-size: .9rem; }
}
.topo { }

/* ---------- Gaveta (menu mobile) ---------- */
.gaveta-fundo { position: fixed; inset: 0; background: rgba(0, 23, 55, .55); z-index: 40; }
.gaveta { position: fixed; top: 0; bottom: 0; left: 0; width: min(320px, 86vw); background: #fff; z-index: 50; padding: 12px 8px; overflow-y: auto; box-shadow: 4px 0 24px rgba(0, 0, 0, .25); }
.gaveta[hidden], .gaveta-fundo[hidden] { display: none; }
.gaveta-topo { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 12px; border-bottom: 1px solid var(--borda); font-size: 1.1rem; }
.gaveta ul { list-style: none; margin: 0; padding: 8px 0; }
.gaveta li button, .gaveta li a { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; text-align: left; padding: 12px; border-radius: 8px; font-size: 1rem; color: var(--texto); text-decoration: none; }
.gaveta li button:hover, .gaveta li a:hover { background: var(--claro); }
.gaveta-extra { border-top: 1px solid var(--borda); }

/* ---------- Banner ---------- */
.hero { position: relative; min-height: 300px; display: flex; align-items: center; overflow: hidden; color: #fff; background: radial-gradient(1200px 400px at 85% 40%, #1d7fe6 0%, transparent 60%), linear-gradient(100deg, #001737 0%, #00306b 50%, #0064CE 100%); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center right; }
.hero-sombra { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 23, 55, .65) 0%, rgba(0, 23, 55, .25) 45%, transparent 70%); pointer-events: none; }
.hero-texto { position: relative; max-width: 1240px; width: 100%; margin: 0 auto; padding: 36px 16px; }
.hero h1 { margin: 0 0 8px; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.05; letter-spacing: -.02em; text-shadow: 0 2px 12px rgba(0, 0, 0, .25); }
.hero p { margin: 0 0 20px; font-size: clamp(1rem, 2.2vw, 1.3rem); max-width: 520px; opacity: .95; }
.hero-btn { display: inline-block; background: #fff; color: var(--profundo); font-weight: 700; padding: 13px 26px; border-radius: 8px; text-decoration: none; box-shadow: 0 4px 14px rgba(0, 0, 0, .2); }
.hero-btn:hover { background: var(--claro); }
.hero-espaco { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); width: min(420px, 38%); border: 2px dashed rgba(255, 255, 255, .6); border-radius: 12px; padding: 16px; display: grid; gap: 4px; font-size: .85rem; background: rgba(255, 255, 255, .08); text-align: center; }
.hero-espaco b { font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; }
.hero-espaco code { background: rgba(0, 0, 0, .3); padding: 1px 5px; border-radius: 4px; }
.hero-espaco[hidden] { display: none; }
.hero-link[hidden] { display: none; }
/* banner com arte pronta (texto e botão já estão na imagem): a imagem inteira vira o link */
.hero.com-arte { display: block; min-height: 0; background: var(--profundo); }
.hero.com-arte .hero-link { display: block; }
.hero.com-arte .hero-img { position: static; display: block; width: 100%; height: auto; object-fit: initial; }
.hero.com-arte .hero-sombra, .hero.com-arte .hero-espaco { display: none; }
.hero.com-arte .hero-texto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); padding: 0; margin: 0; }

/* ---------- Categorias com ícones ---------- */
.cats-faixa { background: #fff; border-bottom: 1px solid var(--borda); }
.cats-faixa ul { list-style: none; margin: 0 auto; padding: 14px 16px; max-width: 1240px; display: flex; gap: 8px; justify-content: space-between; overflow-x: auto; scrollbar-width: thin; }
.cats-faixa li { flex: 1 0 96px; }
.cats-faixa button { width: 100%; background: none; border: 0; display: grid; justify-items: center; gap: 8px; padding: 6px 4px; color: var(--texto); font-weight: 600; font-size: .92rem; border-radius: 10px; text-align: center; }
.cats-faixa button:hover .ic { background: var(--azul); color: #fff; }
.cats-faixa button[aria-current="true"] .ic { background: var(--azul); color: #fff; }
.ic { width: 62px; height: 62px; border-radius: 50%; background: var(--claro); color: var(--azul); display: grid; place-items: center; transition: background .15s, color .15s; }
.ic svg { width: 30px; height: 30px; }

/* ---------- Miolo ---------- */
.miolo { max-width: 1240px; margin: 0 auto; padding: 20px 16px 8px; display: grid; grid-template-columns: 250px 1fr; gap: 22px; align-items: start; }
.filtros { background: #fff; border: 1px solid var(--borda); border-radius: 12px; padding: 14px 16px; position: sticky; top: 108px; }
.filtros-topo { display: flex; align-items: center; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid var(--borda); }
.filtros-topo b { display: flex; align-items: center; gap: 8px; }
.filtros fieldset { border: 0; border-bottom: 1px solid var(--borda); margin: 0; padding: 14px 0; }
.filtros legend { font-weight: 700; padding: 0; margin-bottom: 8px; }
.opcao { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: .93rem; cursor: pointer; }
.opcao input { width: 18px; height: 18px; accent-color: var(--azul); }
.opcao small { color: var(--suave); margin-left: auto; }
.preco-valores { display: flex; justify-content: space-between; font-size: .9rem; font-weight: 600; margin-bottom: 6px; }
.faixa { position: relative; height: 28px; }
.faixa input[type=range] { position: absolute; left: 0; right: 0; width: 100%; margin: 0; top: 4px; height: 20px; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; accent-color: var(--azul); }
.faixa input[type=range]::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--azul); box-shadow: var(--sombra); cursor: grab; }
.faixa input[type=range]::-moz-range-thumb { pointer-events: auto; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--azul); cursor: grab; }
.faixa input[type=range]::-webkit-slider-runnable-track { height: 4px; background: var(--azul); border-radius: 2px; }
.faixa input[type=range]::-moz-range-track { height: 4px; background: var(--azul); border-radius: 2px; }
.filtros-acoes { display: grid; gap: 8px; padding-top: 14px; }
.btn-pri, .btn-sec { border-radius: 8px; padding: 11px 14px; font-weight: 700; border: 1.5px solid var(--azul); }
.btn-pri { background: var(--azul); color: #fff; }
.btn-pri:hover { background: var(--azul-forte); }
.btn-sec { background: #fff; color: var(--azul); display: inline-flex; align-items: center; gap: 8px; justify-content: center; }
.btn-sec:hover { background: var(--claro); }

/* ---------- Produtos ---------- */
.secao { margin-bottom: 28px; }
.secao-topo { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.secao h2 { margin: 0; font-size: 1.45rem; color: var(--azul); letter-spacing: -.01em; }
.secao-topo button { background: none; border: 0; color: var(--azul); font-weight: 600; padding: 4px; }
.secao-topo button:hover { text-decoration: underline; }
.resultado-info { color: var(--suave); margin: 0 0 12px; font-size: .95rem; }
.grade { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.card { background: #fff; border: 1px solid var(--borda); border-radius: 12px; box-shadow: var(--sombra); display: flex; flex-direction: column; overflow: hidden; position: relative; }
.card-foto { display: block; aspect-ratio: 1 / 1; background: #fff; padding: 10px; text-decoration: none; }
.card-foto img { width: 100%; height: 100%; object-fit: contain; display: block; }
.rank { position: absolute; left: 8px; top: 8px; background: var(--profundo); color: #fff; font-size: .75rem; font-weight: 700; border-radius: 6px; padding: 3px 8px; max-width: calc(100% - 100px); }
.card-acoes { position: absolute; right: 6px; top: 6px; display: flex; flex-direction: column; gap: 6px; }
.mini { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--borda); background: rgba(255, 255, 255, .95); color: var(--grafite); display: grid; place-items: center; padding: 0; text-decoration: none; }
.mini:hover { background: var(--claro); color: var(--azul); }
.mini svg { width: 19px; height: 19px; }
.mini.fav[aria-pressed="true"] { color: #c2185b; border-color: #f2b5cb; }
.mini.fav[aria-pressed="true"] svg { fill: #c2185b; }
.mini.zap { color: #1a9d4b; }
.card-corpo { padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-nome { margin: 0; font-size: .92rem; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.6em; }
.card-preco { margin-top: auto; font-size: 1.35rem; font-weight: 800; color: var(--verde); letter-spacing: -.01em; }
.card-data { font-size: .75rem; color: var(--suave); margin: -4px 0 0; }
.card-atual { font-size: .8rem; }
.card-btn { display: block; text-align: center; background: var(--azul); color: #fff; text-decoration: none; font-weight: 700; padding: 10px 8px; border-radius: 8px; margin-top: 4px; }
.card-btn:hover { background: var(--azul-forte); }
.sub-loja { margin: 18px 0 8px; font-size: 1.02rem; color: var(--grafite); font-weight: 700; }
.secao .grade + .sub-loja { margin-top: 22px; }
.loja-tag { align-self: flex-start; font-size: .7rem; font-weight: 700; letter-spacing: .02em; border-radius: 6px; padding: 2px 8px; border: 1px solid var(--borda); background: var(--fundo); color: var(--grafite); }
.loja-tag.loja-shopee { background: #fff1ec; border-color: #f6c4b6; color: #b3361a; }
.loja-tag.loja-mercadolivre { background: #fff9d6; border-color: #eadb7a; color: #5f5300; }
/* categoria sazonal (Natal): destaque discreto */
.menu button[data-cat="natal"] { color: #b3361a; font-weight: 700; }
.cats-faixa [data-cat="natal"] .ic { background: #ffe9e3; color: #b3361a; }
.cats-faixa [data-cat="natal"]:hover .ic, .cats-faixa [data-cat="natal"][aria-current="true"] .ic { background: #b3361a; color: #fff; }
.rodape-aviso2 { margin-top: 0; font-weight: 600; }
.vazio { text-align: center; color: var(--suave); padding: 40px 12px; font-size: 1.05rem; }
.barra-mobile { display: none; }

/* ---------- Sobre, privacidade, rodapé ---------- */
.info { max-width: 1240px; margin: 0 auto; padding: 8px 16px 8px; }
.info h2 { color: var(--azul); margin: 18px 0 6px; }
.info p { margin: 0 0 8px; max-width: 80ch; }
.rodape { background: var(--profundo); color: #cfe0f5; margin-top: 28px; padding: 28px 16px 22px; }
.rodape > * { max-width: 1240px; margin-left: auto; margin-right: auto; }
.rodape-topo { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 40px; padding-bottom: 18px; border-bottom: 1px solid rgba(255, 255, 255, .18); }
.logo-claro { color: #fff; }
.logo-claro b { color: #fff; }
.rodape-frase { margin: 0; font-style: italic; flex: 1; min-width: 200px; }
.rodape nav { display: flex; gap: 40px; }
.rodape nav div { display: grid; gap: 4px; font-size: .92rem; }
.rodape nav b { color: #fff; }
.rodape nav a { color: #cfe0f5; text-decoration: none; }
.rodape nav a:hover { text-decoration: underline; }
.rodape-aviso { font-weight: 600; color: #fff; margin: 16px auto 6px; }
.rodape-fonte { font-size: .85rem; margin: 0 auto; opacity: .85; }

.topo-btn { position: fixed; right: 16px; bottom: 18px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--azul); color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); display: grid; place-items: center; z-index: 25; }
.topo-btn[hidden] { display: none; }
.so-mobile { display: none; }

/* ---------- Celular e tablet ---------- */
@media (max-width: 899px) {
  .so-mobile { display: grid; }
  .btn-sec.so-mobile, .btn-pri.so-mobile { display: block; }
  .topo-linha { flex-wrap: wrap; gap: 8px 8px; padding: 8px 12px; }
  .logo { font-size: 1.2rem; }
  .logo img { width: 34px; height: 34px; }
  .busca { order: 5; flex: 1 0 100%; max-width: none; }
  .btn-fav { margin-left: auto; padding: 6px; }
  .btn-fav span { display: none; }
  .menu { display: none; }
  .hero { min-height: 340px; flex-direction: column; justify-content: flex-end; align-items: stretch; }
  .hero-sombra { background: linear-gradient(0deg, rgba(0, 23, 55, .8) 0%, rgba(0, 23, 55, .25) 70%, transparent 100%); }
  .hero-texto { padding: 16px 16px 28px; }
  .hero-espaco { position: relative; order: -1; right: auto; top: auto; transform: none; width: auto; margin: 16px 16px 0; font-size: .8rem; }
  .cats-faixa ul { justify-content: flex-start; padding: 10px 12px; }
  .cats-faixa li { flex: 0 0 88px; }
  .ic { width: 54px; height: 54px; }
  .miolo { grid-template-columns: 1fr; padding: 12px 12px 0; }
  .barra-mobile { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
  .barra-mobile span { color: var(--suave); font-size: .9rem; }
  .filtros { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; top: auto; max-height: 86vh; overflow-y: auto; border-radius: 16px 16px 0 0; transform: translateY(105%); transition: transform .25s ease; box-shadow: 0 -8px 30px rgba(0, 0, 0, .3); padding: 14px 16px 18px; visibility: hidden; }
  .filtros.aberto { transform: none; visibility: visible; }
  .grade { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .secao h2 { font-size: 1.2rem; }
  .card-corpo { padding: 6px 10px 10px; }
  .card-nome { font-size: .85rem; }
  .card-preco { font-size: 1.15rem; }
  .card-btn { font-size: .9rem; padding: 9px 6px; }
  .rank { font-size: .68rem; padding: 2px 6px; max-width: calc(100% - 84px); }
  .mini { width: 32px; height: 32px; }
  .rodape nav { gap: 24px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .filtros { transition: none; } }
