/* Mobile-first. Alvos de toque >= 44px, contraste AA, sem rolagem horizontal da página. */
:root {
  --brand: #d62828; --brand-ink: #fff; --accent: #ffb703;
  --bg: #fbf7f2; --card: #fff; --ink: #1e1b18; --mute: #6b625a; --line: #e9e1d8;
  --ok: #1a7f37; --warn: #9a6700; --err: #b42318; --info: #175cd3;
  --r: 14px; --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.06);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow-x: hidden; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--info); outline-offset: 2px; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* topo */
.hero { background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 70%, #000)); color: var(--brand-ink); padding: 18px 0 14px; position: relative; overflow: hidden; }
.hero.cover { background-size: cover; background-position: center; }
.hero.cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.65)); }
.hero > .wrap { position: relative; }
.brand { display: flex; gap: 12px; align-items: center; }
.logo { width: 60px; height: 60px; border-radius: 16px; background: #fff; color: #000; display: grid; place-items: center; font-size: 34px; flex: none; overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.brand h1 { margin: 0; font-size: 1.25rem; line-height: 1.2; }
.brand p { margin: 2px 0 0; opacity: .92; font-size: .9rem; }
.top-actions { margin-left: auto; display: flex; gap: 8px; }
.icon-btn { min-width: 44px; min-height: 44px; border-radius: 12px; border: 1px solid rgba(255,255,255,.55); background: rgba(255,255,255,.14); color: #fff; font-size: 1.1rem; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.18); font-size: .85rem; border: 0; color: inherit; min-height: 34px; }
.pill.status-open { background: #dff6e5; color: #0b4a1e; font-weight: 700; }
.pill.status-closed, .pill.status-paused, .pill.status-busy { background: #fde7e4; color: #7a1710; font-weight: 700; }
.notice { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: #fff4d6; color: #5c4300; font-size: .92rem; }

/* busca e abas */
.searchbar { padding: 12px 0 6px; }
.search { width: 100%; min-height: 48px; border-radius: 14px; border: 1.5px solid var(--line); padding: 0 14px; background: #fff; }
.tabs-wrap { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 8px 16px; max-width: 720px; margin: 0 auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; scroll-snap-align: start; white-space: nowrap; }
.tab[aria-current="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }

/* seções e produtos */
section.cat { padding-top: 18px; scroll-margin-top: 64px; }
section.cat h2 { margin: 0 0 10px; font-size: 1.15rem; }
.cards { display: grid; gap: 12px; }
.card { display: flex; gap: 12px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px; width: 100%; text-align: left; border: 0; align-items: stretch; min-height: 96px; }
.card .ph { width: 88px; height: 88px; border-radius: 12px; flex: none; background: #fff0e1; display: grid; place-items: center; font-size: 40px; overflow: hidden; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; }
.card .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.card .name { font-weight: 700; }
.card .desc { color: var(--mute); font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .price { margin-top: auto; font-weight: 800; }
.card .price small { font-weight: 500; color: var(--mute); }
.card .price s { color: var(--mute); font-weight: 400; font-size: .85rem; margin-left: 6px; }
.card.off { opacity: .6; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: #eee; color: #444; width: fit-content; }
.badge.promo { background: #fff0c2; color: #6a4a00; }
.badge.feat { background: #ffe1de; color: #8a1c13; }
.badge.out { background: #3a3a3a; color: #fff; }
.row-scroll { display: flex; gap: 12px; overflow-x: auto; padding: 4px 16px 10px; margin: 0 -16px; scroll-snap-type: x proximity; scrollbar-width: none; }
.row-scroll::-webkit-scrollbar { display: none; }
.row-scroll .card { flex: none; width: 82%; max-width: 300px; scroll-snap-align: start; }
.empty { text-align: center; color: var(--mute); padding: 32px 0; }

/* barra do carrinho */
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 35%); pointer-events: none; }
.cartbar button { pointer-events: auto; display: flex; width: 100%; max-width: 720px; margin: 0 auto; justify-content: space-between; align-items: center; min-height: 54px; padding: 0 18px; border-radius: 16px; border: 0; background: var(--brand); color: var(--brand-ink); font-weight: 800; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.cartbar .count { background: #fff; color: var(--brand); border-radius: 999px; min-width: 26px; height: 26px; display: inline-grid; place-items: center; margin-right: 8px; font-size: .9rem; }
main { padding-bottom: 96px; }
footer.foot { color: var(--mute); font-size: .85rem; padding: 24px 0 110px; text-align: center; }

/* sheets */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: 100%; max-width: 720px; max-height: 94vh; max-height: 94dvh; border-radius: 22px 22px 0 0; display: flex; flex-direction: column; overflow: hidden; animation: up .18s ease-out; }
@keyframes up { from { transform: translateY(24px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
.sheet.full { height: 100dvh; max-height: 100dvh; border-radius: 0; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.sheet-head h3 { margin: 0; font-size: 1.05rem; flex: 1; }
.sheet-body { overflow-y: auto; padding: 14px 16px 20px; flex: 1; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sheet-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; display: flex; gap: 10px; align-items: center; }
.close { min-width: 44px; min-height: 44px; border: 0; background: #f0e9e1; border-radius: 12px; font-size: 1.2rem; }

/* formulários */
.field { display: block; margin: 12px 0; }
.field > span { display: block; font-weight: 600; margin-bottom: 4px; font-size: .92rem; }
.input, select.input, textarea.input { width: 100%; min-height: 48px; border: 1.5px solid #cfc5ba; border-radius: 12px; padding: 10px 12px; background: #fff; }
textarea.input { min-height: 76px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 80px; gap: 10px; }
.hint { color: var(--mute); font-size: .85rem; margin-top: 4px; }
.err { color: var(--err); font-size: .9rem; margin-top: 6px; }
.btn { min-height: 48px; padding: 0 20px; border-radius: 14px; border: 0; background: var(--brand); color: var(--brand-ink); font-weight: 800; }
.btn.sec { background: #fff; color: var(--ink); border: 1.5px solid #cfc5ba; }
.btn.ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.group { background: #fff; border-radius: var(--r); padding: 12px; margin: 12px 0; box-shadow: var(--shadow); }
.group h4 { margin: 0 0 2px; font-size: 1rem; display: flex; justify-content: space-between; gap: 8px; }
.group .req { font-size: .75rem; background: #ffe1de; color: #8a1c13; border-radius: 999px; padding: 2px 8px; align-self: center; }
.group .req.opt { background: #eee; color: #555; }
.opt { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 4px 0; border-top: 1px solid var(--line); cursor: pointer; }
.opt:first-of-type { border-top: 0; }
.opt input { width: 22px; height: 22px; accent-color: var(--brand); flex: none; }
.opt .t { flex: 1; }
.opt .p { color: var(--mute); font-size: .9rem; white-space: nowrap; }
.opt.disabled { opacity: .5; }
.stepper { display: inline-flex; align-items: center; gap: 2px; background: #fff; border: 1.5px solid #cfc5ba; border-radius: 14px; }
.stepper button { min-width: 44px; min-height: 44px; border: 0; background: transparent; font-size: 1.3rem; font-weight: 700; }
.stepper output { min-width: 28px; text-align: center; font-weight: 700; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice label { border: 1.5px solid #cfc5ba; border-radius: 14px; padding: 12px; background: #fff; cursor: pointer; display: block; min-height: 64px; }
.choice input { position: absolute; opacity: 0; }
.choice label:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand) inset; }
.choice label:has(input:focus-visible) { outline: 3px solid var(--info); outline-offset: 2px; }
.choice .t { font-weight: 700; display: block; }
.choice .s { font-size: .82rem; color: var(--mute); }
.lines { list-style: none; padding: 0; margin: 0; }
.line { background: #fff; border-radius: var(--r); padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
.line .top { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.line .det { color: var(--mute); font-size: .85rem; margin: 2px 0 8px; }
.line .acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.link { background: none; border: 0; color: var(--brand); font-weight: 700; min-height: 44px; padding: 0 8px; }
.link.danger { color: var(--err); }
.issue { color: var(--err); font-size: .88rem; font-weight: 600; }
.sum { background: #fff; border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); }
.sum div { display: flex; justify-content: space-between; padding: 3px 0; }
.sum .tot { font-weight: 800; font-size: 1.15rem; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.sum .good { color: var(--ok); }
.banner { padding: 10px 12px; border-radius: 12px; margin: 10px 0; font-size: .92rem; }
.banner.warn { background: #fff4d6; color: #5c4300; }
.banner.err { background: #fde7e4; color: #7a1710; }
.banner.ok { background: #dff6e5; color: #0b4a1e; }
.banner.info { background: #e3efff; color: #0b3a82; }

/* acompanhamento */
.track h2 { margin: 16px 0 4px; }
.steps { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 0; }
.steps li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; color: var(--mute); position: relative; }
.steps li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: #ddd; margin-top: 4px; flex: none; }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--ok); }
.steps li.now { color: var(--ink); font-weight: 800; }
.steps li.now::before { background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 25%, transparent); }
.pix { background: #fff; border-radius: var(--r); padding: 16px; text-align: center; box-shadow: var(--shadow); }
.pix img.qr { width: min(260px, 70vw); height: auto; margin: 8px auto; image-rendering: pixelated; border: 6px solid #fff; outline: 1px solid var(--line); }
.pix textarea { width: 100%; min-height: 84px; font: .8rem/1.3 ui-monospace, monospace; border: 1.5px solid #cfc5ba; border-radius: 10px; padding: 8px; word-break: break-all; }
/* envio do pedido pelo WhatsApp (prévia no estilo do app) */
a.btn { display: grid; place-items: center; text-decoration: none; text-align: center; }
.btn.wa { background: var(--ok); color: #fff; }
.wa-chat { margin: 12px 0 0; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); background: #efe7dd; }
.wa-top { display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: #075e54; color: #fff; line-height: 1.25; }
.wa-top .mini { color: rgba(255,255,255,.85); }
.wa-avatar { width: 38px; height: 38px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 1.15rem; flex: none; }
.wa-msgs { padding: 14px 12px 16px; max-height: 50vh; max-height: 50dvh; overflow-y: auto; overscroll-behavior: contain; }
.wa-bubble { margin-left: auto; width: fit-content; max-width: 94%; background: #d9fdd3; color: #111b21; border-radius: 10px 0 10px 10px; padding: 8px 10px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; line-height: 1.4; box-shadow: 0 1px 1px rgba(0,0,0,.12); }
.wa-actions { display: grid; gap: 10px; margin: 16px 0 8px; }
.big { font-size: 1.6rem; font-weight: 800; }
.mono { font-variant-numeric: tabular-nums; }
.spinner { width: 22px; height: 22px; border: 3px solid #ddd; border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: #222; color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 80; max-width: 90vw; font-size: .92rem; }
.hours { width: 100%; border-collapse: collapse; }
.hours td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.mini { font-size: .85rem; color: var(--mute); }

@media (min-width: 720px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .overlay { align-items: center; }
  .sheet { border-radius: 22px; max-height: 90vh; }
  .sheet.full { height: auto; max-height: 90vh; border-radius: 22px; }
  .row-scroll .card { width: 300px; }
}
