/* ==================================================================
   VARIÁVEIS E TEMAS (claro / escuro)
   ================================================================== */

:root {
  --bg: #f3f5fb;
  --surface: #fff;
  --ink: #0a1a4a;
  --muted: #5a6488;
  --line: #dce1f0;
  --tag: #ffb81c;
  --tag-ink: #0a1a4a;
  --hot: #e8690a;
  --blue: #1e5bff;
  --head: #050b26;
  --ok: #12a150;
  --shadow: 0 8px 24px rgba(20,32,79,.10);
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top,0px);
  padding-bottom: env(safe-area-inset-bottom,0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #050b24;
    --surface: #0d1740;
    --ink: #eef0ff;
    --muted: #a3abd1;
    --line: #22306b;
    --shadow: 0 8px 24px rgba(0,0,0,.4);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #050b24;
  --surface: #0d1740;
  --ink: #eef0ff;
  --muted: #a3abd1;
  --line: #22306b;
  --shadow: 0 8px 24px rgba(0,0,0,.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .stars {
    color: #ffc94d;
  }
}

:root[data-theme="dark"] .stars {
  color: #ffc94d;
}

:root[data-theme="dark"] .note {
  color: #8fb0ff;
  background: rgba(143,176,255,.14);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .note {
    color: #8fb0ff;
    background: rgba(143,176,255,.14);
  }
}


/* ==================================================================
   BASE (reset, tipografia, foco)
   ================================================================== */

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(env(safe-area-inset-top,0px) + 92px);
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 "Bricolage Grotesque",system-ui,-apple-system,"Segoe UI",sans-serif;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--hot);
  outline-offset: 2px;
}

/* Elementos com o atributo hidden somem de verdade, mesmo os que têm display próprio */
[hidden] {
  display: none !important;
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top,0px);
  background: var(--tag);
  z-index: 60;
}


/* ==================================================================
   BARRA AMARELA DO TOPO
   ================================================================== */

.topbar {
  background: var(--tag);
  color: var(--tag-ink);
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  padding: 8px 12px;
}


/* ==================================================================
   CABEÇALHO (logo, busca, Instagram, carrinho)
   ================================================================== */

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-copy strong {
  font: 900 20px 'Montserrat',sans-serif;
  color: var(--bg);
  letter-spacing: -1px;
}

.brand-copy strong span {
  color: #f59b00;
}

.brand-copy small {
  font-size: 10px;
  color: #9d9ea0;
  margin-top: 6px;
}

header {
  position: sticky;
  top: env(safe-area-inset-top,0px);
  z-index: 50;
  background: var(--head);
  border-bottom: 3px solid var(--tag);
}

header .icon-btn {
  background: transparent;
  color: #fff;
  border-color: rgba(255,184,28,.7);
}

header .search input {
  background: #fff;
  color: #0a1a4a;
  border-color: transparent;
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 76px;
}

.logo img {
  display: block;
  height: 60px;
  width: auto;
  border-radius: 10px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -.02em;
  text-decoration: none;
  color: var(--ink);
}

.logo i {
  display: inline-block;
  background: var(--tag);
  color: var(--tag-ink);
  padding: 2px 10px 2px 16px;
  clip-path: polygon(10px 0,100% 0,100% 100%,10px 100%,0 50%);
  font-style: normal;
}

.search {
  flex: 1;
  max-width: 460px;
  margin-left: auto;
  position: relative;
}

.search input {
  width: 100%;
  height: 42px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  padding: 0 16px;
}

.icon-btn {
  position: relative;
  height: 42px;
  min-width: 42px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  padding: 0 14px;
  font-weight: 600;
}

.badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--hot);
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0 5px;
}

header .logo .brand-copy strong {
  color: #fff;
}

header .ig-btn {
  display: grid;
  place-items: center;
  padding: 0;
  width: 42px;
  color: var(--tag);
}


/* ==================================================================
   MENU PRINCIPAL (Início, Categorias, Ofertas, Sobre)
   ================================================================== */

.menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.menu a,
.menu button {
  background: none;
  border: 0;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}

.menu a:hover,
.menu button:hover,
.menu a.on,
.menu button.on {
  background: rgba(255,184,28,.18);
  color: var(--tag);
}

.dd {
  position: relative;
}

.dd-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 6px;
  display: none;
  z-index: 70;
}

.dd-list.on {
  display: block;
}

.dd-list button {
  display: block;
  width: 100%;
  text-align: left;
  color: var(--ink);
  border-radius: 10px;
  font-size: 15px;
}

.dd-list button:hover {
  background: var(--bg);
  color: var(--ink);
}


/* ==================================================================
   BOTÕES
   ================================================================== */

.btn {
  display: inline-block;
  border: 0;
  border-radius: 14px;
  padding: 13px 22px;
  font-weight: 700;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
}

.btn.hot {
  background: var(--hot);
  color: #fff;
}

.btn.ghost {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--ink);
}


/* ==================================================================
   HERO (título principal e etiquetas animadas)
   ================================================================== */

.hero {
  padding: 44px 0 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 28px;
  align-items: center;
}

h1 {
  font-size: clamp(38px,6.4vw,72px);
  line-height: .98;
  letter-spacing: -.035em;
  font-weight: 800;
  margin: 0 0 16px;
}

.hero p {
  color: var(--muted);
  font-size: 18px;
  max-width: 46ch;
  margin: 0 0 22px;
}

/* ---------- Etiquetas dos produtos mais vendidos ---------- */

.stack {
  position: relative;
  height: 440px;
}

.stack[hidden] {
  display: none;
}

.tagcard {
  position: absolute;
  display: block;
  width: 214px;
  padding: 18px 16px 14px;
  background: var(--tag);
  color: var(--tag-ink);
  border-radius: 18px;
  box-shadow: var(--shadow);
  text-align: left;
  text-decoration: none;
  font-weight: 800;
  animation: swing .7s cubic-bezier(.2,1.2,.4,1) backwards;
  transition: transform .25s ease, box-shadow .25s ease;
}

/* o "furinho" da etiqueta */
.tagcard::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 2px 3px rgba(0,0,0,.25);
}

/* foto (ou emoji) + selo "Top 1" */
.tg-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-top: 22px;
}

.tg-media {
  display: flex;
  align-items: center;
  height: 52px;
  font-size: 44px;
  line-height: 1;
}

.tg-media img {
  height: 52px;
  width: auto;
  max-width: 100px;
  padding: 3px;
  border-radius: 10px;
  background: #fff;
  object-fit: contain;
}

.tg-rank {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(10,26,74,.14);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

/* nome do produto (até 2 linhas) */
.tagcard .n {
  display: -webkit-box;
  min-height: 2.5em;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* preço atual + preço "de" na mesma linha (quebra só se faltar espaço) */
.tg-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 8px;
  margin-top: 4px;
}

.tagcard .p {
  font-size: 28px;
  letter-spacing: -.03em;
  white-space: nowrap;
}

.tagcard s {
  font-size: 13px;
  font-weight: 600;
  opacity: .65;
  white-space: nowrap;
}

.tg-sales {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  opacity: .85;
}

/* posição, giro e cor de cada etiqueta (a última da lista fica na frente) */
.tagcard:nth-child(1) {
  left: 0;
  top: 0;
  transform: rotate(-7deg);
}

.tagcard:nth-child(2) {
  right: 0;
  top: 8px;
  background: #fff;
  color: var(--ink);
  transform: rotate(6deg);
  animation-delay: .12s;
}

.tagcard:nth-child(3) {
  left: 50%;
  bottom: 0;
  margin-left: -107px;
  background: var(--hot);
  color: #fff;
  transform: rotate(-2deg);
  animation-delay: .24s;
}

.tagcard:nth-child(2) .tg-rank {
  background: rgba(10,26,74,.08);
}

.tagcard:nth-child(3) .tg-rank {
  background: rgba(255,255,255,.24);
}

/* ao passar o mouse a etiqueta sobe um pouco */
.tagcard:nth-child(1):hover {
  transform: rotate(-7deg) translateY(-6px);
}

.tagcard:nth-child(2):hover {
  transform: rotate(6deg) translateY(-6px);
}

.tagcard:nth-child(3):hover {
  transform: rotate(-2deg) translateY(-6px);
}

@keyframes swing {
  from {
    transform: translateY(-30px) rotate(-14deg);
    opacity: 0;
  }
}

/* Telas menores: as etiquetas viram uma fileira que desliza para o lado
   (a nº 1 vem primeiro), para nenhuma esconder o nome da outra. */
@media (max-width: 1000px) {
  .stack {
    display: flex;
    gap: 14px;
    height: auto;
    padding: 14px 8px 34px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .stack::-webkit-scrollbar {
    display: none;
  }

  .stack .tagcard:nth-child(n),
  .stack .tagcard:nth-child(n):hover {
    position: relative;
    flex: 0 0 214px;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    margin-left: 0;
    transform: none;
    scroll-snap-align: start;
  }

  .stack .tagcard:nth-child(3) {
    order: -1;
  }
}


/* ==================================================================
   VANTAGENS (Pix, frete, compra segura, troca)
   ================================================================== */

.perks {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 12px;
  margin: 8px 0 34px;
}

.perk {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  font-size: 14px;
}

.perk b {
  display: block;
  font-size: 15px;
}


/* ==================================================================
   TÍTULOS DE SEÇÃO E FILTROS DE CATEGORIA
   ================================================================== */

.sec-h {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0 16px;
}

h2 {
  font-size: clamp(26px,3.6vw,38px);
  letter-spacing: -.025em;
  margin: 0;
  font-weight: 800;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.chip {
  white-space: nowrap;
  border: 1.5px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
}

.chip[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}


/* ==================================================================
   VITRINE: CARDS DE PRODUTO
   ================================================================== */

/* Para mudar o tamanho dos cards, mexa só nestas duas variáveis:
     --card-min : largura mínima de cada card (menor = mais cards por linha)
     --thumb-h  : altura da área da foto
   Valores atuais: cards compactos (cerca de 5 por linha no computador
   e 2 por linha no celular). Antes eram 240px e 200px. */

.grid {
  --card-min: 190px;
  --thumb-h: 150px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--card-min), 1fr));
  gap: 14px;
  margin-bottom: 40px;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 40px 0;
}


/* ---------- O card ---------- */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(10,26,74,.05);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  animation: rise .5s cubic-bezier(.2,.8,.2,1) both;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--tag);
  box-shadow: 0 14px 30px rgba(10,26,74,.16);
}

.card:nth-child(2) { animation-delay: .04s; }
.card:nth-child(3) { animation-delay: .08s; }
.card:nth-child(4) { animation-delay: .12s; }
.card:nth-child(5) { animation-delay: .16s; }
.card:nth-child(6) { animation-delay: .20s; }
.card:nth-child(n+7) { animation-delay: .24s; }

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}


/* ---------- Foto (ou emoji) ---------- */

.thumb {
  position: relative;
  display: grid;
  place-items: center;
  height: var(--thumb-h);
  margin: 8px 8px 0;
  border-radius: 13px;
  overflow: hidden;
  font-size: 62px;
  text-shadow: 0 10px 16px rgba(0,0,0,.18);
}

.thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 25% 15%, rgba(255,255,255,.75), transparent 60%);
  pointer-events: none;
}

.thumb img {
  width: 100%;
  height: 100%;
  padding: 6px;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform .45s ease;
}

.card:hover .thumb img {
  transform: scale(1.07);
}

.embed {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: var(--thumb-h);
  margin: 8px 8px 0;
  padding: 8px;
  border-radius: 13px;
  background: #fff;
  overflow: hidden;
}

.embed iframe,
.embed img {
  max-width: 100%;
}

.off {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--hot);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(232,105,10,.4);
}


/* ---------- Informações ---------- */

.info {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 5px;
  padding: 10px 12px 12px;
}

.cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}

.name {
  font-weight: 700;
  line-height: 1.25;
}

.card .name {
  min-height: 2.5em;
  font-size: 13.5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(255,184,28,.16);
  color: #a86b00;
  font-size: 11.5px;
  font-weight: 700;
}

.stars span {
  color: var(--muted);
  font-weight: 500;
}

:root[data-theme="dark"] .stars {
  color: #ffc94d;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .stars {
    color: #ffc94d;
  }
}

.price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
}

.price b {
  font-size: 22px;
  letter-spacing: -.03em;
}

.price s {
  font-size: 12px;
  color: var(--muted);
}

/* "a partir de" (produtos com variações de preço): fica numa linha acima do preço */
.price {
  flex-wrap: wrap;
}

.price .from {
  flex: 0 0 100%;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--muted);
}

/* Texto "no Pix" (também usado no carrinho) */
.pix {
  font-size: 12px;
  font-weight: 600;
  color: var(--ok);
}

/* No card, "no Pix" (venda própria) e "Compra finalizada na Shopee" (afiliado) viram etiquetas */
.card .pix,
.note {
  display: inline-block;
  width: fit-content;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.card .pix {
  background: rgba(18,161,80,.13);
  color: var(--ok);
}

.note {
  background: rgba(30,91,255,.10);
  color: var(--blue);
}

:root[data-theme="dark"] .note {
  background: rgba(143,176,255,.14);
  color: #8fb0ff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .note {
    background: rgba(143,176,255,.14);
    color: #8fb0ff;
  }
}


/* ---------- Botão do card ---------- */

.add {
  width: 100%;
  margin-top: 6px;
  padding: 9px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--tag), #ff9d00);
  color: var(--tag-ink);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 6px 12px rgba(255,157,0,.30);
  transition: transform .15s ease, box-shadow .15s ease;
}

.add::after {
  content: "\00a0→";
  display: inline-block;
  transition: transform .2s ease;
}

.add:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(255,157,0,.40);
}

.add:hover::after {
  transform: translateX(4px);
}

.add:active {
  transform: scale(.97);
}

/* No celular o botão do card é um link de verdade (dá para segurar o dedo e abrir em outra aba) */
a.add {
  display: block;
  text-align: center;
  text-decoration: none;
}

/* Botão "Ver mais produtos" abaixo da vitrine */
.more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: -20px 0 48px;
}

.more span {
  font-size: 13px;
  color: var(--muted);
}


/* ---------- Galeria de fotos (várias fotos por produto) ---------- */

.gal {
  position: absolute;
  inset: 0;
}

.track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.track::-webkit-scrollbar {
  display: none;
}

.slide {
  flex: 0 0 100%;
  height: 100%;
  display: grid;
  place-items: center;
  scroll-snap-align: center;
}

.gnav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: #0a1a4a;
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,.22);
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity .2s;
}

.gnav.prev { left: 6px; }
.gnav.next { right: 6px; }

.card:hover .gnav,
.gnav:focus-visible {
  opacity: 1;
}

.dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 5px;
}

.dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(10,26,74,.3);
  transition: width .2s, background .2s;
}

.dot.on {
  width: 15px;
  background: var(--hot);
}

/* Em telas de toque as setas saem (o dedo desliza a foto) */
@media (hover: none) {
  .gnav {
    display: none;
  }
}


/* ---------- Cards no celular: 2 por linha, ainda mais compactos ---------- */

@media (max-width: 560px) {
  .grid {
    --thumb-h: 118px;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .card {
    border-radius: 16px;
  }

  .thumb {
    margin: 6px 6px 0;
    font-size: 48px;
  }

  .embed {
    margin: 6px 6px 0;
  }

  .info {
    gap: 4px;
    padding: 8px 10px 10px;
  }

  .card .name {
    font-size: 12.5px;
  }

  .price b {
    font-size: 18px;
  }

  .price s {
    font-size: 11px;
  }

  .card .pix,
  .note {
    font-size: 10px;
  }

  .add {
    padding: 8px 4px;
    font-size: 12px;
  }

  .add::after {
    display: none;
  }
}


/* ==================================================================
   CUPOM DE PRIMEIRA COMPRA
   ================================================================== */

.promo {
  background: var(--ink);
  color: var(--bg);
  border-radius: 22px;
  padding: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.promo h2 {
  color: var(--bg);
}

.promo p {
  margin: 6px 0 0;
  opacity: .8;
}

.promo code {
  background: var(--tag);
  color: var(--tag-ink);
  padding: 2px 10px;
  border-radius: 8px;
  font-weight: 800;
}


/* ==================================================================
   SOBRE A WALIX
   ================================================================== */

.about {
  margin-bottom: 48px;
}

.about .lead {
  color: var(--muted);
  font-size: 18px;
  max-width: 62ch;
  margin: 10px 0 18px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 12px;
}


/* ==================================================================
   INSTAGRAM (botão colorido e link do rodapé)
   ================================================================== */

.ig-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(45deg,#f58529,#dd2a7b 55%,#8134af);
  color: #fff;
}

.ig-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}


/* ==================================================================
   RODAPÉ
   ================================================================== */

footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 30px 0;
  color: var(--muted);
  font-size: 14px;
}

.fgrid {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.disclosure {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}


/* ==================================================================
   CARRINHO (gaveta lateral)
   ================================================================== */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,14,40,.55);
  opacity: 0;
  pointer-events: none;
  transition: .2s;
  z-index: 80;
}

.overlay.on {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px,100%);
  background: var(--surface);
  z-index: 90;
  transform: translateX(100%);
  transition: transform .25s;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top,0px);
}

.drawer.on {
  transform: none;
}

.dh {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.dh h3 {
  margin: 0;
  font-size: 20px;
}

.ship {
  padding: 12px 20px;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}

.bar {
  height: 8px;
  background: var(--line);
  border-radius: 9px;
  margin-top: 6px;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  background: var(--ok);
  width: 0;
  transition: width .3s;
}

.items {
  flex: 1;
  overflow: auto;
  padding: 8px 20px;
}

.it {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.it .em {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 28px;
}

.it small {
  color: var(--muted);
}

.qty {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.qty button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  background: var(--bg);
}

.rm {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
}

.df {
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom,0px));
  border-top: 1px solid var(--line);
}

.row {
  display: flex;
  justify-content: space-between;
  margin: 4px 0;
}

.row.t {
  font-size: 20px;
  font-weight: 800;
  margin-top: 8px;
}

.coupon {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.coupon input {
  flex: 1;
  height: 40px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  background: var(--bg);
}


/* ==================================================================
   JANELA DE FINALIZAR COMPRA
   ================================================================== */

.modal {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(480px,calc(100% - 28px));
  max-height: calc(100% - 40px);
  overflow: auto;
  background: var(--surface);
  border-radius: 20px;
  padding: 24px;
  z-index: 100;
  transform: translate(-50%,-46%);
  opacity: 0;
  pointer-events: none;
  transition: .2s;
}

.modal.on {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%,-50%);
}

.modal label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-top: 12px;
}

.modal input,
.modal select {
  width: 100%;
  height: 44px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  background: var(--bg);
  margin-top: 4px;
}


/* ==================================================================
   AVISO FLUTUANTE (toast)
   ================================================================== */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom,0px));
  transform: translate(-50%,30px);
  background: var(--ink);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  opacity: 0;
  transition: .25s;
  z-index: 120;
  pointer-events: none;
}

.toast.on {
  opacity: 1;
  transform: translate(-50%,0);
}


/* ==================================================================
   RESPONSIVO (telas até 820px)
   ================================================================== */

@media (max-width: 820px) {
  .logo {
    margin-right: auto;
  }

  .menu {
    order: 4;
    flex-basis: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 0;
  }

  .menu a,
  .menu button {
    padding: 6px 8px;
    font-size: 14px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .perks {
    grid-template-columns: 1fr 1fr;
  }

  .logo img {
    height: 50px;
  }

  .search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }

  .nav {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 0;
  }

  .search {
    margin: 0;
  }

  .brand-copy strong {
    font-size: 17px;
  }

  .brand-copy small {
    font-size: 8px;
  }
}


/* ==================================================================
   ACESSIBILIDADE: quem prefere menos animação
   ================================================================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none!important;
    transition: none!important;
  }
}
