/* Visual minimalista: fundo preto, fotos grandes, pouco texto.
   O dourado fica reservado para precos e para a acao principal. */
:root {
  --bg: #080706;
  --surface: #141210;
  --line: rgba(255, 250, 240, 0.1);
  --text: #f4efe6;
  --muted: rgba(244, 239, 230, 0.68);
  --gold: #d4ae68;
  --gold-light: #e6c987;
  --sans: Inter, "Helvetica Neue", Arial, sans-serif;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --gutter: max(24px, env(safe-area-inset-left));
  --radius: 14px;
  --flame-outer: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20d='M13.5%201.2C13.6%204.6%2017.6%207.2%2019.2%2011.2%2020.2%2013.7%2019.8%2016.6%2018.2%2018.8%2016.6%2020.9%2014.3%2022.2%2012%2022.2%208.4%2022.2%205%2019.4%205%2015.4%205%2013%206.2%2011.2%207.6%209.6%207.7%2011.2%208.4%2012.4%209.6%2012.9%209.1%209.3%2010.4%204.4%2013.5%201.2Z'/%3E%3C/svg%3E");
  --flame-inner: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20d='M12.6%2012.2C13.2%2014.6%2016%2015.8%2016%2018.4A4%204%200%200%201%208%2018.4C8%2016.9%208.7%2015.9%209.6%2015.1%209.9%2016%2010.5%2016.5%2011.1%2016.7%2010.8%2015%2011.2%2013.4%2012.6%2012.2Z'/%3E%3C/svg%3E");
  color-scheme: dark;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

body {
  position: fixed;
  inset: 0;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

img {
  -webkit-user-drag: none;
}

.app {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  opacity: 0;
  transition: opacity 300ms ease, visibility 0s linear 300ms;
}

.screen.is-active {
  visibility: visible;
  opacity: 1;
  transition: opacity 300ms ease;
}

.scroll-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.scroll-area::-webkit-scrollbar {
  display: none;
}

/* ---------- Boas-vindas ---------- */

.welcome {
  align-items: center;
  justify-content: center;
  background: #000;
  cursor: pointer;
}

.welcome__bg {
  position: absolute;
  inset: -40px;
  /* V602: igual ao original (poster inteiro, com os textos desfocados), mas numa copia reduzida do proprio poster (600x960, ~30 KB) em vez dos 670 KB; desfocado a 30 px fica igual. */
  background: url("assets/entrada/fundo-desfocado.webp") center / cover;
  filter: blur(30px) brightness(0.35);
}

.welcome__embers {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.welcome__poster {
  position: relative;
  z-index: 1;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  pointer-events: none;
}

.welcome__start {
  position: absolute;
  bottom: max(8vh, calc(env(safe-area-inset-bottom) + 32px));
  left: 50%;
  z-index: 3;
  height: 60px;
  padding: 0 36px;
  border: 1px solid rgba(244, 239, 230, 0.5);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
  50% {
    border-color: var(--gold);
    color: var(--gold);
  }
}

/* ---------- Barra de topo ---------- */

.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  flex: none;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: max(12px, env(safe-area-inset-top)) var(--gutter) 12px;
  background: var(--bg);
}

.brand {
  margin-right: auto;
  text-align: left;
}

.brand__name {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand__sub {
  display: none;
}

.topbar__actions {
  display: flex;
  flex: none;
  gap: 8px;
}

.pill-button,
.icon-button,
.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
}

.pill-button {
  padding: 0 18px;
  border: 1px solid var(--line);
}

.icon-button {
  width: 48px;
  color: var(--text);
}

.icon-button--outline {
  border: 1px solid var(--line);
}

.icon-button svg,
.back-button svg {
  width: 22px;
  height: 22px;
}

.back-button {
  flex: none;
  padding: 0 16px 0 6px;
  color: var(--text);
}

.pill-button:active,
.icon-button:active,
.back-button:active {
  background: var(--surface);
}

.heart {
  width: 18px;
  height: 18px;
  flex: none;
  background: var(--gold);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.2C.9 8.4 3 4.5 6.8 4.5c2.2 0 3.9 1.3 5.2 3 1.3-1.7 3-3 5.2-3 3.8 0 5.9 3.9 4.4 7.3C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.2C.9 8.4 3 4.5 6.8 4.5c2.2 0 3.9 1.3 5.2 3 1.3-1.7 3-3 5.2-3 3.8 0 5.9 3.9 4.4 7.3C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--gold);
  color: #140f06;
  font-size: 13px;
  font-weight: 700;
}

.count-badge.is-bumping {
  animation: bump 380ms ease;
}

@keyframes bump {
  40% {
    transform: scale(1.2);
  }
}

/* A barra mantem o translateX(-50%): sem isto saltava para o lado ao estalar. */
.list-bar.is-bumping {
  animation: bump-bar 380ms ease;
}

@keyframes bump-bar {
  40% {
    transform: translateX(-50%) scale(1.07);
  }
}

/* ---------- Inicio ---------- */

.home__scroll {
  padding: 8px var(--gutter) 120px;
}

.block-head {
  max-width: 1400px;
  margin: 28px auto 16px;
}

.block-title {
  font-family: var(--serif);
  font-size: clamp(30px, 3.8vw, 40px);
  font-weight: 500;
  text-wrap: balance;
}

/* Filete dourado curto por baixo dos titulos do inicio. */
.block-title::after {
  content: "";
  display: block;
  width: 44px;
  height: 2px;
  margin-top: 10px;
  border-radius: 2px;
  background: var(--gold);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  max-width: 1400px;
  margin: 0 auto;
}

.category-tile {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 200ms ease;
}

.category-tile:active img {
  transform: scale(1.04);
}

/* V712: capa com vídeo (campo opcional coverVideo da categoria). O vídeo fica por cima da imagem da capa (que é o poster e a
   reserva) e por baixo do degradé (::after) e do texto; sem coverVideo não existe. */
.category-tile__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: transform 200ms ease;
}

.category-tile:active .category-tile__video {
  transform: scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
  .category-tile__video {
    display: none;
  }
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 28%, rgba(0, 0, 0, 0.55) 60%, rgba(0, 0, 0, 0.9));
}

.category-tile__text {
  position: absolute;
  right: 18px;
  bottom: 14px;
  left: 18px;
  z-index: 1;
}

.category-tile__name {
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.15;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.75);
}

/* V835: em ecrãs estreitos (telemóvel, 2 colunas) o nome da categoria («Acompanhamentos», «Accompagnements»…) cabia mal e saía do cartão:
   margens mais curtas, letra mais pequena e, no limite, parte a palavra em vez de sair. Só abaixo dos 420 px: o resto fica como estava. */
@media (max-width: 420px) {
  .category-tile__text {
    right: 10px;
    left: 12px;
  }

  .category-tile__name {
    font-size: 16px;
    line-height: 1.15;
    overflow-wrap: anywhere;
    hyphens: auto;
  }
}

.category-tile--review {
  display: grid;
  place-items: center;
  border: 1px solid rgba(212, 174, 104, 0.45);
  background: var(--bg);
  text-align: center;
}

.category-tile--review::after {
  display: none;
}

.review-tile {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.review-tile__stars {
  color: var(--gold);
  font-size: 18px;
  letter-spacing: 0.3em;
}

.review-tile__title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
}

.review-tile__sub {
  color: var(--muted);
  font-size: 16px;
}

/* Quadrado sem foto de capa: brasa desenhada em CSS (sem ficheiros). */
.category-tile--nocover {
  background:
    radial-gradient(120% 95% at 12% 118%, rgba(214, 92, 28, 0.6), transparent 62%),
    radial-gradient(90% 80% at 92% 125%, rgba(212, 174, 104, 0.3), transparent 66%),
    linear-gradient(160deg, #1d1511, #0b0908 72%);
  box-shadow: inset 0 0 0 1px rgba(212, 174, 104, 0.45);
}

.category-tile--nocover::after {
  display: none;
}

/* Chama desenhada em CSS (mascara SVG): exterior com degrade de brasa e miolo mais claro. */
.flame {
  position: relative;
  display: block;
  aspect-ratio: 1;
}

.flame::before,
.flame::after {
  content: "";
  position: absolute;
  inset: 0;
  -webkit-mask: var(--flame-outer) center / contain no-repeat;
  mask: var(--flame-outer) center / contain no-repeat;
}

.flame::before {
  background: linear-gradient(180deg, #f6dc98 0%, #eaa04a 48%, #c4501c 100%);
}

.flame::after {
  background: linear-gradient(180deg, #fff3c4, #f6b955);
  opacity: 0.9;
  -webkit-mask-image: var(--flame-inner);
  mask-image: var(--flame-inner);
}

.category-tile__flame {
  position: absolute;
  right: 9%;
  bottom: 12%;
  height: 66%;
  pointer-events: none;
}

.category-tile__badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--gold);
  color: #140f06;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Destaque (ex.: Menu de Inverno): quadrado largo no topo da grelha. */
.category-tile--highlight {
  grid-column: span 2;
  aspect-ratio: auto;
}

.category-tile--highlight .category-tile__text {
  bottom: 22px;
  left: 26px;
  display: grid;
  justify-items: start;
}

.category-tile--highlight .category-tile__name {
  font-family: var(--serif);
  font-size: clamp(30px, 3.4vw, 40px);
  font-weight: 500;
  line-height: 1.1;
}

.category-tile--highlight.category-tile--nocover .category-tile__flame {
  right: 7%;
  bottom: 14%;
  height: 72%;
}

/* ---------- Categoria ---------- */

.tabs {
  display: flex;
  flex: 1;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
  padding: 0 16px;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: none;
  height: 44px;
  padding: 0 16px;
  border: 1px solid #262626;
  border-radius: 999px;
  background: #111;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.tab:active {
  background: var(--surface);
}

/* Aba ativa: contorno dourado, texto dourado claro e fundo de brasa (como no desenho aprovado). */
.tab.is-active {
  border-color: var(--gold);
  background: #171207;
  color: var(--gold-light);
  font-weight: 600;
}

.category__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.category__body .tabs {
  flex: none;
  padding: 0 var(--gutter) 10px;
  mask-image: none;
  -webkit-mask-image: none;
}

/* Sombra no fim da linha so quando ha mais categorias por ver (a classe liga-se no script). */
.category__body .tabs.has-more {
  mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent);
}

.category__scroll {
  padding: 0 var(--gutter) 130px;
}

/* Cardápio 22/11: as abas ficam SEMPRE na linha de cima, presas por cima da lista (fora do
   .category__scroll, que é quem rola). O tablet deixou de ter a coluna de categorias à esquerda:
   a 1024 px as abas são a mesma fila horizontal do telemóvel, como no desenho aprovado. */

.category__content {
  max-width: 1400px;
  margin: 0 auto;
}

.category__head {
  display: grid;
  gap: 18px;
  padding: 20px 0 4px;
}

.category__title {
  font-family: var(--serif);
  font-size: clamp(40px, 5.4vw, 60px);
  font-weight: 500;
  line-height: 1;
}

.note {
  max-width: 62ch;
  padding: 12px 18px;
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  background: rgba(212, 174, 104, 0.08);
  color: rgba(244, 239, 230, 0.92);
  font-size: 18px;
  line-height: 1.45;
}

.section {
  margin-top: 36px;
}

.section__title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(212, 174, 104, 0.35);
  color: var(--text);
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.15;
}

.section__note {
  color: rgba(244, 239, 230, 0.86);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px 12px;
}

.category__content--large .product-grid {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px 12px;
}

/* Cardápio 22/11 (desenho aprovado): cada prato é um cartão fechado — foto em cima, corpo por baixo,
   com o nome, o preço a dourado, os alergénios por extenso e o botão «Escolher» a toda a largura. */
.product {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  border: 1px solid #262626;
  border-radius: 14px;
  background: #141414;
  text-align: left;
}

.product__frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 0;
  background: #000;
  box-shadow: none;
}

/* Degradê suave por baixo da foto: o nome e o preço respiram sobre a transição para o cartão. */
.product__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}

.product__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.product:active .product__photo {
  transform: scale(1.04);
}

.product.is-chosen {
  border-color: var(--gold);
}

.product__caption {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  padding: 10px 11px 12px;
}

.product__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.product__name {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
}

.category__content--large .product__name {
  font-size: 21px;
}

/* Preço maior e a dourado (o nome fica como estava). */
.product__price {
  color: var(--gold-light, #e6c987);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.product__desc {
  display: none;
}

/* O botão «Escolher» (substitui o «+» redondo): 46 px, contorno dourado, texto dourado claro. */
.product__add {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  margin-top: 4px;
  padding: 0 12px;
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: transparent;
  color: var(--gold-light, #e6c987);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.product__add svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.product__add:active {
  background: rgba(212, 174, 104, 0.12);
}

/* O número de unidades na escolha: um selo desenhado em CSS, fora do texto do botão (não entra no
   nome acessível nem na tradução). */
.product__add[data-qtd]::before {
  content: attr(data-qtd);
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold);
  color: #140f06;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.product__add.is-chosen {
  border-color: var(--gold);
  background: var(--gold);
  color: #140f06;
}

.product__add.is-chosen[data-qtd]::before {
  background: #140f06;
  color: var(--gold-light, #e6c987);
}

.product--text {
  justify-content: space-between;
  gap: 10px;
  min-height: 100%;
  padding: 22px 22px 20px;
  border: 1px solid rgba(212, 174, 104, 0.3);
  border-radius: 14px;
  background:
    radial-gradient(90% 70% at 0% 115%, rgba(214, 92, 28, 0.22), transparent 62%),
    linear-gradient(165deg, #1d1713, #110d0b 65%);
}

.product--text:active {
  transform: scale(0.985);
}

.product--text.is-chosen {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

.product--text > .product__name {
  padding-right: 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
}

.product--text > .product__desc {
  display: block;
  color: rgba(244, 239, 230, 0.8);
  font-size: 16px;
  line-height: 1.5;
}

.product--text > .product__price {
  display: flex;
  align-items: center;
  min-height: 0;
  margin-top: auto;
  padding-right: 0;
  font-size: 24px;
}

/* No cartão sem foto o «Escolher» também ocupa a largura toda, por baixo do preço. */
.product--text > .product__add {
  position: static;
  width: 100%;
  margin-top: 6px;
}

/* Chama pequena em ouro e discreta: assinatura da casa, nao um aviso de "picante". */
.product__flame,
.thumb-flame {
  opacity: 0.6;
}

.product__flame::before,
.thumb-flame::before {
  background: var(--gold);
}

.product__flame::after,
.thumb-flame::after {
  display: none;
}

.product__flame {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 26px;
}

/* 4 pratos: duas colunas (2x2). */
@media (min-width: 600px) {
  .product-grid--pairs,
  .category__content--large .product-grid--pairs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.product__tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #e6c47e;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.next-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin-top: 56px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  text-align: left;
}

.next-category span {
  display: block;
  color: var(--muted);
  font-size: 16px;
}

.next-category strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
}

.next-category svg {
  width: 30px;
  height: 30px;
  flex: none;
  color: var(--muted);
}

/* ---------- Barra "A minha escolha" ---------- */

.list-bar {
  position: absolute;
  bottom: max(14px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100% - 24px);
  min-height: 60px;
  height: auto;
  padding: 8px 8px 8px 22px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  transform: translateX(-50%);
}

.list-bar .heart {
  background: var(--bg);
}

.list-bar__count {
  opacity: 0.6;
  font-weight: 500;
}

.list-bar__total {
  font-variant-numeric: tabular-nums;
}

.list-bar__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 4px 20px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.2;
}

/* ---------- Janelas por cima ---------- */

.overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) var(--gutter) max(20px, env(safe-area-inset-bottom));
}

.overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  animation: fade-in 200ms ease;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

.close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid rgba(244, 239, 230, 0.85);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.6);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.close-button svg {
  width: 22px;
  height: 22px;
}

.close-button--inline {
  position: static;
  border-color: transparent;
  background: none;
}

/* Procurar */

.search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 1400px;
  height: 60px;
  margin: 4px auto 0;
  padding: 0 22px;
  border: 1px solid rgba(244, 239, 230, 0.24);
  border-radius: 999px;
  background: var(--surface);
  color: rgba(244, 239, 230, 0.82);
  font-size: 18px;
  text-align: left;
}

.search-field svg {
  width: 22px;
  height: 22px;
  flex: none;
}

.search-panel {
  position: absolute;
  inset: 0;
  z-index: 19;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  animation: fade-in 160ms ease;
}

.search-panel__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) 14px;
}

.search-panel__box {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
  height: 58px;
  padding: 0 20px;
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  color: var(--muted);
}

.search-panel__box svg {
  width: 22px;
  height: 22px;
  flex: none;
}

.search-panel__box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 19px;
}

.search-panel__box input::placeholder {
  color: var(--muted);
}

.search-panel__cancel {
  height: 52px;
  padding: 0 14px;
  font-size: 17px;
  font-weight: 500;
}

.search-panel__results {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--gutter) 40px;
}

.search-panel__label {
  margin: 10px 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.search-panel__empty {
  padding: 50px 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
  text-align: center;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 12px 0;
  border-bottom: 1px solid rgba(244, 239, 230, 0.16);
  text-align: left;
}

.search-row:active {
  background: var(--surface);
}

.search-row__photo {
  width: 72px;
  height: 72px;
  flex: none;
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface);
}

.search-row__photo.search-row__photo--text,
.list-row__photo.list-row__photo--text {
  display: grid;
  place-items: center;
  border: 1px solid rgba(212, 174, 104, 0.3);
  background:
    radial-gradient(90% 70% at 0% 115%, rgba(214, 92, 28, 0.3), transparent 62%),
    linear-gradient(165deg, #1d1713, #110d0b 65%);
}

.thumb-flame {
  width: 42%;
}

.search-row__text {
  display: grid;
  flex: 1;
  gap: 3px;
  min-width: 0;
}

.search-row__name {
  font-size: 19px;
  font-weight: 600;
}

.search-row__category {
  color: var(--muted);
  font-size: 14px;
}

.search-row__price {
  flex: none;
  color: var(--gold);
  font-size: 21px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Mostrar ao empregado */

.waiter {
  position: absolute;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) var(--gutter) max(24px, env(safe-area-inset-bottom));
  overflow-y: auto;
  background: var(--text);
  color: #140f06;
  animation: fade-in 160ms ease;
}

.waiter__inner {
  display: grid;
  gap: 24px;
  width: min(900px, 100%);
}

.waiter h2 {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 600;
}

.waiter__items {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.waiter__items li {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(20, 15, 6, 0.22);
  font-size: 40px;
  line-height: 1.15;
}

.waiter__qty {
  min-width: 2.2ch;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.waiter__name {
  flex: 1;
  font-weight: 600;
}

.waiter__note {
  color: rgba(20, 15, 6, 0.8);
  font-size: 24px;
  font-weight: 600;
}

.waiter__total {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding-top: 8px;
  font-size: 24px;
  font-weight: 600;
}

.waiter__total strong {
  font-size: 44px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* V649: dois botões grandes. «Voltar para adicionar mais» (contorno) e «Concluir» (cheio); o foco continua nos pratos e no total. */
.waiter .big-button {
  min-height: 84px;
  border: 2px solid #140f06;
  background: transparent;
  color: #140f06;
  font-size: 26px;
  line-height: 1.15;
  text-align: center;
}

.waiter .waiter__concluir {
  background: #140f06;
  color: var(--text);
}

.waiter__acoes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.waiter__acoes[hidden],
.waiter__confirmar[hidden],
.waiter__chamada[hidden] {
  display: none;
}

.waiter__confirmar {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 3px solid #140f06;
  border-radius: 20px;
}

.waiter__pergunta {
  margin: 0;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.15;
}

/* V648: a chamada já seguiu (vermelho, como as outras chamadas). */
.waiter__chamada {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 14px 20px;
  border-radius: 16px;
  background: var(--call-vermelho, #a50018);
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
}

.waiter__chamada-visto {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: var(--call-vermelho, #a50018);
  font-size: 28px;
}

/* V650: «/ pessoa» a seguir ao preço (porPessoa: true no menu-data.js). */
.por-pessoa {
  font-size: 0.72em;
  font-weight: 600;
  letter-spacing: 0.01em;
  opacity: 0.9;
  white-space: nowrap;
}

/* Detalhe */

.detail {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  width: min(1200px, 100%);
  height: min(720px, 100%);
  max-height: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: var(--bg);
  animation: rise-in 240ms ease;
  touch-action: pan-y;
}

.detail.is-sliding {
  animation: none;
}

.detail__media {
  position: relative;
  overflow: hidden;
  min-height: 0;
  background: #000;
  cursor: zoom-in;
}

.detail__media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 80vh;
  object-fit: cover;
}

.detail__photo {
  animation: detail-zoom 12s ease-out forwards;
}

@keyframes detail-zoom {
  from {
    transform: scale(1.08);
  }
  to {
    transform: scale(1);
  }
}

.detail__media--text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 40px;
  background:
    radial-gradient(circle at 62% 30%, rgba(255, 210, 140, 0.95) 0 2px, rgba(255, 160, 70, 0.3) 4px, transparent 10px),
    radial-gradient(circle at 36% 44%, rgba(255, 180, 100, 0.85) 0 1.5px, rgba(255, 150, 60, 0.25) 3px, transparent 8px),
    radial-gradient(circle at 72% 54%, rgba(255, 200, 120, 0.85) 0 1.5px, rgba(255, 150, 60, 0.25) 3px, transparent 8px),
    radial-gradient(closest-side at 50% 100%, rgba(214, 92, 28, 0.45), transparent),
    linear-gradient(170deg, #1d1511, #0b0908 75%);
  cursor: default;
}

.detail__flame {
  width: min(38%, 210px);
}

/* Sem foto o texto fica a meio do painel (o botao continua em baixo). */
.detail--nophoto .detail__section {
  margin-top: auto;
}

.detail__zoom {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(244, 239, 230, 0.35);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.detail__zoom svg {
  width: 20px;
  height: 20px;
}

.detail__info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  overflow-y: auto;
  padding: 44px 40px 0;
}

.detail__position {
  display: none;
}

/* Etiqueta categoria · secao por cima do nome: diz onde estamos. */
.detail__section {
  padding-right: 56px;
  color: #e6c47e;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.detail__section:empty {
  display: none;
}

.detail__name {
  padding-right: 56px;
  font-family: var(--serif);
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 500;
  line-height: 1.08;
  text-wrap: balance;
}

.detail__price {
  color: var(--gold);
  font-size: 34px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.detail__price small {
  margin-left: 8px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 500;
}

.detail__desc {
  max-width: 46ch;
  font-size: 20px;
  line-height: 1.5;
}

.detail__note {
  max-width: 46ch;
  padding: 10px 16px;
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  background: rgba(212, 174, 104, 0.08);
  color: rgba(244, 239, 230, 0.92);
  font-size: 17px;
  line-height: 1.45;
}

.pairing__button {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.pairing__photo {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 10px;
  object-fit: cover;
}

.pairing__text {
  display: grid;
  flex: 1;
  gap: 2px;
}

.pairing__label {
  color: rgba(244, 239, 230, 0.78);
  font-size: 14px;
}

.pairing__name {
  font-size: 18px;
  font-weight: 600;
}

.pairing__price {
  color: var(--gold);
  font-size: 17px;
  font-weight: 600;
}

.pairing__button svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--muted);
}

/* O botao principal fica sempre visivel no fundo do detalhe. */
.detail__actions {
  position: sticky;
  bottom: 0;
  z-index: 1;
  margin-top: auto;
  padding: 12px 0 24px;
  background: linear-gradient(180deg, transparent, var(--bg) 14px);
}

.big-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 62px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--gold);
  color: #140f06;
  font-size: 18px;
  font-weight: 600;
}

.big-button .heart {
  background: #140f06;
}

.big-button:active {
  filter: brightness(0.92);
}

.big-button--ghost {
  border: 1px solid rgba(244, 239, 230, 0.35);
  background: none;
  color: var(--text);
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 6px;
  border: 1px solid var(--gold);
  border-radius: 999px;
}

.stepper button {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 26px;
}

.stepper__value {
  font-size: 17px;
  text-align: center;
}

.stepper__value strong {
  color: var(--gold);
  font-size: 22px;
  font-weight: 600;
}

.stepper--small {
  min-height: 0;
  padding: 3px;
  border-color: var(--line);
}

.stepper--small button {
  width: 48px;
  height: 48px;
  font-size: 24px;
}

.stepper--small .stepper__value {
  min-width: 24px;
  font-size: 17px;
  font-weight: 600;
}

.detail__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(244, 239, 230, 0.35);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.detail__nav svg {
  width: 22px;
  height: 22px;
}

.detail__nav--prev {
  left: 14px;
}

.detail__nav--next {
  left: calc(60% - 62px);
}

.detail__nav:disabled {
  opacity: 0;
  pointer-events: none;
}

/* A minha escolha */

.overlay--side {
  place-items: stretch end;
  padding: 0;
}

.list-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(540px, 100vw);
  height: 100%;
  background: var(--bg);
  animation: slide-in 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes slide-in {
  from {
    transform: translateX(100%);
  }
}

.list-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(20px, env(safe-area-inset-top)) 18px 12px 28px;
}

.list-panel__head h2 {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
}

.list-panel__items {
  padding: 0 28px;
}

.list-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.list-row__photo {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface);
}


.list-row__name {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.list-row__price {
  margin-top: 4px;
  color: rgba(244, 239, 230, 0.86);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.list-empty {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 70px 10px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
  text-align: center;
}

.list-empty .heart {
  width: 40px;
  height: 40px;
  opacity: 0.5;
}

.list-panel__foot {
  display: grid;
  gap: 12px;
  padding: 20px 28px max(22px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(212, 174, 104, 0.3);
}

.list-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 17px;
}

.list-total strong {
  color: var(--gold);
  font-size: 36px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.list-hint {
  color: rgba(244, 239, 230, 0.82);
  font-size: 16px;
  line-height: 1.45;
}

.list-waiter {
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
  text-align: center;
}

/* Avaliacao */

.review {
  position: relative;
  height: 100%;
  max-width: 100%;
  animation: rise-in 240ms ease;
}

.review img {
  display: block;
  height: 100%;
  max-width: 100%;
  border-radius: 16px;
  object-fit: contain;
}

/* Foto em ecra inteiro */

.photo-viewer {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  background: #000;
  animation: fade-in 200ms ease;
}

.photo-viewer__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
}

.photo-viewer__stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 0 0;
  user-select: none;
}

.photo-viewer__stage img.is-animating {
  transition: transform 250ms ease;
}

.photo-viewer__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px var(--gutter) max(18px, env(safe-area-inset-bottom));
}

.photo-viewer__text {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.photo-viewer__caption {
  font-size: 19px;
  font-weight: 500;
}

.photo-viewer__hint {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.photo-viewer.is-zoomed .photo-viewer__hint {
  visibility: hidden;
}

.photo-viewer__nav {
  display: grid;
  flex: none;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
}

.photo-viewer__nav svg {
  width: 24px;
  height: 24px;
}

.photo-viewer__nav:disabled {
  opacity: 0.25;
}

.photo-viewer .close-button {
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  width: 56px;
  height: 56px;
}

/* Aviso rapido */

.toast {
  position: absolute;
  bottom: calc(max(20px, env(safe-area-inset-bottom)) + 76px);
  left: 50%;
  z-index: 40;
  max-width: calc(100% - 40px);
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 15px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Tablet deitado ---------- */

@media (min-aspect-ratio: 1/1) {
  /* A foto ocupa o painel todo (antes ficava uma faixa preta de 80 px por causa do max-height: 80vh). */
  .detail__media img {
    max-height: none;
  }
}

/* ---------- Tablet na vertical ---------- */

@media (max-aspect-ratio: 1/1) {
  .detail {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(720px, 100%);
    height: auto;
  }

  .detail__media img {
    max-height: 48vh;
  }

  .detail__nav {
    top: 24vh;
    transform: none;
  }

  .detail__nav--next {
    right: 14px;
    left: auto;
  }

  .detail__info {
    padding: 28px 28px 0;
  }
}

/* ---------- Telemovel ---------- */

@media (max-width: 760px) {
  :root {
    --gutter: 16px;
  }

  .category-tile--highlight {
    min-height: 150px;
  }

  .topbar {
    min-height: 60px;
    gap: 8px;
  }

  .brand__name {
    font-size: 17px;
  }

  .pill-button__label,
  .list-bar__text {
    display: none;
  }

  .pill-button {
    padding: 0 14px;
  }

  .back-button {
    margin-right: auto;
  }

  .waiter__items li {
    font-size: 28px;
  }

  .waiter__acoes {
    grid-template-columns: 1fr;
  }

  .waiter__pergunta {
    font-size: 28px;
  }

  .category-grid,
  .product-grid,
  .category__content--large .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 12px;
  }

  /* Telemovel: a pesquisa (caixa + «Cancelar») cabe em 360 px; a caixa encolhe em vez de empurrar o botao. */
  .search-panel__box {
    min-width: 0;
    padding: 0 16px;
    gap: 10px;
  }

  .search-panel__cancel {
    flex: none;
    padding: 0 8px;
  }

  /* Telemovel: as colunas nao podem ser mais largas do que o ecra (o conteudo do cartao encolhe). */
  .product,
  .category-tile,
  .product__text,
  .product__name {
    min-width: 0;
  }

  .category-tile__name,
  .product__name,
  .category__content--large .product__name {
    font-size: 15px;
  }

  .product__price {
    font-size: 21px;
  }

  /* Telemóvel: o «Escolher» continua a ocupar a largura do cartão (46 px de altura). */
  .product__add {
    width: 100%;
    min-height: 46px;
  }

  .welcome__start {
    height: 54px;
    padding: 0 26px;
    font-size: 15px;
  }

  .detail__info {
    padding: 20px 20px 0;
  }

  /* Telemovel: o prato abre no ecra todo. */
  #detail.overlay {
    padding: 0;
  }

  .detail {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .detail__media img {
    max-height: 40vh;
    aspect-ratio: 4 / 3;
  }

  .detail__nav {
    top: 20vh;
  }

  .detail .close-button {
    top: max(14px, env(safe-area-inset-top));
  }

  .detail__name {
    font-size: 30px;
  }

  .detail__desc {
    font-size: 17px;
  }

  .detail__actions {
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }

  .list-bar {
    gap: 10px;
    padding-left: 18px;
  }
}

/* ---------- Animacoes leves (so transform e opacity, curtas) ---------- */

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* Entrada escalonada dos cartoes: os 8 primeiros, 35 ms de intervalo. */
.category__content .product {
  animation: card-in 280ms cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  animation-delay: calc(min(var(--i, 0), 8) * 35ms);
}

/* O estalo so acontece quando o + passa a escolhido. */
@keyframes pop {
  40% {
    transform: scale(1.22);
  }
}

.product__add.is-chosen {
  animation: pop 320ms ease;
}

/* A barra "A minha escolha" sobe ao aparecer. */
@keyframes bar-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(18px);
  }
}

.list-bar:not([hidden]):not(.is-bumping) {
  animation: bar-in 260ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Resposta ao toque nos quadrados e nos cartoes de texto. */
.category-tile,
.product--text {
  transition: transform 160ms ease;
}

.category-tile:active {
  transform: scale(0.985);
}

/* A chama do destaque e a do detalhe sem foto tremem de leve. */
@keyframes flicker {
  50% {
    opacity: 0.88;
    transform: scale(1.045) translateY(-1.5%);
  }
}

.category-tile--highlight .category-tile__flame,
.detail__flame {
  transform-origin: 50% 90%;
  animation: flicker 2.8s ease-in-out infinite;
}

/* Ecras escondidos nao gastam bateria: as animacoes infinitas param. */
.screen:not(.is-active) .category-tile__flame {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.topbar--category .back-button {
  margin-right: auto;
}

/* Prato com imagem gerada (photoIA): linha discreta no detalhe. */
.detail__ia {
  margin: 6px 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted, rgba(244, 233, 214, 0.62));
  font-style: italic;
}

.detail__ia[hidden] {
  display: none;
}

/* V676M: «A enviar…» e o indicador de rede na linha da chamada do «Mostrar ao colaborador». */
.waiter__chamada-corpo {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.waiter__chamada-rede {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
}

.waiter__chamada-rede[hidden] {
  display: none;
}

/* ---------- Cardápio 22/11: tablet com 3 pratos por linha ---------- */

/* A partir de 900 px — o tablet — a grelha passa a 3 colunas iguais. O telemóvel fica com 2
   (a regra dos 760 px acima). O `--pairs` também passa a 3: manda o desenho, não o número de pratos. */
@media (min-width: 900px) {
  .product-grid,
  .category__content--large .product-grid,
  .product-grid--pairs,
  .category__content--large .product-grid--pairs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .category__scroll {
    padding-bottom: 100px;
  }
}
