/* ===== Cardapio online e acompanhamento do pedido ===== */
:root {
  --cor: #d9480f;
  --cor-escura: #b33a0b;
  --fundo: #faf6f1;
  --card: #ffffff;
  --texto: #221c17;
  --suave: #75695f;
  --borda: #ebe2d8;
  --ok: #2b8a3e;
  --alerta: #e8590c;
  --erro: #c92a2a;
  --raio: 14px;
  --sombra: 0 2px 10px rgba(60, 40, 20, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  background: var(--fundo); color: var(--texto); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
a { color: var(--cor); }
.oculto { display: none !important; }
.container { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* ---------- Topo ---------- */
.topo { background: var(--cor); color: #fff; padding: 22px 0 18px; }
.topo .container { display: flex; align-items: center; gap: 14px; }
.topo img.logo { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; background: #fff; border: 3px solid rgba(255,255,255,.6); }
.topo h1 { margin: 0; font-size: 1.45rem; letter-spacing: -.01em; }
.topo p { margin: 2px 0 0; opacity: .92; font-size: .9rem; }
.selo { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: rgba(255,255,255,.18); margin-top: 6px; }
.selo::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #69db7c; }
.selo.fechada::before { background: #ffa8a8; }
.aviso-fechada { background: #fff3bf; color: #5c4400; padding: 12px 16px; text-align: center; font-weight: 600; font-size: .92rem; }

/* ---------- Categorias ---------- */
.nav-cat { position: sticky; top: 0; z-index: 20; background: var(--fundo); border-bottom: 1px solid var(--borda); }
.nav-cat .container { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; scrollbar-width: none; }
.nav-cat .container::-webkit-scrollbar { display: none; }
.chip { white-space: nowrap; border: 1px solid var(--borda); background: var(--card); padding: 7px 14px; border-radius: 99px; cursor: pointer; font-size: .88rem; font-weight: 500; }
.chip.ativo { background: var(--texto); color: #fff; border-color: var(--texto); }

.categoria { padding-top: 18px; scroll-margin-top: 60px; }
.categoria h2 { font-size: 1.15rem; margin: 6px 0 10px; }
.produto { display: flex; gap: 12px; background: var(--card); border-radius: var(--raio); padding: 12px; margin-bottom: 10px; box-shadow: var(--sombra); cursor: pointer; border: 1px solid transparent; transition: border-color .15s; }
.produto:hover { border-color: var(--borda); }
.produto .info { flex: 1; min-width: 0; }
.produto h3 { margin: 0 0 3px; font-size: 1rem; }
.produto .desc { margin: 0; color: var(--suave); font-size: .86rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.produto .preco { margin-top: 6px; font-weight: 700; }
.produto img, .produto .sem-foto { width: 92px; height: 92px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: #f1e9df; }
.produto .sem-foto { display: grid; place-items: center; font-size: 2rem; }
.produto.esgotado { opacity: .55; cursor: not-allowed; }
.tag-esgotado { display: inline-block; background: #f1f3f5; color: var(--suave); font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 6px; margin-left: 6px; }

/* ---------- Barra do carrinho ---------- */
.barra-carrinho { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); z-index: 30; pointer-events: none; }
.barra-carrinho button { pointer-events: auto; width: 100%; max-width: 728px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; background: var(--cor); color: #fff; border: 0; border-radius: 12px; padding: 15px 18px; font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,.18); cursor: pointer; }
.barra-carrinho .qtd { background: rgba(255,255,255,.22); border-radius: 8px; padding: 1px 8px; margin-right: 8px; }
.espaco-barra { height: 90px; }

/* ---------- Folhas (modais de baixo) ---------- */
.fundo-modal { position: fixed; inset: 0; background: rgba(20, 12, 5, .5); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.folha { background: var(--card); width: 100%; max-width: 640px; max-height: 92vh; border-radius: 18px 18px 0 0; display: flex; flex-direction: column; animation: sobe .22s ease-out; }
@media (min-width: 700px) { .fundo-modal { align-items: center; } .folha { border-radius: 18px; } }
@keyframes sobe { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.folha-topo { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--borda); }
.folha-topo h3 { margin: 0; font-size: 1.08rem; }
.fechar { border: 0; background: #f1ebe4; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.folha-corpo { padding: 16px; overflow-y: auto; flex: 1; }
.folha-rodape { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--borda); display: flex; gap: 10px; align-items: center; }
.folha img.foto { width: 100%; max-height: 240px; object-fit: cover; border-radius: 12px; margin-bottom: 12px; }

/* ---------- Formularios ---------- */
label.campo { display: block; margin-bottom: 12px; }
label.campo > span { display: block; font-size: .82rem; font-weight: 600; color: var(--suave); margin-bottom: 4px; }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=date], textarea, select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--borda); border-radius: 10px; background: #fff; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--cor); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cor) 18%, transparent); }
textarea { resize: vertical; min-height: 64px; }
.linha { display: flex; gap: 10px; }
.linha > * { flex: 1; }
.linha > .estreito { flex: 0 0 110px; }
.secao-titulo { font-size: .95rem; font-weight: 700; margin: 18px 0 10px; }
.secao-titulo:first-child { margin-top: 0; }

.btn { border: 0; border-radius: 10px; padding: 13px 16px; font-weight: 700; cursor: pointer; background: var(--cor); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.sec { background: #f1ebe4; color: var(--texto); }
.btn.bloco { width: 100%; display: flex; justify-content: space-between; }
.btn.pequeno { padding: 8px 12px; font-size: .86rem; }

.opcao { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--borda); border-radius: 10px; margin-bottom: 8px; cursor: pointer; }
.opcao input { width: 18px; height: 18px; accent-color: var(--cor); }
.opcao .opcao-texto { flex: 1; }
.opcao .opcao-texto small { display: block; color: var(--suave); }
.opcao:has(input:checked) { border-color: var(--cor); background: color-mix(in srgb, var(--cor) 6%, #fff); }

.segmentado { display: flex; background: #f1ebe4; border-radius: 10px; padding: 4px; margin-bottom: 14px; }
.segmentado button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 8px; font-weight: 600; cursor: pointer; }
.segmentado button.ativo { background: #fff; box-shadow: var(--sombra); }

.qtd-ctrl { display: inline-flex; align-items: center; border: 1px solid var(--borda); border-radius: 10px; overflow: hidden; }
.qtd-ctrl button { border: 0; background: #fff; width: 38px; height: 40px; font-size: 1.2rem; cursor: pointer; color: var(--cor); }
.qtd-ctrl span { min-width: 30px; text-align: center; font-weight: 700; }

/* ---------- Carrinho ---------- */
.item-carrinho { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--borda); }
.item-carrinho .info { flex: 1; min-width: 0; }
.item-carrinho .info small { display: block; color: var(--suave); }
.item-carrinho .valor { font-weight: 700; white-space: nowrap; }
.totais { margin-top: 12px; }
.totais div { display: flex; justify-content: space-between; padding: 3px 0; color: var(--suave); }
.totais div.total { color: var(--texto); font-weight: 800; font-size: 1.1rem; padding-top: 8px; }

#mapa-endereco { height: 220px; border-radius: 12px; margin-bottom: 12px; border: 1px solid var(--borda); }
.dica { font-size: .8rem; color: var(--suave); margin: -4px 0 12px; }
.erro-msg { background: #fff5f5; color: var(--erro); border: 1px solid #ffc9c9; padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; font-size: .9rem; }
.btn-local { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-bottom: 12px; }

/* ---------- Acompanhamento ---------- */
.cartao { background: var(--card); border-radius: var(--raio); padding: 16px; box-shadow: var(--sombra); margin: 14px 0; }
.cartao h2 { margin: 0 0 4px; font-size: 1.2rem; }
.status-grande { font-size: 1.3rem; font-weight: 800; margin: 4px 0 2px; }
.linha-tempo { display: flex; justify-content: space-between; margin: 18px 0 6px; position: relative; }
.linha-tempo::before { content: ""; position: absolute; left: 6%; right: 6%; top: 13px; height: 3px; background: var(--borda); }
.etapa { position: relative; text-align: center; flex: 1; font-size: .72rem; color: var(--suave); }
.etapa .bola { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 3px solid var(--borda); margin: 0 auto 6px; display: grid; place-items: center; font-size: .8rem; position: relative; }
.etapa.feita .bola { background: var(--cor); border-color: var(--cor); color: #fff; }
.etapa.atual .bola { box-shadow: 0 0 0 5px color-mix(in srgb, var(--cor) 25%, transparent); }
.etapa.feita { color: var(--texto); font-weight: 600; }
#mapa-rastreio { height: 320px; border-radius: 12px; border: 1px solid var(--borda); }
.pix-qr { width: 220px; height: 220px; margin: 10px auto; image-rendering: pixelated; }
.copia-cola { display: flex; gap: 8px; }
.copia-cola input { font-size: .8rem; }
.contador { text-align: center; color: var(--suave); font-size: .86rem; }
.btn-whats { display: flex; align-items: center; justify-content: center; gap: 8px; background: #25d366; color: #fff; text-decoration: none; padding: 12px; border-radius: 10px; font-weight: 700; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .76rem; font-weight: 700; }
.badge.ok { background: #d3f9d8; color: #1b5e20; }
.badge.pendente { background: #fff3bf; color: #5c4400; }
.badge.erro { background: #ffe3e3; color: var(--erro); }
.entregador-info { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.entregador-info .icone { font-size: 1.6rem; }
.pulso { width: 10px; height: 10px; background: var(--ok); border-radius: 50%; display: inline-block; animation: pulso 1.6s infinite; }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 rgba(43,138,62,.6); } 100% { box-shadow: 0 0 0 10px rgba(43,138,62,0); } }
.carregando { text-align: center; padding: 60px 0; color: var(--suave); }
.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); background: var(--texto); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 90; font-size: .9rem; box-shadow: var(--sombra); }
.marcador-moto { font-size: 28px; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }

/* ---------- Adicionais com quantidade ---------- */
.opcao-qtd { cursor: default; }
.opcao-qtd .opcao-texto { cursor: pointer; }
.opcao.marcada { border-color: var(--cor); background: color-mix(in srgb, var(--cor) 6%, #fff); }
.qtd-ctrl.mini button { width: 34px; height: 34px; font-size: 1.1rem; }
.qtd-ctrl.mini button:disabled { color: #ccc; cursor: default; }
.qtd-ctrl.mini span { min-width: 24px; }
.opcao.marcada .qtd-ctrl.mini span { color: var(--cor); }

/* Encomendas */
.tag-encomenda { display: inline-block; background: #efe7ff; color: #4b2a99; font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; margin-left: 6px; vertical-align: middle; }
.nota-encomenda { margin: -4px 0 10px; font-size: .84rem; color: #4b2a99; }
.produto.so-encomenda { opacity: .5; }
.bloco-agendamento { background: #faf7ff; border: 1px solid #e3d7ff; border-radius: 12px; padding: 12px 12px 2px; margin-bottom: 14px; }
.bloco-agendamento .secao-titulo { margin-top: 0; }
.bloco-agendamento .dica { margin-top: -4px; }
.resumo-encomenda { background: #efe7ff; color: #4b2a99; font-weight: 600; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: .9rem; }
.aviso-fechada a { color: inherit; }
.totais .resumo-encomenda { display: block; color: #4b2a99; }

/* ---------- Tela do produto (modelo: voltar + foto + grupos de adicionais + observacao + botao amarelo) ---------- */
:root { --mp-titulo: #33475b; --mp-suave: #6b7c93; --mp-botao: #ffcd00; --mp-botao-texto: #1c1c1c; }
#modal-produto { align-items: stretch; }
.folha-produto { max-width: 960px; height: 100%; max-height: 100%; border-radius: 0; overflow: hidden; }
@media (min-width: 700px) {
  #modal-produto { align-items: center; padding: 24px; }
  .folha-produto { height: auto; max-height: calc(100vh - 48px); border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
}
.mp-topo { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: #fff; box-shadow: 0 1px 0 #e9edf2; position: relative; z-index: 2; }
.mp-topo h3 { margin: 0; font-size: 1.25rem; font-weight: 700; color: #1d2430; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-voltar { border: 0; background: none; color: var(--cor); cursor: pointer; padding: 2px; display: grid; place-items: center; border-radius: 50%; }
.mp-voltar:hover { background: color-mix(in srgb, var(--cor) 10%, transparent); }
.mp-corpo { padding: 0; background: #f6f7f9; }
.mp-foto-wrap { padding: 0 14px; background: #f6f7f9; }
.mp-foto { display: block; width: 100%; height: clamp(180px, 34vh, 320px); object-fit: cover; border-radius: 0 0 28px 28px; }
.mp-info { padding: 18px 16px 18px; background: #f6f7f9; }
.mp-info h2 { margin: 0 0 6px; font-size: 1.3rem; color: var(--mp-titulo); font-weight: 700; }
.mp-info p { margin: 0; color: var(--mp-suave); font-size: 1rem; line-height: 1.5; }
.mp-preco { margin-top: 10px; font-weight: 800; color: var(--texto); font-size: 1.05rem; }
#mp-adicionais { background: #fff; padding: 4px 18px 8px; }
.mp-grupo { margin-top: 16px; }
.mp-grupo-topo { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px;
  background: linear-gradient(180deg, #f5f7fa 0%, #e9edf2 100%); border-bottom: 1px solid #4a5868; border-radius: 4px 4px 0 0; }
.mp-grupo-topo h4 { margin: 0; font-size: 1.2rem; color: var(--mp-titulo); font-weight: 700; }
.mp-grupo-topo small { color: var(--mp-suave); font-weight: 700; font-size: .85rem; }
.mp-selo { background: #2ecc71; color: #fff; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 4px 10px; border-radius: 6px; }
.mp-adic { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; border-bottom: 1px solid #e6e9ee; cursor: pointer; }
.mp-adic-texto b { display: block; font-size: 1.02rem; color: #1d2430; font-weight: 600; }
.mp-adic-texto span { color: var(--cor); font-weight: 700; font-size: .95rem; }
.mp-adic-texto small { color: var(--mp-suave); font-weight: 500; }
.mp-adic-ctrl { display: flex; align-items: center; gap: 10px; }
.mp-adic:not(.marcada) .mp-adic-ctrl .menos, .mp-adic:not(.marcada) .mp-adic-qtd { display: none; }
.mp-adic-qtd { min-width: 18px; text-align: center; font-weight: 700; font-size: 1.05rem; }
.mp-circ { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--cor); color: #fff; font-size: 1.2rem; font-weight: 700; line-height: 1;
  display: grid; place-items: center; cursor: pointer; padding: 0; flex-shrink: 0; }
.mp-circ.menos { background: #6c757d; }
.mp-circ:disabled { opacity: .35; cursor: not-allowed; }
.mp-rodape { background: #f6f7f9; border-top: 1px solid #e3e7ec; padding: 12px 22px calc(14px + env(safe-area-inset-bottom)); }
.mp-obs { display: block; }
.mp-obs > span { display: block; color: var(--mp-suave); font-size: 1.05rem; margin-bottom: 6px; }
.mp-obs textarea { min-height: 70px; border-color: #ced4da; border-radius: 6px; font-size: .95rem; }
.mp-acoes { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.mp-qtd { display: flex; align-items: center; gap: 14px; }
.mp-qtd .mp-circ { width: 30px; height: 30px; }
.mp-qtd span { min-width: 16px; text-align: center; font-size: 1.1rem; font-weight: 600; }
.mp-adicionar { border: 0; background: var(--mp-botao); color: var(--mp-botao-texto); font-size: 1.1rem; font-weight: 500; padding: 12px 18px; border-radius: 6px;
  cursor: pointer; display: inline-flex; gap: 8px; align-items: center; box-shadow: 0 2px 0 rgba(0,0,0,.08); }
.mp-adicionar:hover { filter: brightness(.97); }
.mp-adicionar span { font-weight: 600; }
@media (max-width: 420px) { .mp-adicionar { font-size: 1rem; padding: 12px 14px; } .mp-rodape { padding-left: 14px; padding-right: 14px; } }
