/* Forno Quatro — site de delivery (demonstração Estiven4Tech) */
:root {
  --bg: #110c09; --surface: #1b1410; --surface-2: #261c16; --line: rgba(255, 220, 190, .12);
  --fg: #f7efe6; --fg-2: #cdbcaa; --fg-3: #93806e;
  --fire: #ff6b2c; --fire-2: #ffb347; --ok: #5fd08a; --warn: #ffcf5c;
  --serif: 'Fraunces', Georgia, serif; --sans: 'DM Sans', system-ui, sans-serif;
  --pad: clamp(16px, 4vw, 48px); --r: 18px;
  /* tudo alinha numa coluna de até 1200 px */
  --side: max(var(--pad), calc((100% - 1200px) / 2 + var(--pad)));
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 120px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.55 var(--sans); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
body.lock { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--fire-2); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--fg-2); }

.demo { padding: 8px var(--pad); background: #2a1d0a; color: #ffdca0; font-size: .78rem; text-align: center; border-bottom: 1px solid rgba(255, 207, 92, .25); }
.demo a { color: #fff; font-weight: 700; }

/* header */
.hdr { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 12px var(--side); background: rgba(17, 12, 9, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; white-space: nowrap; font: 500 1.35rem/1 var(--serif); letter-spacing: -.01em; }
.brand svg { width: 28px; height: 28px; }
.brand b { color: var(--fire); font-weight: 700; }
.brand--sm { font-size: 1.15rem; margin-bottom: 10px; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; color: var(--fg-2); margin-left: auto; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.status.is-closed i { background: var(--fg-3); box-shadow: none; }
.cartbtn { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.cartbtn svg { width: 22px; height: 22px; }
.cartbtn__n { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--fire); color: #fff; font: 700 .72rem/20px var(--sans); text-align: center; }
.cartbtn__n:empty, .cartbtn__n[data-n="0"] { display: none; }
@media (max-width: 420px) { .status { font-size: .72rem; } }

/* hero */
.hero { position: relative; min-height: min(78svh, 680px); display: grid; align-items: end; overflow: hidden; }
.hero picture, .hero__img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__img { object-fit: cover; object-position: 70% 50%; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(17, 12, 9, .92) 0%, rgba(17, 12, 9, .55) 45%, transparent 75%), linear-gradient(0deg, var(--bg) 0%, transparent 35%); }
.hero__copy { position: relative; z-index: 1; padding: 64px var(--pad) 40px var(--side); max-width: calc(var(--side) + 720px); }
.eyebrow { font: 700 .72rem var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--fire-2); margin-bottom: 14px; }
h1 { font: 700 clamp(2.1rem, 5.6vw, 3.8rem)/1.04 var(--serif); letter-spacing: -.02em; }
h1 em { font-style: italic; color: var(--fire-2); }
.lead { margin-top: 16px; font-size: 1.05rem; color: var(--fg-2); max-width: 46ch; }
.hero__ctas { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.chips { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 12px; border-radius: 99px; background: rgba(27, 20, 16, .8); border: 1px solid var(--line); font-size: .8rem; color: var(--fg-2); }
@media (max-width: 699px) {
  .hero { min-height: 0; align-items: stretch; }
  .hero picture { position: relative; inset: auto; height: 46vw; }
  .hero__img { position: relative; height: 100%; object-position: 80% 50%; }
  .hero::after { background: linear-gradient(0deg, var(--bg) 0%, transparent 30%); height: 46vw; }
  .hero__copy { padding: 0 var(--pad) 28px; margin-top: -24px; }
}

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; }
.btn:active { transform: scale(.98); }
.btn--fire { border-color: transparent; background: linear-gradient(120deg, #ff5a1f, var(--fire) 50%, #ff8d3a); color: #fff; box-shadow: 0 10px 30px -10px rgba(255, 107, 44, .8); }
.btn--ghost { background: rgba(27, 20, 16, .7); }
.btn--wide { flex: 1; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* categorias e cardápio */
.cats { position: sticky; top: 68px; z-index: 20; display: flex; gap: 8px; overflow-x: auto; padding: 12px var(--side); background: rgba(17, 12, 9, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats a { flex: none; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-weight: 500; font-size: .92rem; color: var(--fg-2); }
.cats a.is-on { background: var(--fire); border-color: var(--fire); color: #fff; }
.menu { padding: 8px var(--pad) 40px; max-width: 1200px; margin: 0 auto; }
.menu h2 { font: 700 1.6rem var(--serif); margin: 34px 0 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.card .price { white-space: nowrap; }
.card { display: grid; grid-template-columns: 1fr 112px; gap: 14px; align-items: center; width: 100%; padding: 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); text-align: left; cursor: pointer; transition: border-color .2s, transform .2s; }
.card:hover { border-color: rgba(255, 107, 44, .45); transform: translateY(-2px); }
.card img, .card .ico { width: 112px; height: 112px; border-radius: 14px; object-fit: cover; }
.card .ico { display: grid; place-items: center; font-size: 2.6rem; background: var(--surface-2); }
.card b { display: block; font-size: 1.04rem; }
.card p { margin-top: 4px; font-size: .86rem; color: var(--fg-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .price { margin-top: 10px; font-weight: 700; color: var(--fire-2); }
.card .price small { font-weight: 400; color: var(--fg-3); }
.tag { display: inline-block; margin-bottom: 6px; padding: 2px 8px; border-radius: 99px; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: rgba(255, 107, 44, .16); color: var(--fire-2); }

.how { padding: 44px var(--pad); max-width: 1200px; margin: 0 auto; border-top: 1px solid var(--line); }
.how h2 { font: 700 1.5rem var(--serif); margin-bottom: 18px; }
.how ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: s; }
.how li { padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); counter-increment: s; }
.how li::before { content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--fire); color: #fff; font-weight: 700; margin-bottom: 10px; }
.how b { display: block; } .how span { font-size: .9rem; color: var(--fg-2); }
@media (max-width: 700px) { .how ol { grid-template-columns: 1fr; } }

.ftr { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 36px var(--pad) 110px; max-width: 1200px; margin: 0 auto; border-top: 1px solid var(--line); font-size: .9rem; color: var(--fg-2); }
.ftr h3 { font: 700 .76rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 10px; }
.ftr li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.ftr__by { grid-column: 1 / -1; font-size: .82rem; color: var(--fg-3); }
.ftr__by a { color: var(--fg); }
@media (max-width: 600px) { .ftr { grid-template-columns: 1fr; } }

/* barra do carrinho (celular) */
.bar { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 25; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border: 0; border-radius: 16px; background: linear-gradient(120deg, #ff5a1f, var(--fire)); color: #fff; font-weight: 500; box-shadow: 0 14px 40px -10px rgba(255, 107, 44, .9); cursor: pointer; }
.bar b { font-weight: 700; }
@media (min-width: 900px) { .bar { left: auto; width: 380px; right: 24px; } }

/* folha do produto */
.sheet, .drawer { position: fixed; inset: 0; z-index: 50; }
.sheet { z-index: 55; }
.sheet[hidden], .drawer[hidden], .bar[hidden] { display: none; }
.sheet__bg, .drawer__bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); }
.sheet__box { position: absolute; left: 50%; bottom: 0; translate: -50% 0; width: min(560px, 100%); max-height: 92svh; display: flex; flex-direction: column; border-radius: 22px 22px 0 0; background: var(--surface); overflow: hidden; animation: up .28s ease-out; }
@media (min-width: 700px) { .sheet__box { bottom: auto; top: 50%; translate: -50% -50%; border-radius: 22px; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet__img { width: 100%; height: 220px; object-fit: cover; }
.sheet__body { padding: 18px 20px 6px; overflow-y: auto; }
.sheet__body h2 { font: 700 1.5rem var(--serif); }
.sheet__body > p { margin-top: 6px; }
.sheet__foot { display: flex; gap: 12px; align-items: center; padding: 14px 20px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.grp { margin-top: 18px; border: 0; padding: 0; }
.grp legend { font-weight: 700; margin-bottom: 8px; }
.grp legend small { font-weight: 400; color: var(--fg-3); }
.opt { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 8px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt:has(input:checked) { border-color: var(--fire); background: rgba(255, 107, 44, .1); }
.opt:has(input:focus-visible) { outline: 2px solid var(--fire-2); outline-offset: 2px; }
.opt span { color: var(--fg-2); font-size: .9rem; }
.field { display: grid; gap: 6px; margin-top: 16px; font-size: .9rem; }
.field > span { font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--fire); }
.row2 { display: grid; grid-template-columns: 1fr 110px; gap: 10px; }
.qty { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.qty button { width: 42px; height: 44px; border: 0; background: none; font-size: 1.3rem; cursor: pointer; }
.qty output { min-width: 22px; text-align: center; font-weight: 700; }
.qty--sm button { width: 32px; height: 32px; font-size: 1.1rem; }

/* gaveta: carrinho → entrega → pagamento → pedido */
.drawer__box { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%); display: flex; flex-direction: column; background: var(--surface); animation: side .28s ease-out; }
@keyframes side { from { transform: translateX(40px); opacity: 0; } }
.drawer__hd { position: relative; display: flex; align-items: center; gap: 10px; padding: 16px 60px 12px 20px; }
.drawer__hd h2 { font: 700 1.35rem var(--serif); }
.drawer__hd .x { top: 10px; background: var(--surface-2); }
.back { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: none; cursor: pointer; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 0 20px 12px; font-size: .68rem; color: var(--fg-3); text-align: center; }
.steps li { padding-top: 8px; border-top: 3px solid var(--surface-2); }
.steps li.is-on { border-color: var(--fire); color: var(--fg); }
.drawer__body { flex: 1; overflow-y: auto; padding: 4px 20px 16px; }
.drawer__ft { padding: 14px 20px max(16px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.item img, .item .ico { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; display: grid; place-items: center; background: var(--surface-2); font-size: 1.6rem; }
.item b { display: block; font-size: .95rem; }
.item small { display: block; color: var(--fg-3); font-size: .78rem; line-height: 1.35; }
.item .r { display: grid; justify-items: end; gap: 6px; font-weight: 700; }
.empty { padding: 40px 0; text-align: center; color: var(--fg-2); }
.sum { display: grid; gap: 6px; font-size: .92rem; }
.sum p { display: flex; justify-content: space-between; }
.sum .tot { font-size: 1.15rem; font-weight: 700; padding-top: 6px; border-top: 1px dashed var(--line); }
.sum .ok { color: var(--ok); }
.coupon { display: flex; gap: 8px; margin-top: 14px; }
.coupon input { flex: 1; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); text-transform: uppercase; }
.coupon button { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; font-weight: 700; }
.note { font-size: .8rem; color: var(--fg-3); }

/* pix de demonstração */
.pix { display: grid; justify-items: center; gap: 12px; text-align: center; padding-top: 6px; }
.pix canvas { width: 220px; height: 220px; border-radius: 14px; background: #fff; padding: 12px; }
.pix .stamp { padding: 4px 10px; border-radius: 6px; background: var(--warn); color: #2a1d0a; font-weight: 700; font-size: .75rem; letter-spacing: .06em; }
.pix code { display: block; width: 100%; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px dashed var(--line); font-size: .74rem; word-break: break-all; color: var(--fg-2); }
.pix .timer { font-variant-numeric: tabular-nums; color: var(--fire-2); font-weight: 700; }

/* acompanhamento */
.track { display: grid; gap: 0; margin-top: 8px; }
.track li { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding-bottom: 22px; color: var(--fg-3); }
.track li::before { content: ''; width: 18px; height: 18px; margin: 3px; border-radius: 50%; border: 2px solid var(--surface-2); background: var(--bg); }
.track li::after { content: ''; position: absolute; left: 13px; top: 24px; bottom: 0; width: 2px; background: var(--surface-2); }
.track li:last-child::after { display: none; }
.track li.is-done { color: var(--fg); }
.track li.is-done::before { border-color: var(--ok); background: var(--ok); }
.track li.is-done::after { background: var(--ok); }
.track li.is-now { color: var(--fg); }
.track li.is-now::before { border-color: var(--fire); background: var(--fire); box-shadow: 0 0 0 6px rgba(255, 107, 44, .2); animation: pulse 1.4s infinite; }
.track b { display: block; } .track small { font-size: .82rem; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(255, 107, 44, 0); } }
.orderno { margin: 4px 0 16px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); }
.orderno b { font: 700 1.4rem var(--serif); color: var(--fire-2); }

.toast { position: fixed; left: 50%; bottom: 90px; z-index: 60; translate: -50% 20px; padding: 12px 18px; border-radius: 12px; background: #2e231c; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .25s, translate .25s; }
.toast.is-on { opacity: 1; translate: -50% 0; }

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