/* VAREJO — stylesheet base NickPC
   modernizado automaticamente (FERRAMENTAS/modernizar-base.js) */
/* ============================================
   BASE: VAREJO — estilo Magazine Luiza / Mercado Livre
   Nichos: 05 Varejo, lojas em geral
   TROQUE: --primaria (cor da marca), --destaque
   ============================================ */
:root {
  --primaria: #0072e8; /* TROQUE: cor principal da loja */
  --primaria-escura: #005bbb;
  --primaria-claro: #eaf3ff;
  --destaque: #ffd400; /* cor de selos/ofertas */
  --fundo: #f5f5f5;
  --card: #ffffff;
  --texto: #333333;
  --texto-suave: #777777;
  --borda: #e0e0e0;
  --verde: #00a650;
  --raio: 8px;
  --sombra: 0 1px 4px rgba(0, 0, 0, 0.08);
  --sombra-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Inter", sans-serif;
  background: var(--fundo);
  color: var(--texto);
  line-height: 1.5;
  padding-bottom: 64px;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* TICKER */
.ticker {
  background: #232f3e;
  color: #fff;
  font-size: 0.78rem;
  padding: 7px 0;
  overflow: hidden;
  white-space: nowrap;
}
.ticker .trilho {
  display: inline-block;
  animation: deslizar 30s linear infinite;
}
.ticker span {
  margin-right: 56px;
}
@keyframes deslizar {
  0% {
    transform: translateX(100vw);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* HEADER */
header {
  background: var(--primaria);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.header-topo {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 0;
}
.logo {
  font-size: 1.7rem;
  font-weight: 900;
  color: #fff;
  text-decoration: none;
  letter-spacing: -1px;
  white-space: nowrap;
}
.busca {
  flex: 1;
  display: flex;
  max-width: 640px;
}
.busca input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: var(--raio) 0 0 var(--raio);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
}
.busca button {
  background: var(--destaque);
  border: none;
  padding: 0 20px;
  cursor: pointer;
  border-radius: 0 var(--raio) var(--raio) 0;
  font-size: 1.1rem;
}
.header-acoes {
  display: flex;
  gap: 18px;
  align-items: center;
}
.acao {
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  position: relative;
  transition: transform 0.15s;
}
.acao:hover {
  transform: translateY(-2px);
}
.acao .icone {
  font-size: 1.4rem;
}
.badge-carrinho {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--destaque);
  color: #232f3e;
  font-size: 0.68rem;
  font-weight: 800;
  border-radius: 100px;
  padding: 2px 7px;
  display: none;
}
.badge-carrinho.ativo {
  display: block;
}

/* NAV CATEGORIAS */
.nav-categorias {
  background: #fff;
  border-bottom: 1px solid var(--borda);
}
.nav-categorias .lista {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-categorias .lista::-webkit-scrollbar {
  display: none;
}
.nav-categorias button {
  background: none;
  border: none;
  padding: 13px 16px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--texto);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}
.nav-categorias button:hover {
  color: var(--primaria);
}
.nav-categorias button.ativo {
  color: var(--primaria);
  border-bottom-color: var(--primaria);
}

/* HERO */
.hero {
  position: relative;
  overflow: hidden;
}
.slides {
  display: flex;
  transition: transform 0.5s ease;
}
.slide {
  min-width: 100%;
  padding: 40px 16px;
}
.slide-inner {
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  min-height: 300px;
  padding: 48px;
  color: #fff;
}
.slide-1 .slide-inner {
  background: linear-gradient(120deg, var(--primaria), #1b3a6b);
}
.slide-2 .slide-inner {
  background: linear-gradient(120deg, #232f3e, #37475a);
}
.slide-3 .slide-inner {
  background: linear-gradient(120deg, var(--verde), #7ab929);
}
.slide h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 14px;
}
.slide p {
  font-size: 1.1rem;
  opacity: 0.92;
  margin-bottom: 24px;
  max-width: 460px;
}
.slide .btn {
  display: inline-block;
  background: var(--destaque);
  color: #232f3e;
  font-weight: 800;
  padding: 14px 28px;
  border-radius: var(--raio);
  text-decoration: none;
  transition:
    transform 0.15s,
    box-shadow 0.2s;
}
.slide .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.slide-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
}
.hero-setas {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 5;
  box-shadow: var(--sombra-hover);
}
.hero-pontos {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 0 18px;
}
.hero-pontos button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--borda);
  cursor: pointer;
  transition: all 0.2s;
}
.hero-pontos button.ativo {
  background: var(--primaria);
  transform: scale(1.3);
}

/* BENEFÍCIOS */
.beneficios {
  background: #fff;
  border-bottom: 1px solid var(--borda);
}
.beneficios .grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 18px 0;
}
.beneficio {
  display: flex;
  gap: 12px;
  align-items: center;
}
.beneficio .icone {
  font-size: 1.8rem;
}
.beneficio .titulo {
  font-weight: 700;
  font-size: 0.88rem;
}
.beneficio .desc {
  color: var(--texto-suave);
  font-size: 0.78rem;
}

/* SEÇÕES */
.secao-produtos {
  padding: 36px 0 12px;
}
.secao-cabecalho {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 8px;
}
.secao-cabecalho h2 {
  font-size: 1.5rem;
  font-weight: 800;
}
.secao-cabecalho .contador {
  color: var(--texto-suave);
  font-size: 0.9rem;
}

/* PRODUTOS */
.produtos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}
.produto {
  background: var(--card);
  border-radius: var(--raio);
  box-shadow: var(--sombra);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.produto:hover {
  transform: translateY(-4px);
  box-shadow: var(--sombra-hover);
}
.produto .foto {
  background: linear-gradient(135deg, var(--primaria-claro), #f3e8ff);
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4.5rem;
  position: relative;
}
.produto .selo {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--destaque);
  color: #232f3e;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
}
.produto .selo.novo {
  background: var(--primaria);
  color: #fff;
}
.produto .info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.produto .nome {
  font-size: 0.9rem;
  margin-bottom: 8px;
  line-height: 1.35;
  min-height: 2.7em;
}
.produto .preco {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.produto .preco .valor {
  font-size: 1.35rem;
  font-weight: 800;
}
.produto .preco .parcela {
  font-size: 0.78rem;
  color: var(--texto-suave);
  width: 100%;
}
.produto .pix {
  font-size: 0.78rem;
  color: var(--verde);
  font-weight: 600;
  margin: 6px 0 12px;
}
.produto .btn-add {
  margin-top: auto;
  background: var(--primaria);
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: var(--raio);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.produto .btn-add:hover {
  background: var(--primaria-escura);
}
.sem-resultado {
  text-align: center;
  padding: 60px 20px;
  color: var(--texto-suave);
  display: none;
}

/* BANNER */
.banner-mid {
  margin: 32px 0;
}
.banner-mid .interno {
  border-radius: 12px;
  padding: 40px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: linear-gradient(120deg, var(--primaria), #1b3a6b);
  box-shadow: var(--sombra-hover);
}
.banner-mid h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
}
.banner-mid p {
  opacity: 0.9;
  margin-top: 6px;
}
.banner-mid .btn {
  background: var(--destaque);
  color: #232f3e;
  font-weight: 800;
  padding: 14px 28px;
  border-radius: var(--raio);
  text-decoration: none;
  white-space: nowrap;
  display: inline-block;
}

/* CATEGORIAS TILES */
.categorias-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
}
.tile-cat {
  background: var(--card);
  border-radius: var(--raio);
  box-shadow: var(--sombra);
  padding: 22px 12px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s;
  border: none;
  font-family: inherit;
}
.tile-cat:hover {
  transform: translateY(-3px);
  box-shadow: var(--sombra-hover);
}
.tile-cat .icone {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 8px;
}
.tile-cat .nome {
  font-weight: 700;
  font-size: 0.85rem;
}

/* CARRINHO */
.carrinho-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.carrinho-overlay.aberto {
  opacity: 1;
  pointer-events: all;
}
.carrinho {
  position: fixed;
  top: 0;
  right: -420px;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: #fff;
  z-index: 301;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.2);
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}
.carrinho.aberto {
  right: 0;
}
.carrinho-topo {
  background: var(--primaria);
  color: #fff;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.carrinho-topo h3 {
  font-size: 1.1rem;
  font-weight: 800;
}
.carrinho-topo button {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}
.carrinho-lista {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}
.carrinho-vazio {
  text-align: center;
  color: var(--texto-suave);
  padding: 48px 16px;
}
.carrinho-vazio .icone {
  font-size: 3.2rem;
  display: block;
  margin-bottom: 12px;
}
.item-carrinho {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--borda);
}
.item-carrinho .foto-mini {
  font-size: 1.8rem;
  background: var(--primaria-claro);
  width: 52px;
  height: 52px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.item-carrinho .nome-item {
  font-size: 0.85rem;
  font-weight: 600;
  flex: 1;
}
.item-carrinho .preco-item {
  font-weight: 800;
  font-size: 0.9rem;
  white-space: nowrap;
}
.item-carrinho .remover {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
}
.carrinho-rodape {
  border-top: 1px solid var(--borda);
  padding: 18px 20px;
}
.carrinho-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.carrinho-total .rotulo {
  color: var(--texto-suave);
}
.carrinho-total .valor {
  font-size: 1.4rem;
  font-weight: 900;
}
.carrinho-nota {
  font-size: 0.78rem;
  color: var(--verde);
  font-weight: 600;
  margin-bottom: 14px;
}
.btn-finalizar {
  width: 100%;
  background: var(--verde);
  color: #fff;
  border: none;
  padding: 15px;
  border-radius: var(--raio);
  font-family: inherit;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-finalizar:hover {
  filter: brightness(0.92);
}
.btn-limpar {
  width: 100%;
  background: none;
  border: none;
  color: var(--texto-suave);
  font-family: inherit;
  font-size: 0.82rem;
  margin-top: 10px;
  cursor: pointer;
  text-decoration: underline;
}

/* RODAPÉ */
footer {
  background: #232f3e;
  color: #ddd;
  margin-top: 40px;
}
.rodape-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 44px 0;
}
.rodape-col h4 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.rodape-col a,
.rodape-col p {
  display: block;
  color: #aaa;
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.rodape-col a:hover {
  color: #fff;
}
.rodape-pg {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.selo-pg {
  background: #fff;
  color: #232f3e;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 4px;
}
.rodape-redes {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}
.rodape-redes a {
  font-size: 1.5rem;
}
.rodape-final {
  border-top: 1px solid #37475a;
  padding: 20px 0;
  text-align: center;
  font-size: 0.78rem;
  color: #888;
}

/* BARRA MOBILE */
.barra-mobile {
  display: none;
}
@media (max-width: 760px) {
  .barra-mobile {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--borda);
    z-index: 150;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
  }
  .barra-mobile button,
  .barra-mobile a {
    background: none;
    border: none;
    padding: 8px 4px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--texto-suave);
    text-decoration: none;
    font-family: inherit;
    position: relative;
  }
  .barra-mobile .rotulo {
    font-size: 0.62rem;
    font-weight: 700;
  }
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #232f3e;
  color: #fff;
  padding: 12px 22px;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 600;
  z-index: 400;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: var(--sombra-hover);
}
.toast.visivel {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.revelar {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.revelar.visivel {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .rodape-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .beneficios .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .slide-inner {
    grid-template-columns: 1fr;
    min-height: 240px;
    padding: 32px 24px;
  }
  .slide-visual {
    display: none;
  }
}
@media (max-width: 700px) {
  .header-topo {
    flex-wrap: wrap;
    gap: 12px;
  }
  .busca {
    order: 3;
    max-width: 100%;
    width: 100%;
  }
  .acao .rotulo {
    display: none;
  }
  .produtos {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .produto .foto {
    height: 140px;
    font-size: 3.4rem;
  }
  .produto .info {
    padding: 10px;
  }
  .produto .nome {
    font-size: 0.8rem;
  }
  .produto .preco .valor {
    font-size: 1.1rem;
  }
  .rodape-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ============================================================
   PADRAO NICKPC — correcoes de QA automaticas (v1.1)
   nao remover: contraste, foco visivel, movimento, imgs
   ============================================================ */
html {
  scroll-padding-top: 96px;
} /* header fixo nao cobre a ancora */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--primaria, #25d366);
  outline-offset: 2px;
}
img {
  height: auto;
} /* width/height no HTML viram so proporcao, nunca tamanho fixo */
h1,
h2,
h3 {
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}
