:root {
  --bg: #f3f4f6;
  --card: #ffffff;
  --text: #16181d;
  --muted: #6b7280;
  --border: #e6e8ec;
  --border-strong: #d6d9df;
  --accent: #ea1d2c;
  --accent-dark: #c3101d;
  --accent-soft: #fdeaec;
  --accent-ink: #ffffff;
  --green: #0f7a43;
  --green-bg: #e4f6ec;
  --red: #b4231a;
  --red-bg: #fbe6e4;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 2px 8px rgba(16, 24, 40, 0.05);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.14);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  padding-bottom: 88px;
  -webkit-font-smoothing: antialiased;
}
.muted { color: var(--muted); }

.shop-head {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
  box-shadow: var(--shadow);
}
.shop-head-inner { max-width: 680px; margin: 0 auto; padding: 16px; display: flex; align-items: center; gap: 12px; }
.shop-logo {
  width: 44px; height: 44px; flex: 0 0 44px;
  display: grid; place-items: center;
  font-size: 23px;
  background: var(--accent-soft);
  border-radius: 12px;
}
.shop-head strong { font-size: 20px; margin-right: auto; }
.badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--border); color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.badge.open { background: var(--green-bg); color: var(--green); }
.badge.closed { background: var(--red-bg); color: var(--red); }

.shop-logo-img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }

/* Página "Meus links" (/l/<slug>) */
.links-page { max-width: 480px; margin: 0 auto; padding: 28px 20px 48px; text-align: center; }
.links-cover { width: 100%; height: 150px; object-fit: cover; border-radius: 16px; display: block; margin-bottom: 12px; }
.links-logo {
  width: 92px; height: 92px; margin: 0 auto 12px; border-radius: 24px;
  background: var(--accent-soft); display: grid; place-items: center; font-size: 42px;
  overflow: hidden; border: 3px solid var(--card); box-shadow: var(--shadow-lg);
}
.links-logo img { width: 100%; height: 100%; object-fit: cover; }
.links-name { font-size: 22px; font-weight: 800; margin: 0 0 4px; }
.links-desc { color: var(--muted); margin: 0 0 22px; }
.link-btn {
  display: block; width: 100%; padding: 15px; margin-bottom: 12px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
  font-weight: 700; font-size: 15px; color: var(--text); text-decoration: none;
  transition: transform .05s, box-shadow .15s;
}
.link-btn:hover { box-shadow: var(--shadow-lg); }
.link-btn:active { transform: scale(.99); }
.link-btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.links-foot { margin-top: 26px; font-size: 12px; color: var(--muted); }

.menu { max-width: 680px; margin: 0 auto; padding: 16px; }
.shop-intro { margin-bottom: 14px; }
.shop-cover {
  width: 100%; max-height: 200px; object-fit: cover;
  border-radius: 14px; display: block; margin-bottom: 10px;
}
.shop-desc { font-size: 15px; color: var(--text); margin: 0 0 4px; }
.shop-addr { font-size: 13px; color: var(--muted); margin: 0; }
/* Barra fixa de busca + navegação por categorias */
.menu-nav {
  position: sticky; z-index: 9;
  background: var(--bg);
  padding: 10px 0 2px;
  margin-bottom: 4px;
}
.menu-search {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.menu-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cat-chips {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding: 10px 0 4px;
  scrollbar-width: none;
}
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chip {
  white-space: nowrap;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  font-weight: 600; font-size: 13px;
  color: var(--text); cursor: pointer;
  transition: border-color .12s, color .12s, background .12s;
}
.cat-chip:hover { border-color: var(--accent); color: var(--accent); }
.cat-chip:active { background: var(--accent-soft); }
.menu-cat { scroll-margin-top: 140px; }
.cat-title { font-size: 18px; font-weight: 800; margin: 22px 0 12px; }
.product {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: box-shadow .15s, border-color .15s, transform .05s;
}
.product:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); }
.product:active { transform: scale(0.995); }
.product-name { font-weight: 700; }
.product-desc { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.product-price { font-weight: 800; white-space: nowrap; color: var(--accent); margin-top: 6px; }
/* Preço de/por (promoção) */
.product-price .price-old { color: var(--muted); text-decoration: line-through; font-weight: 600; font-size: 13px; margin-right: 6px; }
.product-price .price-now { color: var(--accent); font-weight: 800; }
/* Seção e cards de combo */
.combos-sec .cat-title { color: var(--accent); }
.product.combo-item { border-color: var(--accent); background: linear-gradient(0deg, var(--accent-soft), var(--card) 60%); }

/* ===================== Modal de combo (cliente) ===================== */
.combo-modal {
  position: relative;
  padding: 0;                 /* o espaçamento vai nas seções internas */
  max-width: 560px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;           /* o corpo rola sozinho */
}
@media (min-width: 640px) { .combo-modal { max-width: 640px; } }

.combo-x {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: rgba(16,18,24,.55); color: #fff; font-size: 15px; cursor: pointer;
  display: grid; place-items: center; backdrop-filter: blur(4px);
}
.combo-hero { width: 100%; height: 180px; object-fit: cover; display: block; flex: 0 0 auto; }
@media (min-width: 640px) { .combo-hero { height: 220px; } }

.combo-head { padding: 18px 20px 6px; flex: 0 0 auto; }
.combo-title { margin: 0; font-size: 22px; font-weight: 800; }
.combo-desc { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.combo-price-row { margin-top: 10px; display: flex; align-items: baseline; gap: 8px; }
.combo-price-row .price-old { color: var(--muted); text-decoration: line-through; font-weight: 600; font-size: 15px; }
.combo-price-row .price-now { color: var(--accent); font-weight: 800; font-size: 22px; }

.combo-body { padding: 8px 20px 16px; overflow-y: auto; flex: 1 1 auto; -webkit-overflow-scrolling: touch; }
.combo-slot { margin-top: 16px; }
.combo-slot-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.combo-slot-name { font-size: 16px; font-weight: 800; }
.combo-slot-hint { font-size: 12px; font-weight: 700; color: var(--accent-dark); background: var(--accent-soft); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }

.combo-opt-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .combo-opt-grid { grid-template-columns: repeat(3, 1fr); } }
.combo-opt {
  position: relative; text-align: left; cursor: pointer;
  background: var(--card); border: 2px solid var(--border); border-radius: 14px;
  padding: 0; overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .12s, box-shadow .12s, transform .05s;
}
.combo-opt:hover { border-color: var(--border-strong); }
.combo-opt:active { transform: scale(.985); }
.combo-opt.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.combo-opt.is-fixed { cursor: default; opacity: 1; }
.combo-opt-media { width: 100%; aspect-ratio: 16 / 11; background: var(--bg); display: block; }
.combo-opt-media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.combo-opt-media.is-empty { display: grid; place-items: center; font-size: 26px; opacity: .5; }
.combo-opt-name { padding: 9px 11px; font-size: 13.5px; font-weight: 700; line-height: 1.25; }
.combo-opt-check {
  position: absolute; top: 8px; right: 8px;
  width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 800;
  opacity: 0; transform: scale(.6); transition: .15s;
}
.combo-opt.selected .combo-opt-check { opacity: 1; transform: none; }

.combo-foot {
  flex: 0 0 auto; display: flex; align-items: center; gap: 12px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border); background: var(--card);
}
.combo-qty { display: flex; align-items: center; gap: 4px; background: var(--bg); border-radius: 12px; padding: 4px; flex: 0 0 auto; }
.combo-qty button { width: 38px; height: 38px; border: 0; background: var(--card); border-radius: 9px; font-size: 20px; font-weight: 800; color: var(--accent); cursor: pointer; box-shadow: var(--shadow); }
.combo-qty-val { min-width: 26px; text-align: center; font-weight: 800; font-size: 16px; }
.combo-add { flex: 1 1 auto; margin: 0; padding: 15px; border-radius: 13px; font-size: 16px; font-weight: 800; }
.combo-add:disabled { opacity: .55; cursor: default; }
.product-thumb {
  width: 76px; height: 76px; flex: 0 0 76px;
  border-radius: 12px; object-fit: contain; background: var(--bg);
  border: 1px solid var(--border);
}
.product-hero {
  width: 100%; height: 200px; object-fit: contain; background: var(--bg);
  border-radius: 14px; margin-bottom: 12px; display: block;
}

.cart-fab {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 648px;
  padding: 15px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(234, 29, 44, 0.35);
  transition: background .12s;
}
.cart-fab:hover { background: var(--accent-dark); }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(16,18,24,0.45); backdrop-filter: blur(2px); display: grid; place-items: end center; z-index: 20; }
@media (min-width: 560px) { .modal-overlay { place-items: center; padding: 16px; } }
.modal {
  background: var(--card);
  width: 100%;
  max-width: min(560px, 100vw);
  min-width: 0;           /* como item de grid, não deixa o conteúdo esticar além da tela */
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;     /* qualquer sobra horizontal não vaza para fora da tela */
  border-radius: 18px 18px 0 0;
  padding: 22px;
  box-shadow: var(--shadow-lg);
}
@media (min-width: 560px) { .modal { border-radius: 18px; } }
.modal h3 { margin: 0 0 12px; font-size: 18px; }

.opt-group { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
.opt-group h4 { margin: 0 0 6px; font-size: 14px; }
.opt-group .opt { display: flex; align-items: center; gap: 8px; padding: 7px 0; }
.opt label { flex: 1; }
.opt .opt-price { color: var(--muted); font-size: 13px; }

.qty { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.qty button { width: 38px; height: 38px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--card); font-size: 18px; font-weight: 700; cursor: pointer; }
.qty button:hover { border-color: var(--accent); color: var(--accent); }

.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 12px; min-width: 0; }
.field input, .field select {
  width: 100%; min-width: 0; max-width: 100%;
  padding: 11px 13px; border: 1px solid var(--border-strong); border-radius: 10px; font-size: 15px; font-weight: 400; color: var(--text);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-row { display: flex; gap: 8px; }
.form-row .field { flex: 1 1 0; min-width: 0; } /* deixa as duas colunas encolherem (não estourar a tela) */
.addr-city { font-size: 13px; font-weight: 600; color: var(--muted); margin: -4px 0 12px; }
.addr-geo-btn {
  width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; color: var(--text, #111); font-weight: 600; font-size: 14px; cursor: pointer;
  margin-bottom: 8px;
}
.addr-geo-btn:disabled { opacity: .6; cursor: default; }
.addr-maphint { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.addr-map-wrap { position: relative; height: 200px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); margin-bottom: 14px; }
.addr-map { position: absolute; inset: 0; height: 100%; width: 100%; z-index: 0; }
.addr-map-pin {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%);
  font-size: 30px; line-height: 1; z-index: 1000; pointer-events: none;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.4));
}

.btn-primary {
  width: 100%; padding: 14px; border: 0; border-radius: 12px;
  background: var(--accent); color: var(--accent-ink); font-size: 15px; font-weight: 700; cursor: pointer;
  transition: background .12s;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.btn-text { border: 0; background: none; color: var(--muted); cursor: pointer; font-weight: 600; text-decoration: underline; }
.btn-text:hover { color: var(--accent); }

.cart-item { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--border); padding: 12px 0; }
.cart-item .ci-opts { font-size: 12px; color: var(--muted); }
.cart-line { display: flex; align-items: center; gap: 8px; }
.cart-total-row { display: flex; justify-content: space-between; font-weight: 800; padding: 14px 0; font-size: 16px; }
.error-box { background: var(--red-bg); color: var(--red); padding: 11px 13px; border-radius: 10px; font-size: 14px; margin: 8px 0; font-weight: 600; }
.ok-box { background: var(--green-bg); color: var(--green); padding: 18px; border-radius: 14px; text-align: center; }
.ok-box strong { font-size: 22px; display: block; margin-top: 6px; }

.fee-summary { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 12px; margin-bottom: 14px; }
.fee-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.fee-row.total { font-weight: 800; font-size: 16px; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; }
.fee-row.discount { color: var(--green); font-weight: 700; }

/* Cupom no checkout */
.coupon-wrap { margin: 6px 0 2px; }
.cashback-wrap { margin: 8px 0 2px; }
.cashback-row { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 600; }
.cashback-row input { width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 auto; }
.cashback-box { margin-top: 12px; background: color-mix(in srgb, var(--accent) 8%, white); border-radius: 12px; padding: 12px 14px; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
@media (prefers-color-scheme: dark) { .cashback-box { background: color-mix(in srgb, var(--accent) 16%, #1a1d24); } }
.coupon-row { display: flex; gap: 8px; }
.coupon-row input {
  flex: 1; padding: 11px 13px; border: 1px solid var(--border-strong);
  border-radius: 10px; font-size: 15px; text-transform: uppercase;
}
.coupon-apply {
  padding: 0 16px; border: 1px solid var(--accent); background: var(--accent-soft);
  color: var(--accent); border-radius: 10px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.coupon-msg { font-size: 13px; font-weight: 600; margin-top: 6px; }
.coupon-msg.ok { color: var(--green); }
.coupon-msg.err { color: var(--red); }

.track-link { margin-left: auto; border: 1px solid var(--border-strong); background: var(--card); border-radius: 10px; padding: 7px 13px; font-size: 13px; font-weight: 700; cursor: pointer; }
.track-link:hover { border-color: var(--accent); color: var(--accent); }
.ref-banner {
  display: block; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--accent-soft); font-family: inherit;
  background: var(--accent-soft); color: var(--accent-dark);
  border-radius: 12px; padding: 12px 14px; font-weight: 700; font-size: 14px; margin-top: 10px;
}
.ref-banner:hover { filter: brightness(.98); }
.ref-share-title { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.ref-out .ref-link { text-align: left; }

/* Campo de telefone do modal "Indique e Ganhe" — bom no celular e multi-device.
   font-size 16px evita o zoom automático do iOS ao focar o input. Escopado em
   .field .ref-phone para vencer a regra base .field input. */
.field .ref-phone {
  width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box;
  padding: 14px; border: 1px solid var(--border-strong); border-radius: 12px;
  font-size: 16px; font-weight: 500; color: var(--text); background: var(--card);
  -webkit-appearance: none; appearance: none;
}
.field .ref-phone:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ref-go { width: 100%; margin-top: 12px; padding: 14px; font-size: 16px; }
.ref-out .ref-link { width: 100%; box-sizing: border-box; font-size: 15px; padding: 12px 14px; }
.ref-out .btn-primary { width: 100%; }
.ref-box { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 16px; text-align: center; }
.ref-title { font-size: 17px; font-weight: 800; }
.ref-sub { font-size: 13px; color: var(--muted); margin: 4px 0 10px; }
.ref-link {
  width: 100%; font-size: 13px; border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 10px; margin-bottom: 6px; text-align: center;
}
.ref-rewards { font-size: 13px; color: var(--green); font-weight: 700; margin-top: 10px; }

.pix-box { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 16px; text-align: center; }
.pix-title { font-size: 17px; font-weight: 800; }
.pix-sub { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.pix-qr { display: flex; justify-content: center; margin: 8px 0; }
.pix-qr svg { width: 200px; height: 200px; }
.pix-code {
  width: 100%; font-size: 12px; font-family: "Courier New", monospace;
  border: 1px solid var(--border-strong); border-radius: 10px; padding: 10px;
  resize: none; word-break: break-all; margin-bottom: 8px;
}
.pix-note { font-size: 12px; color: var(--muted); margin-top: 8px; }

.track-box { background: var(--green-bg); border-radius: 14px; padding: 18px; text-align: center; margin-bottom: 14px; }
.track-status { font-size: 18px; font-weight: 800; color: var(--green); margin-bottom: 4px; }

/* ===================== Avaliação (review widget) ===================== */
.review-page { max-width: 440px; margin: 0 auto; padding: 24px 16px; }
.rv-widget { width: 100%; }
.rv-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); padding: 24px 20px; text-align: center;
}
.rv-logo { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; margin: 0 auto 10px; display: block; }
.rv-title { font-size: 20px; font-weight: 800; margin: 0 0 4px; }
.rv-sub { color: var(--muted); margin: 0 0 16px; }
.rv-stars { display: flex; justify-content: center; gap: 6px; margin: 10px 0 16px; }
.rv-star {
  border: 0; background: none; cursor: pointer; padding: 2px;
  color: #d6d9df; transition: color .12s, transform .08s;
}
.rv-star:hover { transform: scale(1.08); }
.rv-star.on { color: #f6b100; }
.rv-star-ic { width: 40px; height: 40px; }
.rv-comment {
  width: 100%; box-sizing: border-box; border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 10px 12px; font-size: 14px; font-family: inherit;
  resize: vertical; margin-bottom: 12px;
}
.rv-err { color: var(--accent); font-size: 13px; min-height: 18px; margin: 0 0 8px; }
.rv-btn {
  width: 100%; border: 0; border-radius: 12px; padding: 13px 16px;
  font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 6px;
}
.rv-btn-send { background: var(--accent); color: var(--accent-ink); }
.rv-btn-send:disabled { opacity: .6; cursor: default; }
.rv-btn-google {
  background: #fff; color: #3c4043; border: 1px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.rv-g {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; color: #4285f4; font-weight: 800; border: 1px solid var(--border);
  font-family: Arial, sans-serif;
}
.rv-check {
  width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); font-size: 30px; font-weight: 800;
  display: grid; place-items: center; margin: 0 auto 12px;
}
.rv-link { display: inline-block; margin-top: 14px; color: var(--muted); font-size: 14px; text-decoration: none; }
.rv-link:hover { color: var(--text); }
/* Embutido na confirmação do pedido: sem borda dupla. */
.order-review .rv-card { border: 0; box-shadow: none; padding: 8px 0 0; }

/* ===================== Composição (ingredientes) ===================== */
.ing-group h4 { margin: 0 0 8px; font-size: 15px; }
.ing-fixed { color: var(--muted); }
.ing-hint { color: var(--muted); font-size: 12px; margin: 6px 0 0; }
.product-ings { color: var(--muted); font-size: 12px; margin: 2px 0 4px; }
.ci-removed { color: var(--accent); font-size: 12px; }
