/* Braavos Xis & Hot Dog — folha única. Mobile primeiro; o desktop só ganha ar. */

:root {
  /* Versão comercial: paleta laranja da Gu Lanches. `--laranja` é o acento. */
  --laranja: #ff7a2f;
  --laranja-escuro: #ef620d;
  --vermelho: #d81f26;
  --creme: #fdf1e2;
  --fundo: #fbf6f0;
  --card: #ffffff;
  --tinta: #2a1c12;
  --tinta-fraca: #8a7869;
  --borda: #f0e5d8;
  --verde: #1e7a4b;
  --raio: 18px;
  --sombra: 0 1px 2px rgba(42, 28, 18, .04), 0 10px 26px rgba(42, 28, 18, .06);
  /* Espaço reservado embaixo para a navbar flutuante (pílula ~90 na base 24 +
     a saliência do carrinho de 70px). CTA "Ver pedido", toast e o padding da
     página se apoiam nisto para ficar acima da navbar. */
  --tabbar: 116px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #efe6da;
  color: var(--tinta);
  font-family: Poppins, "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body { overscroll-behavior-y: none; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
img { display: block; max-width: 100%; }

.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--fundo);
  position: relative;
  padding-bottom: calc(var(--tabbar) + 96px);
}

/* ---------- Barra de topo ---------- */

.topo {
  display: flex; align-items: center; gap: 11px;
  padding: 14px 18px 10px;
  background: var(--fundo);
}
.topo .logo { width: 42px; height: 42px; border-radius: 50%; flex: none; box-shadow: 0 3px 10px rgba(42, 28, 18, .2); }
.topo-txt { flex: 1; min-width: 0; }
.topo h1 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.topo .sub { margin: 1px 0 0; font-size: 11.5px; color: var(--tinta-fraca); }

.selo {
  flex: none;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
  background: #e6f5ec; color: var(--verde);
}
.selo.off { background: #f3ece5; color: var(--tinta-fraca); }

/* ---------- Carrossel ---------- */

.hero { padding: 6px 16px 0; }
.hero-janela {
  border-radius: 22px;
  overflow: hidden;
  background: var(--creme);
  box-shadow: var(--sombra);
}
.hero-trilho { display: flex; transition: transform .45s cubic-bezier(.3, .8, .3, 1); }

/* Todo slide ocupa a janela inteira e tem a mesma proporção — sem isso o
   flex estica a arte mais baixa até a altura da mais alta. */
.slide { flex: none; width: 100%; aspect-ratio: 16 / 10; position: relative; overflow: hidden; }
.slide-arte { width: 100%; height: 100%; object-fit: cover; }

.slide-marca {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 0 22px; text-align: center;
  /* O mesmo #600003 do fundo da arte da marca, para a faixa do brasão
     não aparecer como um retângulo colado sobre o slide. */
  background: radial-gradient(130% 120% at 50% 42%, #7a0208, #4a0002 82%);
  color: #fff;
}
.slide-brasao { width: min(80%, 300px); height: auto; mix-blend-mode: lighten; }
.slide-marca p { margin: 0; font-size: 11.5px; line-height: 1.4; opacity: .82; }
.slide-marca .slide-btn { background: #fff; color: var(--laranja); box-shadow: none; }

.slide-combo {
  display: flex; align-items: center;
  background: linear-gradient(115deg, #fde3c4, #fbf0dd 62%);
}
.slide-txt { flex: 1; min-width: 0; padding: 0 0 0 20px; }
.slide-txt .etq {
  display: inline-block; margin-bottom: 8px;
  padding: 4px 10px; border-radius: 999px;
  background: #fff; color: var(--laranja);
  font-size: 10px; font-weight: 600;
}
.nq { white-space: nowrap; }
.slide-txt h2 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
.slide-txt p { margin: 5px 0 12px; font-size: 11.5px; line-height: 1.35; color: #7a6552; }
.slide-btn {
  display: inline-block;
  padding: 8px 15px; border-radius: 999px;
  background: var(--laranja); color: #fff;
  font-size: 12px; font-weight: 600;
  box-shadow: 0 5px 14px rgba(255, 122, 47, .32);
}
.slide-recorte { width: 45%; height: 100%; flex: none; object-fit: cover; }

.pontos { display: flex; justify-content: center; gap: 6px; padding: 12px 0 4px; }
.pontos button {
  width: 6px; height: 6px; border-radius: 999px;
  background: #dbc9c4; padding: 0;
  transition: width .25s ease, background .25s ease;
}
.pontos button[aria-current="true"] { width: 20px; background: var(--laranja); }

/* ---------- Categorias ---------- */

/* A barra de categorias gruda no topo assim que a rolagem passa por ela e
   acompanha o scroll dali em diante. z-index abaixo das folhas (véu = 50). */
.cats {
  position: sticky; top: 8px; z-index: 20;
  display: flex; gap: 6px;
  margin: 10px 12px 0;
  padding: 12px 6px;
  background: var(--card);
  border-radius: 22px;
  box-shadow: var(--sombra);
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.cats::-webkit-scrollbar { display: none; }
/* Enquanto grudada, ganha um anel para se destacar do conteúdo que passa
   por baixo. O JS liga esta classe quando a barra encosta no topo. */
.cats.fixa { box-shadow: 0 6px 20px rgba(42, 28, 18, .14); }

.cat {
  flex: none;
  width: 74px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 2px 0;
}
.cat img {
  width: 54px; height: 54px; border-radius: 50%;
  background: #f7efec;
  object-fit: cover;
  transition: box-shadow .18s ease, transform .18s ease;
}
.cat span {
  font-size: 10.5px; font-weight: 500; line-height: 1.25;
  color: var(--tinta-fraca); text-align: center;
}
.cat[aria-current="true"] img { box-shadow: 0 0 0 2.5px var(--laranja); transform: translateY(-1px); }
.cat[aria-current="true"] span { color: var(--laranja); font-weight: 600; }

/* ---------- Seções ---------- */

/* scroll-margin-top reserva a altura da barra grudada, para o título da
   seção não ficar escondido atrás dela quando se clica numa categoria. */
.secao { padding: 24px 16px 0; scroll-margin-top: 92px; }
.secao-cab { display: flex; align-items: baseline; gap: 10px; margin-bottom: 13px; }
.secao-cab h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.secao-cab .resumo { margin: 0; font-size: 11.5px; color: var(--tinta-fraca); }
.secao-cab .link { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--laranja); white-space: nowrap; }

.grade { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Card de produto ---------- */

.card {
  position: relative;
  display: flex; flex-direction: column;
  text-align: left;
  background: var(--card);
  border-radius: var(--raio);
  padding: 10px 12px 12px;
  box-shadow: var(--sombra);
  transition: transform .12s ease;
}
.card:active { transform: scale(.985); }

.card-foto {
  width: 100%; aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  background: #f7efec;
}

.coracao {
  position: absolute; top: 16px; right: 18px; z-index: 2;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255, 255, 255, .88);
  display: grid; place-items: center;
  font-size: 14px; line-height: 1;
  color: #c3b0ac;
  box-shadow: 0 1px 4px rgba(42, 28, 18, .12);
}
.coracao .ico { width: 16px; height: 16px; transform-origin: center; }
.coracao[aria-pressed="true"] { color: var(--laranja); }
.coracao[aria-pressed="true"] .ico { fill: currentColor; }

.card-nome { margin-top: 9px; font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.card-desc {
  margin-top: 3px; font-size: 11px; line-height: 1.35; color: var(--tinta-fraca);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-pe { margin-top: auto; padding-top: 10px; display: flex; align-items: flex-end; gap: 8px; }
.card-preco {
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 32px;
  font-size: 14px; font-weight: 700; color: var(--laranja);
}
.card-preco small { display: block; font-size: 9.5px; font-weight: 500; color: var(--tinta-fraca); }
.card-add {
  margin-left: auto; flex: none;
  width: 28px; height: 28px; border-radius: 9px;
  background: var(--laranja); color: #fff;
  display: grid; place-items: center;
  font-size: 17px; line-height: 1;
  box-shadow: 0 4px 10px rgba(255, 122, 47, .32);
}

/* ---------- Faixa de oferta ---------- */

.oferta { display: block; margin: 26px 16px 0; border-radius: 20px; overflow: hidden; box-shadow: var(--sombra); }
.oferta img { width: 100%; }

/* ---------- Rodapé ---------- */

.rodape {
  margin-top: 28px;
  padding: 24px 20px 8px;
  border-top: 1px solid var(--borda);
  font-size: 11.5px; line-height: 1.7;
  color: var(--tinta-fraca);
}
.rodape strong { color: var(--tinta); }

/* ---------- Busca e favoritos ---------- */

.busca-campo { padding: 4px 16px 0; }
.busca-campo input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--borda);
  border-radius: 14px;
  background: var(--card);
  font-size: 15px;
}
.busca-campo input:focus { outline: 2px solid var(--laranja); outline-offset: 1px; }

.vazio-msg { padding: 40px 24px; text-align: center; font-size: 13px; color: var(--tinta-fraca); line-height: 1.6; }

/* ---------- Barra inferior ---------- */

/* Navbar — valores idênticos ao protótipo (.navbar-wrapper): pílula branca,
   cantos bem redondos, ícones em traço cinza e o carrinho central elevado.
   Fica flutuando na base como no protótipo (bottom-dock: bottom 24px). */
.tabbar {
  position: fixed; z-index: 45;
  left: 50%; transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  width: calc(100% - 32px); max-width: 440px;
  background-color: #fff;
  border-radius: 50px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .08);
  display: flex; justify-content: space-evenly; align-items: center;
  padding: 10px 15px;
  /* Leve suavização; o deslocamento em si é ligado ao scroll pelo JS. */
  transition: transform .15s ease-out;
}
/* .icon-btn */
.tab {
  display: flex; justify-content: center; align-items: center;
  border-radius: 50%;
  padding: 12px;
  position: relative;
  transition: background-color .3s ease;
  -webkit-tap-highlight-color: transparent;
}
.tab:hover { background-color: rgba(255, 112, 52, .08); }
/* .nav-icon */
.tab .ico { width: 26px; height: 26px; stroke: #888; fill: transparent; transition: stroke .3s ease; }
.tab[aria-current="true"] .ico { stroke: #ff7034; }

/* .central-cart-btn — disco laranja elevado, sem anel, exatamente como o código. */
.tab-central {
  width: 70px; height: 70px;
  background-color: #ff7034;
  box-shadow: 0 8px 20px rgba(255, 112, 52, .4);
  transform: translateY(-22px);
  padding: 0;
  flex-shrink: 0;
}
.tab-central:hover { background-color: #ff8550; }
.tab-central .ico { width: 28px; height: 28px; stroke: #fff; }

/* .nav-cart-badge — vermelho, no canto superior direito do carrinho. */
.nav-cart-badge {
  position: absolute; top: 2px; right: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background-color: #e53935; color: #fff;
  border: 2px solid #fff;
  font-size: 11px; font-weight: 700;
  display: flex; justify-content: center; align-items: center;
}

/* "Ver pedido" flutua como a barra de cima do dock — mesma largura da navbar,
   centralizado, acima dela. Sem fundo próprio: só a pílula do botão aparece,
   como no `.product-action-bar.ordered-state` do protótipo. */
.cta-flutuante {
  position: fixed; z-index: 44;
  left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar) + 6px + env(safe-area-inset-bottom, 0px));
  width: calc(100% - 32px); max-width: 440px;
  padding: 0;
  transition: transform .15s ease-out;
}

.btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--laranja);
  color: #fff;
  font-size: 14.5px; font-weight: 600;
  box-shadow: 0 8px 20px rgba(255, 122, 47, .3);
}
.btn:disabled { opacity: .45; box-shadow: none; }
.btn.zap { background: var(--verde); box-shadow: 0 8px 20px rgba(30, 122, 75, .3); }
.btn .cnt { background: rgba(255, 255, 255, .24); padding: 2px 9px; border-radius: 999px; font-size: 12px; }
.btn .val { margin-left: auto; }
.btn .lbl { margin-right: auto; }

/* Pílula "Ver pedido": bem arredondada e com respiro, igual ao ordered-state
   do protótipo (border-radius 28px, sombra mais forte). */
.cta-flutuante .btn {
  border-radius: 28px;
  padding: 18px 24px;
  box-shadow: 0 12px 35px rgba(255, 112, 52, .45);
}

/* ---------- Aviso rápido ---------- */

.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar) + 84px); z-index: 60;
  background: rgba(42, 28, 18, .93); color: #fff;
  padding: 10px 18px; border-radius: 999px;
  font-size: 12.5px; font-weight: 500;
  animation: sobeToast .2s ease;
}
@keyframes sobeToast { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- Folhas (modal) ---------- */

/* A folha é uma sobreposição: o véu escurece a tela por trás e a folha SOBE
   inteira de baixo, como uma janela que aparece sobre o cardápio — não uma
   nova página. Ao sair, ela desce de volta e o véu some, sem recarregar
   nada por baixo. */
.veu {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(42, 28, 18, .5);
  display: flex; align-items: flex-end; justify-content: center;
  animation: veu-entra .32s ease forwards;
}
@keyframes veu-entra { from { opacity: 0; } to { opacity: 1; } }
.veu.saindo { animation: veu-entra .28s ease reverse forwards; }

.folha {
  width: 100%; max-width: 480px;
  max-height: 92vh;
  display: flex; flex-direction: column;
  background: var(--fundo);
  border-radius: 24px 24px 0 0;
  will-change: transform;
  animation: folha-sobe .42s cubic-bezier(.16, 1, .3, 1);
}
@keyframes folha-sobe { from { transform: translateY(100%); } to { transform: translateY(0); } }
.folha.saindo { animation: folha-sobe .34s cubic-bezier(.4, 0, 1, 1) reverse forwards; }

@media (prefers-reduced-motion: reduce) {
  .veu, .veu.saindo, .folha, .folha.saindo { animation-duration: .01s; }
}

.folha-topo {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--borda);
}
.folha-topo h3 { margin: 0; font-size: 16px; font-weight: 600; flex: 1; }
.fechar {
  width: 32px; height: 32px; border-radius: 50%;
  background: #efe2dd; color: var(--tinta-fraca);
  display: grid; place-items: center; font-size: 17px; line-height: 1;
}

/* Scroll por toque normal, mas sem a barra cinza visível — no celular ela
   deixava o modal com cara de janela de desktop. */
.folha-corpo {
  overflow-y: auto; padding: 16px 18px 20px; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.folha-corpo::-webkit-scrollbar { display: none; }
.folha-pe {
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--borda);
  background: var(--card);
  display: flex; gap: 12px; align-items: center;
}

/* ~13% mais baixa que os 190px iniciais: mantém o impacto do lanche e já
   deixa aparecer o começo de "Escolha o pão" sem rolar tanto. */
.folha-foto {
  width: 100%; height: 165px; object-fit: cover;
  border-radius: 16px; background: #f7efec;
  margin-bottom: 14px;
}

.grupo { margin-bottom: 20px; }
.grupo-cab { display: flex; align-items: baseline; gap: 8px; margin-bottom: 9px; }
.grupo-cab h4 { margin: 0; font-size: 13.5px; font-weight: 600; }
.tag {
  font-size: 9.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  background: #efe2dd; color: var(--tinta-fraca);
  padding: 3px 7px; border-radius: 5px;
}
.tag.obrig { background: var(--laranja); color: #fff; }

.opcoes { display: grid; gap: 8px; }
.opcao {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  padding: 12px 14px;
  background: var(--card);
  border: 1.5px solid var(--borda);
  border-radius: 13px;
  font-size: 14px;
}
.opcao[aria-pressed="true"] { border-color: var(--laranja); background: #fff6ef; }
.opcao .marca-op {
  width: 20px; height: 20px; flex: none;
  border-radius: 50%;
  border: 2px solid #dbc9c4;
  display: grid; place-items: center;
}
.opcao[aria-pressed="true"] .marca-op { border-color: var(--laranja); background: var(--laranja); color: #fff; font-size: 12px; }
.opcao .op-nome { flex: 1; }
.opcao .op-preco { font-size: 12.5px; color: var(--tinta-fraca); font-weight: 500; }

textarea.obs {
  width: 100%;
  min-height: 74px;
  padding: 12px 14px;
  border: 1.5px solid var(--borda);
  border-radius: 13px;
  background: var(--card);
  font-size: 14px;
  resize: vertical;
}
textarea.obs:focus, .campo input:focus { outline: 2px solid var(--laranja); outline-offset: 1px; }

.qtd { display: flex; align-items: center; gap: 6px; background: var(--card); border: 1.5px solid var(--borda); border-radius: 13px; padding: 4px; }
.qtd button { width: 34px; height: 34px; border-radius: 9px; font-size: 18px; color: var(--laranja); display: grid; place-items: center; }
.qtd button:disabled { color: #d5c3be; }
.qtd span { min-width: 22px; text-align: center; font-weight: 600; font-size: 15px; }

.erro { margin-top: 10px; font-size: 12.5px; color: var(--vermelho); font-weight: 500; }

/* ---------- Carrinho ---------- */

.linha { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid var(--borda); }
.linha:last-of-type { border-bottom: 0; }
.linha img { width: 56px; height: 56px; flex: none; border-radius: 12px; object-fit: cover; background: #f7efec; }
.linha-txt { flex: 1; min-width: 0; }
.linha-nome { font-size: 14px; font-weight: 600; }
.linha-det { margin-top: 3px; font-size: 11.5px; line-height: 1.5; color: var(--tinta-fraca); }
.linha-val { font-size: 14px; font-weight: 700; white-space: nowrap; }
.linha-baixo { margin-top: 8px; display: flex; align-items: center; gap: 10px; }
.tirar { font-size: 11.5px; color: var(--tinta-fraca); text-decoration: underline; }

.contas { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--borda); font-size: 13.5px; }
.conta-l { display: flex; justify-content: space-between; padding: 4px 0; color: var(--tinta-fraca); }
.conta-l.total { font-size: 17px; font-weight: 700; color: var(--tinta); padding-top: 8px; }

.aviso {
  margin-top: 14px;
  padding: 12px 14px;
  background: #fff6e8;
  border: 1px solid #f2e0bd;
  border-radius: 13px;
  font-size: 12px; line-height: 1.55; color: #7a5a1e;
}

/* ---------- Checkout ---------- */

.campo { margin-bottom: 13px; }
.campo label { display: block; font-size: 12px; font-weight: 500; margin-bottom: 5px; color: var(--tinta-fraca); }
.campo input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--borda);
  border-radius: 13px;
  background: var(--card);
  font-size: 15px;
}
.dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

@media (min-width: 430px) {
  .grade { grid-template-columns: repeat(3, 1fr); }
  .card-nome { font-size: 12.5px; }
}

@media (min-width: 520px) {
  .app-shell { box-shadow: 0 0 60px rgba(42, 28, 18, .1); }
}

/* Área clicável do card: o botão precisa se comportar como bloco para as
   linhas de texto empilharem, e o realce do foco fica no card inteiro. */
.card-abrir {
  display: block; width: 100%; text-align: left;
  padding: 0; background: none; border: 0; color: inherit; font: inherit;
}
.card-abrir:focus-visible { outline: 2px solid var(--laranja); outline-offset: 3px; border-radius: 12px; }

.folha-desc { margin: 0 0 8px; font-size: 12.5px; line-height: 1.5; color: var(--tinta-fraca); }
.folha-preco { margin: 0 0 20px; font-size: 19px; font-weight: 700; color: var(--laranja); }

/* Pulinho curto quando o preço muda (escolher pão/adicional). O JS põe a
   classe só quando o valor de fato mudou, então não pisca à toa. */
@keyframes pulsoPreco { 0% { transform: scale(1); } 45% { transform: scale(1.13); } 100% { transform: scale(1); } }
.folha-preco.pulo { animation: pulsoPreco .18s ease; }
.btn .val.pulo { animation: pulsoPreco .18s ease; }
@media (prefers-reduced-motion: reduce) { .folha-preco.pulo, .btn .val.pulo { animation: none; } }
.folha-preco small { font-size: 11px; font-weight: 500; color: var(--tinta-fraca); }

.opcao:disabled { opacity: .4; cursor: default; }

/* ---------- Pagamento simulado ---------- */

/* A faixa de demonstração fica no topo das duas telas de pagamento; é ela
   que impede alguém de confundir a simulação com uma cobrança real. */
.demo {
  margin-bottom: 16px;
  padding: 11px 13px;
  border-radius: 12px;
  background: #fff3cd;
  border: 1px solid #e8d08a;
  color: #6b5310;
  font-size: 11.5px; font-weight: 500; line-height: 1.5;
}

.pix-caixa { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.qr { width: 190px; height: 190px; border-radius: 12px; border: 1px solid var(--borda); }
.pix-dica { margin: 0; font-size: 11.5px; line-height: 1.5; color: var(--tinta-fraca); text-align: center; }
.pix-codigo {
  width: 100%;
  padding: 11px 13px;
  border-radius: 12px;
  background: #f4ece9;
  border: 1px solid var(--borda);
  font-family: ui-monospace, "Cascadia Mono", Menlo, monospace;
  font-size: 10.5px; line-height: 1.5; color: var(--tinta-fraca);
  word-break: break-all;
  max-height: 78px; overflow-y: auto;
}
.btn-sec {
  width: 100%;
  padding: 12px 16px;
  border-radius: 13px;
  background: var(--card);
  border: 1.5px solid var(--laranja);
  color: var(--laranja);
  font-size: 13.5px; font-weight: 600;
}
.dinheiro-nota { margin: 0; font-size: 13.5px; line-height: 1.6; text-align: center; }

.cartao-visor {
  display: flex; flex-direction: column; gap: 14px;
  padding: 18px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: linear-gradient(125deg, #7a0208, #b3131b 60%, #4a0002);
  color: #fff;
  box-shadow: 0 10px 24px rgba(122, 2, 8, .28);
}
.cv-chip { width: 34px; height: 25px; border-radius: 5px; background: linear-gradient(140deg, #f0d488, #c9a34a); }
.cv-num { font-size: 16px; font-weight: 600; letter-spacing: .06em; }
.cv-pe { display: flex; justify-content: space-between; gap: 12px; font-size: 10.5px; opacity: .85; }
.cv-pe span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.processando { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 34px 10px; }
.processando p { margin: 0; font-size: 13.5px; color: var(--tinta-fraca); text-align: center; }
.giro {
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid var(--borda); border-top-color: var(--laranja);
  animation: gira .8s linear infinite;
}
@keyframes gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .giro { animation-duration: 2.4s; } }

.btn-voltar {
  flex: none;
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--card); border: 1.5px solid var(--borda);
  color: var(--tinta-fraca); font-size: 18px;
  display: grid; place-items: center;
}

.sucesso { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0 18px; text-align: center; }
.tique {
  width: 58px; height: 58px; border-radius: 50%;
  background: #e6f5ec; color: var(--verde);
  display: grid; place-items: center;
  font-size: 27px; margin-bottom: 8px;
}
.sucesso h4 { margin: 0; font-size: 17px; font-weight: 700; }
.sucesso p { margin: 0; font-size: 12.5px; color: var(--tinta-fraca); }
.sucesso .grande { margin-top: 6px; font-size: 24px; font-weight: 700; color: var(--tinta); }

/* ---------- Adicionais no estilo da vitrine de pizza ---------- */

/* Grade de três colunas com todos os adicionais à vista de uma vez. */
.add-trilho {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 4px 0 4px;
}

.add-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 8px 12px;
  background: var(--card);
  border: 1.5px solid var(--borda);
  border-radius: 16px;
  text-align: center;
  transition: border-color .15s ease, transform .12s ease;
}
.add-card:active { transform: scale(.97); }
.add-card[aria-pressed="true"] { border-color: var(--laranja); background: #fff6ef; }
.add-card:disabled { opacity: .42; cursor: default; }

.add-card img {
  width: 62px; height: 62px; border-radius: 50%;
  object-fit: cover; background: #f7efec;
}
.add-nome {
  margin-top: 6px; font-size: 11px; font-weight: 600; line-height: 1.2;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.add-preco { font-size: 10.5px; font-weight: 500; color: var(--tinta-fraca); }

/* O botão redondo no canto: some para "+" e vira "✓" quando o item entra. */
.add-mais {
  position: absolute; top: 8px; right: 8px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--laranja); color: #fff;
  display: grid; place-items: center;
  font-size: 15px; line-height: 1;
  box-shadow: 0 3px 8px rgba(255, 122, 47, .38);
}
.add-card[aria-pressed="true"] .add-mais { background: var(--verde); box-shadow: none; }
.add-card:disabled .add-mais { background: #cbbdb0; box-shadow: none; }

/* Contador "3 de 6" ao lado do título do grupo, como no cardápio real. */
.add-contador { margin-left: auto; white-space: nowrap; font-size: 11px; font-weight: 500; color: var(--tinta-fraca); }

.cats-sentinela { height: 1px; margin: 0; }

/* Botão "ver mais / ver menos" dos adicionais: discreto, largura total, para
   encurtar a folha quando há muitos adicionais. */
.add-ver {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  background: var(--card);
  border: 1.5px dashed var(--borda);
  color: var(--laranja);
  font-size: 12.5px; font-weight: 600;
}
.add-ver:active { transform: scale(.99); }

/* ---------- Animações de toque da navbar ---------- */
/* Cada ícone tem um gesto próprio no clique (adaptado do protótipo). */

.tab .ico { transform-origin: center; }

.anim-home    { animation: pop-home     .6s cubic-bezier(.175,.885,.32,1.275); }
.anim-search  { animation: radar-search .6s ease-in-out; }
.anim-heart   { animation: beat-heart   .6s ease-in-out; }
.anim-profile { animation: nod-profile  .6s ease-in-out; }

/* Home: achata e estica, enchendo de laranja por um instante. */
@keyframes pop-home {
  0%   { transform: scale(1); }
  40%  { transform: scaleX(1.25) scaleY(.75); fill: rgba(255,112,52,.2); }
  75%  { transform: scaleX(.85) scaleY(1.15); }
  100% { transform: scale(1); fill: none; }
}
/* Busca: gira como um radar. */
@keyframes radar-search {
  0%   { transform: rotate(0) scale(1); }
  30%  { transform: rotate(-20deg) scale(1.15); }
  70%  { transform: rotate(20deg) scale(1.15); }
  100% { transform: rotate(0) scale(1); }
}
/* Coração: batimento duplo, preenchendo de laranja. */
@keyframes beat-heart {
  0%   { transform: scale(1); fill: none; }
  25%  { transform: scale(1.35); fill: var(--laranja); stroke: var(--laranja); }
  50%  { transform: scale(1); fill: none; }
  75%  { transform: scale(1.35); fill: var(--laranja); stroke: var(--laranja); }
  100% { transform: scale(1); fill: none; }
}
/* Perfil: um leve aceno. */
@keyframes nod-profile {
  0%   { transform: translateY(0); }
  30%  { transform: translateY(-7px); }
  60%  { transform: translateY(3px); }
  100% { transform: translateY(0); }
}

/* Carrinho: pulo festivo. Parte da saliência de -22px do botão elevado. */
.tab-central.anim-cart { animation: pula-carrinho .6s cubic-bezier(.175,.885,.32,1.275); }
@keyframes pula-carrinho {
  0%   { transform: translateY(-22px) scale(1);   box-shadow: 0 8px 20px rgba(255,112,52,.4); }
  40%  { transform: translateY(-42px) scale(1.06); box-shadow: 0 18px 28px rgba(255,112,52,.6); }
  70%  { transform: translateY(-16px) scale(.95);  box-shadow: 0 5px 12px rgba(255,112,52,.35); }
  100% { transform: translateY(-22px) scale(1);   box-shadow: 0 8px 20px rgba(255,112,52,.4); }
}

@media (prefers-reduced-motion: reduce) {
  .anim-home, .anim-search, .anim-heart, .anim-profile, .tab-central.anim-cart { animation: none; }
}

/* ---------- Transição de adicionar ao carrinho ---------- */
/* A pílula "Ver pedido" sobe suavemente e se expande para a direita (parte
   estreita à esquerda e cresce até a largura cheia), como no protótipo. A
   classe vai no BOTÃO — o container fica com o translateX(-50%) da
   centralização, que não pode ser sobrescrito por esta animação. */
.cta-entrada { transform-origin: left center; animation: sobe-cta .55s cubic-bezier(.16, 1, .3, 1); }
@keyframes sobe-cta {
  0%   { opacity: 0; transform: translateY(70px) scaleX(.66); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) scaleX(1); }
}
.btn .cnt.pop,
.tab-central .nav-cart-badge.pop { animation: badge-pop .4s cubic-bezier(.175, .885, .32, 1.275); }
@keyframes badge-pop {
  0%   { transform: scale(0); }
  80%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .cta-entrada, .btn .cnt.pop, .tab-central .nav-cart-badge.pop { animation: none; }
}

/* ---------- Entrada coreografada (revelar ao aparecer) ---------- */
/* Cada bloco marcado com .rev nasce invisível e é revelado quando entra na
   tela (o JS liga .rev-on via IntersectionObserver). Na primeira dobra os
   atrasos --d encadeiam a abertura — logo, título, banner, categorias e
   cards surgem um a um, como numa vitrine de anúncio. Usamos animações
   (não transições) para o efeito não deixar resíduo na propriedade
   transform e atrapalhar o toque nos cards (:active). */
.rev { opacity: 0; }
.rev.rev-on {
  /* Estado final garantido: se o motor de animação não rodar (webview
     congelado), a opacity estática mantém o conteúdo visível; enquanto a
     animação roda, é ela que comanda opacity/transform. */
  opacity: 1;
  animation-duration: .72s;
  animation-timing-function: cubic-bezier(.16, 1, .3, 1);
  animation-fill-mode: both;
  animation-delay: var(--d, 0s);
}
.rev-up.rev-on    { animation-name: rev-up; }
.rev-pop.rev-on   { animation-name: rev-pop; }
.rev-scale.rev-on { animation-name: rev-scale; }
.rev-left.rev-on  { animation-name: rev-left; }

@keyframes rev-up    { from { opacity: 0; transform: translateY(30px); }               to { opacity: 1; transform: none; } }
@keyframes rev-left  { from { opacity: 0; transform: translateX(-26px); }              to { opacity: 1; transform: none; } }
@keyframes rev-scale { from { opacity: 0; transform: scale(.93); }                     to { opacity: 1; transform: none; } }
@keyframes rev-pop {
  0%   { opacity: 0; transform: translateY(14px) scale(.82); }
  70%  { opacity: 1; transform: translateY(0) scale(1.06); }
  100% { opacity: 1; transform: none; }
}

/* Sem animação: nada fica escondido. */
@media (prefers-reduced-motion: reduce) {
  .rev { opacity: 1; }
  .rev.rev-on { animation: none; }
}

/* ---------- Botão de gravação (temporário, só com #rec na URL) ---------- */
/* Reinicia a coreografia para gravar a tela; some no clique para não entrar
   na captura. Não aparece para quem acessa o site normalmente. */
.btn-gravar {
  position: fixed; z-index: 90;
  top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px;
  padding: 9px 14px; border-radius: 999px;
  background: rgba(42, 28, 18, .9); color: #fff;
  font-size: 12.5px; font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
  transition: opacity .16s ease, transform .16s ease;
}
.btn-gravar.oculto { opacity: 0; transform: scale(.9); pointer-events: none; }
