/* Cardápio público — o que o cliente da hamburgueria vê no celular */

body {
  background: var(--papel);
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

.carregando {
  display: grid;
  place-items: center;
  min-height: 70vh;
  color: var(--carvao-suave);
}

/* ---------- Capa: o nome da loja como letreiro ---------- */

.capa-letreiro {
  padding: 28px 16px 26px;
  background: var(--brand);
  color: var(--brand-tinta);
}

.capa-letreiro > * {
  max-width: 1120px;
  margin-inline: auto;
}

.capa-marca {
  margin-bottom: 18px;
}

.logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--papel);
  box-shadow: 0 0 0 3px var(--brand-tinta);
}

.logo-iniciais {
  display: grid;
  place-items: center;
  background: var(--brand-tinta);
  color: var(--brand);
  font-weight: 900;
  font-stretch: 125%;
  font-size: 1.6rem;
}

#nome-loja {
  font-size: min(clamp(2.4rem, 11vw, 5.25rem), calc(88vw / (var(--palavra, 8) * 0.8)));
  overflow-wrap: anywhere;
}

.capa-descricao {
  max-width: 1120px;
  margin-top: 12px;
}

.capa-descricao span {
  display: block;
  max-width: 56ch;
  opacity: 0.92;
}

.capa-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  max-width: 1152px;
  margin: 0 auto;
  padding: 14px 16px;
  border-bottom: 1px solid var(--linha);
  font-size: var(--t-s);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 10px;
  border-radius: 999px;
  background: #e9f2dd;
  color: var(--picles);
  font-weight: 700;
}

.status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.status.fechado {
  background: #f1ece6;
  color: var(--carvao-suave);
}

.info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--carvao-suave);
}

.info li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.horarios summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.horarios ul {
  display: grid;
  gap: 2px;
  margin: 8px 0 0;
  padding: 0 0 0 24px;
  list-style: none;
  color: var(--carvao);
}

.promocoes {
  display: grid;
  gap: 10px;
  max-width: 1120px;
  margin: 16px auto 0;
}

.promocao {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 2px dashed var(--brand);
  border-radius: var(--raio);
  background: color-mix(in srgb, var(--brand) 8%, white);
}

.promocao .icone {
  flex: none;
  color: var(--brand);
  margin-top: 2px;
}

.promocao .icone svg {
  width: 22px;
  height: 22px;
}

.promocao strong {
  display: block;
  font-size: var(--t-m);
  font-weight: 800;
}

.promocao p {
  margin-top: 2px;
  color: var(--carvao-suave);
  font-size: var(--t-s);
}

@media (max-width: 1151px) {
  .promocoes {
    margin-inline: 16px;
  }
}

.aviso-fechado,
.aviso-exemplo {
  max-width: 1120px;
  margin: 14px auto 0;
  padding: 12px 16px;
  border-radius: var(--raio);
  font-size: var(--t-s);
}

.aviso-fechado {
  background: #f1ece6;
  font-weight: 600;
}

.aviso-exemplo {
  background: #fff4cf;
}

@media (max-width: 1151px) {
  .aviso-fechado,
  .aviso-exemplo {
    margin-inline: 16px;
  }
}

/* ---------- Estrutura ---------- */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 16px;
}

.lateral {
  display: none;
}

@media (min-width: 1000px) {
  body {
    padding-bottom: 40px;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
  }

  .lateral {
    display: block;
    padding-top: 24px;
  }

  .lateral-fixa {
    position: sticky;
    top: 24px;
  }

  .barra-pedido {
    display: none !important;
  }
}

/* ---------- Busca e categorias ---------- */

.ferramentas {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 -16px;
  padding: 14px 16px 10px;
  background: rgb(255 255 255 / 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--linha);
}

.busca input {
  width: 100%;
  min-height: 46px;
  padding: 0.55em 0.9em 0.55em 2.6em;
  border: 1.5px solid var(--linha-forte);
  border-radius: 12px;
  background: var(--fundo) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d5b50' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M20 20l-4.2-4.2'/%3E%3C/svg%3E") no-repeat 0.85em center / 1.1em;
  font-size: 1rem;
}

.busca input:focus {
  border-color: var(--carvao);
  background-color: var(--papel);
  outline: 3px solid rgb(255 199 44 / 0.7);
  outline-offset: 0;
}

.chips {
  display: flex;
  gap: 8px;
  margin: 10px -16px 0;
  padding: 0 16px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.chips a {
  flex: none;
  padding: 7px 14px;
  border: 1.5px solid var(--linha-forte);
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--t-s);
  text-decoration: none;
  white-space: nowrap;
}

.chips a[aria-current='true'] {
  border-color: var(--carvao);
  background: var(--carvao);
  color: #fff;
}

/* ---------- Seções e produtos ---------- */

.secao {
  padding-top: 28px;
  scroll-margin-top: 120px;
}

.secao h2 {
  margin-bottom: 4px;
  font-size: clamp(1.4rem, 7vw, 1.875rem);
  overflow-wrap: anywhere;
  font-stretch: 125%;
  font-weight: 900;
}

.produtos {
  margin: 0;
  padding: 0;
  list-style: none;
}

.produto {
  border-bottom: 1px solid var(--linha);
}

.produto button.abrir {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  width: 100%;
  padding: 18px 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.produto button.abrir:hover .produto-nome {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.produto-texto {
  display: grid;
  align-content: start;
  gap: 4px;
}

.produto-nome {
  font-weight: 700;
  font-size: var(--t-m);
}

.produto-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--carvao-suave);
  font-size: var(--t-s);
}

.produto-preco {
  margin-top: 4px;
  font-weight: 800;
}

.produto-preco small {
  color: var(--carvao-suave);
  font-weight: 500;
  font-size: var(--t-xs);
}

.foto {
  position: relative;
  width: 104px;
  height: 104px;
  border-radius: var(--raio);
  overflow: hidden;
  background: color-mix(in srgb, var(--brand) 12%, white);
}

.foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.foto .icone {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: color-mix(in srgb, var(--brand) 55%, white);
}

.foto .icone svg {
  width: 44%;
  height: 44%;
}

.foto-mais {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--brand-tinta);
  box-shadow: 0 2px 0 var(--brand-funda);
}

.foto-mais svg {
  width: 18px;
  height: 18px;
}

.produto.esgotado .foto img,
.produto.esgotado .foto .icone {
  filter: grayscale(1);
  opacity: 0.5;
}

.selo {
  display: inline-block;
  justify-self: start;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f1ece6;
  color: var(--carvao-suave);
  font-size: var(--t-xs);
  font-weight: 700;
}

/* Destaques: faixa horizontal com fotos maiores */
.destaques {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 240px);
  gap: 14px;
  margin: 10px -16px 0;
  padding: 0 16px 6px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.destaque {
  scroll-snap-align: start;
}

.destaque button {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.destaque .foto {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
}

.destaque .produto-nome {
  font-size: var(--t-m);
}

.vazio {
  padding: 48px 0;
  color: var(--carvao-suave);
  text-align: center;
}

/* ---------- Comanda (pedido) ---------- */

.comanda-sombra {
  filter: drop-shadow(0 10px 18px rgb(43 26 18 / 0.16)) drop-shadow(0 1px 1px rgb(43 26 18 / 0.12));
}

.comanda {
  --dente: 7px;
  padding: 26px 22px 30px;
  background: #fffdf8;
  font-stretch: 75%;
  font-size: var(--t-m);
  -webkit-mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--dente)) 51% repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(2 * var(--dente)) 51% repeat-x;
  mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--dente)) 51% repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(2 * var(--dente)) 51% repeat-x;
}

.comanda-topo {
  padding-bottom: 12px;
  border-bottom: 2px dashed var(--linha-forte);
  text-align: center;
}

.comanda-topo strong {
  display: block;
  font-size: var(--t-l);
  font-weight: 900;
  font-stretch: 100%;
  line-height: 1.1;
}

.comanda-topo span {
  color: var(--carvao-suave);
  font-size: var(--t-s);
}

.comanda-itens {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px 0;
  list-style: none;
  border-bottom: 2px dashed var(--linha-forte);
}

.linha {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.linha .pontos {
  flex: 1;
  min-width: 16px;
  border-bottom: 2px dotted var(--linha-forte);
  transform: translateY(-5px);
}

.linha .valor {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.item-extra {
  margin-top: 2px;
  padding-left: 1.6em;
  color: var(--carvao-suave);
  font-size: var(--t-s);
}

.item-qtd {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding-left: 1.6em;
  font-stretch: 100%;
}

.item-qtd button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1.5px solid var(--linha-forte);
  border-radius: 8px;
  background: var(--papel);
  cursor: pointer;
}

.item-qtd button svg {
  width: 16px;
  height: 16px;
}

.item-qtd output {
  min-width: 2ch;
  text-align: center;
  font-weight: 700;
}

.comanda-totais {
  display: grid;
  gap: 4px;
  padding-top: 14px;
}

.comanda-totais .total {
  margin-top: 6px;
  font-size: var(--t-l);
  font-weight: 800;
}

.comanda-promos {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 12px 0 0;
  border-top: 2px dashed var(--linha-forte);
  list-style: none;
  font-stretch: 100%;
  font-size: var(--t-s);
}

.comanda-promos li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.comanda-promos .icone {
  flex: none;
  margin-top: 2px;
  color: var(--brand);
}

.comanda-promos strong {
  font-weight: 800;
}

.comanda-vazia {
  padding: 22px 0 8px;
  color: var(--carvao-suave);
  text-align: center;
}

.comanda-acao {
  margin-top: 16px;
}

.comanda-acao .btn {
  width: 100%;
}

.comanda-nota {
  margin-top: 10px;
  color: var(--carvao-suave);
  font-size: var(--t-xs);
  text-align: center;
}

/* ---------- Barra do pedido (celular) ---------- */

.aviso {
  bottom: calc(86px + env(safe-area-inset-bottom));
}

@media (min-width: 1000px) {
  .aviso {
    bottom: 24px;
  }
}

.barra-pedido {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 0 20px;
  border: 0;
  border-radius: 16px;
  background: var(--brand);
  color: var(--brand-tinta);
  font-weight: 800;
  font-size: var(--t-m);
  box-shadow: 0 4px 0 var(--brand-funda), 0 16px 32px -12px rgb(43 26 18 / 0.5);
  cursor: pointer;
}

.barra-pedido .qtd {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  margin-right: 10px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--brand-tinta);
  color: var(--brand);
  font-size: var(--t-s);
}

/* ---------- Diálogo do produto ---------- */

.dlg-produto {
  width: min(520px, calc(100vw - 16px));
}

.dlg-produto form {
  display: grid;
}

.produto-capa {
  position: relative;
}

.produto-capa .foto {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  border-radius: 0;
}

.produto-capa .fechar {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--papel);
  box-shadow: var(--sombra);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.produto-capa .fechar svg {
  width: 20px;
  height: 20px;
}

.produto-info {
  display: grid;
  gap: 8px;
  padding: 20px 20px 4px;
}

.produto-info h2 {
  font-size: var(--t-xl);
  font-stretch: 112%;
  font-weight: 900;
}

.produto-info p {
  color: var(--carvao-suave);
}

.grupo {
  margin: 0;
  padding: 16px 20px 0;
  border: 0;
}

.grupo legend {
  padding: 0;
  margin-bottom: 8px;
  font-weight: 700;
}

.opcoes {
  display: grid;
  border: 1.5px solid var(--linha);
  border-radius: var(--raio);
  overflow: hidden;
}

.opcao {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 14px;
  cursor: pointer;
}

.opcao + .opcao {
  border-top: 1px solid var(--linha);
}

.opcao:has(input:checked) {
  background: #fff8e1;
}

.opcao input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--carvao);
}

.opcao span:nth-of-type(1) {
  flex: 1;
}

.opcao .valor {
  color: var(--carvao-suave);
  font-variant-numeric: tabular-nums;
}

.rodape-dialogo {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--linha);
  background: var(--papel);
}

.qtd-seletor {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--linha-forte);
  border-radius: 12px;
}

.qtd-seletor button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 50px;
  border: 0;
  background: none;
  cursor: pointer;
}

.qtd-seletor button svg {
  width: 18px;
  height: 18px;
}

.qtd-seletor output {
  min-width: 2ch;
  text-align: center;
  font-weight: 800;
}

.rodape-dialogo .btn {
  flex: 1;
  justify-content: space-between;
}

/* ---------- Diálogo de fechar pedido ---------- */

.dlg-pedido {
  width: min(560px, 100vw);
  background: var(--fundo);
}

@media (max-width: 640px) {
  .dlg-pedido {
    width: 100vw;
    max-width: 100vw;
    max-height: 100dvh;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
}

.dlg-pedido .dialogo-topo {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--fundo);
}

.dlg-pedido .dialogo-topo h2 {
  font-size: var(--t-l);
  font-stretch: 112%;
  font-weight: 900;
}

.checkout {
  display: grid;
  gap: 22px;
  padding: 0 16px 16px;
}

.checkout form {
  display: grid;
  gap: 18px;
}

.segmento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: #e8e3dc;
}

.segmento label {
  display: grid;
  place-items: center;
  min-height: 46px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.segmento input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmento label:has(input:checked) {
  background: var(--papel);
  box-shadow: 0 1px 3px rgb(43 26 18 / 0.18);
}

.segmento label:has(input:focus-visible) {
  outline: 3px solid var(--carvao);
}

.checkout .opcoes {
  background: var(--papel);
}

.checkout .grupo {
  padding: 0;
}

.enviar {
  position: sticky;
  bottom: 0;
  margin: 0 -16px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--fundo);
  border-top: 1px solid var(--linha);
}

.enviar .btn {
  width: 100%;
}

.sucesso {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 8px 16px 24px;
}

.sucesso h3 {
  font-size: var(--t-xl);
  font-stretch: 112%;
  font-weight: 900;
}

.sucesso .btn {
  white-space: normal;
  text-align: center;
}

.mensagem-previa {
  margin: 0;
  padding: 16px;
  border-radius: var(--raio);
  background: #dcf8c6;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: var(--t-s);
  line-height: 1.45;
}

/* ---------- Rodapé ---------- */

.rodape {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  max-width: 1152px;
  margin: 48px auto 0;
  padding: 24px 16px;
  border-top: 1px solid var(--linha);
  color: var(--carvao-suave);
  font-size: var(--t-s);
}

.rodape a {
  font-weight: 600;
}
