/* ===== Cardápio com pedido pela mesa ===== */
.menu-body {
  --m-accent: #7c3aed; --m-accent-ink: #fff; --m-ink: #1d1530; --m-muted: #6b6380; --m-line: #ece7f5; --m-bg: #f7f5fb;
  background: var(--m-bg) !important; color: var(--m-ink); font-family: var(--font);
}
/* cor de destaque de acordo com o visual do estabelecimento */
.menu-body.theme-boteco, .menu-body.theme-boteco-classico { --m-accent: #2f7d6c; --m-bg: #f6f8f6; }
.menu-body.theme-represa { --m-accent: #1d6fa3; --m-bg: #f3f7fa; }

.menu-wrap { display: block; min-height: 100vh; padding: 0 0 110px; }
.m-head { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--m-line); }
.m-head__logo { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  background: var(--m-accent); color: #fff; font-weight: 800; border: 1px solid var(--m-line); }
.m-head__logo.has-img { background: #fff; }
.m-head__logo img { width: 100%; height: 100%; object-fit: contain; }
.m-head__txt { display: grid; min-width: 0; line-height: 1.2; }
.m-head__txt strong { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-head__txt span { font-size: 12.5px; font-weight: 700; color: var(--m-accent); }
.m-head__btn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--m-line); background: #fff; color: var(--m-ink); font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }
.m-head__btn .icon { width: 16px; height: 16px; color: var(--m-accent); }

.m-cats { position: sticky; top: 71px; z-index: 15; display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; background: var(--m-bg); scrollbar-width: none; }
.m-cats::-webkit-scrollbar { display: none; }
.m-cat { flex: none; padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--m-line); color: var(--m-ink); font-weight: 700; font-size: 13.5px; text-decoration: none; }

.m-list { max-width: 640px; margin: 0 auto; padding: 8px 16px 24px; }
.m-sec { scroll-margin-top: 130px; }
.m-sec__t { margin: 18px 2px 10px; font-size: 19px; font-weight: 800; }
.m-item { display: flex; align-items: center; gap: 12px; padding: 14px; margin-bottom: 10px; background: #fff; border: 1px solid var(--m-line); border-radius: 16px; }
.m-item.is-in { border-color: var(--m-accent); box-shadow: 0 0 0 1px var(--m-accent) inset; }
.m-item__txt { flex: 1; min-width: 0; }
.m-item h3 { margin: 0 0 3px; font-size: 15.5px; font-weight: 800; overflow-wrap: anywhere; }
.m-item p { margin: 0 0 6px; font-size: 13px; color: var(--m-muted); line-height: 1.35; }
.m-price { font-size: 15px; color: var(--m-ink); }

.m-qty { display: flex; align-items: center; gap: 6px; flex: none; }
.m-qty__b { width: 38px; height: 38px; border-radius: 12px; border: 1.5px solid var(--m-line); background: #fff; color: var(--m-ink);
  font-size: 22px; font-weight: 700; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.m-qty__b--add { background: var(--m-accent); border-color: var(--m-accent); color: var(--m-accent-ink); }
.m-qty__n { min-width: 22px; text-align: center; font-weight: 800; font-size: 16px; }

.m-bar { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 30; max-width: 616px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 0; border-radius: 18px; cursor: pointer;
  background: var(--m-accent); color: var(--m-accent-ink); font-size: 16px; font-weight: 800; box-shadow: 0 14px 30px rgba(0, 0, 0, .25); }
.m-bar__n { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; background: rgba(255, 255, 255, .25); display: grid; place-items: center; font-size: 14px; }
.m-bar strong { margin-left: auto; }

.m-back { margin: 10px 0 4px; padding: 6px 0; border: 0; background: none; color: var(--m-accent); font-weight: 700; font-size: 14px; cursor: pointer; }
.m-title { margin: 6px 0 14px; font-size: 22px; font-weight: 800; }
.m-lines { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.m-line { padding: 12px 14px; background: #fff; border: 1px solid var(--m-line); border-radius: 16px; display: grid; gap: 10px; }
.m-line__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.m-line__top strong { display: block; font-size: 15px; }
.m-line__top span { font-size: 12.5px; color: var(--m-muted); }
.m-input { width: 100%; padding: 10px 12px; border: 1.5px solid var(--m-line); border-radius: 12px; background: #fff; font: inherit; font-size: 14.5px; color: var(--m-ink); }
.m-input:focus { outline: none; border-color: var(--m-accent); }
textarea.m-input { resize: vertical; margin-top: 6px; }
.m-lab { display: block; font-size: 13.5px; font-weight: 700; color: var(--m-muted); }
.m-sum { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 2px 10px; font-weight: 700; }
.m-sum strong { font-size: 20px; }
.m-sum--big { padding: 14px; background: #fff; border-radius: 16px; border: 1px solid var(--m-line); }
.m-sum--big strong { font-size: 22px; color: var(--m-accent); }
.m-cta { width: 100%; margin-top: 10px; padding: 15px; border: 0; border-radius: 16px; background: var(--m-accent); color: var(--m-accent-ink);
  font-size: 16.5px; font-weight: 800; cursor: pointer; }
.m-cta:disabled { opacity: .6; cursor: wait; }
.m-cta--ghost { background: #fff; color: var(--m-accent); border: 1.5px solid var(--m-accent); }
.m-hint { margin: 10px 2px 0; font-size: 13px; color: var(--m-muted); text-align: center; }
.m-err { margin: 6px 0 0; padding: 10px 12px; border-radius: 12px; background: #fdecec; color: #b91c1c; font-weight: 700; font-size: 14px; }
.m-empty { padding: 30px 10px; text-align: center; color: var(--m-muted); }
.m-foot { margin-top: 24px; text-align: center; font-size: 12px; color: var(--m-muted); }

.m-done, .m-fail { text-align: center; padding-top: 30px; }
.m-fail { max-width: 420px; margin: 0 auto; padding: 60px 20px; }
.m-fail h1 { font-size: 22px; margin: 10px 0 6px; }
.m-fail p { color: var(--m-muted); }
.m-done__ic { width: 76px; height: 76px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center;
  background: #e7f8f0; color: #047857; font-size: 40px; font-weight: 800; }
.m-done__ic--off { background: #fdecec; color: #b91c1c; }

.m-order { padding: 12px 14px; margin-bottom: 10px; background: #fff; border: 1px solid var(--m-line); border-radius: 16px; }
.m-order.is-off { opacity: .55; }
.m-order__h { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 14px; }
.m-order__h span { color: var(--m-muted); font-size: 13px; }
.m-order ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.m-order li { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14.5px; }
.m-order small { color: var(--m-muted); }
.m-tag { flex: none; padding: 3px 9px; border-radius: 999px; font-style: normal; font-size: 11.5px; font-weight: 800; background: #eeeaf3; color: #6b6380; }
.m-tag--preparando { background: #fff4e8; color: #9a3412; }
.m-tag--pronto { background: #e7f8f0; color: #047857; }
.m-tag--entregue { background: #e8eefc; color: #1d4ed8; }
.m-tag--off { background: #fdecec; color: #b91c1c; }

.m-loading { display: grid; place-items: center; gap: 10px; padding: 50px 0; color: var(--m-muted); }
.m-spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--m-line); border-top-color: var(--m-accent); animation: m-spin .8s linear infinite; }
@keyframes m-spin { to { transform: rotate(360deg); } }

/* ===== Cardápio interativo (v2) ===== */
.m-head__back { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 12px; color: var(--m-ink); text-decoration: none; }
.m-head__back .icon { width: 20px; height: 20px; }
.m-head { gap: 10px; padding: 10px 12px; }
.m-hero { margin: 12px 0 14px; padding: 14px 16px; border-radius: 18px; background: var(--m-accent); color: var(--m-accent-ink); display: grid; gap: 3px; }
.m-hero b { font-size: 19px; font-weight: 800; }
.m-hero span { font-size: 13.5px; opacity: .92; line-height: 1.35; }
.m-hero--view { background: #fff; color: var(--m-ink); border: 1px solid var(--m-line); }
.m-hero--view span { color: var(--m-muted); opacity: 1; }
.m-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; margin-bottom: 14px; border-radius: 16px; background: #fff; border: 1px solid var(--m-line); }
.m-seg__b { padding: 11px; border: 0; border-radius: 12px; background: none; font: inherit; font-weight: 800; font-size: 15.5px; color: var(--m-muted); cursor: pointer; }
.m-seg__b.is-on { background: var(--m-accent); color: var(--m-accent-ink); }
.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m-tile { position: relative; aspect-ratio: 1 / .82; overflow: hidden; border: 0; border-radius: 18px; padding: 0; cursor: pointer; text-align: left;
  background: linear-gradient(135deg, var(--m-accent), #1d1530); color: #fff; font: inherit; box-shadow: 0 6px 16px rgba(0, 0, 0, .1); }
.m-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.m-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, .78) 100%); }
.m-tile__ini { position: absolute; top: 12px; left: 14px; font-size: 26px; font-weight: 800; opacity: .35; }
.m-tile__name { position: absolute; z-index: 1; left: 12px; right: 12px; bottom: 26px; font-size: 16px; font-weight: 800; line-height: 1.15; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.m-tile__n { position: absolute; z-index: 1; left: 12px; bottom: 9px; font-size: 11.5px; font-weight: 600; opacity: .85; }
.m-cdesc { margin: -8px 2px 12px; color: var(--m-muted); font-size: 13.5px; }
.m-item { cursor: pointer; }
.m-item__img { width: 72px; height: 72px; flex: none; border-radius: 14px; object-fit: cover; }
.m-item__opt { font-size: 12px !important; color: var(--m-accent) !important; font-weight: 700; }
.m-price.is-none { color: var(--m-muted); font-weight: 600; font-size: 13px; }
.m-add { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--m-accent); color: var(--m-accent-ink); font-size: 22px; font-weight: 700; }
.m-add b { font-size: 16px; }
.m-line__det { display: block; color: var(--m-accent) !important; font-weight: 700; }

/* janela do item */
.m-lock { overflow: hidden; }
.m-sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.m-sheet__bg { position: absolute; inset: 0; background: rgba(15, 10, 30, .55); }
.m-sheet__box { position: relative; width: 100%; max-width: 560px; max-height: 92vh; display: flex; flex-direction: column; background: #fff;
  border-radius: 24px 24px 0 0; overflow: hidden; animation: m-up .2s ease; }
@keyframes m-up { from { transform: translateY(30px); opacity: .6; } }
@media (min-width: 600px) { .m-sheet { align-items: center; } .m-sheet__box { border-radius: 24px; } }
.m-sheet__x { position: absolute; z-index: 2; top: 10px; right: 10px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92);
  display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.m-sheet__x .icon { width: 18px; height: 18px; }
.m-sheet__img { width: 100%; height: 190px; object-fit: cover; flex: none; }
.m-sheet__body { overflow-y: auto; padding: 16px 16px 8px; }
.m-sheet__body h2 { margin: 0 44px 4px 0; font-size: 21px; font-weight: 800; }
.m-sheet__desc { margin: 0 0 10px; color: var(--m-muted); font-size: 14px; }
.m-grp { margin: 12px 0; padding: 0; border: 0; }
.m-grp legend { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 6px; border-radius: 10px; background: var(--m-bg); }
.m-grp legend b { font-size: 15px; }
.m-grp__rule { font-size: 12px; font-weight: 800; color: #9a3412; background: #fff4e8; padding: 3px 8px; border-radius: 999px; }
.m-grp__rule.is-ok { color: #047857; background: #e7f8f0; }
.m-ch { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 10px; border: 0; border-bottom: 1px solid var(--m-line); background: none; font: inherit; color: var(--m-ink); text-align: left; cursor: pointer; }
.m-ch:disabled { opacity: .4; cursor: not-allowed; }
.m-ch__mk { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid #cfc8da; }
.m-ch__mk.is-box { border-radius: 6px; }
.m-ch.is-on .m-ch__mk { border-color: var(--m-accent); background: var(--m-accent); box-shadow: inset 0 0 0 4px #fff; }
.m-ch.is-on .m-ch__mk.is-box { box-shadow: inset 0 0 0 3px #fff; }
.m-ch__t { flex: 1; display: grid; }
.m-ch__t b { font-size: 15px; font-weight: 700; }
.m-ch__t small { color: var(--m-muted); font-size: 12.5px; }
.m-ch em { font-style: normal; font-weight: 800; font-size: 14px; }
.m-lab span { font-weight: 500; }
.m-lab .m-input { margin-top: 6px; }
.m-sheet__foot { display: flex; align-items: center; gap: 10px; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--m-line); background: #fff; }
.m-sheet__foot .m-cta { margin: 0; flex: 1; }
.m-sheet__foot--view { flex-direction: column; align-items: flex-start; gap: 2px; }
.m-sheet__foot--view span { color: var(--m-muted); font-size: 13px; }
.m-cta--add:disabled { background: #e7e3ee; color: var(--m-muted); opacity: 1; cursor: not-allowed; }
.m-toast { position: fixed; left: 50%; bottom: 96px; z-index: 60; transform: translateX(-50%); padding: 11px 16px; border-radius: 14px; background: #1d1530; color: #fff;
  font-weight: 700; font-size: 14px; box-shadow: 0 10px 24px rgba(0, 0, 0, .25); transition: opacity .3s ease; white-space: nowrap; }
.m-toast.is-out { opacity: 0; }
/* deixa espaço para o botão fechar (X), que fica fixo no canto */
.m-grp legend { padding-right: 52px; }
