/* Cardápio do cliente. Storefront claro por padrão, cor puxada da marca da loja.
   Vitrine — não é ferramenta de operação como o painel; aqui o alvo é o celular. */

:root {
  --marca: #f97316;
  --marca-escura: #c2560c;
  --marca-clara: #fff2e8;

  --fundo:      #f7f7f8;
  --superficie: #ffffff;
  --borda:      #e6e6ea;
  --texto:      #1a1a1f;
  --texto-suave:#6b6b76;
  --texto-fraco:#9a9aa4;

  --ok:     #16a34a;
  --alerta: #d97706;
  --erro:   #dc2626;

  --r-g: 18px;
  --r-m: 13px;
  --r-p: 9px;
  --sombra: 0 6px 24px rgb(0 0 0 / .10);
  --sombra-forte: 0 12px 40px rgb(0 0 0 / .22);

  --fonte: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --largura: 720px;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--fundo);
  color: var(--texto);
  font-family: var(--fonte);
  -webkit-text-size-adjust: 100%;
}

[hidden] { display: none !important; }

img { max-width: 100%; display: block; }

/* ------------------------------------------------------------ telas cheias */

.tela-cheia {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
  color: var(--texto-suave);
}

.girando {
  width: 38px; height: 38px;
  border: 3px solid var(--borda);
  border-top-color: var(--marca);
  border-radius: 50%;
  animation: girar .8s linear infinite;
}
@keyframes girar { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) { .girando { animation: none; } }

.erro-grande { font-size: 20px; font-weight: 600; color: var(--texto); }

/* ------------------------------------------------------------------- botões */

.botao {
  font: inherit;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--r-p);
  padding: 14px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.botao--principal { background: var(--marca); color: #fff; }
.botao--principal:active { background: var(--marca-escura); }
.botao--sec { background: var(--superficie); border-color: var(--borda); color: var(--texto); }
.botao:disabled { opacity: .5; cursor: default; }
.botao--largo { width: 100%; }

/* -------------------------------------------------------------------- topo */

.topo {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--superficie);
  border-bottom: 1px solid var(--borda);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.topo__marca { display: flex; align-items: center; gap: 12px; min-width: 0; }

.topo__logo {
  width: 46px; height: 46px;
  border-radius: 12px;
  object-fit: cover;
}

.topo__nome {
  margin: 0;
  font-size: 19px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selo {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  margin-top: 3px;
}
.selo--aberta { background: color-mix(in oklab, var(--ok) 15%, transparent); color: var(--ok); }
.selo--fechada { background: color-mix(in oklab, var(--erro) 12%, transparent); color: var(--erro); }

.banner-mesa {
  background: var(--marca);
  color: #fff;
  text-align: center;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
}

.carrinho-botao {
  margin-left: auto;
  position: relative;
  font: inherit;
  font-size: 20px;
  background: var(--marca-clara);
  border: 0;
  border-radius: 12px;
  width: 48px; height: 48px;
  cursor: pointer;
  flex: none;
}

.carrinho-botao__contador {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 22px; height: 22px;
  padding: 0 6px;
  background: var(--marca);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  display: grid;
  place-items: center;
}

/* ------------------------------------------------------------- categorias */

.categorias {
  position: sticky;
  top: 76px;
  z-index: 9;
  background: var(--fundo);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px;
  scrollbar-width: none;
}
.categorias::-webkit-scrollbar { display: none; }

.cat-chip {
  flex: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--borda);
  background: var(--superficie);
  color: var(--texto-suave);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.cat-chip[aria-current="true"] { background: var(--marca); border-color: var(--marca); color: #fff; }

/* -------------------------------------------------------------- catálogo */

.catalogo {
  max-width: var(--largura);
  margin: 0 auto;
  padding: 8px 16px 96px;
}

.secao { scroll-margin-top: 130px; }

.secao__titulo {
  font-size: 15px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--texto-fraco);
  margin: 26px 0 12px;
}

.item {
  display: flex;
  gap: 14px;
  align-items: stretch;
  background: var(--superficie);
  border: 1px solid var(--borda);
  border-radius: var(--r-m);
  padding: 14px;
  margin-bottom: 12px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
}
.item:active { border-color: var(--marca); }

.item__texto { flex: 1; min-width: 0; }

.item__nome { font-weight: 700; font-size: 16px; }

.item__descricao {
  color: var(--texto-suave);
  font-size: 14px;
  margin: 4px 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item__preco { font-weight: 700; color: var(--marca-escura); }

.item__foto {
  width: 96px;
  flex: none;
  align-self: center;
  aspect-ratio: 1;
  border-radius: 10px;
  object-fit: cover;
  background: var(--marca-clara);
}

.item__mais {
  align-self: flex-end;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--marca-clara);
  color: var(--marca-escura);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
  flex: none;
}

/* ------------------------------------------------------------------ modal */

.modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: end center; }
.modal__fundo { position: absolute; inset: 0; background: rgb(0 0 0 / .45); }

.modal__caixa {
  position: relative;
  width: min(var(--largura), 100%);
  max-height: 92dvh;
  background: var(--superficie);
  border-radius: var(--r-g) var(--r-g) 0 0;
  display: grid;
  grid-template-rows: 1fr auto;
  box-shadow: var(--sombra-forte);
  animation: subir .22s ease;
}
@keyframes subir { from { translate: 0 40px; opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .modal__caixa { animation: none; } }

.modal__x {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 2;
  width: 34px; height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--fundo);
  color: var(--texto-suave);
  font-size: 15px;
  cursor: pointer;
}

.mi-corpo { overflow-y: auto; padding: 22px 20px 12px; }
.mi-nome { margin: 0 30px 6px 0; font-size: 21px; }
.mi-descricao { color: var(--texto-suave); margin: 0 0 16px; }

.grupo { border-top: 1px solid var(--borda); padding: 14px 0; }
.grupo__cabeca { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.grupo__nome { font-weight: 700; }
.grupo__regra { font-size: 12px; color: var(--texto-fraco); }

.opcao {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  cursor: pointer;
}
.opcao input { width: 20px; height: 20px; accent-color: var(--marca); flex: none; }
.opcao__nome { flex: 1; }
.opcao__preco { color: var(--texto-suave); font-size: 14px; }

.campo { display: grid; gap: 6px; margin-top: 8px; }
.campo__rotulo { font-size: 13px; font-weight: 600; color: var(--texto-suave); }
.campo input, .campo select, .campo textarea {
  font: inherit;
  padding: 12px 13px;
  border: 1px solid var(--borda);
  border-radius: var(--r-p);
  background: var(--superficie);
  color: var(--texto);
  width: 100%;
}
.campo input:focus-visible, .campo select:focus-visible, .campo textarea:focus-visible {
  outline: 2px solid var(--marca); outline-offset: 1px;
}

.mi-rodape {
  display: flex;
  gap: 12px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--borda);
}

.quantidade {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--borda);
  border-radius: var(--r-p);
  padding: 4px;
  flex: none;
}
.quantidade button {
  width: 40px; height: 40px;
  border: 0;
  background: var(--fundo);
  border-radius: 7px;
  font-size: 20px;
  cursor: pointer;
  color: var(--texto);
}
.quantidade span { min-width: 30px; text-align: center; font-weight: 700; }

.mi-rodape .botao { flex: 1; }

/* ----------------------------------------------------------------- gaveta */

.gaveta { position: fixed; inset: 0; z-index: 40; }
.gaveta__fundo { position: absolute; inset: 0; background: rgb(0 0 0 / .45); }

.gaveta__painel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(460px, 100%);
  background: var(--fundo);
  display: grid;
  grid-template-rows: auto 1fr auto;
  box-shadow: var(--sombra-forte);
  animation: entrar .22s ease;
}
@keyframes entrar { from { translate: 40px 0; opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .gaveta__painel { animation: none; } }

.gaveta__topo {
  display: flex;
  align-items: center;
  padding: 16px 18px;
  background: var(--superficie);
  border-bottom: 1px solid var(--borda);
}
.gaveta__topo h2 { margin: 0; font-size: 18px; }
.gaveta__topo .modal__x { position: static; margin-left: auto; }

.gaveta__corpo { overflow-y: auto; padding: 16px 18px; }
.gaveta__rodape {
  padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
  background: var(--superficie);
  border-top: 1px solid var(--borda);
  display: grid;
  gap: 10px;
}

.linha-carrinho {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--borda);
}
.linha-carrinho__qtd { font-weight: 700; color: var(--marca-escura); }
.linha-carrinho__texto { flex: 1; min-width: 0; }
.linha-carrinho__nome { font-weight: 600; }
.linha-carrinho__opcoes, .linha-carrinho__obs {
  font-size: 13px; color: var(--texto-suave); margin-top: 2px;
}
.linha-carrinho__preco { font-weight: 600; white-space: nowrap; }
.linha-carrinho__remover {
  border: 0; background: none; color: var(--erro);
  font-size: 13px; cursor: pointer; padding: 4px 0; margin-top: 2px;
}

.vazio-carrinho { text-align: center; color: var(--texto-fraco); padding: 40px 0; }

.resumo { display: grid; gap: 6px; margin: 4px 0; }
.resumo__linha { display: flex; justify-content: space-between; font-size: 14px; color: var(--texto-suave); }
.resumo__linha--total { font-size: 18px; font-weight: 700; color: var(--texto); margin-top: 4px; }

.opcoes-tipo { display: flex; gap: 8px; margin-bottom: 4px; }
.opcoes-tipo button {
  flex: 1;
  font: inherit; font-weight: 600;
  padding: 11px;
  border: 1px solid var(--borda);
  background: var(--superficie);
  border-radius: var(--r-p);
  cursor: pointer;
  color: var(--texto-suave);
}
.opcoes-tipo button[aria-pressed="true"] {
  background: var(--marca-clara); border-color: var(--marca); color: var(--marca-escura);
}

.dica { font-size: 13px; color: var(--texto-suave); }
.dica--erro { color: var(--erro); }

/* --------------------------------------------------------------- acompanhar */

.acompanhar {
  max-width: 420px;
  width: 100%;
  background: var(--superficie);
  border: 1px solid var(--borda);
  border-radius: var(--r-g);
  padding: 28px 24px;
  text-align: left;
  box-shadow: var(--sombra);
}
.acompanhar__loja { font-size: 13px; color: var(--texto-fraco); text-transform: uppercase; letter-spacing: .06em; }
.acompanhar__codigo { margin: 6px 0 22px; font-size: 30px; color: var(--marca-escura); }

.trilha { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.trilha__passo {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  color: var(--texto-fraco);
}
.trilha__bolinha {
  width: 26px; height: 26px; flex: none;
  border-radius: 50%;
  border: 2px solid var(--borda);
  display: grid; place-items: center;
  font-size: 13px;
}
.trilha__passo--feito { color: var(--texto); }
.trilha__passo--feito .trilha__bolinha { background: var(--ok); border-color: var(--ok); color: #fff; }
.trilha__passo--atual { color: var(--texto); font-weight: 700; }
.trilha__passo--atual .trilha__bolinha { border-color: var(--marca); color: var(--marca); }

.acompanhar__rodape { color: var(--texto-suave); font-size: 14px; margin: 18px 0; }

/* ------------------------------------------------------------------ avisos */

.avisos {
  position: fixed;
  bottom: 16px; left: 50%;
  translate: -50% 0;
  z-index: 60;
  display: grid; gap: 8px;
  width: min(420px, calc(100% - 32px));
}
.aviso {
  background: var(--texto);
  color: #fff;
  border-radius: var(--r-p);
  padding: 12px 16px;
  font-size: 14px;
  box-shadow: var(--sombra);
}
.aviso--erro { background: var(--erro); }
.aviso--ok { background: var(--ok); }

/* ------------------------------------------------------------------- dark */

@media (prefers-color-scheme: dark) {
  :root {
    --fundo:      #0f0f12;
    --superficie: #17171b;
    --borda:      #2a2a31;
    --texto:      #f4f4f5;
    --texto-suave:#a1a1aa;
    --texto-fraco:#71717a;
    --marca-clara: color-mix(in oklab, var(--marca) 22%, #17171b);
  }
  .aviso { background: #2a2a31; }
}

/* --------------------------------------------------- acompanhamentos do dia */

.acomp { margin-top: 18px; border-top: 1px solid var(--borda); padding-top: 14px; }
.acomp__titulo { font-size: 15px; margin: 0 0 8px; }
.acomp__lista { margin-bottom: 10px; }
.acomp__lista-nome { font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--texto-fraco); margin: 6px 0; }
.acomp__item { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.acomp__nome { flex: 1; font-size: 14px; }
.acomp__preco { font-size: 13px; color: var(--texto-suave); white-space: nowrap; }
.acomp__stepper { display: inline-flex; align-items: center; gap: 8px; }
.acomp__stepper button {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--borda);
  background: var(--superficie); color: var(--texto); font-size: 17px; line-height: 1;
  cursor: pointer;
}
.acomp__stepper button:active { background: var(--marca-clara); }
.acomp__stepper [data-qtd] { min-width: 16px; text-align: center; font-variant-numeric: tabular-nums; }
