:root {
  --cor: #9a3412;
  --fundo: #faf6f1;
  --cartao: #ffffff;
  --texto: #1f1a17;
  --suave: #6b625c;
  --linha: #ebe3da;
  --ok: #15803d;
  --erro: #b91c1c;
  --raio: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 118px; }
body {
  margin: 0; background: var(--fundo); color: var(--texto);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: 96px;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

#aviso-offline { background: #fef3c7; color: #78350f; padding: 8px 16px; font-size: 14px; text-align: center; }

#topo { background: var(--cor); color: #fff; padding: 20px 16px 16px; }
.topo-linha { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
#topo h1 { margin: 0; font-size: 24px; line-height: 1.2; }
#loja-endereco { margin: 4px 0 0; font-size: 14px; opacity: .85; }
#mesa-selo { background: #fff; color: var(--cor); font-weight: 700; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
#loja-status { margin: 12px 0 0; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; background: rgba(0,0,0,.18); padding: 5px 12px; border-radius: 999px; }
#loja-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #fca5a5; }
#loja-status.aberto::before { background: #86efac; }

#barra { position: sticky; top: 0; z-index: 5; background: var(--fundo); padding: 10px 0 8px; border-bottom: 1px solid var(--linha); }
#busca { display: block; width: calc(100% - 32px); margin: 0 16px; padding: 11px 14px; border: 1px solid var(--linha); border-radius: 12px; background: var(--cartao); }
#busca:focus, .campo input:focus, .campo select:focus, .campo textarea:focus { outline: 2px solid var(--cor); outline-offset: 1px; }
#chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px 2px; scrollbar-width: none; }
#chips::-webkit-scrollbar { display: none; }
#chips a { flex: none; text-decoration: none; color: var(--texto); background: var(--cartao); border: 1px solid var(--linha); padding: 6px 12px; border-radius: 999px; font-size: 14px; white-space: nowrap; }

main { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.faixa { width: 100%; margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--cor); background: #fff7ed; color: var(--cor); border-radius: var(--raio); font-weight: 600; text-align: left; }
section h2 { font-size: 19px; margin: 22px 0 10px; }
.item { display: flex; gap: 12px; align-items: stretch; width: 100%; text-align: left; background: var(--cartao); border: 1px solid var(--linha); border-radius: var(--raio); padding: 12px; margin-bottom: 10px; }
.item-texto { flex: 1; min-width: 0; }
.item-nome { font-weight: 600; }
.item-desc { color: var(--suave); font-size: 14px; margin-top: 2px; }
.item-preco { margin-top: 6px; font-weight: 700; color: var(--cor); }
.item-foto { flex: none; width: 88px; height: 88px; border-radius: 12px; background: #f3ebe2; display: grid; place-items: center; font-size: 34px; position: relative; background-size: cover; background-position: center; }
.item-mais { position: absolute; right: -6px; bottom: -6px; width: 30px; height: 30px; border-radius: 50%; background: var(--cor); color: #fff; display: grid; place-items: center; font-size: 20px; line-height: 1; font-weight: 600; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.item-mais.tem { background: var(--ok); font-size: 14px; }
.selo-foto { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; line-height: 1.5; text-align: center; border-radius: 0 0 12px 12px; letter-spacing: .2px; }
.item-grande.com-foto { height: 210px; position: relative; overflow: hidden; }
.item-grande .selo-foto { left: auto; right: 8px; bottom: 8px; padding: 2px 10px; border-radius: 999px; font-size: 12px; }
#atalhos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#atalhos a, #atalhos button { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 6px 12px; font-size: 14px; text-decoration: none; }
.horarios div { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--linha); }
.horarios .hoje { font-weight: 700; color: var(--cor); }
#creditos a { color: inherit; }
#vazio { text-align: center; color: var(--suave); padding: 40px 0; }
footer { max-width: 720px; margin: 28px auto 0; padding: 0 16px; color: var(--suave); font-size: 12px; text-align: center; }

#ver-pedido {
  position: fixed; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 6;
  max-width: 688px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center;
  background: var(--cor); color: #fff; border: 0; border-radius: 16px; padding: 15px 18px; font-weight: 700;
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
}

.folha { border: 0; padding: 0; width: 100%; max-width: 560px; max-height: 92dvh; margin: auto auto 0; border-radius: 20px 20px 0 0; background: var(--fundo); color: var(--texto); overflow: hidden; }
.folha[open] { display: flex; flex-direction: column; }
.folha::backdrop { background: rgba(0,0,0,.5); }
@media (min-width: 640px) { .folha { margin: auto; border-radius: 20px; } }
.folha-topo { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px; }
.folha-topo h2 { margin: 0; font-size: 20px; }
.fechar { border: 0; background: var(--linha); width: 34px; height: 34px; border-radius: 50%; font-size: 18px; line-height: 1; }
.folha-corpo { padding: 4px 16px 16px; overflow-y: auto; flex: 1; }
.folha-pe { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--linha); background: var(--cartao); }
.botao { width: 100%; border: 0; border-radius: 14px; background: var(--cor); color: #fff; padding: 15px; font-weight: 700; display: flex; justify-content: space-between; gap: 12px; }
.botao.centro { justify-content: center; }
.botao.zap { background: #128c4a; }
.botao.claro { background: transparent; color: var(--cor); border: 1px solid var(--cor); margin-top: 10px; }
.botao:disabled { opacity: .55; }

.item-grande { height: 150px; border-radius: var(--raio); background: #f3ebe2; display: grid; place-items: center; font-size: 72px; margin-bottom: 12px; background-size: cover; background-position: center; }
.preco-grande { font-size: 20px; font-weight: 700; color: var(--cor); margin: 6px 0 14px; }
.campo { display: block; margin-bottom: 12px; }
.campo > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.campo input, .campo select, .campo textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--linha); border-radius: 10px; background: var(--cartao); }
.campo textarea { resize: vertical; min-height: 64px; }
.qtd { display: inline-flex; align-items: center; gap: 4px; }
.qtd button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--linha); background: var(--cartao); font-size: 20px; line-height: 1; }
.qtd output { min-width: 30px; text-align: center; font-weight: 700; }
.centro-qtd { display: flex; justify-content: center; margin-top: 4px; }

.linha-pedido { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--linha); }
.linha-pedido .info { flex: 1; min-width: 0; }
.linha-pedido .obs { color: var(--suave); font-size: 13px; }
.linha-pedido .valor { font-weight: 600; white-space: nowrap; }
.tipos { display: flex; gap: 8px; margin: 16px 0 12px; }
.tipos label { flex: 1; text-align: center; border: 1px solid var(--linha); background: var(--cartao); border-radius: 12px; padding: 10px 6px; font-weight: 600; }
.tipos input { position: absolute; opacity: 0; }
.tipos label:has(input:checked) { border-color: var(--cor); background: #fff7ed; color: var(--cor); }
.tipos label:has(input:focus-visible) { outline: 2px solid var(--cor); }
.totais { margin-top: 8px; }
.totais div { display: flex; justify-content: space-between; padding: 3px 0; color: var(--suave); }
.totais .total { color: var(--texto); font-weight: 700; font-size: 18px; border-top: 1px solid var(--linha); margin-top: 6px; padding-top: 8px; }
.nota { background: #fef3c7; color: #78350f; border-radius: 12px; padding: 10px 12px; font-size: 14px; margin: 12px 0; }
.nota.erro { background: #fee2e2; color: var(--erro); }
.nota.ok { background: #dcfce7; color: #14532d; }
.previa { white-space: pre-wrap; background: var(--cartao); border: 1px solid var(--linha); border-radius: 12px; padding: 12px; font-size: 14px; }

.marca { margin-top: 14px; }
