/*
 * Cardápio — camada visual PRATZU (Açafrão) sobre as classes nm-* do MenuApp.
 * Fica fora do MenuApp.tsx de propósito: o CSS estrutural continua lá e esta
 * camada só troca tipografia, contornos e sombras sólidas. As cores do
 * restaurante (Branding → --nm-*) continuam valendo.
 * Seletores prefixados por .nm-app para vencer o <style> embutido.
 */
.nm-app {
  background: var(--nm-bg, var(--tm-cream));
  box-shadow: none;
  font-family: var(--font-body);
  color: var(--tm-aubergine);
  --cart-bar-offset: 18px;
  --cart-bar-h: calc(56px + var(--cart-bar-offset));
  --menu-sticky-stack: 105px;
}
@media (min-width: 761px) {
  .nm-app {
    --cart-bar-offset: 34px;
  }
}
.nm-app .nm-content {
  padding-block-end: calc(var(--cart-bar-h) + env(safe-area-inset-bottom, 0px) + 8px);
}
.nm-app .nm-header {
  background: color-mix(in srgb, var(--nm-bg, var(--tm-cream)) 94%, transparent);
  border-bottom: var(--outline);
}
.nm-app .nm-hero,
.nm-app .sr-detail-hero {
  border-bottom: var(--outline);
}

/* títulos: Unbounded 800 (H1 40/44 no guia; menor no celular), sem vazar com palavras longas */
.nm-app .nm-info h1 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: var(--ls-display);
  font-size: clamp(1.6rem, 6vw, 2.25rem);
  line-height: 1.1;
  overflow-wrap: break-word;
}
.nm-app .nm-section-title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: var(--ls-display);
  font-size: clamp(1.3rem, 4.6vw, 1.6rem);
  line-height: 1.2;
  overflow-wrap: break-word;
}
:lang(ar) .nm-app :is(.nm-info h1, .nm-section-title),
:lang(hi) .nm-app :is(.nm-info h1, .nm-section-title),
:lang(zh) .nm-app :is(.nm-info h1, .nm-section-title),
:lang(ja) .nm-app :is(.nm-info h1, .nm-section-title),
:lang(ko) .nm-app :is(.nm-info h1, .nm-section-title) {
  letter-spacing: 0;
}

/* item: nome Manrope 800, preço tabular em tomate escuro (AA sobre creme) */
.nm-app .nm-product {
  border-bottom: 1px solid rgba(43, 15, 58, 0.18);
  overflow: visible;
}
.nm-app .nm-product h3 {
  font-weight: 800;
  font-size: 1.05rem;
  overflow-wrap: break-word;
  hyphens: auto;
}
.nm-app .nm-product p {
  color: var(--tm-plum);
}
.nm-app .nm-price {
  color: var(--tm-tomato-ink);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.nm-app .nm-media {
  overflow: visible;
}
.nm-app .nm-media img,
.nm-app .nm-media .nm-media-fallback {
  border: var(--outline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}

/* "+" = ação principal do item: açafrão com texto berinjela, contorno e sombra que afunda */
.nm-app .nm-search-wrap {
  padding: 0 18px 12px;
  box-sizing: border-box;
}
.nm-app .nm-search-input::-webkit-search-cancel-button {
  display: none;
}
.nm-app .nm-search-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--tm-plum);
}
.nm-app .nm-search-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.nm-app .nm-search-input {
  flex: 1;
  min-height: 44px;
  padding: 10px 14px;
  border: var(--outline);
  border-radius: var(--r-btn);
  font: inherit;
  font-size: 16px;
  background: #fff;
  color: var(--tm-aubergine);
  box-sizing: border-box;
}
.nm-app .nm-search-clear {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  border: var(--outline);
  border-radius: var(--r-btn);
  background: var(--tm-saffron);
  color: var(--tm-aubergine);
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
}
.nm-app .nm-search-live {
  margin: 6px 2px 0;
  font-size: 12px;
  color: var(--tm-plum);
  min-height: 1.2em;
}
.nm-app .nm-search-empty {
  text-align: center;
  padding: 12px 18px 24px;
  font-weight: 700;
  color: var(--tm-plum);
}
.nm-app .nm-search-empty p {
  margin: 0 0 12px;
}
.nm-app .nm-search-empty-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0 16px;
  border: var(--outline);
  border-radius: var(--r-btn);
  background: #fff;
  color: var(--tm-aubergine);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.nm-app .nm-quick-add {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 6px;
  background: var(--nm-bg, var(--tm-cream));
  border: var(--outline);
  border-radius: var(--r-btn);
  box-sizing: border-box;
  width: 100%;
  min-width: min(168px, 100%);
  max-width: min(220px, calc(100vw - 32px));
  min-height: 148px;
  scroll-margin-block-start: calc(var(--menu-sticky-stack) + 8px);
  scroll-margin-block-end: calc(var(--cart-bar-h) + env(safe-area-inset-bottom, 0px) + 8px);
}
.nm-app .nm-quick-add[data-mode='added'] {
  justify-content: center;
  inline-size: 100%;
  width: 100%;
}
.nm-app .nm-quick-qty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.nm-app .nm-quick-step {
  min-width: 44px;
  min-height: 44px;
  border: var(--outline);
  border-radius: var(--r-btn);
  background: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
}
.nm-app .nm-quick-close {
  flex: 1 1 100%;
  max-width: 100%;
  min-width: 44px;
  min-height: 44px;
  border: var(--outline);
  border-radius: var(--r-btn);
  background: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
}
.nm-app .nm-quick-confirm {
  min-height: 44px;
  border: var(--outline);
  border-radius: var(--r-btn);
  background: var(--tm-saffron);
  color: var(--tm-aubergine);
  font: inherit;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.2;
  white-space: normal;
  text-wrap: balance;
  overflow-wrap: break-word;
  cursor: pointer;
  padding: 0 8px;
}
.nm-app .nm-quick-added {
  display: block;
  text-align: center;
  font: inherit;
  font-weight: 800;
  font-size: 14px;
  padding: 10px 6px;
}
.nm-app .nm-quick-host {
  position: relative;
}
.nm-app .nm-product > .nm-media {
  min-width: 0;
  overflow: visible;
}
.nm-app .nm-media {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  row-gap: 6px;
  align-content: start;
  width: 126px;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
  box-sizing: border-box;
}
.nm-app .nm-media > img,
.nm-app .nm-media > .nm-media-fallback {
  grid-row: 1;
  grid-column: 1;
  justify-self: end;
  width: 126px;
  max-width: 100%;
}
.nm-app .nm-media > .nm-quick-host {
  grid-row: 1;
  grid-column: 1;
  align-self: end;
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  z-index: 2;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}
.nm-app .nm-media > .nm-quick-host:has(.nm-quick-add[data-mode='expanded']),
.nm-app .nm-media > .nm-quick-host:has(.nm-quick-add[data-mode='added']) {
  grid-row: 2;
  grid-column: 1;
  align-self: start;
  justify-self: end;
  width: min(220px, calc(100vw - 32px));
  max-width: min(220px, calc(100vw - 32px));
  min-width: min(168px, 100%);
}
.nm-app .nm-quick-host:has(.nm-quick-add[data-mode='expanded']),
.nm-app .nm-quick-host:has(.nm-quick-add[data-mode='added']) {
  min-inline-size: min(168px, 100%);
}
.nm-app .nm-media .nm-quick-add {
  position: static;
  width: 100%;
  max-width: 100%;
}
.nm-app .nm-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.nm-app .nm-add {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: var(--outline);
  border-radius: var(--r-btn);
  background: var(--tm-saffron);
  color: var(--tm-aubergine);
  box-shadow: var(--shadow-btn);
  font-weight: 800;
}
.nm-app .nm-add:focus-visible,
.nm-app .nm-quick-step:focus-visible,
.nm-app .nm-quick-close:focus-visible,
.nm-app .nm-quick-confirm:focus-visible {
  outline: 2px solid var(--nm-primary, #1f2a44);
  outline-offset: 2px;
}
.nm-app .nm-add:active {
  transform: translate(calc(3px * var(--shadow-dir)), 3px);
  box-shadow: none;
}
[dir='rtl'] .nm-app .nm-add {
  right: auto;
  left: 7px;
}

/* pílulas e filtros */
.nm-app .nm-pill,
.nm-app .nm-waiter,
.nm-app .nm-orders {
  border: var(--outline);
  border-radius: var(--r-btn);
  min-height: 36px;
  font-weight: 800;
}
/* #476 (decisão 3 da PO): «Fechar a conta» (menu-bill-open) e «Meus pedidos»
   (menu-history-open) são alvos de toque ≥ 44 px; pílulas e garçom ficam. */
.nm-app .nm-orders {
  min-height: 44px;
}
.nm-app .nm-pill {
  color: var(--tm-aubergine);
}
.nm-app .nm-pill.active {
  background: var(--tm-aubergine);
  border-color: var(--tm-aubergine);
  color: var(--tm-cream);
}
.nm-app .nm-categories {
  border-bottom: var(--outline);
  background: var(--nm-bg, var(--tm-cream));
}
.nm-app .nm-cat {
  color: var(--tm-plum);
  font-weight: 800;
}
.nm-app .nm-cat.active {
  color: var(--tm-aubergine);
  border-bottom-width: 3px;
}

/* barra do carrinho = CTA: contorno + sombra sólida */
.nm-app .nm-cart-bar {
  border: var(--outline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-pop);
  min-height: 56px;
  font-weight: 800;
}
.nm-app .nm-cart-count {
  background: var(--tm-saffron);
  color: var(--tm-aubergine);
  border: 2px solid var(--tm-aubergine);
  font-weight: 800;
}

/* modais / folhas */
.nm-sheet {
  border: var(--outline);
  border-bottom: 0;
  font-family: var(--font-body);
  color: var(--tm-aubergine);
  min-width: 0;
  box-sizing: border-box;
}
.nm-sheet input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.nm-app .nm-google-btn {
  border: var(--outline);
  border-radius: var(--r-btn);
  box-shadow: var(--shadow-btn);
  min-height: 44px;
}

.nm-app .nm-powered {
  color: var(--tm-plum);
  font-weight: 600;
}

@media (min-width: 761px) {
  .nm-app {
    border: var(--outline);
    border-radius: var(--r-card);
    box-shadow: var(--shadow-pop);
  }
  .nm-sheet {
    border: var(--outline);
    box-shadow: var(--shadow-pop);
  }
}
