/* Loja Buquê com Chocolate — layout de cardápio digital, pedidos via WhatsApp */
:root {
  --primary: #f634a8;           /* ajustável na administração */
  --primary-contrast: #ffffff;
  --background: #f4f5f7;
  --card: #ffffff;
  --g50: #f9fafb; --g100: #f3f4f6; --g200: #e5e7eb; --g300: #d1d5db; --g400: #9ca3af;
  --g500: #6b7280; --g600: #4b5563; --g700: #374151; --g800: #1f2937; --g900: #111827;
  --verde: #22c55e; --verde-escuro: #16a34a; --verde-bg: #dcfce7;
  --vermelho: #ef4444; --vermelho-bg: #fee2e2;
  --roxo: #7c3aed; --roxo-bg: #ede9fe;
  --nav-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body { font-family: Rubik, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--background); color: var(--g700); font-size: 16px; line-height: 1.35; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; }
img { display: block; max-width: 100%; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
[hidden] { display: none !important; }
a { color: inherit; }

.carregando { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--background); z-index: 100; }
.spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--g200); border-top-color: var(--primary); animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

.loja { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 84px); }
.container { max-width: 1140px; margin: 0 auto; }

/* ===== Cabeçalho ===== */
.capa { height: 160px; background: var(--primary) center/cover no-repeat; position: relative; }
.capa-banners { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.capa-banners::-webkit-scrollbar { display: none; }
.capa-banners img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.topo { background: var(--card); border-radius: 20px 20px 0 0; margin-top: -18px; position: relative; padding: 0 16px 14px; text-align: center; }
.logo { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; margin: -46px auto 8px; border: 4px solid #fff; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.nome-loja { font-size: 20px; font-weight: 600; color: var(--g900); margin: 0; }
.local { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; color: var(--g600); margin-top: 4px; }
.local svg { width: 16px; height: 16px; }
.local .ponto { width: 4px; height: 4px; border-radius: 50%; background: var(--g400); }
.local button { font-weight: 500; color: var(--g700); text-decoration: underline; text-underline-offset: 2px; }
.status { font-size: 14px; font-weight: 500; margin-top: 6px; }
.status.fechado { color: var(--vermelho); }
.status.aberto { color: var(--verde-escuro); }

.calc-entrega { display: flex; align-items: center; gap: 10px; width: calc(100% - 32px); max-width: 1108px; margin: 12px auto 0; padding: 14px 14px; background: var(--card); border-radius: 12px; border: 1px solid var(--g200); text-align: left; font-size: 13px; font-weight: 500; color: var(--g700); }
.calc-entrega svg:first-child { color: var(--g500); width: 20px; height: 20px; }
.calc-entrega span { flex: 1; }
.calc-entrega svg:last-child { color: var(--primary); width: 18px; height: 18px; }
.calc-entrega b { color: var(--g900); font-weight: 600; }

/* Barra de categorias (fixa ao rolar) */
.barra-cat { position: sticky; top: 0; z-index: 20; background: var(--background); padding: 12px 16px 8px; display: flex; gap: 10px; align-items: center; }
.barra-cat-inner { max-width: 1108px; margin: 0 auto; width: 100%; display: flex; gap: 10px; align-items: center; }
.sel-cat { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 40px; padding: 0 12px; background: var(--card); border: 1px solid var(--g200); border-radius: 10px; font-size: 14px; color: var(--g700); text-align: left; min-width: 0; }
.sel-cat span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-cat svg { width: 18px; height: 18px; color: var(--g500); }
.btn-busca { width: 40px; height: 40px; border-radius: 10px; background: var(--card); border: 1px solid var(--g200); display: inline-flex; align-items: center; justify-content: center; color: var(--g700); }
.btn-busca svg { width: 20px; height: 20px; }
.busca { flex: 1; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--primary); outline: none; font-size: 16px; background: #fff; }

/* ===== Seções ===== */
.secao { padding: 12px 16px 4px; max-width: 1140px; margin: 0 auto; }
.secao-titulo { font-size: 20px; font-weight: 600; color: var(--g800); margin: 6px 0 12px; scroll-margin-top: 64px; }

/* Destaques: cartões em grade */
.grade { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cartao { position: relative; display: flex; flex-direction: column; background: var(--card); border-radius: 12px; overflow: hidden; text-align: left; box-shadow: 0 1px 3px rgba(0,0,0,.06); min-width: 0; }
.cartao-foto { height: 144px; width: 100%; object-fit: cover; background: var(--g100); }
.cartao-corpo { padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.cartao-nome { font-size: 16px; font-weight: 500; color: var(--g700); margin: 0; }
.cartao-desc { font-size: 13px; color: var(--g500); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cartao .precos { margin-top: auto; padding-top: 6px; }

/* Lista de categoria: foto à direita */
.lista { display: grid; gap: 12px; }
.item { position: relative; display: flex; gap: 12px; width: 100%; background: var(--card); border-radius: 12px; padding: 12px; text-align: left; box-shadow: 0 1px 3px rgba(0,0,0,.06); min-width: 0; }
.item-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.item-nome { font-size: 16px; font-weight: 500; color: var(--g700); margin: 0; }
.item-desc { font-size: 13px; color: var(--g500); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.item-foto-wrap { position: relative; width: 112px; height: 112px; flex-shrink: 0; border-radius: 10px; overflow: hidden; background: var(--g100); }
.item-foto { width: 100%; height: 100%; object-fit: cover; }
.item .precos { margin-top: auto; padding-top: 4px; }

.precos { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.preco { font-size: 16px; color: var(--g700); }
.preco.promo { color: var(--verde); }
.preco-de { font-size: 14px; color: var(--g500); text-decoration: line-through; }
.desconto { font-size: 13px; font-weight: 500; color: var(--verde-escuro); background: var(--verde-bg); padding: 2px 6px; border-radius: 6px; }
.selo-novidade { align-self: flex-start; font-size: 11px; font-weight: 600; letter-spacing: .03em; color: var(--roxo); background: var(--roxo-bg); padding: 3px 8px; border-radius: 6px; }
.esgotado .item-foto, .esgotado .cartao-foto { filter: grayscale(.5); opacity: .7; }
.esgotado .item-nome, .esgotado .cartao-nome, .esgotado .preco { color: var(--g400); }
.faixa-esgotado { position: absolute; top: 14px; right: -30px; transform: rotate(45deg); background: var(--primary); color: var(--primary-contrast); font-size: 11px; font-weight: 600; padding: 3px 34px; box-shadow: 0 1px 3px rgba(0,0,0,.2); z-index: 2; }
.sem-foto { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--g300); }
.sem-foto svg { width: 34px; height: 34px; }
.vazio { text-align: center; color: var(--g500); padding: 40px 16px; }
.vazio b { display: block; color: var(--g700); font-size: 17px; margin-bottom: 6px; }

/* ===== Navegação inferior ===== */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: #fff; border-top: 1px solid var(--g200); }
.nav-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; font-weight: 500; color: var(--g500); }
.nav-item svg { width: 24px; height: 24px; }
.nav-item.ativo { color: var(--primary); }
.nav-badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--primary); color: #fff; font-size: 11px; font-style: normal; font-weight: 600; display: flex; align-items: center; justify-content: center; }

.barra-sacola { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + var(--safe-b) + 10px); z-index: 29; max-width: 560px; margin: 0 auto; height: 52px; border-radius: 12px; background: var(--primary); color: var(--primary-contrast); display: flex; align-items: center; gap: 12px; padding: 0 16px; font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.barra-sacola span:nth-child(2) { flex: 1; text-align: left; }
.barra-sacola-qtd { min-width: 26px; height: 26px; padding: 0 6px; border-radius: 8px; background: rgba(255,255,255,.22); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }

/* ===== Modal / folha ===== */
.fundo-modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 60; animation: fade .2s; }
.modal { position: fixed; z-index: 61; inset: 0; background: #fff; display: flex; flex-direction: column; animation: subir .25s ease-out; }
.modal.folha { inset: auto 0 0 0; max-height: 90vh; max-height: 90dvh; border-radius: 18px 18px 0 0; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes subir { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--g100); }
.modal-topo h2 { margin: 0; font-size: 18px; font-weight: 600; color: var(--g800); }
.fechar { width: 34px; height: 34px; border-radius: 50%; background: var(--g200); display: inline-flex; align-items: center; justify-content: center; color: var(--g700); flex-shrink: 0; }
.fechar svg { width: 18px; height: 18px; stroke-width: 2.2; }
.modal-corpo { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.modal-rodape { padding: 12px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--g100); background: #fff; }

/* Produto */
.galeria { position: relative; background: var(--g100); }
.galeria-fotos { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 4 / 3; }
.galeria-fotos::-webkit-scrollbar { display: none; }
.galeria-fotos img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.galeria .fechar { position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,.9); }
.pontos { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.pontos i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.6); }
.pontos i.on { background: var(--primary); }
.prod-info { padding: 16px; }
.prod-nome { font-size: 18px; font-weight: 600; color: var(--g800); margin: 0 0 8px; }
.prod-desc { font-size: 14px; color: var(--g600); white-space: pre-line; margin: 0 0 12px; }
.grupo-topo { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; background: var(--g100); }
.grupo-topo h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--g800); }
.grupo-topo small { display: block; font-size: 13px; color: var(--g500); margin-top: 2px; }
.grupo-topo small.falta { color: var(--vermelho); }
.selos-grupo { display: flex; gap: 6px; flex-shrink: 0; }
.selo-cont { font-size: 11px; font-weight: 600; padding: 3px 7px; border-radius: 6px; background: var(--vermelho); color: #fff; }
.selo-cont.ok { background: var(--verde-escuro); }
.selo-obrig { font-size: 11px; font-weight: 600; padding: 3px 7px; border-radius: 6px; background: var(--vermelho); color: #fff; letter-spacing: .02em; }
.selo-ok { display: inline-flex; align-items: center; color: var(--verde-escuro); }
.selo-ok svg { width: 18px; height: 18px; stroke-width: 2.5; }
.opcao { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 14px 16px; border-bottom: 1px solid var(--g100); text-align: left; font-size: 14px; color: var(--g700); }
.opcao small { display: block; color: var(--g500); margin-top: 2px; }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--g400); flex-shrink: 0; position: relative; }
.radio.on { border-color: var(--primary); }
.radio.on::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--primary); }
.contador { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.contador button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--g300); color: var(--primary); font-size: 18px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.contador button:disabled { color: var(--g300); }
.contador b { min-width: 14px; text-align: center; font-weight: 500; }
.obs { padding: 14px 16px 18px; }
.obs label { display: flex; justify-content: space-between; font-size: 14px; color: var(--g600); margin-bottom: 8px; }
.obs textarea, .campo input, .campo select, .campo textarea { width: 100%; border: 1px solid var(--g300); border-radius: 10px; padding: 12px; font-size: 16px; color: var(--g800); background: #fff; outline: none; resize: vertical; }
.obs textarea { min-height: 80px; }
.obs textarea:focus, .campo input:focus, .campo select:focus, .campo textarea:focus { border-color: var(--primary); }
.rodape-prod { display: flex; gap: 12px; align-items: center; }
.qtd { display: inline-flex; align-items: center; gap: 14px; height: 48px; padding: 0 12px; border: 1px solid var(--g200); border-radius: 10px; }
.qtd button { font-size: 22px; color: var(--primary); width: 22px; }
.qtd button:disabled { color: var(--g300); }
.btn-prim { flex: 1; height: 48px; border-radius: 10px; background: var(--primary); color: var(--primary-contrast); font-weight: 600; font-size: 15px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; }
.btn-prim:disabled { opacity: .5; }
.btn-prim.centro { justify-content: center; gap: 10px; text-decoration: none; }
.btn-sec { width: 100%; height: 46px; border-radius: 10px; border: 1px solid var(--g300); background: #fff; font-weight: 500; color: var(--g700); }
.btn-whats { background: #25d366; color: #fff; }
.btn-whats svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }

/* Sacola / checkout / perfil */
.bloco { background: #fff; padding: 14px 16px; margin-bottom: 8px; }
.bloco h3 { margin: 0 0 10px; font-size: 15px; font-weight: 600; color: var(--g800); }
.linha-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--g100); }
.linha-item:last-child { border-bottom: 0; }
.linha-item img, .linha-item .mini-sem { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--g100); flex-shrink: 0; }
.linha-item-info { flex: 1; min-width: 0; font-size: 14px; }
.linha-item-info b { display: block; font-weight: 500; color: var(--g800); }
.linha-item-info small { display: block; color: var(--g500); margin-top: 2px; }
.linha-item-lado { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; font-size: 14px; font-weight: 500; }
.remover { font-size: 13px; color: var(--vermelho); }
.campo { margin-bottom: 12px; }
.campo label { display: block; font-size: 13px; font-weight: 500; color: var(--g600); margin-bottom: 6px; }
.dois { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opcoes-linha { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opcoes-linha.tres { grid-template-columns: 1fr 1fr 1fr; }
.op-btn { height: 44px; border-radius: 10px; border: 1px solid var(--g300); background: #fff; font-size: 14px; font-weight: 500; color: var(--g700); }
.op-btn.on { border-color: var(--primary); color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, #fff); }
.resumo-linha { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; color: var(--g600); }
.resumo-linha.total { font-size: 17px; font-weight: 600; color: var(--g900); padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--g100); }
.nota { font-size: 13px; color: var(--g500); margin: 8px 0 0; }
.erro { background: var(--vermelho-bg); color: #b91c1c; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 0 0 10px; }
.sucesso-box { text-align: center; padding: 26px 16px; }
.sucesso-box .icone { width: 64px; height: 64px; border-radius: 50%; background: #25d366; color: #fff; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.sucesso-box .icone svg { width: 34px; height: 34px; fill: currentColor; stroke: none; }
.sucesso-box h3 { margin: 0 0 8px; font-size: 19px; color: var(--g900); }
.sucesso-box p { margin: 0 0 16px; color: var(--g600); font-size: 14px; }
.link-whats { display: block; word-break: break-all; font-size: 13px; color: var(--verde-escuro); margin-top: 10px; }

/* Lista de promoções no popup / regiões / categorias */
.promo-lista { padding: 12px 16px 16px; display: grid; gap: 12px; background: var(--background); }
.lista-simples button { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; padding: 15px 16px; border-bottom: 1px solid var(--g100); text-align: left; font-size: 15px; color: var(--g700); }
.lista-simples button.on { color: var(--primary); font-weight: 600; }
.lista-simples small { color: var(--g500); font-size: 13px; }
.banner-popup { padding: 0; }
.banner-popup img { width: 100%; height: auto; max-height: 70vh; object-fit: contain; background: #000; }
.info-bloco { padding: 14px 16px; border-bottom: 1px solid var(--g100); font-size: 14px; color: var(--g600); }
.info-bloco h3 { margin: 0 0 8px; font-size: 15px; color: var(--g800); }
.horario { display: flex; justify-content: space-between; padding: 3px 0; }
.horario.hoje { font-weight: 600; color: var(--g800); }

.aviso { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 90; background: var(--g800); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: calc(100% - 32px); text-align: center; animation: fade .2s; }

/* ===== Telas maiores (computador) ===== */
@media (min-width: 768px) {
  .capa { height: 260px; }
  .grade { grid-template-columns: repeat(3, 1fr); }
  .cartao-foto { height: 200px; }
  .lista { grid-template-columns: repeat(2, 1fr); }
  .modal { inset: 5vh auto auto 50%; transform: translateX(-50%); width: 560px; max-height: 90vh; border-radius: 16px; overflow: hidden; animation: fade .2s; }
  .modal.folha { inset: 5vh auto auto 50%; transform: translateX(-50%); width: 560px; border-radius: 16px; }
  .nav { max-width: 520px; margin: 0 auto; border-radius: 16px 16px 0 0; border-left: 1px solid var(--g200); border-right: 1px solid var(--g200); }
}
@media (min-width: 1024px) {
  .grade { grid-template-columns: repeat(4, 1fr); }
  .lista { grid-template-columns: repeat(3, 1fr); }
  .modal.grande { width: 900px; flex-direction: column; }
}

/* ===== v1.1: entrega no final + WhatsApp flutuante ===== */
.calc-entrega.fim { margin: 24px auto 8px; }
.whats-flutuante { position: fixed; right: 16px; bottom: calc(var(--nav-h) + var(--safe-b) + 14px); z-index: 62; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,.25); transition: bottom .2s ease, transform .15s ease; }
.whats-flutuante:active { transform: scale(.94); }
.whats-flutuante svg { width: 32px; height: 32px; fill: currentColor; stroke: none; }
body.com-sacola .whats-flutuante { bottom: calc(var(--nav-h) + var(--safe-b) + 74px); }
body.com-modal .whats-flutuante { bottom: calc(var(--safe-b) + 16px); }
body.com-modal.com-rodape .whats-flutuante { bottom: calc(var(--safe-b) + 90px); }
@media (min-width: 768px) {
  body.com-modal .whats-flutuante, body.com-modal.com-rodape .whats-flutuante { bottom: 24px; right: 24px; }
}

body.tela-sacola .whats-flutuante { display: none; }

/* ===== Visor de fotos em tela cheia ===== */
#galeria img { cursor: zoom-in; }
.visor { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.94); animation: fade .2s; }
.visor-fotos { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.visor-fotos::-webkit-scrollbar { display: none; }
.visor-slide { flex: 0 0 100%; height: 100%; display: flex; align-items: center; justify-content: center; scroll-snap-align: start; padding: 56px 8px calc(48px + var(--safe-b)); }
.visor-slide img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; user-select: none; -webkit-user-drag: none; }
.visor-fechar { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; display: flex; align-items: center; justify-content: center; }
.visor-fechar svg { width: 22px; height: 22px; }
.visor-cont { position: absolute; left: 50%; bottom: calc(16px + var(--safe-b)); transform: translateX(-50%); color: #fff; font-size: 14px; font-weight: 500; background: rgba(255,255,255,.14); padding: 5px 12px; border-radius: 20px; }
.visor-seta { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font-size: 30px; line-height: 1; display: none; align-items: center; justify-content: center; }
.visor-seta.esq { left: 16px; } .visor-seta.dir { right: 16px; }
@media (min-width: 768px) { .visor-seta { display: flex; } }
