:root {
  --primary: #c8102e; --accent: #f5a400;
  --bg: #fbf6ef; --card: #fff; --ink: #231815; --muted: #7a6c64; --line: #eadfd3;
  --ok: #1a8f4c; --warn: #b26a00; --err: #c0392b;
  --r: 16px; --shadow: 0 2px 10px rgba(60, 30, 10, .08);
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.4; padding-bottom: env(safe-area-inset-bottom); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
.boot { display: grid; place-items: center; height: 100vh; font-size: 64px; animation: pulse 1s infinite alternate; }
@keyframes pulse { to { transform: scale(1.15); } }

.wrap { max-width: 920px; margin: 0 auto; padding: 0 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; font-weight: 700; background: var(--primary); color: #fff; transition: transform .1s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--primary); box-shadow: inset 0 0 0 2px var(--primary); }
.btn.green { background: #1fa855; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.link { color: var(--primary); font-weight: 700; text-decoration: underline; }

/* Topo */
.hero { background: linear-gradient(160deg, var(--primary), color-mix(in srgb, var(--primary) 70%, #000)); color: #fff; padding: 26px 0 62px; }
.hero .wrap { display: flex; gap: 16px; align-items: center; }
.logo { width: 76px; height: 76px; border-radius: 20px; background: #fff; display: grid; place-items: center; font-size: 42px; flex: none; overflow: hidden; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.hero h1 { font-size: 24px; line-height: 1.15; }
.hero p { opacity: .9; font-size: 14px; margin-top: 4px; }
.info { margin-top: -40px; position: relative; }
.info .box { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; }
.pill.open { background: #e3f6ea; color: var(--ok); }
.pill.closed { background: #fde8e6; color: var(--err); }
.meta { font-size: 14px; color: var(--muted); display: flex; gap: 4px; align-items: center; }
.meta b { color: var(--ink); }
.info .more { margin-left: auto; color: var(--primary); font-weight: 700; font-size: 14px; }
.closed-banner { background: #fff3cd; color: #6b4e00; border-radius: 12px; padding: 12px 14px; margin-top: 12px; font-size: 14px; }
.track-banner { margin-top: 12px; background: var(--ink); color: #fff; border-radius: 14px; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; }

/* Navegação por categorias */
.cats { position: sticky; top: 0; z-index: 20; background: var(--bg); padding: 10px 0; margin-top: 14px; border-bottom: 1px solid var(--line); }
.cats .wrap { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.cats .wrap::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 16px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; font-size: 14px; white-space: nowrap; }
.chip.on { background: var(--primary); color: #fff; box-shadow: none; }
.search { margin-top: 14px; }
.search input { width: 100%; height: 46px; border-radius: 999px; border: 1px solid var(--line); background: #fff; padding: 0 18px; }

/* Produtos */
.section { margin-top: 26px; }
.section h2 { font-size: 21px; margin-bottom: 12px; }
.grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid { grid-template-columns: 1fr 1fr; } }
.prod { display: flex; gap: 12px; background: var(--card); border-radius: var(--r); padding: 12px; box-shadow: var(--shadow); text-align: left; width: 100%; align-items: stretch; transition: transform .1s; }
.prod:active { transform: scale(.985); }
.prod .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.prod h3 { font-size: 16px; }
.prod .desc { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod .price { margin-top: auto; font-weight: 800; color: var(--primary); }
.prod .price small { color: var(--muted); font-weight: 600; }
.thumb { width: 96px; height: 96px; border-radius: 14px; flex: none; background: linear-gradient(135deg, #ffe7c2, #ffd1c4); display: grid; place-items: center; font-size: 42px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge { align-self: flex-start; background: var(--accent); color: #2b1b00; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .3px; }
.empty { text-align: center; color: var(--muted); padding: 36px 0; }

/* Barra da sacola */
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); }
.cartbar .btn { max-width: 920px; margin: 0 auto; display: flex; justify-content: space-between; width: 100%; box-shadow: 0 6px 20px rgba(200, 16, 46, .35); }
.spacer { height: 110px; }
footer.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 16px 10px; }

/* Sheet (modal) */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(20, 10, 5, .55); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet { background: var(--bg); width: 100%; max-width: 560px; max-height: 94vh; border-radius: 22px 22px 0 0; display: flex; flex-direction: column; animation: up .25s; overflow: hidden; }
@media (min-width: 720px) { .overlay { align-items: center; } .sheet { border-radius: 22px; max-height: 90vh; } }
.sheet header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: #fff; border-bottom: 1px solid var(--line); gap: 8px; }
.sheet header h3 { font-size: 18px; }
.x { width: 38px; height: 38px; border-radius: 50%; background: #f1e8de; font-size: 18px; flex: none; }
.sheet .body { overflow-y: auto; padding: 4px 18px 18px; flex: 1; -webkit-overflow-scrolling: touch; }
.sheet footer { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
.group { margin-top: 18px; }
.group > h4 { margin: 0 0 8px; font-size: 15px; display: flex; justify-content: space-between; align-items: baseline; }
.group > h4 small { font-weight: 600; color: var(--muted); font-size: 12px; }
.opt { display: flex; align-items: center; gap: 12px; background: #fff; border: 2px solid transparent; box-shadow: inset 0 0 0 1px var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; width: 100%; text-align: left; cursor: pointer; }
.opt.on { border-color: var(--primary); box-shadow: none; background: #fff6f6; }
.opt .t { flex: 1; min-width: 0; }
.opt .t small { display: block; color: var(--muted); font-size: 12px; }
.opt .p { font-weight: 800; white-space: nowrap; }
.opt input { accent-color: var(--primary); width: 20px; height: 20px; flex: none; }
.seg { display: flex; gap: 8px; }
.seg button { flex: 1; min-height: 44px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; }
.seg button.on { background: var(--primary); color: #fff; box-shadow: none; }
select, textarea, .field input { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 14px; min-height: 48px; }
select { appearance: auto; }
textarea { min-height: 70px; resize: vertical; }
.field { margin-top: 12px; display: block; }
.field > span { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
.qty { display: inline-flex; align-items: center; background: #fff; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.qty button { width: 40px; height: 44px; font-size: 22px; font-weight: 700; color: var(--primary); }
.qty b { min-width: 22px; text-align: center; }

/* Sacola */
.line { background: #fff; border-radius: 14px; padding: 12px 14px; margin-top: 10px; box-shadow: var(--shadow); }
.line .top { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.line ul { margin: 4px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.line .ctl { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.line .rm { color: var(--err); font-size: 13px; font-weight: 700; }
.sum { background: #fff; border-radius: 14px; padding: 14px 16px; margin-top: 14px; box-shadow: var(--shadow); }
.sum div { display: flex; justify-content: space-between; padding: 3px 0; }
.sum .tot { font-size: 19px; font-weight: 800; border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; }
.sum .disc { color: var(--ok); }
.err { color: var(--err); font-size: 13px; font-weight: 600; margin-top: 6px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; }

/* Checkout / pedido */
.page { padding: 16px 0 120px; }
.page .top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.page .top h2 { font-size: 22px; }
.back { width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); font-size: 18px; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; margin-top: 14px; }
.card h3 { font-size: 16px; margin-bottom: 4px; }
.sub { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 800; margin: 14px 0 6px; }
.coupon { display: flex; gap: 8px; margin-top: 8px; }
.coupon input { flex: 1; text-transform: uppercase; }
.pixbox { text-align: center; }
.pixbox img.qr { width: 240px; max-width: 80%; margin: 10px auto; border-radius: 12px; border: 1px solid var(--line); background: #fff; padding: 8px; }
.pixcode { word-break: break-all; font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: #f5ede4; border-radius: 10px; padding: 10px; margin: 10px 0; max-height: 84px; overflow: auto; text-align: left; }
.timer { font-size: 28px; font-weight: 800; color: var(--primary); }
.steps { display: flex; justify-content: space-between; margin: 14px 0 4px; position: relative; }
.steps::before { content: ""; position: absolute; left: 8%; right: 8%; top: 18px; height: 4px; background: var(--line); border-radius: 2px; }
.step { position: relative; z-index: 1; width: 25%; text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; }
.step i { display: grid; place-items: center; width: 38px; height: 38px; margin: 0 auto 6px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 3px var(--line); font-style: normal; font-size: 17px; }
.step.done i { background: var(--ok); box-shadow: none; color: #fff; }
.step.cur i { background: var(--primary); box-shadow: 0 0 0 5px rgba(200, 16, 46, .18); color: #fff; }
.step.cur, .step.done { color: var(--ink); }
.tag { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: 13px; }
.tag.ok { background: #e3f6ea; color: var(--ok); }
.tag.wait { background: #fff3cd; color: var(--warn); }
.tag.bad { background: #fde8e6; color: var(--err); }
.demo { background: #eef2ff; color: #3a4a9a; border-radius: 12px; padding: 12px; font-size: 13px; margin-top: 12px; text-align: left; }
.fixed-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.fixed-cta .btn { max-width: 920px; margin: 0 auto; display: flex; width: 100%; }

#toast { position: fixed; left: 50%; bottom: 100px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 100; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 70; max-width: 640px; margin: 0 auto; background: var(--ink); color: #fff; border-radius: 16px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: 14px; box-shadow: 0 8px 30px rgba(0, 0, 0, .35); }
.consent .btn.ghost { color: #fff; box-shadow: inset 0 0 0 2px #fff; }
.consent div { display: flex; gap: 8px; }

.hero.cover { padding: 36px 0 78px; }
.catbanner { height: 120px; border-radius: 16px; background-size: cover; background-position: center; margin-bottom: 12px; box-shadow: var(--shadow); }

.pimg { width: 100%; height: 190px; object-fit: cover; border-radius: 14px; margin-top: 12px; display: block; }

/* ---- Promoções e Mais pedidos (topo do cardápio) ---- */
.was { color: var(--muted); font-weight: 600; font-size: .85em; text-decoration: line-through; margin-right: 2px; }
.badge.promo { background: #e03131; color: #fff; }
.chip.hot { font-weight: 800; }
.chip.hot.promo { background: #fff0f0; color: #c92a2a; box-shadow: inset 0 0 0 1.5px #e03131; }
.chip.hot.best { background: #fff6dd; color: #a85d00; box-shadow: inset 0 0 0 1.5px #f59f00; }
.chip.hot.on { background: #e03131; color: #fff; box-shadow: none; }
.chip.hot.best.on { background: #f59f00; }
.section.hl { margin: 14px -6px 6px; padding: 14px 6px 12px; border-radius: 18px; }
.section.hl h2 { margin: 0 8px 2px; }
.section.hl .hsub { margin: 0 8px 10px; font-size: 13px; opacity: .85; }
.section.hl.promo { background: linear-gradient(160deg, #e03131, #ff6b3d); color: #fff; }
.section.hl.best { background: linear-gradient(160deg, #ffe69a, #ffc233); color: #4a2d00; }
.hscroll { display: flex; gap: 10px; overflow-x: auto; padding: 2px 8px 6px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hcard { flex: none; width: 150px; background: #fff; color: var(--ink); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 4px; text-align: left; box-shadow: 0 3px 10px rgba(0,0,0,.18); scroll-snap-align: start; position: relative; }
.hcard:active { transform: scale(.97); }
.himg { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #f3ece3; }
.himg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.himg .emo { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 38px; }
.himg .off { position: absolute; top: 6px; left: 6px; background: #e03131; color: #fff; font-weight: 800; font-size: 12px; padding: 3px 8px; border-radius: 999px; }
.hcard .hn { font-size: 14px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.4em; }
.hcard .hp { font-weight: 800; color: var(--primary); font-size: 15px; }
.hcard .hp small { color: var(--muted); font-weight: 600; font-size: 11px; display: block; }
.hcard .hl { font-size: 11px; font-weight: 800; color: #c92a2a; }
