:root {
  --ivory: #f8f3ef;
  --paper: #fffdf9;
  --ink: #1a1714;
  --ink-2: #5b544c;
  --ink-3: #8f877d;
  --line: #ebe0e6;
  --gold: #ad72b4;
  --gold-2: #86498e;
  --gold-3: #ecd3ee;
  --gold-soft: #f4e8f5;
  --noir: #3b2442;
  --noir-2: #4b2f53;
  --danger: #b4412f;
  --ok: #2f7a4f;
  --whats: #1f9d55;
  --marca: #ad72b4;
  --creme: #f8f0e6;
  --r: 18px;
  --sombra: 0 1px 2px rgba(20, 17, 14, .05), 0 10px 30px rgba(20, 17, 14, .07);
  --serif: 'Tenor Sans', 'Trebuchet MS', sans-serif;
  --sans: 'Manrope', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font: 400 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
body.travado { overflow: hidden; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.demo-bar {
  background: var(--gold-soft);
  color: var(--gold-2);
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 16px;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px;
  padding: 12px 22px;
  font-weight: 600; font-size: 14px; letter-spacing: .02em;
  text-decoration: none;
  transition: transform .15s ease, background .2s ease, opacity .2s ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-ouro { background: var(--marca); color: #fff; box-shadow: 0 8px 24px rgba(173, 114, 180, .35); }
.btn-escuro { background: var(--noir); color: var(--paper); width: 100%; }
.btn-escuro:hover { background: var(--noir-2); }
.btn-linha { background: transparent; border: 1px solid var(--line); color: var(--ink-3); width: 100%; }
.btn-whats { background: var(--whats); color: #fff; width: 100%; padding: 15px 22px; font-size: 15px; }

/* ---------- Topo ---------- */
.topo {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px max(16px, env(safe-area-inset-left));
  background: rgba(173, 114, 180, .97);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: var(--paper);
}
.marca { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; line-height: 1; text-decoration: none; color: inherit; }
.marca-logo { grid-row: 1 / 3; width: 42px; height: 42px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(248, 240, 230, .7); }
.marca-nome { font: 400 22px/1 var(--serif); letter-spacing: .06em; color: var(--creme); }
.marca-sub { font-size: 9.5px; letter-spacing: .32em; text-transform: uppercase; color: rgba(248, 240, 230, .85); margin-top: 4px; }
.btn-sacola {
  position: relative; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); color: var(--paper);
}
.badge {
  position: absolute; top: -3px; right: -3px;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--creme); color: var(--noir);
  font-size: 11px; font-weight: 700; display: grid; place-items: center;
}

/* ---------- Faixa do topo (compacta) ---------- */
.hero {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px;
  padding: 14px 16px 16px; text-align: center;
  background: linear-gradient(180deg, var(--marca), #9d62a5); color: var(--creme);
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.hero-titulo { margin: 0; font: 400 clamp(19px, 4.6vw, 26px)/1.15 var(--serif); }
.hero-aviso {
  margin: 0; padding: 4px 12px; border-radius: 999px;
  border: 1px solid rgba(248, 240, 230, .6); color: var(--creme);
  font-size: 12px; font-weight: 600;
}

/* ---------- Mais vendidos ---------- */
.destaques { padding: 22px 0 6px; }
.destaques-titulo { margin: 0 0 12px; font: 400 26px/1 var(--serif); }
.faixa {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(158px, 42%);
  gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -16px; padding: 2px 16px 14px; scrollbar-width: none;
}
.faixa::-webkit-scrollbar { display: none; }
@media (min-width: 720px) { .faixa { grid-auto-columns: 220px; } }
.faixa .card { scroll-snap-align: start; }

/* ---------- Catálogo ---------- */
.catalogo { max-width: 1180px; margin: 0 auto; padding: 0 16px 120px; }
.filtros {
  position: sticky; top: 68px; z-index: 20;
  margin: 0 -16px; padding: 14px 16px 10px;
  background: linear-gradient(var(--ivory) 80%, rgba(248, 243, 239, 0));
}
.busca {
  display: flex; align-items: center; gap: 10px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px;
  padding: 0 16px; color: var(--ink-3);
  box-shadow: 0 1px 2px rgba(20, 17, 14, .04);
}
.busca input { flex: 1; border: 0; outline: 0; background: transparent; padding: 12px 0; font-size: 15px; color: var(--ink); min-width: 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips-tipo { padding-top: 8px; }
.chips-tipo .chip { padding: 6px 13px; font-size: 12.5px; background: transparent; }
.chips-tipo .chip.ativo { background: var(--gold-soft); border-color: var(--gold-3); color: var(--gold-2); }
.chip {
  flex: none; border: 1px solid var(--line); background: var(--paper);
  border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 600; color: var(--ink-2);
  transition: all .2s ease;
}
.chip.ativo { background: var(--noir); border-color: var(--noir); color: var(--paper); }
.contagem { margin: 6px 2px 14px; font-size: 12.5px; color: var(--ink-3); letter-spacing: .04em; }

.grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 720px) { .grade { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1040px) { .grade { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  display: flex; flex-direction: column;
  background: var(--paper); border-radius: var(--r); overflow: hidden;
  box-shadow: var(--sombra);
  animation: surgir .45s ease both;
}
@keyframes surgir { from { opacity: 0; transform: translateY(8px); } }
.card.esqueleto { aspect-ratio: 3 / 5; background: linear-gradient(100deg, var(--paper) 30%, var(--gold-soft) 50%, var(--paper) 70%) 0 0 / 300% 100%; animation: brilho 1.4s linear infinite; }
@keyframes brilho { to { background-position: -150% 0; } }
.card-foto { position: relative; display: block; padding: 0; border: 0; background: #f4efe7; aspect-ratio: 1; overflow: hidden; }
.card-foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
@media (hover: hover) { .card:hover .card-foto img { transform: scale(1.04); } }
.is-esgotado .card-foto img { filter: grayscale(.9); opacity: .55; }
.selos { position: absolute; top: 10px; left: 10px; display: flex; flex-wrap: wrap; gap: 5px; }
.selo {
  padding: 4px 9px; border-radius: 999px;
  background: rgba(255, 253, 249, .94); color: var(--ink);
  font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
.selo-ouro { background: var(--noir); color: var(--gold-3); }
.selo-promo { background: var(--danger); color: #fff; }
.selo-esg { background: var(--ink-2); color: #fff; }
.card-corpo { display: flex; flex-direction: column; flex: 1; padding: 12px 12px 14px; }
@media (min-width: 720px) { .card-corpo { padding: 16px 16px 18px; } }
.card-cat { margin: 0 0 4px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); font-weight: 700; }
.card-nome { margin: 0; font: 400 21px/1.1 var(--serif); }
@media (min-width: 720px) { .card-nome { font-size: 23px; } }
.card-notas { margin: 6px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.preco { margin: 10px 0 0; font-size: 16px; }
.preco s { color: var(--ink-3); font-size: 12.5px; margin-right: 2px; }
.preco strong { font-weight: 700; }
.consulte { font-size: 13px; font-weight: 600; color: var(--gold-2); }
.card-acao { margin-top: auto; padding-top: 12px; }
.card-acao .btn { padding: 11px 12px; }

.stepper {
  display: flex; align-items: center; justify-content: space-between;
  border: 1.5px solid var(--noir); border-radius: 999px; height: 44px; overflow: hidden;
}
.stepper button { width: 44px; height: 100%; border: 0; background: transparent; font-size: 20px; line-height: 1; }
.stepper button:active { background: var(--gold-soft); }
.stepper span { font-weight: 700; }
.stepper-p { height: 34px; width: 116px; margin-top: 8px; border-width: 1px; }
.stepper-p button { width: 36px; font-size: 17px; }

.vazio, .sacola-vazia { text-align: center; color: var(--ink-3); padding: 48px 16px; }
.vazio-titulo { font: 400 24px/1.2 var(--serif); color: var(--ink); margin: 0 0 6px; }
.erro { grid-column: 1 / -1; text-align: center; color: var(--danger); padding: 40px 0; }

.rodape { text-align: center; color: var(--ink-3); font-size: 13px; padding: 40px 16px 120px; border-top: 1px solid var(--line); }
.rodape p { margin: 2px 0; }
.rodape-marca { font: 400 24px/1 var(--serif); color: var(--ink); }
.rodape a { color: var(--gold-2); font-weight: 600; text-decoration: none; display: inline-block; margin-top: 8px; }

/* ---------- Barra do pedido (fixa embaixo) ---------- */
.barra-pedido {
  position: fixed; z-index: 25; left: 16px; right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  max-width: 520px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; border: 0; border-radius: 999px;
  background: var(--noir); color: var(--paper);
  box-shadow: 0 14px 40px rgba(20, 17, 14, .35);
  font-weight: 600; animation: subir .35s ease both;
}
@keyframes subir { from { transform: translateY(30px); opacity: 0; } }
.barra-cta { color: var(--gold-3); }

/* ---------- Sacola (gaveta) ---------- */
.veu { position: fixed; inset: 0; z-index: 40; background: rgba(20, 17, 14, .5); animation: aparecer .25s ease both; }
@keyframes aparecer { from { opacity: 0; } }
.sacola {
  position: fixed; z-index: 50; top: 0; right: 0; bottom: 0;
  width: min(440px, 100%);
  display: flex; flex-direction: column;
  background: var(--paper);
  transform: translateX(100%); transition: transform .32s cubic-bezier(.2, .8, .2, 1);
  box-shadow: -20px 0 50px rgba(20, 17, 14, .2);
}
.sacola.aberta { transform: none; }
.sacola-topo { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.sacola-topo h2 { margin: 0; font: 400 28px/1 var(--serif); }
.fechar { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); font-size: 22px; line-height: 1; }
.sacola-itens { flex: 1; overflow-y: auto; padding: 8px 20px; }
.item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.item img { width: 76px; height: 76px; border-radius: 12px; object-fit: cover; background: #f4efe7; flex: none; }
.item-info { flex: 1; min-width: 0; }
.item-nome { margin: 0; font: 400 19px/1.15 var(--serif); }
.item-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-3); }
.item-remover { align-self: flex-start; border: 0; background: none; color: var(--ink-3); font-size: 22px; padding: 0 4px; }
.sacola-rodape { padding: 16px 20px max(18px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--ivory); }
.progresso p { margin: 0 0 8px; font-size: 13px; color: var(--ink-2); }
.trilho { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-bottom: 14px; }
.trilho-cheio { height: 100%; border-radius: 3px; background: linear-gradient(90deg, #d7aedc, var(--marca)); transition: width .3s ease; }
.trilho-cheio.ok { background: var(--ok); }
.sacola-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; font-weight: 600; }
.sacola-total strong { font-size: 19px; }
.sacola-total small { font-size: 11px; font-weight: 500; color: var(--ink-3); }
.campos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.campos input { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); font-size: 16px; outline: 0; }
.campos input:focus { border-color: var(--gold); }
.campos input.invalido { border-color: var(--danger); }
.sacola-nota { margin: 10px 0 0; text-align: center; font-size: 12px; color: var(--ink-3); }

/* ---------- Detalhe ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: end center; background: rgba(20, 17, 14, .55); animation: aparecer .2s ease both; }
@media (min-width: 720px) { .modal { place-items: center; padding: 24px; } }
.modal-caixa {
  position: relative; width: 100%; max-width: 860px; max-height: 92vh; overflow-y: auto;
  background: var(--paper); border-radius: 24px 24px 0 0; animation: subir .3s ease both;
}
@media (min-width: 720px) { .modal-caixa { border-radius: 24px; } }
.fechar-modal { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(255, 253, 249, .92); }
.detalhe { display: grid; }
@media (min-width: 720px) { .detalhe { grid-template-columns: 1fr 1fr; } }
.detalhe-foto { position: relative; background: #f4efe7; aspect-ratio: 1; }
.detalhe-foto img { width: 100%; height: 100%; object-fit: cover; }
.detalhe-info { padding: 22px 22px 26px; display: flex; flex-direction: column; }
@media (min-width: 720px) { .detalhe-info { padding: 40px 34px; } }
.detalhe-nome { margin: 0; font: 400 34px/1.05 var(--serif); }
.preco-grande { font-size: 20px; margin-top: 12px; }
.detalhe-bloco { margin-top: 18px; font-size: 14px; color: var(--ink-2); }
.detalhe-bloco p { margin: 0; }
.rotulo { font-size: 10.5px !important; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--gold-2); margin-bottom: 4px !important; }
.detalhe-acao { margin-top: 24px; }
@media (min-width: 720px) { .detalhe-acao { margin-top: auto; padding-top: 24px; } }

/* ---------- Aviso rápido ---------- */
.toast {
  position: fixed; z-index: 80; left: 50%; bottom: 96px;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--noir); color: var(--paper);
  padding: 11px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(20, 17, 14, .3);
  transition: all .25s ease; max-width: calc(100% - 32px); text-align: center;
}
.toast.visivel { opacity: 1; transform: translate(-50%, 0); }

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

/* ---------- Ajustes de celular ---------- */
.card-nome { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 719px) {
  .filtros { position: static; }
  .card-nome { font-size: 17px; line-height: 1.15; -webkit-line-clamp: 2; }
  .card-cat { font-size: 9.5px; letter-spacing: .1em; }
  .card-notas { font-size: 11.5px; }
  .card-corpo { padding: 10px 10px 12px; }
  .destaques-titulo { font-size: 22px; }
}

/* ---------- Banner de renda extra ---------- */
.banner {
  position: relative; overflow: hidden;
  margin-top: 18px; padding: 22px 20px;
  border-radius: 22px; color: var(--creme);
  background: radial-gradient(120% 140% at 100% 0%, #c590cc 0%, var(--marca) 45%, #6e3f78 100%);
  box-shadow: 0 14px 34px rgba(110, 63, 120, .28);
}
.banner::after {
  content: ''; position: absolute; right: -40px; bottom: -60px; width: 200px; height: 200px;
  border-radius: 50%; border: 1.5px solid rgba(248, 240, 230, .25); pointer-events: none;
}
.banner-titulo { margin: 0 0 14px; font: 400 clamp(24px, 6vw, 32px)/1.1 var(--serif); }
.banner-publicos { display: grid; gap: 10px; margin-bottom: 18px; }
@media (min-width: 720px) { .banner { padding: 28px 30px; } .banner-publicos { grid-template-columns: 1fr 1fr; gap: 14px; } }
.banner-publicos p {
  margin: 0; padding: 12px 14px; border-radius: 14px;
  background: rgba(248, 240, 230, .14); border: 1px solid rgba(248, 240, 230, .22);
  font-size: 14px; line-height: 1.45;
}
.banner-botao { position: relative; z-index: 1; background: var(--creme); color: var(--noir); padding: 13px 26px; }

/* ---------- Sugestão de revenda ---------- */
.revenda { margin: 6px 0 0; display: flex; flex-direction: column; gap: 1px; font-size: 12px; color: var(--ink-2); }
.revenda b { color: var(--ink); }
.lucro { color: var(--ok); font-weight: 700; }
.sacola-revenda { margin: -2px 0 12px; padding: 10px 12px; border-radius: 12px; background: #eaf4ee; font-size: 12.5px; color: var(--ink-2); }
.sacola-revenda p { margin: 0; }
.sacola-revenda-n { display: flex; justify-content: space-between; gap: 8px; margin: 4px 0 !important; font-size: 14px; color: var(--ink); }
.sacola-revenda-nota { font-size: 11px; color: var(--ink-3); }
.banner-titulo, .banner-publicos { position: relative; z-index: 1; }

/* ---------- Compartilhar perfume ---------- */
.detalhe-compartilhar { display: flex; gap: 8px; margin-top: 10px; }
.detalhe-compartilhar .btn { flex: 1; padding: 10px 12px; font-size: 13px; }
.btn-linha-whats { border: 1px solid var(--whats); color: var(--whats); background: transparent; }
.btn-linha-suave { border: 1px solid var(--line); background: transparent; color: var(--ink-2); }

/* ---------- Mais vendidos em destaque ---------- */
.destaques {
  position: relative; overflow: hidden;
  margin: 18px -16px 0; padding: 22px 16px 20px;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(197, 144, 204, .45) 0%, transparent 55%),
    linear-gradient(160deg, #4b2c54 0%, var(--noir) 70%);
  color: var(--creme);
}
@media (min-width: 720px) { .destaques { margin: 22px 0 0; padding: 26px 26px 24px; border-radius: 26px; } }
.destaques-topo { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.destaques-eyebrow { margin: 0 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-3); }
.destaques .destaques-titulo { margin: 0; font-size: clamp(26px, 6vw, 34px); color: var(--creme); }
.faixa-nav { display: none; gap: 8px; }
@media (min-width: 720px) { .faixa-nav { display: flex; } }
.faixa-seta {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(248, 240, 230, .35); background: rgba(248, 240, 230, .08);
  color: var(--creme); font-size: 22px; line-height: 1;
}
.faixa-seta:hover { background: rgba(248, 240, 230, .18); }
.destaques .faixa { gap: 14px; padding-bottom: 6px; grid-auto-columns: minmax(170px, 46%); }
@media (min-width: 720px) { .destaques .faixa { grid-auto-columns: 236px; margin: 0; padding-left: 0; padding-right: 0; } }
.destaques .card {
  border: 1.5px solid rgba(236, 211, 238, .55);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28), 0 0 0 4px rgba(236, 211, 238, .08);
  color: var(--ink);
}
.posicao {
  position: absolute; top: 10px; left: 10px;
  min-width: 40px; height: 40px; padding: 0 8px; border-radius: 20px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--creme), #ecd3ee); color: var(--noir);
  font: 400 19px/1 var(--serif); box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}
