/* ============================================================
   Cardápio do cliente
   ============================================================ */
:root {
  --brand: #1F4D3A;
  --accent: #E3A33B;
  --paper: #F4F5F1;
  --surface: #FFFFFF;
  --ink: #17201B;
  --ink-2: #3A453E;
  --muted: #66716A;
  --line: #E1E5DE;
  --danger: #B33A2E;
  --display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bar-h: 116px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #0C100E; --surface: #161D19; --ink: #EEF1EC; --ink-2: #CDD4CF; --muted: #93A097; --line: #243029; color-scheme: dark; }
}
@media (min-width: 1024px) { :root { --bar-h: 76px; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.ic { width: 18px; height: 18px; flex: none; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

/* ---------- Preço ---------- */
.price { font: 700 1.02rem/1 var(--body); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); }
.price small { font-size: .72em; font-weight: 600; }

/* ============ CAPA ============ */
.hero {
  position: relative; color: #fff; background-color: var(--brand); isolation: isolate;
  padding: calc(env(safe-area-inset-top, 0px) + 56px) 20px 32px;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.2px);
  background-size: 18px 18px;
}
.hero.has-cover { background-color: #111; background-position: center; background-size: cover; background-repeat: no-repeat; padding-top: calc(env(safe-area-inset-top, 0px) + 150px); }
.hero.has-cover::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,.82) 100%); }
.hero-inner { max-width: 1120px; margin: 0 auto; }
.hero-id { display: flex; gap: 18px; align-items: flex-end; }
.hero-logo { width: 88px; height: 88px; border-radius: 22px; object-fit: cover; background: #fff; flex: none; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.hero-logo--txt { display: grid; place-items: center; background: var(--accent); color: #1c1405; font: 800 2.6rem/1 var(--display); }
.hero h1 { font: 800 clamp(2.2rem, 8vw, 4rem)/.95 var(--display); letter-spacing: -0.035em; text-wrap: balance; }
.hero-about { margin: 10px 0 0; max-width: 56ch; color: rgba(255,255,255,.88); font-size: 1.02rem; }
.table-chip { display: inline-flex; align-items: center; gap: 8px; margin: 22px 0 0; background: var(--accent); color: #1c1405; font-weight: 700; padding: 8px 14px; border-radius: 999px; font-size: .92rem; }
.table-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: #1c1405; }
.hero-info { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-info li > a, .hero-info li > span, .hero-info li { display: inline-flex; align-items: center; gap: 7px; }
.hero-info li { font-size: .9rem; color: rgba(255,255,255,.92); background: rgba(255,255,255,.12); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.16); padding: 7px 12px; border-radius: 999px; max-width: 100%; }
.hero-info li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-info a { text-decoration: none; min-width: 0; }
.hero-info a:hover span { text-decoration: underline; }

/* ============ BARRA FIXA ============ */
.bar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.bar-inner { max-width: 1120px; margin: 0 auto; padding: 12px 20px 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
.bar-brand { display: none; align-items: center; gap: 10px; min-width: 0; }
.bar-brand img { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; }
.bar-brand strong { font: 700 1.05rem var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-mesa { font-size: .78rem; font-weight: 700; background: var(--accent); color: #1c1405; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.search { position: relative; display: flex; align-items: center; }
.search > .ic { position: absolute; left: 13px; color: var(--muted); pointer-events: none; }
.search input { width: 100%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 12px; padding: 12px 42px; font: 500 1rem var(--body); -webkit-appearance: none; appearance: none; }
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.search-clear { position: absolute; right: 6px; width: 34px; height: 34px; border: 0; background: none; color: var(--muted); border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs { gap: 6px; padding-bottom: 12px !important; }
.tabs a { flex: none; display: inline-flex; align-items: center; text-decoration: none; padding: 7px 13px; font-size: .9rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.tabs a.on { color: #fff; background: var(--brand); border-color: var(--brand); }
@media (prefers-color-scheme: dark) { .tabs a.on { background: var(--accent); border-color: var(--accent); color: #1c1405; } }
.bar.is-stuck .bar-brand { display: flex; }
@media (max-width: 1023px) { .bar.is-stuck .bar-inner { grid-template-columns: auto 1fr; } .bar.is-stuck .bar-brand strong { max-width: 30vw; } .bar.is-stuck .tabs { grid-column: 1 / -1; } }
@media (max-width: 420px) { .bar.is-stuck .bar-brand strong { display: none; } }
body.searching .tabs { display: none; }

/* ============ LAYOUT ============ */
.layout { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.index { display: none; }
@media (min-width: 1024px) {
  .layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; }
  .bar-inner { grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: center; padding-bottom: 12px; }
  .bar-brand { display: flex; }
  .tabs { display: none; }
  .index { display: block; position: sticky; top: calc(var(--bar-h) + 24px); align-self: start; padding-top: 28px; max-height: calc(100vh - var(--bar-h) - 40px); overflow-y: auto; }
  .index-title { font: 700 .95rem var(--display); color: var(--muted); margin: 0 0 10px; }
  .index nav a { display: flex; align-items: center; gap: 10px; padding: 7px 12px; margin-left: -12px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-weight: 500; }
  .index nav a span { flex: 1; }
  .index nav a small { color: var(--muted); font-variant-numeric: tabular-nums; }
  .index nav a:hover { background: var(--surface); }
  .index nav a.on { background: var(--brand); color: #fff; }
  .index nav a.on small { color: rgba(255,255,255,.75); }
  body.searching .index nav { opacity: .4; pointer-events: none; }
}
.content { min-width: 0; padding: 8px 0 48px; }

/* ---------- Cabeçalho de seção ---------- */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 40px 0 0; }
.sec-head h2 { font: 700 clamp(1.5rem, 5vw, 1.95rem)/1.05 var(--display); letter-spacing: -0.02em; }
.sec-note { color: var(--muted); font-size: .82rem; font-weight: 600; white-space: nowrap; background: var(--surface); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; }
.search-status { margin: 22px 0 0; color: var(--muted); font-weight: 600; }

/* ---------- Destaques ---------- */
.featured .sec-head { margin-bottom: 14px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: min(80%, 290px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 20px; margin: 0 -20px; padding: 0 20px 6px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) { .rail { margin: 0; padding: 0 0 6px; grid-auto-columns: calc((100% - 28px) / 3); scroll-padding: 0; } }
.feat { scroll-snap-align: start; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.feat:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.08); }
.feat-media { aspect-ratio: 16 / 11; background: var(--brand) center / cover no-repeat; display: grid; place-items: center; }
.ph-letter { font: 800 3.4rem/1 var(--display); color: rgba(255,255,255,.35); }
.feat-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.feat-cat { margin: 0; font-size: .8rem; font-weight: 600; color: var(--muted); }
.feat h3 { font: 700 1.15rem/1.2 var(--display); }
.feat-desc { margin: 0 0 6px; font-size: .9rem; color: var(--muted); }
.feat .price { margin-top: auto; padding-top: 6px; font-size: 1.1rem; }

/* ---------- Mais pedidos ---------- */
.best-list { list-style: none; margin: 14px 0 0; padding: 4px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.best-list li + li { border-top: 1px solid var(--line); }
.best-list a { display: grid; grid-template-columns: 2.2rem 1fr auto; align-items: center; gap: 10px; padding: 12px 0; text-decoration: none; }
.rank { font: 800 1.45rem/1 var(--display); color: var(--brand); font-variant-numeric: tabular-nums; }
@media (prefers-color-scheme: dark) { .rank { color: var(--accent); } }
.best-name { font-weight: 600; }

/* ---------- Itens (cartões) ---------- */
.items { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 760px) { .items { grid-template-columns: 1fr 1fr; gap: 12px; } }
.item { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; transition: border-color .15s, transform .15s, box-shadow .15s; }
.item:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: 0 8px 24px rgba(0,0,0,.07); }
.item:active { transform: scale(.99); }
.item-link { display: flex; gap: 14px; align-items: center; padding: 14px; text-decoration: none; height: 100%; }
.item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.item-name { font: 700 1.06rem/1.25 var(--display); letter-spacing: -0.005em; }
.item-desc { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.item .price { color: var(--brand); font-size: 1.08rem; }
@media (prefers-color-scheme: dark) { .item .price { color: var(--accent); } }
.item-img { width: 104px; height: 104px; border-radius: 14px; object-fit: cover; flex: none; background: var(--line); }
.item-tile { width: 64px; height: 64px; flex: none; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 10%, var(--surface)); color: var(--brand); }
.item-tile--lg { width: 104px; height: 104px; border-radius: 14px; }
.item-tile .cat-ic { width: 30px; height: 30px; }
.item-tile--lg .cat-ic { width: 40px; height: 40px; }
@media (prefers-color-scheme: dark) { .item-tile { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--accent); } }
.item.is-out { opacity: .55; }
.tag { font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--brand); }
@media (prefers-color-scheme: dark) { .tag { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); } }
.tag--hot { background: var(--accent); color: #1c1405; }
.tag--out { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); }
@media (max-width: 380px) { .item-img, .item-tile--lg { width: 88px; height: 88px; } }

/* ícones de categoria */
.sec-head h2 { display: flex; align-items: center; gap: 12px; }
.sec-ic { width: 44px; height: 44px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--brand); color: #fff; }
.sec-ic .cat-ic { width: 26px; height: 26px; }
@media (prefers-color-scheme: dark) { .sec-ic { background: var(--accent); color: #1c1405; } }
.tab-ic { width: 17px; height: 17px; margin-right: 6px; vertical-align: -3px; }
.side-ic { width: 18px; height: 18px; flex: none; opacity: .75; }
.feat-ic { width: 64px; height: 64px; color: rgba(255,255,255,.55); }

/* ---------- Vazio ---------- */
.empty-state { text-align: center; padding: 64px 12px; color: var(--muted); }
.empty-title { font: 700 1.3rem var(--display); color: var(--ink); margin: 0 0 6px; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); text-decoration: underline; cursor: pointer; }

/* ============ RODAPÉ ============ */
.footer { background: var(--surface); border-top: 1px solid var(--line); padding: 44px 20px calc(env(safe-area-inset-bottom, 0px) + 48px); }
.footer-inner { max-width: 1120px; margin: 0 auto; display: grid; gap: 28px; }
@media (min-width: 860px) { .footer-inner { grid-template-columns: 1fr 1.6fr; } .footer-legal { grid-column: 1 / -1; } }
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand img { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; }
.footer-brand strong { font: 800 1.35rem/1.1 var(--display); }
.footer-brand p { margin: 6px 0 0; color: var(--muted); max-width: 40ch; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; }
.footer-cols p { margin: 0 0 4px; }
.footer-cols a { text-decoration: none; }
.footer-cols a:hover { text-decoration: underline; }
.footer-label { font-weight: 700; color: var(--muted); font-size: .85rem; margin-bottom: 6px !important; }
.footer-legal { margin: 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }

.to-top { position: fixed; right: 16px; bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); z-index: 30; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--ink); color: var(--paper); display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.to-top .ic { width: 22px; height: 22px; }

/* ============================================================
   Página do produto
   ============================================================ */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: calc(env(safe-area-inset-top, 0px) + 12px) 20px 12px; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.back { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-weight: 600; }
.back svg { width: 22px; height: 22px; fill: currentColor; }
.topbar-name { font: 700 1rem var(--display); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
main.detail { max-width: 1020px; margin: 0 auto; padding: 20px 20px 48px; }
@media (min-width: 820px) { main.detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 44px; align-items: start; } .related { grid-column: 1 / -1; } .gallery { position: sticky; top: 76px; } }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 20px; scrollbar-width: none; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track img { flex: 0 0 100%; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; scroll-snap-align: start; }
.gallery-empty { aspect-ratio: 1 / 1; border-radius: 20px; background: var(--brand); display: grid; place-items: center; font: 800 7rem/1 var(--display); color: rgba(255,255,255,.35); }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumbs button { flex: none; width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: none; opacity: .65; }
.thumbs button.on { border-color: var(--ink); opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.info { padding-top: 22px; }
.cat { margin: 0 0 6px; color: var(--muted); font-weight: 600; }
.info h1 { font: 800 clamp(2rem, 7vw, 3rem)/1 var(--display); letter-spacing: -0.03em; margin: 0 0 12px; }
.big-price { font: 700 1.6rem var(--display); margin: 0 0 12px; font-variant-numeric: tabular-nums; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.badge { display: inline-block; background: var(--accent); color: #1b1406; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.badge.out { background: var(--danger); color: #fff; }
.desc { font-size: 1.04rem; max-width: 60ch; }
.hint { margin-top: 24px; padding: 14px 16px; border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 10px 10px 0; color: var(--muted); }
.related h2 { font: 700 1.5rem var(--display); margin: 40px 0 16px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.related-grid a { text-decoration: none; display: flex; flex-direction: column; gap: 4px; }
.related-grid img, .related-grid .noimg { aspect-ratio: 1; width: 100%; object-fit: cover; border-radius: 14px; background: var(--brand); display: grid; place-items: center; margin-bottom: 4px; font: 800 2.4rem/1 var(--display); color: rgba(255,255,255,.4); }
.related-grid strong { font: 700 1rem/1.2 var(--display); }
.empty { text-align: center; color: var(--muted); padding: 48px 0; }
.btn-back { display: inline-block; margin: 0 auto; padding: 12px 20px; background: var(--brand); color: #fff; border-radius: 10px; text-decoration: none; }
