/* ═══════════════════════════════════════════════════
   cardapio.css — Cardápio Online RCDev
   Tema claro (fundo branco) + cores configuráveis
   ═══════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Cores dinâmicas (sobrescritas via JS com dados do Firestore) ── */
  --primary:    #E53935;          /* cor principal (cabeçalho, botões, destaques) */
  --primary-l:  #EF5350;          /* variante clara */
  --primary-dk: #B71C1C;          /* variante escura */
  --primary-rgb: 229, 57, 53;     /* para rgba() */

  /* ── Paleta de fundo branco ── */
  --bg0:    #F5F5F5;
  --bg1:    #FFFFFF;
  --bg2:    #F0F0F0;
  --bg3:    #E8E8E8;
  --text:   #1A1A1A;
  --text2:  #555555;
  --border: rgba(0,0,0,.09);

  /* ── Semânticas ── */
  --em:    #16A34A;
  --rose:  #E05263;
  --gold:  var(--primary);
  --gold-l: var(--primary-l);
  --wpp:   #25D366;

  --radius:    12px;
  --radius-lg: 18px;
}

html, body {
  min-height: 100%;
  background: var(--bg0);
  color: var(--text);
  font-family: 'Sora', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(var(--primary-rgb),.35); border-radius: 2px; }

/* ══════════════════════════════════════════════════
   HEADER FIXO DA LOJA
   ══════════════════════════════════════════════════ */
.loja-header {
  background: var(--primary);
  border-bottom: none;
  padding: .75rem 1rem .625rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  position: fixed !important;
  top: 0 !important; left: 0 !important; right: 0 !important;
  width: 100%;
  z-index: 1000 !important;
  transform: translateZ(0) !important;
  will-change: transform !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
/* Logo no header */
#loja-header-logo img {
  height: 42px !important;
  width: 42px !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  border: 2px solid rgba(255,255,255,.35) !important;
  flex-shrink: 0;
}
.loja-header-text { flex: 1; min-width: 0; }
.loja-nome {
  font-size: 1rem; font-weight: 800;
  color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.loja-desc {
  font-size: .72rem; color: rgba(255,255,255,.8);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: .05rem;
}
.loja-info-row {
  display: flex; gap: .625rem; flex-wrap: wrap;
  margin-top: .25rem; font-size: .72rem; color: rgba(255,255,255,.85);
}
.loja-info-row span {
  background: rgba(255,255,255,.18);
  border-radius: 99px;
  padding: .15rem .5rem;
  flex-shrink: 0;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .loja-header { align-items: flex-start; padding: .65rem .875rem .55rem; }
  .loja-info-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin-right: -.25rem;
    padding-bottom: .1rem;
  }
  .loja-info-row::-webkit-scrollbar { display: none; }
}
.loja-fechado {
  background: rgba(0,0,0,.25);
  border-radius: 8px; padding: .25rem .65rem; font-size: .72rem;
  color: #fff; font-weight: 700; white-space: nowrap; flex-shrink: 0;
}
.loja-aberto {
  background: rgba(255,255,255,.22);
  border-radius: 8px; padding: .25rem .65rem; font-size: .72rem;
  color: #fff; font-weight: 700; white-space: nowrap; flex-shrink: 0;
}

/* ══════════════════════════════════════════════════
   HEADER ITENS (quando dentro de categoria)
   ══════════════════════════════════════════════════ */
.itens-header {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem;
  background: var(--primary);
  border-bottom: none;
  position: fixed !important;
  top: 0 !important; left: 0 !important; right: 0 !important; width: 100%;
  z-index: 999 !important;
  transform: translateZ(0) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.itens-header-back {
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 10px; padding: .35rem .75rem;
  color: #fff; font-size: .8rem; cursor: pointer;
  font-family: 'Sora', sans-serif; flex-shrink: 0;
}
.itens-header-titulo {
  font-size: .95rem; font-weight: 800; color: #fff;
  flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ══════════════════════════════════════════════════
   WRAPPER PRINCIPAL
   ══════════════════════════════════════════════════ */
.cardapio-wrap {
  max-width: 640px; margin: 0 auto;
  padding: 0 0 9rem;
  padding-top: var(--loja-header-h, 64px);
}

/* ══════════════════════════════════════════════════
   BANNER DE TOPO (foto opcional da loja) — proporção 640×200
   ══════════════════════════════════════════════════ */
.loja-banner-wrap {
  width: 100%;
  aspect-ratio: 640 / 200;
  overflow: hidden;
  display: block;
  background: #f0f0f0;
}
.loja-banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 0;
  margin: 0;
  box-shadow: none;
}
.loja-banner-placeholder {
  width: 100%; height: 0; /* sem banner = sem espaço */
  display: none;
}

/* ══════════════════════════════════════════════════
   CHIPS DE CATEGORIA (horizontal scroll, como nas fotos)
   ══════════════════════════════════════════════════ */
.cats-chips-bar {
  position: sticky;
  top: var(--loja-header-h, 64px);
  z-index: 90;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: .625rem 1rem;
  display: flex;
  gap: .45rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
}
.cats-chips-bar::-webkit-scrollbar { display: none; }

.cat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  flex-shrink: 0;
  cursor: pointer;
  padding: .4rem .7rem;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg2);
  transition: all .18s;
  min-width: 56px;
}
.cat-chip:active { opacity: .75; }
.cat-chip-img {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  background: var(--bg3);
}
.cat-chip-emoji {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  border: 2px solid var(--border);
}
.cat-chip-nome {
  font-size: .65rem; font-weight: 700;
  color: var(--text2);
  white-space: nowrap;
  max-width: 64px;
  overflow: hidden; text-overflow: ellipsis;
  text-align: center;
}
.cat-chip.active {
  background: var(--primary);
  border-color: var(--primary);
}
.cat-chip.active .cat-chip-nome { color: #fff; }
.cat-chip.active .cat-chip-img,
.cat-chip.active .cat-chip-emoji {
  border-color: rgba(255,255,255,.45);
}

/* ══════════════════════════════════════════════════
   SEÇÕES DE CATEGORIA (no scroll do cardápio)
   ══════════════════════════════════════════════════ */
.cat-section {
  margin-bottom: .5rem;
}
.cat-section-titulo {
  font-size: 1rem; font-weight: 800; color: var(--text);
  padding: .875rem 1rem .4rem;
  display: flex; justify-content: space-between; align-items: center;
}
.cat-section-ver-tudo {
  font-size: .75rem; font-weight: 600;
  color: var(--primary); cursor: pointer;
  background: none; border: none;
  font-family: 'Sora', sans-serif; padding: 0;
}

/* ══════════════════════════════════════════════════
   ITEM DO CARDÁPIO (lista dentro de categoria)
   ══════════════════════════════════════════════════ */
.item-card {
  display: flex; align-items: center; gap: .875rem;
  background: var(--bg1);
  border-bottom: 1px solid var(--border);
  padding: .875rem 1rem;
  cursor: pointer; transition: background .15s;
}
.item-card:hover { background: #fafafa; }
.item-card.indisponivel { opacity: .45; cursor: not-allowed; }
.item-thumb {
  flex-shrink: 0; width: 84px; height: 84px;
  border-radius: 12px;
  background: var(--bg2);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; overflow: hidden;
}
.item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-info { flex: 1; min-width: 0; }
.item-nome {
  font-weight: 700; font-size: .95rem;
  color: var(--text); line-height: 1.3;
}
.item-desc {
  font-size: .8rem; color: var(--text2); margin-top: .15rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-clamp: 2;
  overflow: hidden; line-height: 1.4;
}
.item-preco-wrap { display: flex; align-items: baseline; gap: .35rem; margin-top: .35rem; flex-wrap: wrap; }
.item-preco {
  font-weight: 800; color: var(--primary);
  font-size: 1rem; font-family: 'DM Mono', monospace;
}
.item-preco-original {
  font-size: .78rem; text-decoration: line-through;
  color: #aaa; font-family: 'DM Mono', monospace;
}
.item-promo-tag {
  font-size: .6rem; background: rgba(var(--primary-rgb),.1);
  border: 1px solid rgba(var(--primary-rgb),.25);
  border-radius: 5px; padding: .1rem .35rem;
  color: var(--primary); font-weight: 700;
}
.item-views {
  font-size: .68rem; color: #bbb; margin-top: .1rem;
}
.item-add-btn {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #fff; border: none; font-size: 1.4rem;
  font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb),.35);
}
.item-add-btn:hover { transform: scale(1.1); }
.item-add-btn:active { transform: scale(.9); }

/* ══════════════════════════════════════════════════
   CARRINHO FAB
   ══════════════════════════════════════════════════ */
.carrinho-fab {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; border: none; border-radius: 50px;
  padding: 1rem 2rem; font-size: .95rem; font-weight: 800;
  font-family: 'Sora', sans-serif; cursor: pointer;
  box-shadow: 0 6px 24px rgba(var(--primary-rgb),.45);
  display: flex; align-items: center; gap: .75rem;
  transition: transform .2s, box-shadow .2s;
  min-width: 220px; justify-content: center; white-space: nowrap;
  z-index: 80;
}
.carrinho-fab:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 10px 32px rgba(var(--primary-rgb),.55);
}
.carrinho-fab.hidden { display: none; }
.fab-badge {
  background: rgba(0,0,0,.25); color: #fff; border-radius: 50%;
  width: 24px; height: 24px; font-size: .72rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* ══════════════════════════════════════════════════
   MODAL ITEM (bottom sheet — FUNDO BRANCO)
   ══════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px); z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
}
.modal-overlay.hidden { display: none !important; }

.modal-sheet {
  background: #fff;
  border-radius: 24px 24px 0 0;
  width: 100%; max-width: 540px;
  animation: slideUp .28s cubic-bezier(.22,.8,.36,1);
  max-height: 92dvh; overflow-y: auto;
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Hero da foto do item */
.sheet-hero {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: var(--bg2);
  border-radius: 24px 24px 0 0;
  flex-shrink: 0;
}
.sheet-hero img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  z-index: 1;
}
/* Fundo blur da própria imagem (efeito Spotify) */
.sheet-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: inherit;
  background-size: cover;
  filter: blur(20px) brightness(.6) saturate(1.2);
  transform: scale(1.1);
  z-index: 0;
}
.sheet-hero-overlay  { z-index: 2; }
.sheet-hero-cat      { z-index: 3; }
.sheet-hero-close    { z-index: 3; }
.sheet-hero-info     { z-index: 3; }
.sheet-hero-emoji {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
}
.sheet-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.0) 40%, rgba(0,0,0,.62) 100%);
}
.sheet-hero-cat {
  position: absolute; top: .75rem; left: .875rem;
  background: var(--primary); color: #fff;
  border-radius: 99px; padding: .25rem .75rem;
  font-size: .65rem; font-weight: 800;
  opacity: 0; transition: opacity .2s;
}
.sheet-hero-cat.visible { opacity: 1; }
.sheet-hero-close {
  position: sticky;
  top: .75rem;
  float: right;
  margin: .75rem .875rem 0 0;
  background: rgba(0,0,0,.55);
  border: none; color: #fff;
  width: 36px; height: 36px; border-radius: 50%; font-size: 1rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  z-index: 999;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
  backdrop-filter: blur(4px);
}
.sheet-hero-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: .75rem 1rem;
}
.sheet-item-nome {
  font-size: 1.1rem; font-weight: 800; color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,.6); line-height: 1.25;
}
.sheet-item-desc {
  font-size: .8rem; color: rgba(255,255,255,.8); margin-top: .2rem;
  text-shadow: 0 1px 4px rgba(0,0,0,.5); line-height: 1.4;
}

/* Corpo do modal */
.sheet-body {
  padding: 1rem 1rem 1.5rem;
  background: #fff;
}

.sheet-preco-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .875rem;
  padding-bottom: .875rem;
  border-bottom: 1px solid var(--border);
}
.sheet-preco-label {
  font-size: .6rem; letter-spacing: .1em; color: var(--text2); font-weight: 700;
  margin-bottom: .15rem;
}
.sheet-item-preco {
  font-size: 1.3rem; font-weight: 800;
  color: var(--primary); font-family: 'DM Mono', monospace;
}
.sheet-disponivel {
  background: rgba(22,163,74,.1); color: #16A34A;
  border: 1px solid rgba(22,163,74,.25);
  border-radius: 99px; padding: .25rem .8rem;
  font-size: .72rem; font-weight: 700;
}
.sheet-disponivel.indisponivel {
  background: rgba(224,82,99,.1); color: var(--rose);
  border-color: rgba(224,82,99,.25);
}

/* Grupos de adicionais — tema claro */
.si-grupo {
  margin: .875rem 0;
  border-top: 1px solid var(--border);
  padding-top: .875rem;
}
.si-grupo-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: .5rem;
}
.si-grupo-nome { font-weight: 700; font-size: .88rem; color: var(--text); }
.si-grupo-limite {
  font-size: .65rem; color: var(--text2);
  background: var(--bg2); border: 1px solid var(--border);
  padding: .15rem .5rem; border-radius: 20px;
}
/* Opção de adicional — tema claro */
.si-opcao-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: .6rem .75rem; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--bg0);
  cursor: pointer; transition: all .15s; gap: .75rem;
  margin-bottom: .3rem;
}
.si-opcao-row:has(input:checked) {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb),.06);
}
/* Hack para safari: usa JS para marcar classe 'checked' */
.si-opcao-row.opcao-selecionada {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb),.06);
}
.si-opcao-row input[type="radio"],
.si-opcao-row input[type="checkbox"] {
  accent-color: var(--primary);
  width: 18px; height: 18px; flex-shrink: 0;
}
.si-opcao-nome { font-size: .85rem; color: var(--text); flex: 1; }
.si-opcao-preco { font-size: .78rem; color: var(--primary); font-family: 'DM Mono', monospace; white-space: nowrap; font-weight: 700; }
.si-opcao-gratis { font-size: .72rem; color: #bbb; }

/* Controle de qty dos adicionais ilimitados */
.si-qty-btn {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--border); background: var(--bg2);
  color: var(--text); font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; line-height: 1;
  flex-shrink: 0;
}
.si-qty-btn.si-qty-plus {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.si-qty-val { min-width: 18px; text-align: center; font-size: .82rem; font-family: 'DM Mono', monospace; color: var(--text); }

/* Quantidade principal */
.qty-control-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 1rem 0 .875rem;
  padding: .75rem; border-radius: var(--radius);
  background: var(--bg0); border: 1px solid var(--border);
}
.qty-label { font-size: .85rem; font-weight: 700; color: var(--text); }
.qty-control { display: flex; align-items: center; gap: 1rem; }
.qty-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg2); border: 1.5px solid var(--border);
  color: var(--text); font-size: 1.3rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.qty-btn.qty-btn--plus {
  background: var(--primary); border-color: var(--primary); color: #fff;
}
.qty-btn:active { transform: scale(.92); }
.qty-val { font-size: 1.25rem; font-weight: 800; min-width: 2rem; text-align: center; color: var(--text); }

.obs-input {
  width: 100%; background: var(--bg0); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: .75rem; color: var(--text);
  font-family: 'Sora', sans-serif; font-size: .875rem; resize: none;
  margin-bottom: 1rem; outline: none;
}
.obs-input:focus { border-color: var(--primary); }
.obs-input::placeholder { color: #bbb; }

.btn-add-carrinho {
  width: 100%; background: var(--primary); color: #fff; border: none;
  border-radius: var(--radius); padding: 1rem; font-size: .95rem;
  font-weight: 800; font-family: 'Sora', sans-serif; cursor: pointer;
  transition: opacity .2s; box-shadow: 0 4px 16px rgba(var(--primary-rgb),.35);
  display: flex; align-items: center; justify-content: space-between;
}
.btn-add-carrinho:hover { opacity: .9; }
.btn-add-total { font-family: 'DM Mono', monospace; font-size: .95rem; font-weight: 800; }

/* ══════════════════════════════════════════════════
   CARRINHO / CHECKOUT SHEET (fundo branco)
   ══════════════════════════════════════════════════ */
.carrinho-sheet .modal-sheet {
  background: #fff;
  max-height: 92dvh; display: flex; flex-direction: column;
}
.carrinho-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .875rem; }
.carrinho-titulo { font-size: 1rem; font-weight: 800; color: var(--text); }
.btn-fechar-sheet {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text2); padding: .25rem .55rem;
  font-size: 1rem; cursor: pointer;
}
.carrinho-itens { flex: 1; overflow-y: auto; margin-bottom: 1rem; }
.carr-item {
  display: flex; align-items: center; gap: .625rem;
  padding: .625rem 0; border-bottom: 1px solid var(--border);
}
.carr-item-nome { flex: 1; font-size: .875rem; font-weight: 600; color: var(--text); }
.carr-item-preco { font-family: 'DM Mono', monospace; font-size: .875rem; color: var(--primary); font-weight: 700; }
.carr-item-del { background: none; border: none; color: #ccc; cursor: pointer; font-size: 1rem; padding: 0 .25rem; }
.carr-total-row { display: flex; justify-content: space-between; margin-bottom: .25rem; font-size: .875rem; color: var(--text2); }
.carr-total-final { font-weight: 800; font-size: 1rem; color: var(--text); border-top: 1px solid var(--border); padding-top: .625rem; margin-top: .25rem; }
.btn-finalizar-pedido {
  width: 100%; background: var(--primary); color: #fff; border: none;
  border-radius: var(--radius); padding: 1rem; font-size: .95rem;
  font-weight: 800; font-family: 'Sora', sans-serif; cursor: pointer;
  box-shadow: 0 4px 16px rgba(var(--primary-rgb),.3);
}
.checkout-fields { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1rem; }
.field-label { font-size: .65rem; letter-spacing: .1em; color: var(--text2); font-weight: 700; margin-bottom: .25rem; display: block; }
.rc-input {
  width: 100%; background: var(--bg0); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: .75rem; color: var(--text);
  font-family: 'Sora', sans-serif; font-size: .875rem; outline: none;
}
.rc-input:focus { border-color: var(--primary); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .625rem; }
.pay-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem; }
.pay-opt {
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: .75rem; font-size: .82rem;
  cursor: pointer; text-align: center; transition: all .2s;
  font-family: 'Sora', sans-serif; color: var(--text);
}
.pay-opt.selected {
  background: rgba(var(--primary-rgb),.08);
  border-color: var(--primary);
  color: var(--primary); font-weight: 700;
}

/* ══════════════════════════════════════════════════
   SUCESSO
   ══════════════════════════════════════════════════ */
.sucesso-wrap { text-align: center; padding: 2rem 1rem; }
.sucesso-emoji { font-size: 4rem; margin-bottom: 1rem; }
.sucesso-titulo { font-size: 1.3rem; font-weight: 800; color: var(--em); margin-bottom: .5rem; }
.sucesso-sub { font-size: .875rem; color: var(--text2); margin-bottom: 1.5rem; }
.sucesso-num { font-size: 1rem; font-weight: 800; color: var(--primary); font-family: 'DM Mono', monospace; }

/* ══════════════════════════════════════════════════
   CHAT FAB (WhatsApp verde)
   ══════════════════════════════════════════════════ */
.chat-fab-wrap {
  position: fixed; bottom: 5.5rem; right: 1.25rem;
  z-index: 150; display: flex; flex-direction: column;
  align-items: flex-end; gap: .5rem;
}
.chat-fab-wrap.hidden { display: none !important; }
.chat-fab-balao {
  background: #fff; color: #111; font-family: 'Sora', sans-serif;
  font-size: .82rem; font-weight: 700;
  padding: .5rem .875rem; border-radius: 14px 14px 4px 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  white-space: nowrap; position: relative;
  animation: balaoIn .4s cubic-bezier(.22,.8,.36,1);
  transition: opacity .35s;
}
.chat-fab-balao::after {
  content: ''; position: absolute; bottom: -7px; right: 18px;
  width: 0; height: 0;
  border-left: 7px solid transparent;
  border-right: 3px solid transparent;
  border-top: 8px solid #fff;
}
@keyframes balaoIn {
  from { opacity: 0; transform: translateY(6px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-fab {
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--wpp); border: none; cursor: pointer;
  box-shadow: 0 4px 20px rgba(37,211,102,.45);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s; flex-shrink: 0; position: relative;
}
.chat-fab:hover { transform: scale(1.08); }
.chat-fab svg { width: 30px; height: 30px; }
.chat-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--rose); color: #fff;
  border-radius: 50%; width: 18px; height: 18px;
  font-size: .65rem; font-weight: 800;
  display: none; align-items: center; justify-content: center;
}
.chat-badge.visible { display: flex; }
.chat-window {
  position: fixed; bottom: 5.5rem; right: 1.25rem;
  width: min(360px, calc(100vw - 2rem)); max-height: 520px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 18px; z-index: 151;
  display: flex; flex-direction: column;
  box-shadow: 0 12px 48px rgba(0,0,0,.15);
  overflow: hidden; transition: opacity .22s, transform .22s;
  transform-origin: bottom right;
}
.chat-window.hidden { opacity: 0; pointer-events: none; transform: scale(.92) translateY(10px); }
.chat-header {
  display: flex; align-items: center; gap: .625rem;
  padding: .875rem 1rem; background: var(--primary);
  border-bottom: none; flex-shrink: 0;
}
.chat-header-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0;
}
.chat-header-info { flex: 1; }
.chat-header-nome { font-size: .875rem; font-weight: 700; color: #fff; }
.chat-header-status { font-size: .68rem; color: rgba(255,255,255,.8); }
.chat-fechar { background: none; border: none; color: rgba(255,255,255,.7); font-size: 1.1rem; cursor: pointer; }
.chat-msgs { flex: 1; overflow-y: auto; padding: .875rem; display: flex; flex-direction: column; gap: .5rem; background: #f9f9f9; }
.chat-msg { max-width: 85%; padding: .625rem .875rem; border-radius: 14px; font-size: .875rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.chat-msg.bot { background: #fff; border: 1px solid var(--border); color: var(--text); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.user { background: rgba(var(--primary-rgb),.1); border: 1px solid rgba(var(--primary-rgb),.2); color: var(--text); align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-opcoes { display: flex; flex-direction: column; gap: .3rem; align-self: flex-start; width: 100%; }
.chat-opcao-btn {
  background: #fff; border: 1.5px solid var(--border);
  border-radius: 10px; padding: .55rem .875rem;
  font-size: .82rem; font-weight: 600; color: var(--text);
  cursor: pointer; text-align: left; font-family: 'Sora', sans-serif; transition: all .15s;
}
.chat-opcao-btn:hover { border-color: var(--primary); color: var(--primary); }
.chat-input-row { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid var(--border); flex-shrink: 0; background: #fff; }
.chat-input {
  flex: 1; background: var(--bg0); border: 1.5px solid var(--border);
  border-radius: 10px; padding: .55rem .875rem;
  color: var(--text); font-family: 'Sora', sans-serif; font-size: .875rem; outline: none;
}
.chat-input:focus { border-color: var(--primary); }
.chat-send-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--wpp); color: #fff; border: none; font-size: 1.1rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* ══════════════════════════════════════════════════
   LOADING / ERRO
   ══════════════════════════════════════════════════ */
.loading-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; gap: 1rem; color: var(--text2); }
.spinner { font-size: 2rem; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════
   TRACKING DO PEDIDO
   ═══════════════════════════════════════════════════ */
.tracking-wrap { padding: 1.25rem 1rem 2rem; max-width: 480px; margin: 0 auto; }
.tracking-header { text-align: center; margin-bottom: 1.75rem; }
.tracking-num { font-family: 'DM Mono', monospace; font-size: .82rem; color: var(--text2); letter-spacing: .12em; margin-bottom: .25rem; }
.tracking-title { font-size: 1.2rem; font-weight: 800; color: var(--text); }
.tracking-timeline { display: flex; flex-direction: column; margin-bottom: 1.5rem; }
.tl-row { display: flex; gap: .875rem; align-items: flex-start; }
.tl-col { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; width: 40px; }
.tl-dot { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; background: var(--bg3); border: 2px solid var(--border); flex-shrink: 0; transition: all .4s; }
.tl-dot.done { background: rgba(22,163,74,.1); border-color: rgba(22,163,74,.4); box-shadow: 0 0 14px rgba(22,163,74,.15); }
.tl-dot.active { background: rgba(var(--primary-rgb),.1); border-color: rgba(var(--primary-rgb),.4); animation: tlPulse 1.8s ease-in-out infinite; }
@keyframes tlPulse { 0%,100% { box-shadow: 0 0 12px rgba(var(--primary-rgb),.25); } 50% { box-shadow: 0 0 26px rgba(var(--primary-rgb),.55); } }
.tl-dot.cancelado { background: rgba(224,82,99,.1); border-color: rgba(224,82,99,.35); }
.tl-line { width: 2px; flex: 1; min-height: 28px; background: var(--border); margin: 3px 0; border-radius: 2px; transition: background .4s; }
.tl-line.done { background: rgba(22,163,74,.35); }
.tl-body { padding: .35rem 0 1.25rem; flex: 1; }
.tl-label { font-weight: 700; font-size: .9rem; color: var(--text2); transition: color .3s; }
.tl-label.done    { color: var(--em); }
.tl-label.active  { color: var(--primary); }
.tl-label.idle    { color: #ccc; }
.tl-label.cancelado { color: var(--rose); }
.tl-desc { font-size: .75rem; color: var(--text2); margin-top: .15rem; }
.tl-hora { font-size: .68rem; color: #bbb; font-family: 'DM Mono', monospace; margin-top: .1rem; }
.tracking-resumo { background: var(--bg0); border: 1px solid var(--border); border-radius: 16px; padding: 1rem; margin-bottom: 1rem; }
.tracking-resumo-titulo { font-size: .65rem; letter-spacing: .1em; color: var(--text2); margin-bottom: .625rem; }
.tracking-item-row { display: flex; justify-content: space-between; font-size: .82rem; color: var(--text); padding: .25rem 0; border-bottom: 1px solid rgba(0,0,0,.04); }
.tracking-item-row:last-child { border-bottom: none; }
.tracking-total { display: flex; justify-content: space-between; font-weight: 800; font-size: .95rem; color: var(--text); margin-top: .625rem; padding-top: .625rem; border-top: 1px solid var(--border); }
.btn-tracking-novo { width: 100%; background: var(--primary); color: #fff; border: none; border-radius: 12px; padding: .875rem; font-size: .9rem; font-weight: 800; font-family: 'Sora', sans-serif; cursor: pointer; margin-top: .75rem; }

/* ══════════════════════════════════════════════════
   MODAL PIX — tema claro
   ══════════════════════════════════════════════════ */
#modal-pix > div {
  background: #fff !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}
#pix-valor-txt { color: var(--primary) !important; }

/* ══════════════════════════════════════════════════
   ITENS WRAP (lista dentro de categoria - scroll)
   ══════════════════════════════════════════════════ */
.itens-wrap {
  max-width: 640px; margin: 0 auto;
  padding: 0 0 9rem;
  padding-top: var(--loja-header-h, 64px);
}
#app-cardapio { min-height: 100vh; position: relative; }
body { padding-top: 0 !important; }

/* ══════════════════════════════════════════════════
   SEÇÃO INSTALAR PWA (final da página)
   ══════════════════════════════════════════════════ */
.pwa-install-section {
  margin: 1rem 1rem 2.5rem;
  background: var(--bg1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 1.25rem;
  text-align: center;
}
.pwa-install-loja-logo {
  width: 56px; height: 56px;
  border-radius: 14px;
  object-fit: cover;
  margin: 0 auto .75rem;
  display: block;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
  border: 1px solid var(--border);
}
.pwa-install-loja-logo-placeholder {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: rgba(var(--primary-rgb),.1);
  border: 1px solid rgba(var(--primary-rgb),.2);
  margin: 0 auto .75rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem;
}
.pwa-install-titulo {
  font-size: .95rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: .3rem;
}
.pwa-install-sub {
  font-size: .78rem;
  color: var(--text2);
  line-height: 1.5;
  margin-bottom: 1rem;
  max-width: 260px;
  margin-left: auto;
  margin-right: auto;
}
.pwa-install-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: .7rem 1.5rem;
  font-size: .85rem;
  font-weight: 800;
  cursor: pointer;
  font-family: 'Sora', sans-serif;
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), .3);
  transition: transform .15s, box-shadow .15s;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.pwa-install-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), .45);
}
.pwa-install-btn:active { transform: scale(.97); }
.pwa-install-ja {
  font-size: .7rem;
  color: var(--text2);
  margin-top: .75rem;
}

/* ══════════════════════════════════════════════════
   MODAL PWA INSTALL (instruções iOS)
   ══════════════════════════════════════════════════ */
.pwa-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(6px);
  z-index: 300;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 1rem;
}
.pwa-modal-overlay.hidden { display: none !important; }

.pwa-modal {
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 24px 24px 20px 20px;
  padding: 1.5rem;
  width: 100%; max-width: 480px;
  animation: slideUp .28s cubic-bezier(.22,.8,.36,1);
  position: relative;
}
.pwa-modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: rgba(255,255,255,.1); border: none;
  color: rgba(255,255,255,.6); width: 30px; height: 30px;
  border-radius: 50%; font-size: .9rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.pwa-modal-titulo {
  font-size: 1.1rem; font-weight: 800; color: #fff;
  margin-bottom: .25rem;
}
.pwa-modal-sub {
  font-size: .8rem; color: rgba(255,255,255,.5);
  margin-bottom: 1.25rem;
}
.pwa-steps {
  display: flex; flex-direction: column; gap: .75rem;
  margin-bottom: 1.25rem;
}
.pwa-step {
  display: flex; align-items: center; gap: .75rem;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; padding: .75rem;
}
.pwa-step-num {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: .75rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pwa-step span:nth-child(2) {
  flex: 1; font-size: .82rem; color: rgba(255,255,255,.8); line-height: 1.4;
}
.pwa-step-icon { font-size: 1.2rem; flex-shrink: 0; }
.pwa-modal-dica {
  font-size: .75rem; color: rgba(255,255,255,.35);
  text-align: center;
}