/* Cardápio do Dia — estilos compartilhados (cliente e painel) */
:root {
  --bg: #fbf6f0;
  --surface: #ffffff;
  --surface-2: #f6ede3;
  --text: #24170f;
  --muted: #7a6656;
  --line: #eadfd3;
  --brand: #d9480f;
  --brand-ink: #ffffff;
  --brand-soft: #ffe8d9;
  --brand-strong: #b8390a;
  --zap: #1a9e4f;
  --zap-strong: #13803f;
  --warn-bg: #fff4d6;
  --warn-ink: #7a5300;
  --danger: #c92a2a;
  --ok-bg: #e3f6ea;
  --ok-ink: #146c37;
  --shadow: 0 1px 2px rgba(60, 30, 10, .06), 0 6px 24px rgba(60, 30, 10, .08);
  --radius: 18px;
  --radius-sm: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15100c; --surface: #211913; --surface-2: #2b2119; --text: #f7eee6; --muted: #b9a696;
    --line: #3a2d23; --brand: #ff7a3d; --brand-ink: #1b0f08; --brand-soft: #3d2416; --brand-strong: #ff9461;
    --zap: #25b862; --zap-strong: #2ccd6e; --warn-bg: #3a2e10; --warn-ink: #ffd772; --danger: #ff6b6b;
    --ok-bg: #12301f; --ok-ink: #7fe0a6; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15100c; --surface: #211913; --surface-2: #2b2119; --text: #f7eee6; --muted: #b9a696;
  --line: #3a2d23; --brand: #ff7a3d; --brand-ink: #1b0f08; --brand-soft: #3d2416; --brand-strong: #ff9461;
  --zap: #25b862; --zap-strong: #2ccd6e; --warn-bg: #3a2e10; --warn-ink: #ffd772; --danger: #ff6b6b;
  --ok-bg: #12301f; --ok-ink: #7fe0a6; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
.oculto { display: none !important; }
.muted { color: var(--muted); }
.pequeno { font-size: .875rem; }
.centro { text-align: center; }

.pagina { max-width: 560px; margin: 0 auto; padding: 0 16px 120px; }

/* ---------- cabeçalho da loja ---------- */
.topo { display: flex; align-items: center; gap: 12px; padding: 18px 0 14px; }
.logo {
  width: 56px; height: 56px; border-radius: 50%; flex: none; object-fit: cover;
  background: var(--brand); color: var(--brand-ink); display: grid; place-items: center;
  font-weight: 800; font-size: 1.4rem; box-shadow: var(--shadow);
}
.topo h1 { font-size: 1.3rem; font-weight: 800; }
.topo .sub { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.selo {
  display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; background: var(--ok-bg); color: var(--ok-ink);
}
.selo::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.selo.fechado { background: var(--surface-2); color: var(--muted); }

/* ---------- fotos do dia ---------- */
.fotos {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none;
}
.fotos::-webkit-scrollbar { display: none; }
.fotos figure {
  margin: 0; flex: 0 0 86%; scroll-snap-align: center; aspect-ratio: 4 / 3;
  border-radius: var(--radius); overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow);
}
.fotos figure:only-child { flex-basis: 100%; }
.fotos img { width: 100%; height: 100%; object-fit: cover; }
.foto-vazia { display: grid; place-items: center; height: 100%; font-size: 3rem; }

.aviso {
  margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--warn-bg); color: var(--warn-ink); font-weight: 600; font-size: .95rem;
}

/* ---------- blocos ---------- */
.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 16px; margin-top: 16px;
}
.card > h2 { font-size: 1.15rem; font-weight: 800; }
.passo { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 20px 0 10px; }
.passo:first-of-type { margin-top: 14px; }
.passo h3 { font-size: 1rem; font-weight: 750; }
.passo h3 span {
  display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 6px;
  border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); font-size: .8rem;
}
.contador { font-size: .85rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.contador.cheio { color: var(--brand-strong); }

/* tamanhos (cartões grandes) */
.tamanhos { display: grid; gap: 10px; }
.opcao-grande {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 14px; border-radius: var(--radius-sm); border: 2px solid var(--line); background: var(--surface);
  transition: border-color .15s, background .15s;
}
.opcao-grande .ico { font-size: 1.6rem; flex: none; }
.opcao-grande strong { display: block; font-size: 1rem; }
.opcao-grande small { color: var(--muted); font-size: .85rem; }
.opcao-grande .preco { margin-left: auto; font-weight: 800; white-space: nowrap; }
.opcao-grande[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }

/* chips (carnes / acompanhamentos) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px;
  border-radius: 999px; border: 2px solid var(--line); background: var(--surface);
  font-weight: 600; font-size: .95rem; transition: border-color .15s, background .15s, opacity .15s;
}
.chip[aria-pressed="true"] { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.chip[aria-pressed="true"]::before { content: "✓"; font-weight: 900; }
.chip .mais { font-size: .8rem; opacity: .8; }
.chip:disabled { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.chip.limite:not([aria-pressed="true"]) { opacity: .5; }

/* campos */
label.campo { display: block; margin-top: 14px; font-weight: 650; font-size: .95rem; }
label.campo small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=tel], input[type=password], input[type=search], input[type=number], input:not([type]), textarea, select {
  width: 100%; margin-top: 6px; padding: 13px 14px; border-radius: var(--radius-sm);
  border: 2px solid var(--line); background: var(--surface); font-size: 1rem; font-weight: 400; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--brand); }
textarea { resize: vertical; min-height: 64px; }

/* segmentado */
.segmentos { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin-top: 8px; }
.segmentos button {
  padding: 12px 8px; border-radius: var(--radius-sm); border: 2px solid var(--line); background: var(--surface);
  font-weight: 700; font-size: .95rem;
}
.segmentos button[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-strong); }

/* botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  padding: 12px 18px; border-radius: var(--radius-sm); border: 0; font-weight: 750; font-size: 1rem;
  background: var(--surface-2); color: var(--text); text-decoration: none; transition: transform .1s, background .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primario { background: var(--brand); color: var(--brand-ink); }
.btn.primario:hover:not(:disabled) { background: var(--brand-strong); }
.btn.zap { background: var(--zap); color: #fff; }
.btn.zap:hover:not(:disabled) { background: var(--zap-strong); }
.btn.contorno { background: transparent; border: 2px solid var(--line); }
.btn.perigo { background: transparent; color: var(--danger); border: 2px solid var(--line); }
.btn.cheio { width: 100%; }
.btn.grande { min-height: 56px; font-size: 1.08rem; }
.btn.mini { min-height: 36px; padding: 6px 12px; font-size: .85rem; border-radius: 10px; }

/* linha de item com +/- */
.lista-linhas { display: grid; gap: 2px; }
.linha { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.linha:last-child { border-bottom: 0; }
.linha .info { flex: 1; min-width: 0; }
.linha .info strong { display: block; }
.linha .info small { color: var(--muted); }
.stepper { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.stepper button {
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface);
  font-size: 1.25rem; font-weight: 700; line-height: 1; display: grid; place-items: center;
}
.stepper button.mais { border-color: var(--brand); color: var(--brand-strong); }
.stepper output { min-width: 26px; text-align: center; font-weight: 800; }

/* barra de baixo (sacola) */
.barra {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); transform: translateY(110%); transition: transform .25s ease;
}
.barra.visivel { transform: none; }
.barra .btn { max-width: 528px; margin: 0 auto; width: 100%; justify-content: space-between; display: flex; }
.barra .qtd {
  background: rgba(255,255,255,.25); border-radius: 999px; padding: 2px 10px; font-size: .9rem;
}
.pulo { animation: pulo .45s ease; }
@keyframes pulo { 40% { transform: scale(1.04); } }

/* janela (sacola / formulários) */
dialog.folha {
  width: 100%; max-width: 560px; max-height: 92dvh; margin: auto auto 0; padding: 0; border: 0;
  border-radius: 22px 22px 0 0; background: var(--bg); color: var(--text); box-shadow: var(--shadow);
}
dialog.folha::backdrop { background: rgba(20, 10, 4, .5); }
dialog.folha[open] { animation: subir .25s ease; }
@keyframes subir { from { transform: translateY(40px); opacity: .4; } }
@media (min-width: 640px) { dialog.folha { margin: auto; border-radius: 22px; } }
.folha-topo {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  padding: 16px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.folha-topo h2 { font-size: 1.2rem; font-weight: 800; }
.fechar { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface-2); font-size: 1.2rem; }
.folha-corpo { padding: 4px 16px 20px; }
.folha-rodape {
  position: sticky; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--line);
}

.resumo-total { display: grid; gap: 4px; margin-top: 16px; font-size: .95rem; }
.resumo-total div { display: flex; justify-content: space-between; }
.resumo-total .total { font-size: 1.2rem; font-weight: 800; margin-top: 4px; }

/* estado vazio / sucesso */
.vazio { text-align: center; padding: 40px 12px; }
.vazio .grande { font-size: 3.4rem; }
.vazio h2 { margin-top: 10px; font-size: 1.3rem; }
.vazio p { color: var(--muted); }
.pix {
  display: flex; gap: 8px; align-items: center; margin-top: 12px; padding: 12px; border-radius: var(--radius-sm);
  background: var(--surface); border: 2px dashed var(--line); text-align: left; word-break: break-all;
}

/* aviso rápido */
.toast {
  position: fixed; left: 50%; bottom: 96px; z-index: 50; transform: translate(-50%, 20px); opacity: 0;
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 999px; background: var(--text); color: var(--bg);
  font-weight: 650; font-size: .95rem; box-shadow: var(--shadow); transition: opacity .2s, transform .2s; pointer-events: none;
}
.toast.visivel { opacity: 1; transform: translate(-50%, 0); }

.rodape-loja { margin-top: 28px; text-align: center; color: var(--muted); font-size: .85rem; }
.rodape-loja a { color: inherit; }
.rodape-loja .area-loja { display: inline-block; margin-top: 14px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-weight: 600; }

/* esqueleto de carregamento */
.carregando { padding: 60px 0; text-align: center; color: var(--muted); }
.carregando::before {
  content: ""; display: block; width: 36px; height: 36px; margin: 0 auto 12px; border-radius: 50%;
  border: 4px solid var(--line); border-top-color: var(--brand); animation: gira .8s linear infinite;
}
@keyframes gira { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* acompanhar pedido */
.linha-tempo { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 18px 0 0; padding: 0; }
.linha-tempo li {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  font-size: .78rem; font-weight: 700; color: var(--muted); position: relative;
}
.linha-tempo li span {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 1.2rem;
  background: var(--surface-2); filter: grayscale(1); opacity: .6; position: relative; z-index: 1;
}
.linha-tempo li:not(:first-child)::before {
  content: ""; position: absolute; top: 20px; right: 50%; width: 100%; height: 3px; background: var(--line);
}
.linha-tempo li.feito::before, .linha-tempo li.agora::before { background: var(--zap); }
.linha-tempo li.feito span { background: var(--ok-bg); filter: none; opacity: 1; }
.linha-tempo li.agora { color: var(--text); }
.linha-tempo li.agora span { background: var(--brand); filter: none; opacity: 1; box-shadow: 0 0 0 5px var(--brand-soft); }
.qr { display: inline-block; padding: 10px; background: #fff; border-radius: 14px; box-shadow: var(--shadow); }
.qr svg { display: block; }
select { appearance: auto; }

/* cartão fidelidade e indicação */
.carimbos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 12px; max-width: 320px; }
.carimbo { aspect-ratio: 1; border-radius: 50%; border: 2px dashed var(--line); display: grid; place-items: center; font-size: 1.15rem; }
.carimbo.cheio { border: 2px solid var(--brand); background: var(--brand-soft); }
.indique { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }

/* tela do entregador */
.numeros-entrega { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.numeros-entrega div { background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 10px 12px; }
.numeros-entrega small { display: block; color: var(--muted); font-size: .8rem; }
.numeros-entrega strong { font-size: 1.2rem; }
.titulo-sec { font-size: 1.05rem; margin: 22px 0 0; }
.entrega { border-left: 6px solid var(--line); }
.entrega.pronto { border-left-color: var(--zap); }
.entrega.entregue { opacity: .7; }
.topo-entrega { display: flex; align-items: center; gap: 10px; }
.topo-entrega .num { font-size: 1.5rem; font-weight: 900; }
.topo-entrega strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topo-entrega small { display: block; font-size: .85rem; }
.entrega .pill { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: .8rem; font-weight: 700; white-space: nowrap; }
.endereco { font-size: 1.08rem; font-weight: 700; margin: 12px 0 8px; }
.cobrar { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn-ink); }
.cobrar.ok { background: var(--ok-bg); color: var(--ok-ink); }
.botoes-entrega { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.botoes-entrega .btn { padding-left: 4px; padding-right: 4px; }
@media (min-width: 520px) { .numeros-entrega { grid-template-columns: repeat(4, 1fr); } }

/* ---------- capa da loja (topo do cardápio) ---------- */
.capa {
  position: relative; overflow: hidden; margin: 0 -16px; padding: 22px 18px 18px; color: #fff;
  background:
    radial-gradient(circle at 88% 12%, rgba(255,255,255,.18) 0 60px, transparent 61px),
    radial-gradient(circle at 100% 100%, rgba(255,255,255,.10) 0 90px, transparent 91px),
    linear-gradient(135deg, #e8590c 0%, #c2410c 55%, #9a3412 100%);
  border-radius: 0 0 24px 24px; box-shadow: 0 10px 30px rgba(154, 52, 18, .25);
}
@media (min-width: 600px) { .capa { margin: 16px 0 0; border-radius: 24px; padding: 26px 24px 22px; } }
.capa-linha { display: flex; align-items: center; gap: 14px; }
.capa .logo { width: 64px; height: 64px; background: #fff; color: #c2410c; border: 3px solid rgba(255,255,255,.85); }
.capa h1 { font-size: 1.45rem; font-weight: 900; line-height: 1.15; letter-spacing: -.01em; }
.capa .sub { opacity: .9; font-size: .92rem; margin-top: 3px; text-transform: capitalize; }
.capa .selo { margin-top: 14px; background: #fff; color: #146c37; }
.capa .selo.fechado { background: rgba(0,0,0,.22); color: #fff; }
.capa-infos { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.capa-infos li { font-size: .8rem; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.16); }

/* ---------- situação da loja + vitrine ---------- */
.status-loja { display: flex; gap: 14px; align-items: flex-start; }
.status-loja .ico { font-size: 2.2rem; line-height: 1; flex: none; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: var(--brand-soft); }
.status-loja h2 { font-size: 1.12rem; font-weight: 800; }
.status-loja p { color: var(--muted); margin: 4px 0 12px; }
.status-loja .btn { padding-inline: 16px; }
.titulo-secao { font-size: 1.05rem; font-weight: 800; margin: 22px 0 10px; }
.sub-secao { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 8px; }
.chip.fixo { cursor: default; }
.chip.fixo small { color: var(--muted); font-weight: 600; }
.linha .preco { color: var(--brand-strong); white-space: nowrap; }
.passos { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.passos li { display: flex; gap: 12px; align-items: flex-start; }
.passos li > span { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-weight: 900; }
.passos strong { display: block; }
.passos small { color: var(--muted); }
.chip.fixo { min-height: 36px; border-width: 1px; font-size: .9rem; }
.capa + .fotos, .capa + .aviso { margin-top: 16px; }
@media (min-width: 600px) { .fotos { margin: 0; padding: 0 0 4px; border-radius: var(--radius); } }
