/* App do cliente — telefone primeiro */
body { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
#app { max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* Navegação em pílula flutuante */
.topo {
  position: sticky; top: calc(10px + env(safe-area-inset-top)); z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 688px; margin: 10px auto 14px; padding: 0.45rem 0.5rem 0.45rem 1rem;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(12px);
  border: 1px solid var(--linha); border-radius: 24px; box-shadow: var(--sombra);
}
@media (max-width: 720px) { .topo { margin: 10px 12px 14px; } }
.topo .marca { font-size: 1.05rem; }
.topo-nav { display: flex; gap: 0.25rem; }
.topo-nav a { color: var(--tinta); font-weight: 500; font-size: 0.875rem; text-decoration: none; padding: 0.45rem 0.85rem; border-radius: 999px; }
.topo-nav a:hover { background: var(--superficie); }
.topo-nav a:last-child { background: var(--tinta); color: #fff; }

/* Capa da cidade: bloco escuro com degradê e grade fina */
.cidade {
  position: relative; overflow: hidden; color: #fff; text-align: center;
  border-radius: 24px; padding: 3.2rem 1.25rem 2.4rem; margin-bottom: 1rem;
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0 / 100% 32px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0 / 32px 100%,
    linear-gradient(180deg, #80bfef 0%, #44a4e9 18%, #1095e5 34%, #1046e9 52%, #061db6 70%, #0f071d 100%);
}
.cidade::after { content: ''; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(transparent, rgba(15, 7, 29, 0.55)); pointer-events: none; }
.cidade > * { position: relative; z-index: 1; }
.cidade h1 { font-size: clamp(2.8rem, 12vw, 4.6rem); line-height: 1.02; color: #fff; margin: 0; letter-spacing: -0.03em; font-weight: 500; }
.cidade h1 small { font: 500 0.75rem var(--f-mono); letter-spacing: 0.03em; color: rgba(255, 255, 255, 0.85); vertical-align: super; margin-left: 0.4em; }
.entregar-em {
  display: inline-block; max-width: 100%; margin-top: 1.2rem; line-height: 1.4;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 999px;
  padding: 0.5rem 1rem; font: 400 0.875rem var(--f-texto); color: rgba(255, 255, 255, 0.92); cursor: pointer;
}
.entregar-em:hover { background: rgba(255, 255, 255, 0.2); }
.entregar-em b { color: #fff; font-weight: 600; }

/* Escolha da cidade */
.cidade-escolha { padding: 2.6rem 1.25rem 2.1rem; }
.cidade-escolha h1 { font-size: clamp(2.3rem, 10vw, 3.6rem); }
.ce-rotulo { display: inline-block; margin-bottom: 0.9rem; font: 500 0.6875rem var(--f-mono); letter-spacing: 0.04em; text-transform: uppercase; color: rgba(255, 255, 255, 0.8); }
.cidade-escolha p { margin: 0.7rem auto 0; max-width: 30ch; color: rgba(255, 255, 255, 0.86); font-size: 0.9375rem; line-height: 1.45; }
.entregar-em.perto { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 500; color: #fff; }
.entregar-em.perto svg { width: 16px; height: 16px; }
.entregar-em.perto:disabled { opacity: 0.7; cursor: progress; }
.trocar-cidade {
  display: inline-flex; align-items: center; gap: 0.35rem; margin-bottom: 0.9rem; padding: 0.3rem 0.75rem 0.3rem 0.6rem;
  border-radius: 999px; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff; font: 500 0.75rem var(--f-texto); text-decoration: none;
}
.trocar-cidade:hover { background: rgba(255, 255, 255, 0.22); text-decoration: none; }
.trocar-cidade svg { width: 14px; height: 14px; }

.cidades { list-style: none; margin: 0 0 1.5rem; padding: 0; background: #fff; border: 1px solid var(--linha); border-radius: 20px; overflow: hidden; box-shadow: var(--anel); }
.cidades > li + li { border-top: 1px solid var(--linha); }
.cidade-item, .convite {
  display: flex; align-items: center; gap: 0.9rem; width: 100%; padding: 0.85rem 1rem; border: 0; background: none;
  text-align: left; cursor: pointer; font: inherit; color: var(--tinta); text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.cidade-item:hover, .cidade-item:focus-visible { background: var(--superficie); outline: none; }
.cidade-item:active { background: #efeff1; }
.ci-letra {
  flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff;
  font: 500 1.25rem var(--f-titulo); letter-spacing: -0.02em;
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0 / 100% 9px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0 / 9px 100%,
    linear-gradient(180deg, #44a4e9 0%, #1046e9 55%, #0f071d 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.ci-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.ci-txt b { font: 500 1.0625rem var(--f-titulo); letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-txt span { font-size: 0.8125rem; color: var(--cinza); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-tag { flex: none; font: 500 0.625rem var(--f-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--azul); background: var(--lavanda); padding: 0.18rem 0.5rem; border-radius: 999px; }
.ci-seta { flex: none; display: grid; place-items: center; color: var(--cinza-2); }
.ci-seta svg { width: 18px; height: 18px; }
.ci-vazio { padding: 1rem; color: var(--cinza); font-size: 0.875rem; }

.convites-rotulo { margin: 0 0 0.6rem 0.25rem; font: 500 0.6875rem var(--f-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--cinza); }
.convites { display: grid; grid-template-columns: 1fr; gap: 0.6rem; }
@media (min-width: 560px) { .convites { grid-template-columns: 1fr 1fr; } }
.convite { border: 1px solid var(--linha); border-radius: 18px; background: #fff; box-shadow: var(--anel); }
.convite:hover { background: var(--superficie); text-decoration: none; }
.cv-ic { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--superficie); color: var(--tinta); box-shadow: inset 0 0 0 1px var(--linha); }
.cv-ic svg { width: 20px; height: 20px; }

.busca { margin: 0 0 0.75rem; }
.busca input { border-radius: 999px; padding-left: 1.1rem; background: var(--superficie); }
.chips { display: flex; gap: 0.4rem; overflow-x: auto; padding: 0.1rem 0 0.9rem; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--linha); background: #fff; border-radius: 999px; padding: 0.4rem 0.95rem; font: 500 0.8125rem var(--f-texto); color: var(--tinta); cursor: pointer; }
.chip:hover { border-color: var(--nevoa); }
.chip[aria-pressed='true'] { background: var(--tinta); border-color: var(--tinta); color: #fff; }

.lojas > li > a { display: flex; gap: 0.9rem; align-items: center; padding: 0.9rem 0.25rem; color: inherit; text-decoration: none; border-radius: 14px; }
.lojas > li > a:hover { background: var(--superficie); }
.lojas .logo, .logo-loja { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; flex: none; background: var(--lavanda); border: 1px solid #cfdcff; display: grid; place-items: center; font: 500 1.35rem var(--f-titulo); color: var(--azul); }
.lojas h3 { margin: 0 0 0.1rem; font-size: 1.0625rem; }
.lojas .info { color: var(--cinza); font-size: 0.875rem; }
.lojas li.fechada a { opacity: 0.5; }
.estrela { color: var(--tinta); font-weight: 600; }

/* Página da loja */
.capa {
  margin: 0; height: 160px; border-radius: 24px; position: relative;
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0 / 100% 32px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0 / 32px 100%,
    linear-gradient(180deg, #80bfef 0%, #1095e5 30%, #1046e9 55%, #061db6 78%, #0f071d 100%);
  background-size: auto, auto, cover;
}
.capa .logo-loja { position: absolute; left: 20px; bottom: -28px; width: 72px; height: 72px; border: 4px solid #fff; border-radius: 18px; box-shadow: var(--sombra); }
.loja-cab { padding: 2.4rem 0 0.6rem; }
.loja-cab h1 { margin-bottom: 0.25rem; }
.aviso-fechada { background: var(--brasa-clara); color: var(--brasa); border-radius: 14px; padding: 0.75rem 1rem; font-weight: 500; font-size: 0.875rem; margin: 0.75rem 0; }
.nav-cats { position: sticky; top: 76px; z-index: 10; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(8px); margin: 0 -16px; padding: 0.5rem 16px 0.2rem; }
.secao-cardapio h2 { margin: 1.6rem 0 0.3rem; }
.produtos > li > button { all: unset; box-sizing: border-box; display: flex; gap: 0.9rem; width: 100%; padding: 1rem 0; cursor: pointer; }
.produtos > li > button:focus-visible { outline: 2px solid var(--azul); border-radius: 8px; }
.produtos h3 { font: 500 1rem var(--f-texto); letter-spacing: -0.01em; margin: 0 0 0.2rem; }
.produtos .desc { color: var(--cinza); font-size: 0.875rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0 0 0.35rem; }
.produtos .preco { font-weight: 500; font-size: 0.9375rem; }
.produtos img { width: 88px; height: 88px; object-fit: cover; border-radius: 14px; flex: none; border: 1px solid var(--linha); }

/* Folha do produto */
.prod-foto { width: 100%; max-height: 220px; object-fit: cover; border-radius: 14px; margin-bottom: 0.9rem; }
.grupo { margin: 1.25rem 0; }
.grupo-cab { display: flex; justify-content: space-between; align-items: center; background: var(--superficie); border: 1px solid var(--linha); border-radius: 14px; padding: 0.65rem 0.9rem; }
.grupo-cab h3 { margin: 0; font-size: 1rem; }
.grupo-cab small { font-size: 0.8125rem; }
.opcao { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0.25rem; border-bottom: 1px solid var(--linha); cursor: pointer; font-weight: 400; margin: 0; }
.opcao:last-child { border-bottom: 0; }
.opcao .cresce { font-size: 0.9375rem; }
.quantidade { display: inline-flex; align-items: center; border: 1px solid var(--linha); border-radius: 999px; background: #fff; }
.quantidade button { width: 40px; height: 40px; border: 0; background: none; font: 500 1.2rem var(--f-texto); color: var(--tinta); cursor: pointer; border-radius: 999px; }
.quantidade button:hover { background: var(--superficie); }
.quantidade span { min-width: 26px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Barra da sacola */
.barra-sacola {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom)); width: min(688px, calc(100vw - 24px));
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--azul); color: #fff; text-decoration: none; padding: 0.85rem 1.25rem; border-radius: 999px;
  box-shadow: var(--brilho-botao), 0 12px 28px -6px rgba(0, 54, 255, 0.45); font-weight: 500; z-index: 30;
}
.barra-sacola .qtd { background: #fff; color: var(--azul); border-radius: 999px; padding: 0 0.55rem; margin-right: 0.55rem; font: 500 0.8125rem/1.6 var(--f-mono); }

/* Sacola */
.item-sacola { display: flex; gap: 0.75rem; padding: 0.9rem 0; align-items: flex-start; }
.item-sacola .det { color: var(--cinza); font-size: 0.8125rem; }
.pagamento-op { display: flex; gap: 0.75rem; align-items: center; padding: 0.9rem 1rem; border: 1px solid var(--linha); border-radius: 14px; margin-bottom: 0.6rem; cursor: pointer; font-weight: 400; }
.pagamento-op:has(input:checked) { border-color: var(--azul); background: #f5f8ff; box-shadow: 0 0 0 3px rgba(0, 54, 255, 0.08); }
.totais { display: grid; grid-template-columns: 1fr auto; gap: 0.35rem 1rem; font-size: 0.9375rem; }
.totais .total { font: 500 1.375rem var(--f-titulo); letter-spacing: -0.015em; padding-top: 0.5rem; }

/* Acompanhamento do pedido */
.status-pedido { padding: 0.6rem 0 0.4rem; }
.status-pedido h1 { font-size: clamp(2.2rem, 10vw, 3.2rem); margin: 0.6rem 0 0.35rem; letter-spacing: -0.02em; }
.status-pedido .rotulo { margin-top: 0.25rem; }
.passos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 1rem 0 1.25rem; }
.passos span { height: 4px; border-radius: 999px; background: var(--linha); }
.passos span.feito { background: var(--tinta); }
.passos span.agora { background: var(--azul); }

/* Código de entrega: janela escura no estilo terminal */
.codigo-entrega {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--vazio); color: #fff; border-radius: 20px; padding: 1.1rem 1.3rem; margin-bottom: 1rem;
  box-shadow: var(--sombra);
}
.codigo-entrega b { font: 500 2.5rem/1 var(--f-mono); letter-spacing: 0.18em; }
.codigo-entrega p { margin: 0; font: 500 0.6875rem/1.5 var(--f-mono); letter-spacing: 0.03em; text-transform: uppercase; color: #c2c2c9; max-width: 18ch; }

.pix-qr { width: 220px; height: 220px; margin: 0.5rem auto 0.8rem; image-rendering: pixelated; border: 1px solid var(--linha); border-radius: 14px; padding: 8px; }
.copia-cola { font-family: var(--f-mono); font-size: 0.75rem; word-break: break-all; background: var(--vazio); color: #e5e7eb; border-radius: 14px; padding: 0.75rem; max-height: 4.8rem; overflow: hidden; text-align: left; }
#mapa { height: 240px; border-radius: 20px; margin-bottom: 1rem; z-index: 0; border: 1px solid var(--linha); }
.estrelas { display: flex; gap: 0.2rem; }
.estrelas button { font-size: 1.9rem; background: none; border: 0; cursor: pointer; color: var(--linha); padding: 0 0.1rem; }
.estrelas button.on { color: var(--azul); }
.linha-tempo { list-style: none; padding: 0; margin: 0; font-size: 0.875rem; }
.linha-tempo li { display: flex; gap: 0.9rem; padding: 0.35rem 0; }
.linha-tempo time { color: var(--cinza); min-width: 3.2rem; font-family: var(--f-mono); font-size: 0.8125rem; }
