:root {
  --brown: #3d2218;
  --brown-2: #5c2a22;
  --maroon: #6b1d22;
  --cream: #f6efe6;
  --cream-2: #efe4d4;
  --gold: #c49b5c;
  --mint: #7bae9e;
  --text: #2b1812;
  --muted: #7a675c;
  --line: #eadbc8;
  --card: #fffdf9;
  --ok: #2f9e6a;
  --warn: #d89a1a;
  --danger: #c44536;
  --shadow: 0 10px 30px rgba(61, 34, 24, 0.12);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Nunito", system-ui, sans-serif;
  background: #d9c6b0;
  color: var(--text);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.noscroll { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
img { max-width: 100%; display: block; }

.fab-pedidos {
  display: none;
}
.page {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--cream);
  box-shadow: 0 0 50px rgba(61, 34, 24, .18);
  position: relative;
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}

.cover {
  height: 154px;
  background: #2a1812 center 36%/cover no-repeat;
  position: relative;
}
.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(43,24,18,.28));
}
.cover-logo {
  position: absolute;
  z-index: 1;
  top: 10px;
  right: 12px;
  width: 68px;
  height: 68px;
  object-fit: contain;
  background: #1a0e0c;
  border-radius: 50%;
  border: 2px solid #fff;
  padding: 7px;
  box-shadow: 0 6px 16px rgba(0,0,0,.3);
}
.store {
  padding: 0 16px 4px;
  margin-top: -36px;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: start;
}
.logo {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  object-fit: cover;
  border: 4px solid var(--cream);
  background: #fff;
  box-shadow: var(--shadow);
}
.store-info {
  padding-top: 40px;
  min-width: 0;
}
.store-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.store h1 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.15;
  color: var(--text);
}
.store .slogan {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .84rem;
}
.soc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 800;
  color: inherit;
  flex-shrink: 0;
}
.socials {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.soc-ig {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  color: #fff;
  box-shadow: 0 4px 10px rgba(214, 36, 159, .22);
}
.soc-site {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--maroon);
  color: #fff;
  box-shadow: 0 4px 10px rgba(107, 29, 34, .28);
}
.footer-brand {
  text-align: center;
  padding: 8px 16px 24px;
  color: var(--muted);
  font-size: .78rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-brand .soc-ig,
.footer-brand .soc-site {
  width: auto;
  height: auto;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}
.fab-wa {
  position: fixed;
  z-index: 45;
  right: max(16px, calc(50% - 264px));
  bottom: calc(18px + env(safe-area-inset-bottom));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(18, 140, 70, .4);
  text-decoration: none;
  transition: bottom .2s ease, transform .15s ease;
}
.fab-wa:active { transform: scale(.96); }
body.has-cart .fab-wa {
  bottom: calc(84px + env(safe-area-inset-bottom));
}
body.noscroll .fab-wa { display: none; }
.meta {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 10px 16px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.meta::-webkit-scrollbar { display: none; }
.chip {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--brown);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .72rem;
  font-weight: 700;
  font-family: inherit;
  white-space: nowrap;
  flex: 0 0 auto;
}
button.chip { cursor: pointer; }
a.chip { text-decoration: none; }
button.chip:active, a.chip:active { transform: scale(.97); }
.chip.gold { background: #f3e3c4; border-color: #e4cc9a; }

.week {
  margin: 14px 16px 0;
  background: #fff;
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow);
}
.week h2 {
  margin: 0 0 4px;
  font-size: .95rem;
}
.week p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .8rem;
}
.days {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.days::-webkit-scrollbar { display: none; }
.day {
  flex: 0 0 auto;
  min-width: 52px;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 8px 6px;
  font-weight: 800;
  color: var(--brown);
}
.day.on {
  background: var(--maroon);
  border-color: var(--maroon);
  color: #fff;
}

.search {
  margin: 12px 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
}
.search input {
  border: 0;
  outline: 0;
  width: 100%;
  background: transparent;
}

.cats {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 239, 230, .94);
  backdrop-filter: blur(10px);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 16px;
  scrollbar-width: none;
}
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  padding: 8px 4px 10px;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.cat.on {
  color: var(--maroon);
  border-bottom-color: var(--maroon);
}

.section { padding: 8px 16px 4px; }
.section h2 {
  margin: 12px 0 10px;
  font-size: 1.12rem;
}

.card {
  display: flex;
  align-items: stretch;
  gap: 10px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: 0 4px 16px rgba(61,34,24,.06);
  border: 1px solid #f0e4d4;
  width: 100%;
  text-align: left;
  color: inherit;
}
.card > div:first-child {
  flex: 1;
  min-width: 0;
}
.card:active { transform: scale(.99); }
.card h3 { margin: 0 0 4px; font-size: .98rem; }
.card p {
  margin: 0;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.price {
  margin-top: 8px;
  font-weight: 800;
  color: var(--brown);
}
.thumb-wrap {
  position: relative;
  flex: 0 0 108px;
  width: 108px;
  height: 108px;
}
.thumb {
  width: 108px;
  height: 108px;
  max-width: none;
  border-radius: 14px;
  object-fit: cover;
  background: #eee;
}
.thumb-logo {
  object-fit: contain;
  background: #fff;
  padding: 4px;
}
.plus {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--maroon);
  color: #fff;
  display: grid;
  place-items: center;
  pointer-events: none;
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(107, 29, 34, .35);
}
.badge {
  display: inline-block;
  background: var(--gold);
  color: #3d2218;
  font-size: .68rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 3px 8px;
  margin-bottom: 6px;
}

.benefits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 16px 20px;
}
.benefit {
  background: var(--brown);
  color: #f6efe6;
  border-radius: 14px;
  padding: 12px;
  font-size: .78rem;
  font-weight: 700;
}
.benefit span { display: block; color: var(--gold); font-size: .72rem; margin-top: 4px; }

.pay {
  margin: 0 16px 20px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.pay img { width: 100%; height: 150px; object-fit: cover; object-position: top; }

.cartbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 14px;
  width: min(528px, calc(100% - 24px));
  background: var(--maroon);
  color: #fff;
  border: 0;
  border-radius: 16px;
  padding: 13px 16px;
  display: none;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(107, 29, 34, .35);
  z-index: 40;
  padding-bottom: calc(13px + env(safe-area-inset-bottom));
}
.cartbar.show { display: flex; }
.cartbar .count {
  background: #fff;
  color: var(--maroon);
  border-radius: 999px;
  padding: 2px 8px;
  margin-right: 8px;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(24, 12, 8, .45);
  z-index: 50;
  display: none;
}
.overlay.show { display: block; }

.sheet {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateY(110%);
  bottom: 0;
  width: min(560px, 100%);
  max-height: 92dvh;
  background: var(--cream);
  border-radius: 22px 22px 0 0;
  z-index: 60;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .28s ease;
}
.sheet.show { transform: translateX(-50%) translateY(0); }
.sheet-handle {
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: #dcc9b4;
  margin: 8px auto 0;
  flex: 0 0 auto;
}
.sheet-head {
  position: sticky;
  top: 0;
  background: var(--cream);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px 8px;
  z-index: 2;
}
.sheet-head h2 { margin: 0; font-size: 1.05rem; }
.close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  font-size: 1.2rem;
}
.hero {
  height: 190px;
  object-fit: cover;
  width: 100%;
  flex: 0 0 auto;
}
.hero.hero-logo {
  object-fit: contain;
  background: #fff;
  padding: 12px;
}
.sheet-body { padding: 12px 16px 16px; overflow: auto; flex: 1; }
.sheet-body h3 { margin: 0 0 6px; }
.desc { color: var(--muted); font-size: .88rem; margin: 0 0 12px; }
.obs {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
  resize: vertical;
  min-height: 70px;
}

.group {
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid var(--line);
}
.group header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 8px;
}
.group h4 { margin: 0; }
.group small { color: var(--muted); font-weight: 700; }
.opt {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border: 0;
  background: transparent;
  text-align: left;
  border-bottom: 1px solid #f3e9dc;
}
.opt:last-child { border-bottom: 0; }
.opt .mark {
  width: 22px;
  height: 22px;
  border: 2px solid #cbb9a6;
  border-radius: 6px;
  margin-left: auto;
  flex: 0 0 22px;
}
.opt.radio .mark { border-radius: 50%; }
.opt.on .mark {
  background: var(--maroon);
  border-color: var(--maroon);
  box-shadow: inset 0 0 0 4px #fff;
}
.opt.off { opacity: .45; }
.opt .emoji { font-size: 1.15rem; width: 28px; }

.sheet-cta {
  flex: 0 0 auto;
  background: var(--cream);
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 8px;
  border-top: 1px solid var(--line);
}
.qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
  font-weight: 800;
}
.qty button {
  width: 36px;
  height: 36px;
  border: 0;
  background: var(--cream-2);
  border-radius: 10px;
  font-size: 1.2rem;
}
.add {
  border: 0;
  background: var(--maroon);
  color: #fff;
  border-radius: 14px;
  font-weight: 800;
  min-height: 48px;
}
.add:disabled { opacity: .45; }
.sheet-cta-cart {
  display: flex;
  flex-direction: column;
  gap: 8px;
  grid-template-columns: none;
}
.sheet-cta-cart .total-row {
  padding: 0;
  font-size: 1rem;
}
.sheet-cta-cart .add,
.sheet-cta-cart .btn-ghost-app { width: 100%; }
#checkout-cta { display: grid; gap: 8px; }

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 8px;
}
.cart-item h4 { margin: 0 0 8px; font-size: .95rem; }
.cart-item p { margin: 0; color: var(--muted); font-size: .78rem; }
.cart-item strong { display: block; margin-top: 10px; }
.ing-box { display: flex; flex-direction: column; gap: 8px; }
.ing-row small {
  display: block;
  font-size: .68rem;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.ing-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ing-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f6efe6;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px 5px 7px;
  font-size: .76rem;
  font-weight: 700;
  color: var(--brown);
}
.ing-ico { font-size: 1.05rem; line-height: 1; }
.ing-obs { margin-top: 4px; font-size: .78rem; color: var(--muted); }
.cart-item .rm {
  border: 0;
  background: transparent;
  color: var(--danger);
  font-weight: 800;
}
.cart-item .editar {
  border: 0;
  background: #f6efe6;
  color: var(--maroon);
  font-weight: 800;
  border-radius: 10px;
  padding: 6px 8px;
  margin-bottom: 6px;
}
.dia-tag {
  display: inline-block;
  background: #f3e3c4;
  color: var(--brown);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: .72rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.total-row {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 8px 0 16px;
}

.field { margin: 0 0 10px; }
.field label {
  display: block;
  font-size: .78rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  outline: none;
}
.field input:focus, .field textarea:focus, .search input:focus {
  outline: 2px solid #c49b5c;
  outline-offset: 1px;
}
.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.seg button {
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  font-weight: 800;
}
.seg button.on {
  background: var(--maroon);
  color: #fff;
  border-color: var(--maroon);
}
.pays { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pays button {
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 12px 10px;
  font-size: .82rem;
  font-weight: 800;
}
.pays button.on { background: var(--brown); color: #fff; border-color: var(--brown); }
.btn-ghost-app {
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--brown);
  border-radius: 14px;
  font-weight: 800;
  padding: 12px;
}
.pedido-card {
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
}
.pedido-card .topo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.pedido-card .codigo { font-weight: 800; }
.st {
  font-size: .72rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.st-ico { font-size: .85rem; line-height: 1; }
.st-novo { background: #fde7e3; color: #9b2c22; }
.st-aceito { background: #e3eefd; color: #1d4f9b; }
.st-preparo { background: #fdeccd; color: #8a5a00; }
.st-pronto { background: #d9f5e6; color: #1b7a4a; }
.st-finalizado { background: #eee; color: #666; }
.pedido-card ul { margin: 6px 0 10px; padding-left: 18px; font-size: .82rem; color: var(--muted); }
.pedido-card .add { width: 100%; padding: 10px; }

.empty {
  text-align: center;
  padding: 24px 8px;
  color: var(--muted);
}
.empty img {
  width: 140px;
  margin: 0 auto 10px;
  border-radius: 20px;
}

.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  bottom: 88px;
  background: var(--brown);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  z-index: 80;
  font-weight: 700;
  transition: .2s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.hide { display: none !important; }
.group.ok { border-color: #cde8d8; }
.group.bad { border-color: #f0b8b2; }
