/* =====================================================
   Adega Brasil — catálogo
   Animações só com transform/opacity (leves).
   ===================================================== */
:root {
  --bg: #0a0a0a;
  --surface: rgba(22, 20, 16, .86);
  --surface-2: #1e1c18;
  --border: rgba(255, 255, 255, .09);
  --border-2: rgba(255, 255, 255, .16);
  --text: #fff;
  --muted: #a8a29a;
  --gold: #ffc20e;
  --gold-light: #ffd84d;
  --whats: #25d366;
  --danger: #ff5c5c;
  --radius: 16px;
  --grad-gold: linear-gradient(135deg, #ffd84d 0%, #ffc20e 45%, #f59e0b 100%);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.travado { overflow: hidden; }
body {
  margin: 0; padding-bottom: 90px; overflow-x: hidden;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.45;
}
h1, h2, h3 { font-family: "Montserrat", "Inter", sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
main, .footer { position: relative; z-index: 1; }

/* ============ Aviso de idade ============ */
.age-gate {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(ellipse at 50% 40%, #241a04 0%, #070707 70%);
  transition: opacity .4s var(--ease);
}
.age-gate.saindo { opacity: 0; pointer-events: none; }
.age-box {
  width: min(400px, 100%); text-align: center; padding: 30px 26px;
  background: var(--surface-2); border: 1px solid rgba(255, 194, 14, .35); border-radius: 22px;
  box-shadow: 0 0 60px rgba(255, 194, 14, .12);
  animation: popIn .5s var(--ease) both;
}
.age-logo { width: 170px; display: block; margin: 0 auto 6px; }
.age-box h2 { margin: 6px 0; font-size: 22px; font-weight: 900; }
.age-box p { color: var(--muted); margin: 0 0 18px; }
.age-actions { display: grid; gap: 8px; }

/* ============ Fundo: bolhas de cerveja subindo ============ */
/* Bolhas recortadas da imagem de referência (img/bolhas.webp, 6 bolhas lado a lado).
   Só transform/opacity: leve no celular. */
.bolhas-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: radial-gradient(ellipse 80% 55% at 50% 0%, rgba(255, 194, 14, .10), transparent 70%);
}
.bolhas-bg i {
  position: absolute; top: 0; display: block; will-change: transform;
  animation: bolhaSobe cubic-bezier(.45, 0, .85, .7) infinite; transform: translateY(112vh);
}
.bolhas-bg b {
  display: block; width: 100%; height: 100%;
  background: url("../img/bolhas.webp") 0 0 / 600% 100% no-repeat; background-position: inherit;
  animation: bolhaBalanca ease-in-out infinite alternate;
}
.bolhas-bg.parado i, .bolhas-bg.parado b { animation: none; }
@keyframes bolhaSobe { from { transform: translateY(112vh); } to { transform: translateY(-15vh); } }
@keyframes bolhaBalanca { from { transform: translateX(-14px); } to { transform: translateX(14px); } }
/* títulos legíveis sobre a foto */
.cat-title, .sec-promo-head h2 { text-shadow: 0 2px 14px rgba(0, 0, 0, .85); }


/* ============ Topo ============ */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 10, 10, .78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 112px; }
.top-logo { display: block; line-height: 0; }
.top-logo img { height: 96px; width: auto; display: block; transition: transform .3s var(--ease); }
.top-logo:hover img { transform: scale(1.05); }
.cart-btn {
  justify-self: end; display: flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--grad-gold); color: #0a0a0a; border-radius: 999px; padding: 10px 18px; font-weight: 800;
  transition: transform .2s var(--ease), box-shadow .3s;
}
.cart-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255, 194, 14, .35); }
.cart-btn.shake { animation: shake .5s; }
.badge {
  background: #0a0a0a; color: var(--gold); font-size: 12px; font-weight: 800;
  border-radius: 999px; min-width: 22px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center;
}
.badge.bump { animation: bump .45s cubic-bezier(.3, 1.6, .5, 1); }

.previa {
  position: relative; z-index: 15; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap;
  padding: 10px 16px; font-size: 13px; text-align: center;
  background: rgba(255, 194, 14, .12); border-bottom: 1px solid rgba(255, 194, 14, .4);
}
.previa b { color: var(--gold); }
.previa button { background: var(--gold); color: #0a0a0a; border: 0; border-radius: 999px; padding: 6px 12px; font-weight: 800; cursor: pointer; }

/* ============ Busca e categorias ============ */
.toolbar { padding: 24px 0 8px; display: grid; gap: 12px; }
#busca {
  width: 100%; padding: 14px 18px; border-radius: 999px; outline: none;
  background: var(--surface); border: 2px solid var(--border); transition: border-color .25s;
}
#busca:focus { border-color: var(--gold); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chip {
  flex: 0 0 auto; padding: 9px 16px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: 14px; font-weight: 600;
  transition: background .25s, color .25s, border-color .25s;
}
.chip:hover { color: var(--text); border-color: var(--gold); }
.chip.active { background: var(--grad-gold); color: #0a0a0a; border-color: transparent; font-weight: 800; }

/* ============ Seções ============ */
.cat-title {
  margin: 30px 0 14px; font-size: 22px; font-weight: 900; text-transform: uppercase;
  display: flex; align-items: center; gap: 12px;
}
.cat-title::before { content: ""; width: 26px; height: 4px; border-radius: 4px; background: var(--grad-gold); }
.cat-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-2), transparent); }

.sec-promo {
  margin-top: 26px; padding: 18px; border-radius: 22px;
  background: var(--surface); border: 2px solid rgba(255, 194, 14, .55);
  box-shadow: 0 0 40px rgba(255, 194, 14, .10);
}
.sec-promo-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sec-promo-head h2 { margin: 0; font-size: 22px; font-weight: 900; text-transform: uppercase; }
.contador-box { font-size: 13px; color: var(--muted); background: var(--bg); border: 1px solid var(--border); padding: 6px 12px; border-radius: 999px; }
.contador-box b { color: var(--gold); font-family: "Montserrat", sans-serif; font-size: 15px; letter-spacing: 1px; font-variant-numeric: tabular-nums; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 16px; }
.carrossel {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(175px, 210px); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 12px; scrollbar-width: thin; scrollbar-color: var(--gold) transparent;
}
.carrossel .card { scroll-snap-align: start; }
.empty { color: var(--muted); text-align: center; padding: 30px 0; }

/* ============ Card do produto ============ */
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
  animation: cardIn .45s var(--ease) both; animation-delay: calc(var(--d, 0) * 40ms);
}
.card:hover { transform: translateY(-6px); border-color: rgba(255, 194, 14, .6); box-shadow: 0 14px 30px rgba(0, 0, 0, .5); }
.card-img {
  position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; font-size: 66px; overflow: hidden;
  background: radial-gradient(circle at 50% 45%, rgba(255, 194, 14, .22), transparent 68%);
}
.card-img > span, .card-img img { transition: transform .4s var(--ease); }
.card:hover .card-img > span { transform: scale(1.15) rotate(-6deg); }
.card:hover .card-img img { transform: scale(1.06); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.selos { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; flex-wrap: wrap; gap: 4px; pointer-events: none; }
.selo { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; line-height: 1.4; }
.selo-off { background: #e11d48; color: #fff; }
.selo-dest { background: rgba(10, 10, 10, .8); color: var(--gold); border: 1px solid rgba(255, 194, 14, .5); }
.card-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-name { font-size: 16px; font-weight: 800; line-height: 1.25; letter-spacing: -.1px; color: #fff; flex: 1; }
.card-desc { font-size: 13px; color: var(--muted); margin-top: -4px; line-height: 1.3; }
.card-price { font-size: 19px; font-weight: 900; color: var(--gold); font-family: "Montserrat", sans-serif; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; }
.card-price s { color: var(--muted); font-size: 13px; font-weight: 600; }

/* ============ Botões ============ */
.btn {
  border: 0; border-radius: 12px; padding: 11px 14px; cursor: pointer; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  transition: transform .15s, box-shadow .25s, filter .2s;
}
.btn:active { transform: scale(.95); }
.btn-primary { background: var(--grad-gold); color: #0a0a0a; }
.btn-primary:hover { box-shadow: 0 8px 22px rgba(255, 194, 14, .3); filter: brightness(1.05); }
.btn-secondary { background: var(--surface-2); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }
.btn-ghost { background: transparent; border: 1px solid var(--border-2); }
.btn-whats { background: var(--whats); color: #062b14; width: 100%; font-size: 16px; padding: 15px; }
.btn-whats:hover { box-shadow: 0 8px 24px rgba(37, 211, 102, .3); }

.qty {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface-2); border: 1px solid rgba(255, 194, 14, .3); border-radius: 12px;
}
.qty button { background: none; border: 0; width: 38px; height: 38px; font-size: 20px; font-weight: 800; cursor: pointer; color: var(--gold); transition: transform .15s; }
.qty button:active { transform: scale(.75); }
.qty span { font-weight: 800; }

/* ============ Carrinho ============ */
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .6); animation: fadeIn .25s; }
.drawer {
  position: fixed; top: 0; right: 0; z-index: 50; height: 100%; width: 100%; max-width: 440px;
  display: flex; flex-direction: column; background: #141310; border-left: 1px solid var(--border);
  transform: translateX(100%); transition: transform .4s var(--ease);
}
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { margin: 0; font-size: 20px; font-weight: 900; text-transform: uppercase; }
.icon-btn { background: var(--surface-2); border: 1px solid var(--border); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; transition: transform .3s, background .2s, color .2s; }
.icon-btn:hover { transform: rotate(90deg); background: var(--gold); color: #0a0a0a; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px; }
.drawer-body h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gold); margin: 22px 0 10px; font-weight: 800; }
.drawer-body input, .drawer-body select, .drawer-body textarea {
  width: 100%; padding: 12px; margin-bottom: 8px; outline: none;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px; transition: border-color .2s;
}
.drawer-body input:focus, .drawer-body select:focus, .drawer-body textarea:focus { border-color: var(--gold); }
.drawer-body input[readonly] { color: var(--muted); }

.cart-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.ci-emoji { font-size: 28px; text-align: center; }
.ci-emoji img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; display: block; margin: 0 auto; }
.ci-name { font-size: 14px; font-weight: 600; }
.ci-price { font-size: 13px; color: var(--muted); }
.ci-price s { font-size: 12px; }
.ci-price b { color: var(--gold); }
.ci-promo { font-size: 11px; color: var(--gold); font-weight: 700; margin-top: 2px; }
.cart-item .qty { width: 110px; }
.cart-item .qty button { width: 32px; height: 32px; }

.seg { display: flex; gap: 8px; margin-bottom: 10px; }
.seg label {
  flex: 1; text-align: center; padding: 11px; border-radius: 12px; cursor: pointer; font-size: 14px; font-weight: 600;
  background: var(--bg); border: 1px solid var(--border); transition: background .25s, color .25s;
}
.seg input { display: none; }
.seg label:has(input:checked) { background: var(--grad-gold); color: #0a0a0a; border-color: transparent; font-weight: 800; }
.cep-row { display: flex; gap: 8px; }
.cep-row input { margin-bottom: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hint { font-size: 13px; color: var(--muted); margin: 8px 0; }
.hint.ok { color: var(--whats); }
.hint.bad { color: var(--danger); }
.hint b { color: var(--gold); }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--gold); border-right-color: transparent; border-radius: 50%; animation: girar .7s linear infinite; vertical-align: -2px; margin-right: 4px; }

.drawer-foot { padding: 16px; border-top: 1px solid var(--border); background: var(--surface-2); }
.totals div { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.totals .linha-eco { color: var(--whats); font-weight: 700; }
.totals .total { color: var(--text); font-size: 20px; font-weight: 900; margin: 8px 0 12px; font-family: "Montserrat", sans-serif; }
.totals .total span:last-child { color: var(--gold); }
.error { color: var(--danger); font-size: 13px; margin: 0 0 8px; }

/* ============ Outros ============ */
.floating-cart {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 30; max-width: 560px; margin: 0 auto;
  display: flex; justify-content: space-between; gap: 10px; border: 0; cursor: pointer;
  background: var(--grad-gold); color: #0a0a0a; font-weight: 700; font-size: 14px;
  border-radius: 16px; padding: 15px 18px; box-shadow: 0 10px 30px rgba(255, 194, 14, .25);
  animation: slideUp .4s var(--ease);
}
.toast {
  position: fixed; left: 50%; bottom: 96px; z-index: 60; transform: translate(-50%, 20px);
  background: var(--grad-gold); color: #0a0a0a; font-weight: 800; padding: 11px 20px; border-radius: 999px;
  opacity: 0; pointer-events: none; white-space: nowrap; transition: opacity .25s, transform .3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.fly { position: fixed; z-index: 80; font-size: 48px; pointer-events: none; }
.fly-img { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; }
.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 30px 16px; border-top: 1px solid var(--border); margin-top: 40px; background: rgba(10, 10, 10, .7); }

/* ============ Keyframes ============ */
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: scale(.9); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px); } }
@keyframes slideUp { from { transform: translateY(120%); } }
@keyframes bump { 40% { transform: scale(1.6); } }
@keyframes shake { 20% { transform: translateX(-5px) rotate(-3deg); } 40% { transform: translateX(5px) rotate(3deg); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
@keyframes girar { to { transform: rotate(360deg); } }

/* ============ Responsivo ============ */
@media (max-width: 480px) {
  .card-name { font-size: 15px; }
  .cart-label { display: none; }
  .topbar-inner { height: 88px; }
  .top-logo img { height: 74px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-img { font-size: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ============ Esgotado e loja fechada ============ */
.btn-esgotado { width: 100%; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); cursor: not-allowed; }
.selo-esgotado { background: #3a3a3a; color: #fff; }
.card:has(.btn-esgotado) .card-img > * { opacity: .45; }
.loja-fechada {
  position: relative; z-index: 15; padding: 12px 16px; text-align: center; font-size: 14px;
  background: rgba(255, 92, 92, .12); border-bottom: 1px solid rgba(255, 92, 92, .45); color: var(--text);
}
.loja-fechada b { color: var(--danger); margin-right: 6px; text-transform: uppercase; letter-spacing: .5px; }

/* ============ Revisão: ícones, cards, envio, rodapé, acessibilidade ============ */
.ico { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.18em; }
.cart-btn .ico { width: 20px; height: 20px; }
.sec-promo-head h2 { display: flex; align-items: center; gap: 8px; }
.sec-promo-head h2 .ico { color: var(--gold); width: 24px; height: 24px; }
.selo .ico { width: 11px; height: 11px; vertical-align: -1px; }
.selo-dest .ico { fill: currentColor; }
.ci-promo .ico { width: 12px; height: 12px; vertical-align: -2px; }
.previa .ico { color: var(--gold); width: 18px; height: 18px; }
.icon-btn { display: grid; place-items: center; }
.icon-btn .ico { width: 18px; height: 18px; }
.fc-qtd { display: inline-flex; align-items: center; gap: 6px; }
.fc-qtd .ico { width: 18px; height: 18px; }

/* Cards sólidos: o fundo animado não atravessa o produto */
.card { background: #16140f; }
.sec-promo { background: #14120e; }
/* Foto inteira (garrafas não são cortadas) */
.card-img img { object-fit: contain; padding: 10px; }
.ci-emoji img { object-fit: contain; background: rgba(255, 255, 255, .04); }
/* Botão do card com a mesma largura do seletor de quantidade */
.acao .btn { width: 100%; }

/* Envio bloqueado (loja fechada / pedido mínimo) */
.aviso-envio {
  margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; font-size: 13px;
  background: rgba(255, 92, 92, .1); border: 1px solid rgba(255, 92, 92, .4); color: var(--text);
}
.btn-whats:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; box-shadow: none; }

/* Rodapé com dados da loja */
.footer-info { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.footer-info b { color: var(--text); font-size: 15px; font-family: "Montserrat", sans-serif; }
.footer-info a { color: var(--gold); font-weight: 700; text-decoration: none; }
.footer-info a:hover { text-decoration: underline; }
.footer p { margin: 0; }

/* Foco visível para quem navega pelo teclado */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
#busca:focus-visible, .drawer-body :is(input, select, textarea):focus-visible { outline: none; }

/* Categorias: indica que dá para arrastar no celular */
@media (max-width: 700px) {
  .chips { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); padding-right: 40px; }
}

/* Logo no rodapé */
.footer-info .rodape-logo { display: block; height: 76px; width: auto; margin: 0 auto 8px; }

/* Redes sociais no rodapé */
.rodape-redes { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.footer-info .rede {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  font-weight: 700; font-size: 14px; text-decoration: none; border: 1px solid var(--border-2); background: rgba(255, 255, 255, .04);
  transition: border-color .2s, background .2s;
}
.footer-info .rede svg { width: 20px; height: 20px; flex: none; }
.footer-info .rede-zap { color: #25d366; }
.footer-info .rede-zap:hover { border-color: #25d366; background: rgba(37, 211, 102, .1); text-decoration: none; }
.footer-info .rede-insta { color: #f0f0f0; }
.footer-info .rede-insta svg { color: #e1306c; }
.footer-info .rede-insta:hover { border-color: #e1306c; background: rgba(225, 48, 108, .1); text-decoration: none; }
/* Slogan da loja (painel → Loja) */
.footer-info .rodape-slogan { display: block; color: var(--gold); font-weight: 700; font-size: 15px; margin: -2px 0 8px; }
