/* Santo Uda Pizza — página de pedido do cliente (mobile-first) */

body { background: var(--bege); padding-bottom: env(safe-area-inset-bottom); }
body.com-sacola { padding-bottom: 96px; }

/* ---------- Cabeçalho ---------- */
.cab {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 10px var(--gutter); background: var(--preto); color: var(--branco);
  box-shadow: 0 2px 12px rgb(0 0 0 / .25);
}
.cab__marca svg { width: 48px; height: 48px; display: block; }
.cab__marca img { width: 48px; height: 48px; object-fit: contain; display: block; }
.cab__texto { display: grid; line-height: 1.2; }
.cab__texto strong { font-family: var(--fonte-titulo); font-size: 1.5rem; letter-spacing: .5px; font-style: italic; }
.cab__texto span { font-size: .78rem; color: var(--amarelo); }

.app { max-width: 720px; margin: 0 auto; padding: 16px var(--gutter) 32px; display: grid; gap: 16px; }

.boas-vindas h1 { margin: 4px 0; font-family: var(--fonte-titulo); font-style: italic; font-size: 2.2rem; line-height: 1; }
.boas-vindas p { margin: 0; color: var(--texto-suave); font-size: .92rem; }
.faixa-aviso {
  display: block; margin-top: 12px; padding: 12px 14px; border-radius: var(--raio-sm);
  background: var(--preto); color: var(--amarelo); font-weight: 600; font-size: .9rem; text-decoration: none;
}

.titulo-secao {
  justify-self: start; margin: 4px 0; padding: 4px 18px 2px;
  font-family: var(--fonte-titulo); font-style: italic; font-weight: 400; font-size: 1.9rem; letter-spacing: .5px;
  background: var(--preto); color: var(--amarelo); transform: rotate(-1.5deg);
  clip-path: polygon(2% 0, 100% 6%, 98% 100%, 0 92%);
}
.tela { display: grid; gap: 14px; }
.tela[hidden] { display: none; }

/* ---------- Filtros ---------- */
.filtros { display: grid; gap: 10px; }
.busca input {
  width: 100%; min-height: 48px; padding: 10px 16px; border-radius: 999px;
  border: 2px solid var(--bege-2); background: var(--branco); font: inherit;
}
.busca input:focus { outline: none; border-color: var(--vermelho); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chip {
  flex: none; min-height: 40px; padding: 6px 16px; border-radius: 999px;
  border: 2px solid var(--preto); background: transparent; font-weight: 600; font-size: .88rem;
}
.chip[aria-pressed="true"] { background: var(--preto); color: var(--amarelo); }

/* ---------- Lista de sabores ---------- */
.sabores { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sabor {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  padding: 14px; border-radius: var(--raio); background: var(--branco); box-shadow: var(--sombra-leve);
}
.sabor[hidden] { display: none; }
.sabor__nome { margin: 0; font-size: 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sabor__ingr { margin: 2px 0 6px; font-size: .85rem; color: var(--texto-suave); }
.sabor__precos { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .85rem; font-weight: 600; }
.p-broto { color: var(--verde-preco); }
.p-grande { color: var(--texto); }
.tag-top {
  padding: 1px 8px; border-radius: 999px; background: var(--dourado); color: var(--preto);
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
}
.sabor__add {
  min-height: 44px; padding: 8px 14px; border-radius: var(--raio-sm); border: 0;
  background: var(--vermelho); color: var(--branco); font-weight: 600; font-size: .88rem;
}
.sabor__add:hover { background: var(--vermelho-escuro); }

.vazio { margin: 0; color: var(--texto-suave); }
.nota { margin: 0; font-size: .82rem; color: var(--texto-suave); }

/* ---------- Botões ---------- */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 10px 20px; border-radius: var(--raio-sm); border: 2px solid transparent;
  font-weight: 700; text-decoration: none; text-align: center;
}
.botao--principal { background: var(--vermelho); color: var(--branco); }
.botao--principal:hover { background: var(--vermelho-escuro); }
.botao--principal:disabled { opacity: .55; cursor: not-allowed; }
.botao--contorno { border-color: var(--preto); background: var(--branco); color: var(--texto); }
.botao--contorno:hover { background: var(--preto); color: var(--branco); }
.botao--largo { width: 100%; }
.link { padding: 0; border: 0; background: none; color: var(--vermelho); font-weight: 600; text-decoration: underline; min-height: 44px; }
.voltar {
  justify-self: start; min-height: 44px; padding: 0; border: 0; background: none;
  font-weight: 600; color: var(--texto);
}

/* ---------- Sacola fixa ---------- */
.sacola {
  position: fixed; inset: auto 0 0; z-index: 30;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgb(243 227 216 / .95) 30%);
}
.sacola[hidden] { display: none; }
.sacola__botao {
  width: 100%; max-width: 688px; margin: 0 auto; min-height: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 18px; border: 0; border-radius: var(--raio); background: var(--vermelho); color: var(--branco);
  box-shadow: var(--sombra); font-size: .95rem;
}

/* ---------- Folha (montar pizza) ---------- */
.folha {
  width: 100%; max-width: 560px; max-height: 92vh; margin: auto auto 0; padding: 0;
  border: 0; border-radius: var(--raio) var(--raio) 0 0; background: var(--branco);
}
.folha::backdrop { background: rgb(0 0 0 / .55); }
@media (min-width: 768px) { .folha { margin: auto; border-radius: var(--raio); } }
.folha__corpo { display: grid; gap: 14px; padding: 18px var(--gutter) 0; }
.folha__cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.folha__cab h2 { margin: 0; font-family: var(--fonte-titulo); font-style: italic; font-weight: 400; font-size: 1.8rem; line-height: 1; }
.folha__cab p { margin: 4px 0 0; font-size: .85rem; color: var(--texto-suave); }
.folha__fechar {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--cinza-fundo); font-size: 1.5rem; line-height: 1;
}
.folha__rodape {
  position: sticky; bottom: 0; display: flex; gap: 12px; align-items: center;
  margin: 0 calc(-1 * var(--gutter)); padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: var(--branco); border-top: 1px solid var(--borda);
}
.folha__rodape .botao { flex: 1; }

.grupo { margin: 0; padding: 0; border: 0; display: grid; gap: 8px; }
.grupo legend { padding: 0; margin-bottom: 8px; font-weight: 700; font-size: .95rem; }
.grupo legend small, .confirmar small, .campo small { font-weight: 500; color: var(--texto-suave); }

.opcoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.opcoes--quebra { grid-template-columns: repeat(2, 1fr); }
.opcao input { position: absolute; opacity: 0; pointer-events: none; }
.opcao span {
  display: flex; flex-direction: column; justify-content: center; min-height: 48px; padding: 8px 12px;
  border-radius: var(--raio-sm); border: 2px solid var(--borda); background: var(--branco);
  font-weight: 600; font-size: .9rem; cursor: pointer;
}
.opcao small { font-weight: 500; color: var(--texto-suave); }
.opcao input:checked + span { border-color: var(--preto); background: var(--preto); color: var(--amarelo); }
.opcao input:checked + span small { color: var(--bege); }
.opcao input:focus-visible + span { outline: 3px solid var(--amarelo); outline-offset: 2px; }

.confirmar { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: .92rem; }
.confirmar input { width: 22px; height: 22px; accent-color: var(--vermelho); flex: none; }

.campo { display: grid; gap: 4px; }
.campo[hidden] { display: none; }
.campo > span { font-size: .82rem; font-weight: 600; color: var(--texto-suave); }
.campo input, .campo select, .campo textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border-radius: var(--raio-sm);
  border: 2px solid var(--borda); background: var(--branco); font: inherit;
}
.campo textarea { resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--vermelho); }

.qtd { display: inline-flex; align-items: center; gap: 4px; border: 2px solid var(--borda); border-radius: 999px; padding: 2px; }
.qtd button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--cinza-fundo); font-size: 1.3rem; line-height: 1; }
.qtd output { min-width: 24px; text-align: center; font-weight: 700; }
.qtd--peq button { width: 36px; height: 36px; font-size: 1.1rem; }

/* ---------- Finalizar ---------- */
.finalizar { display: grid; gap: 14px; }
.cartao {
  margin: 0; padding: 16px; border: 0; border-radius: var(--raio); background: var(--branco); box-shadow: var(--sombra-leve);
  display: grid; gap: 12px; min-width: 0;
}
.cartao legend { float: left; width: 100%; padding: 0; margin-bottom: 4px; font-weight: 700; }
.cartao h2 { margin: 0; font-size: 1.05rem; }
[data-entrega], .campos-endereco { display: grid; gap: 12px; }
[data-entrega][hidden], .campos-endereco[hidden], .endereco-salvo[hidden] { display: none; }
.endereco-grade { display: grid; gap: 12px; }
.cep-estado, .localizacao__estado { min-height: 20px; margin: 0; font-size: .82rem; color: var(--texto-suave); }
.cep-estado.is-carregando, .localizacao__estado.is-carregando { color: var(--azul); }
.cep-estado.is-sucesso, .localizacao__estado.is-sucesso { color: var(--verde); font-weight: 700; }
.cep-estado.is-erro, .localizacao__estado.is-erro { color: var(--vermelho); font-weight: 700; }
.localizacao { display: grid; justify-items: start; gap: 8px; padding-top: 4px; }
.localizacao__botao { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; }
.localizacao__botao svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.localizacao__botao.is-destaque { outline: 3px solid var(--amarelo); outline-offset: 3px; }
.localizacao a { color: var(--azul); font-weight: 700; }
@media (min-width: 600px) {
  .endereco-grade { grid-template-columns: 2fr 1fr; }
  .campo--rua { grid-column: 1; }
  .campo--numero { grid-column: 2; }
}

.carrinho { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.carrinho__item {
  display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center;
  padding: 12px 14px; border-radius: var(--raio); background: var(--branco); box-shadow: var(--sombra-leve);
}
.carrinho__item strong { display: block; font-size: .95rem; }
.carrinho__item small { display: block; color: var(--texto-suave); font-size: .8rem; }
.carrinho__preco { grid-column: 1 / -1; justify-self: end; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (min-width: 480px) {
  .carrinho__item { grid-template-columns: 1fr auto auto; }
  .carrinho__preco { grid-column: auto; min-width: 90px; text-align: right; }
}

.endereco-salvo { padding: 12px; border-radius: var(--raio-sm); background: var(--cinza-fundo); border: 2px solid var(--bege-2); }
.endereco-salvo__rotulo { margin: 0; font-size: .8rem; font-weight: 600; color: var(--texto-suave); }
.endereco-salvo__texto { margin: 2px 0 8px; font-weight: 600; }
.endereco-salvo__acoes { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; }

.total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 1.05rem; }
.total strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.erro {
  margin: 0; padding: 12px 14px; border-radius: var(--raio-sm);
  background: #fde2e3; border: 1px solid #f5b5b8; color: var(--vermelho-escuro); font-weight: 600;
}
.erro[hidden] { display: none; }
.sucesso {
  margin: 0; padding: 12px 14px; border-radius: var(--raio-sm);
  background: #e7f5e8; border: 1px solid #b7dfb9; color: #1b5e20; font-weight: 600;
}

/* ---------- Confirmação do WhatsApp ---------- */
.confirmar-whatsapp { max-width: 560px; margin-inline: auto; width: 100%; }
.confirmar-whatsapp__cartao {
  padding: 24px; border: 1px solid var(--linha); border-radius: var(--raio-bloco);
  background: var(--superficie); display: grid; gap: 16px; text-align: center;
}
.confirmar-whatsapp__cartao > p { margin: 0; color: var(--texto-suave); }
.confirmar-whatsapp__icone {
  width: 64px; height: 64px; margin-inline: auto; padding: 14px; border-radius: 50%;
  background: var(--verde-fundo); color: var(--verde);
}
.confirmar-whatsapp__icone svg {
  width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.confirmar-whatsapp__codigo {
  padding: 14px; border-radius: var(--raio-campo); background: var(--fundo); display: grid; gap: 8px;
}
.confirmar-whatsapp__codigo span { color: var(--texto-suave); font-size: .88rem; }
.confirmar-whatsapp__codigo code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: clamp(1rem, 4vw, 1.3rem);
  color: var(--texto); overflow-wrap: anywhere;
}
.confirmar-whatsapp__estado { min-height: 24px; font-weight: 700; }
.confirmar-whatsapp__estado.is-aguardando::before {
  content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px;
  border-radius: 50%; background: var(--amarelo); animation: pulso-confirmacao 1.4s ease-in-out infinite;
}
[data-confirmar-whatsapp][aria-disabled="true"] { opacity: .55; pointer-events: none; }
@keyframes pulso-confirmacao { 50% { transform: scale(1.45); opacity: .55; } }
@media (prefers-reduced-motion: reduce) {
  .confirmar-whatsapp__estado.is-aguardando::before { animation: none; }
}

.toast {
  position: fixed; left: 50%; bottom: 96px; z-index: 40; margin: 0; max-width: calc(100% - 32px);
  padding: 10px 18px; border-radius: 999px; background: var(--preto); color: var(--branco); font-size: .9rem;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .25s ease;
}
.toast.is-visivel { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Página de aviso (link expirado) ---------- */
.aviso-pagina { max-width: 520px; margin: 0 auto; padding: 48px var(--gutter); display: grid; gap: 14px; text-align: center; }
.aviso-pagina h1 { margin: 0; font-family: var(--fonte-titulo); font-style: italic; font-weight: 400; font-size: 2.4rem; line-height: 1; }
.aviso-pagina p { margin: 0; color: var(--texto-suave); }

/* ---------- Acompanhamento ---------- */
.status-atual { text-align: center; background: var(--preto); color: var(--branco); }
.status-atual__num { margin: 0; color: var(--amarelo); font-weight: 600; font-size: .9rem; }
.status-atual__rotulo { margin: 0; font-family: var(--fonte-titulo); font-style: italic; font-weight: 400; font-size: 2.6rem; line-height: 1; }
.status-atual__dica { margin: 0; color: var(--bege-2); font-size: .92rem; min-height: 1.4em; }

.linha-tempo { list-style: none; margin: 0; padding: 16px; border-radius: var(--raio); background: var(--branco); box-shadow: var(--sombra-leve); display: grid; gap: 0; }
.linha-tempo[hidden] { display: none; }
.linha-tempo li {
  position: relative; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 12px;
  min-height: 48px; color: var(--texto-suave);
}
.linha-tempo li:not(:last-child)::after {
  content: ""; position: absolute; left: 13px; top: 34px; bottom: -14px; width: 2px; background: var(--borda);
}
.linha-tempo__ponto { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--borda); background: var(--branco); }
.linha-tempo time { font-size: .85rem; font-variant-numeric: tabular-nums; }
.linha-tempo li.is-feito { color: var(--texto); }
.linha-tempo li.is-feito .linha-tempo__ponto { border-color: var(--verde-preco); background: var(--verde-preco); }
.linha-tempo li.is-feito::after { background: var(--verde-preco); }
.linha-tempo li.is-atual { color: var(--texto); font-weight: 700; }
.linha-tempo li.is-atual .linha-tempo__ponto { border-color: var(--vermelho); background: var(--amarelo); animation: pulso 1.6s ease-in-out infinite; }
@keyframes pulso { 50% { box-shadow: 0 0 0 8px rgb(215 25 32 / .15); } }

.resumo-itens { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: .92rem; }
.rastreio p { margin: 0; }

/* ---------- Visual aprovado 2026 ---------- */
body { background: var(--fundo); }
.cab {
  position: sticky; margin: 8px; padding: 10px 14px; border-radius: var(--raio-bloco);
  background: var(--menu); box-shadow: var(--sombra-leve);
}
.cab__texto strong { font-family: var(--fonte-corpo); font-size: 1.05rem; font-style: normal; font-weight: 800; letter-spacing: -.02em; }
.cab__texto span { color: var(--linha); }
.app { max-width: 760px; padding-top: 20px; gap: 20px; }
.boas-vindas h1 { font-family: var(--fonte-corpo); font-style: normal; font-weight: 800; letter-spacing: -.03em; }
.titulo-secao {
  margin: 8px 0 0; padding: 0; transform: none; clip-path: none;
  background: transparent; color: var(--texto); font-family: var(--fonte-corpo);
  font-style: normal; font-weight: 800; letter-spacing: -.03em;
}
.faixa-aviso { border-radius: var(--raio-campo); background: var(--menu); }
.busca input { border: 1px solid var(--linha); border-radius: var(--raio-campo); }
.chip { min-height: 44px; border: 1px solid var(--linha); background: var(--superficie); }
.chip[aria-pressed="true"] { border-color: var(--preto); background: var(--preto); color: var(--superficie); }
.sabor { padding: 16px; border: 1px solid var(--linha); border-radius: var(--raio-cartao); box-shadow: none; }
.sabor__add {
  width: 44px; height: 44px; padding: 0; border-radius: 50%;
  font-size: 1.5rem; font-weight: 500;
}
.tag-top { background: var(--amarelo); }
.botao { border-radius: var(--raio-campo); }
.botao--contorno { border-color: var(--preto); background: var(--preto); color: var(--superficie); }
.sacola { background: linear-gradient(transparent, rgb(247 245 242 / .97) 32%); }
.sacola__botao { border-radius: var(--raio-cartao); }
.folha { border-radius: var(--raio-bloco) var(--raio-bloco) 0 0; }
.folha__cab h2 { font-family: var(--fonte-corpo); font-style: normal; font-weight: 800; letter-spacing: -.03em; }
.pizza-ilustracao {
  width: 116px; height: 116px; margin-inline: auto; padding: 8px;
  border-radius: 50%; background: var(--bege); color: var(--vermelho);
}
.pizza-ilustracao svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 3; }
.folha__fechar svg, .qtd button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.opcao span, .campo input, .campo select, .campo textarea { border-radius: var(--raio-campo); }
.cartao, .carrinho__item, .linha-tempo { border: 1px solid var(--linha); border-radius: var(--raio); box-shadow: none; }
.status-atual { border: 0; background: var(--menu); }
.status-atual__rotulo { font-family: var(--fonte-corpo); font-style: normal; font-weight: 800; letter-spacing: -.03em; }
.status-atual__dica { color: var(--linha); }
.linha-tempo li.is-feito .linha-tempo__ponto { border-color: var(--verde); background: var(--verde); }
.linha-tempo li.is-feito::after { background: var(--verde); }
.etapas-pedido {
  list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  color: var(--texto-suave); font-size: .78rem; font-weight: 700;
}
.etapas-pedido li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.etapas-pedido span {
  display: grid; place-items: center; flex: none; width: 28px; height: 28px;
  border-radius: 50%; background: var(--preto); color: var(--superficie);
}
.etapas-pedido li:first-child span { background: var(--vermelho); }
.sucesso { background: var(--verde-fundo); border-color: var(--verde); color: var(--verde); }
.erro { background: var(--vermelho-fundo); border-color: var(--vermelho); color: var(--vermelho-texto); }

@media (min-width: 768px) {
  .cab { margin: 12px; }
  .folha { border-radius: var(--raio-bloco); }
}
body h1, body h2, body h3 { font-style: normal; font-weight: 800; letter-spacing: -.02em; }
