/* Ki-Caldos — cabeçalho vermelho da marca, cardápio em cards, sacola que sobe de baixo. */
:root {
  --vermelho: oklch(0.47 0.18 26);
  --vermelho-esc: oklch(0.36 0.14 25);
  --amarelo: oklch(0.8 0.16 72);
  --amarelo-claro: oklch(0.88 0.14 88);
  --preto: oklch(0.2 0.02 25);
  --fundo: oklch(0.975 0.005 25);
  --papel: oklch(1 0 0);
  --suave: oklch(0.97 0.008 25);
  --texto: oklch(0.24 0.02 25);
  --texto-2: oklch(0.47 0.02 25);
  --linha: oklch(0.91 0.01 25);
  --verde: oklch(0.52 0.13 152);
  --erro: oklch(0.5 0.19 27);
  --raio: 16px;
  --sombra: 0 1px 2px oklch(0.3 0.05 25 / 0.06), 0 4px 14px oklch(0.3 0.05 25 / 0.07);
  --sai: cubic-bezier(0.25, 1, 0.5, 1); /* ease-out-quart */
  --largura: 640px;

  --z-cats: 10;
  --z-barra: 20;
  --z-fundo: 30;
  --z-sacola: 40;
  --z-toast: 50;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font: 16px/1.45 'Figtree', system-ui, sans-serif;
  padding-bottom: 96px;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { text-wrap: balance; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--vermelho); outline-offset: 2px; }

.demo-faixa { background: var(--preto); color: oklch(0.9 0.02 60); font-size: 12px; text-align: center; padding: 6px 16px; }

/* ---------- topo ---------- */
.topo { background: var(--vermelho); color: var(--papel); text-align: center; padding: 30px 16px 34px; }
.topo-logo {
  width: 132px; height: 132px; margin: 0 auto 10px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 4px 12px oklch(0 0 0 / 0.25);
}
/* Mesmo jeito das letras do logo: amarelo chapado com contorno escuro */
.marca {
  margin: 0;
  font: 400 clamp(52px, 15vw, 84px)/1 'Anton', Impact, sans-serif;
  text-transform: uppercase; letter-spacing: 0.01em;
  color: var(--amarelo-claro);
  -webkit-text-stroke: 3px var(--preto); paint-order: stroke fill;
  text-shadow: 0 4px 0 var(--preto);
}
.topo-frase { margin: 8px auto 0; max-width: 30ch; font-size: 16px; font-weight: 500; color: oklch(0.95 0.02 30); }
.topo-status {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 16px 0 0; padding: 6px 14px; border-radius: 99px;
  background: oklch(0 0 0 / 0.22); font-size: 14px; font-weight: 600;
}
.topo-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: oklch(0.82 0.17 150); }
.topo-status.fechado::before { background: var(--amarelo); }
.topo-info {
  list-style: none; margin: 12px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px;
  font-size: 14px; color: oklch(0.93 0.03 30);
}

/* ---------- promo ---------- */
.promo {
  position: relative; width: calc(100% - 32px); max-width: calc(var(--largura) - 32px);
  margin: -18px auto 0; display: flex; align-items: center; gap: 12px;
  background: var(--amarelo-claro); color: var(--preto);
  border-radius: 14px; padding: 12px 14px; font-size: 15px;
  box-shadow: 0 4px 14px oklch(0 0 0 / 0.12);
}
.promo-selo {
  flex: none; background: var(--preto); color: var(--amarelo-claro);
  font: 400 15px/1 'Anton', sans-serif; text-transform: uppercase; letter-spacing: 0.03em;
  padding: 7px 9px 6px; border-radius: 8px;
}

/* ---------- pedido em andamento ---------- */
.acompanhar {
  display: flex; align-items: center; gap: 12px;
  width: calc(100% - 32px); max-width: calc(var(--largura) - 32px); margin: 14px auto 0;
  padding: 12px 14px; border-radius: 14px; background: var(--preto); color: var(--papel); text-decoration: none;
}
.acompanhar b { display: block; font-size: 15px; }
.acompanhar small { display: block; font-size: 13px; color: oklch(0.85 0.03 60); }
.acompanhar span:first-child { flex: 1; }
.acompanhar .seta { font-weight: 800; color: var(--amarelo-claro); white-space: nowrap; }
.acompanhar .pulsa { width: 10px; height: 10px; border-radius: 50%; background: var(--amarelo-claro); flex: none; }

/* ---------- hoje tem ---------- */
.hoje { max-width: var(--largura); margin: 26px auto 0; padding: 0 16px; scroll-margin-top: 16px; }
.hoje-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hoje-cab h2, .cat-titulo {
  margin: 0; font: 400 30px/1.05 'Anton', sans-serif; text-transform: uppercase; color: var(--vermelho);
}
.hoje-dia { margin: 0; font-weight: 700; color: var(--texto-2); font-size: 15px; }
.hoje-aviso { margin: 6px 0 0; font-size: 15px; color: var(--texto-2); }
.hoje-lista { display: grid; gap: 12px; margin-top: 14px; }
.hoje-lista .card { box-shadow: var(--sombra), inset 0 0 0 2px var(--amarelo); }

.semana { margin-top: 12px; background: var(--papel); border-radius: 14px; box-shadow: var(--sombra); }
.semana summary {
  list-style: none; cursor: pointer; padding: 14px 16px; min-height: 48px; font-weight: 700; font-size: 15px;
  display: flex; justify-content: space-between; align-items: center;
}
.semana summary::-webkit-details-marker { display: none; }
.semana summary::after { content: '+'; font-size: 22px; line-height: 1; color: var(--vermelho); }
.semana[open] summary::after { content: '−'; }
.semana-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; padding: 0 12px 14px; }
.semana-dia { border-radius: 12px; background: var(--suave); padding: 10px 12px; font-size: 14px; }
.semana-dia b { display: block; font: 400 17px/1.2 'Anton', sans-serif; text-transform: uppercase; color: var(--vermelho); margin-bottom: 4px; }
.semana-dia ul { margin: 0; padding-left: 16px; }
.semana-dia.e-hoje { background: var(--vermelho); color: var(--papel); }
.semana-dia.e-hoje b { color: var(--amarelo-claro); }
.semana-dia.fechado { color: var(--texto-2); }

/* ---------- categorias ---------- */
.cats {
  position: sticky; top: 0; z-index: var(--z-cats);
  background: var(--fundo); margin-top: 28px; border-bottom: 1px solid var(--linha);
}
.cats-trilho {
  position: relative; max-width: var(--largura); margin: 0 auto;
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; scrollbar-width: none;
}
.cats-trilho::-webkit-scrollbar { display: none; }
.cat-chip {
  flex: none; border: 0; border-radius: 99px; padding: 10px 16px;
  background: var(--papel); font-weight: 700; font-size: 14px; box-shadow: inset 0 0 0 1px var(--linha);
  transition: background-color 200ms var(--sai), color 200ms var(--sai);
}
.cat-chip.ativo { background: var(--vermelho); color: var(--papel); box-shadow: none; }

/* ---------- cardápio ---------- */
main { max-width: var(--largura); margin: 0 auto; padding: 0 16px; }
.cat { padding-top: 26px; scroll-margin-top: 62px; }
.cat-lista { display: grid; gap: 12px; margin-top: 14px; }

.card {
  background: var(--papel); border-radius: var(--raio); box-shadow: var(--sombra);
  padding: 14px; display: grid; grid-template-columns: 92px 1fr; gap: 4px 14px;
}
.card-arte {
  width: 92px; height: 92px; border-radius: 14px; overflow: hidden;
  display: grid; place-items: center; background: var(--fundo-arte, var(--suave));
}
.card-arte svg { width: 80px; height: 80px; overflow: visible; }
.card-arte img { width: 100%; height: 100%; object-fit: cover; }
.card-info { min-width: 0; }
.card-nome { margin: 0; font-size: 17px; font-weight: 800; line-height: 1.25; }
.card-desc {
  margin: 4px 0 0; font-size: 14px; color: var(--texto-2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-acao { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; margin-top: 10px; min-width: 0; }

.tamanhos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tam {
  border: 0; border-radius: 10px; padding: 7px 4px 6px; min-height: 48px;
  background: var(--suave); box-shadow: inset 0 0 0 1px var(--linha);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15;
  transition: background-color 150ms var(--sai), color 150ms var(--sai);
}
.tam b { font-size: 14px; }
.tam small { font-size: 12px; color: var(--texto-2); }
.tam[aria-pressed="true"] { background: var(--preto); color: var(--papel); box-shadow: none; }
.tam[aria-pressed="true"] small { color: var(--amarelo-claro); }

.acomp { display: grid; gap: 8px; }
.acomp-titulo { margin: 0; font-size: 14px; font-weight: 800; }
.acomp-titulo span { font-weight: 500; color: var(--texto-2); }
.acomp-opcoes { display: flex; flex-wrap: wrap; gap: 6px; }
.acomp-op {
  min-height: 40px; padding: 0 12px; border: 0; border-radius: 99px;
  background: var(--suave); box-shadow: inset 0 0 0 1px var(--linha); font-size: 14px; font-weight: 600; color: var(--texto-2);
  transition: background-color 150ms var(--sai), color 150ms var(--sai);
}
.acomp-op[data-acomp][aria-pressed="true"] { background: oklch(0.94 0.04 150); box-shadow: inset 0 0 0 1.5px var(--verde); color: oklch(0.35 0.1 150); }
.acomp-op[data-acomp][aria-pressed="true"]::before { content: '\2713  '; }
.acomp-op[data-acomp][aria-pressed="false"] { text-decoration: line-through; }
.acomp-sem[aria-pressed="true"] { background: var(--preto); color: var(--papel); box-shadow: none; }
.acomp-nao { margin: 0; font-size: 13px; color: var(--texto-2); }
.card { position: relative; }
.card.esgotado .card-arte, .card.esgotado .card-info, .card.esgotado .tamanhos, .card.esgotado .acomp { opacity: 0.45; filter: grayscale(0.6); pointer-events: none; }
.card.esgotado::after {
  content: 'Esgotou'; position: absolute; left: 14px; top: 76px; width: 92px; rotate: -6deg; text-align: center;
  padding: 6px 0; border-radius: 8px; background: var(--preto); color: var(--amarelo-claro);
  font: 400 17px/1 'Anton', sans-serif; text-transform: uppercase; letter-spacing: 0.03em;
}
.card.esgotado .add { background: var(--linha); color: var(--texto-2); cursor: default; }
.si-aviso { margin-top: 2px; font-size: 13px; font-weight: 700; color: var(--erro); }
.si-esgotado .si-nome { text-decoration: line-through; color: var(--texto-2); }
.card-rodape { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.preco { font-size: 19px; font-weight: 800; color: var(--vermelho); white-space: nowrap; }
.add {
  border: 0; border-radius: 12px; padding: 10px 16px; min-height: 46px;
  background: var(--vermelho); color: var(--papel); font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; gap: 6px; transition: background-color 150ms var(--sai), transform 120ms var(--sai);
}
.add:active { transform: scale(0.96); background: var(--vermelho-esc); }
.add .mais { font-size: 20px; line-height: 0; }
.add-qtd { background: var(--amarelo-claro); color: var(--preto); border-radius: 99px; font-size: 12px; padding: 2px 8px; font-weight: 800; }

/* fumacinha só nos desenhos de comida quente */
.vapor { animation: vapor 2.8s ease-in-out infinite; }
.vapor:nth-child(2) { animation-delay: 0.5s; }
.vapor:nth-child(3) { animation-delay: 1s; }
@keyframes vapor {
  0%, 100% { opacity: 0; transform: translateY(4px); }
  40% { opacity: 0.9; }
  80% { opacity: 0; transform: translateY(-6px); }
}

/* ---------- rodapé ---------- */
.rodape { text-align: center; padding: 40px 16px 20px; color: var(--texto-2); font-size: 14px; }
.rodape p { margin: 4px 0; }
.rodape a { color: var(--vermelho); font-weight: 700; text-decoration: none; }
.rodape-marca { font: 400 26px/1 'Anton', sans-serif; text-transform: uppercase; color: var(--vermelho); }
.rodape .assinatura { display: inline-block; margin-top: 18px; color: var(--texto-2); font-weight: 500; font-size: 13px; }

/* ---------- barra da sacola ---------- */
.barra-sacola {
  position: fixed; z-index: var(--z-barra); left: 50%; bottom: max(14px, env(safe-area-inset-bottom));
  translate: -50% 0;
  width: min(calc(100% - 24px), calc(var(--largura) - 24px));
  border: 0; border-radius: 16px; padding: 0 16px; min-height: 58px;
  background: var(--vermelho); color: var(--papel);
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 8px 22px oklch(0 0 0 / 0.22);
  animation: entrar 300ms var(--sai);
}
.barra-qtd { background: var(--amarelo-claro); color: var(--preto); font-weight: 800; border-radius: 9px; min-width: 28px; padding: 3px 7px; }
.barra-txt { font-weight: 700; flex: 1; text-align: left; }
.barra-total { font-weight: 800; }
.barra-sacola.pulo { animation: pulo 320ms var(--sai); }
@keyframes entrar { from { translate: -50% 120%; } }
@keyframes pulo { 50% { scale: 1.04; } }

/* ---------- sacola ---------- */
.sacola-fundo { position: fixed; inset: 0; z-index: var(--z-fundo); background: oklch(0.2 0.03 25 / 0.5); }
.sacola {
  position: fixed; z-index: var(--z-sacola); left: 0; right: 0; bottom: 0; margin: 0 auto;
  max-width: var(--largura); max-height: 92dvh;
  background: var(--fundo); border-radius: 22px 22px 0 0;
  display: flex; flex-direction: column;
  transform: translateY(105%); transition: transform 320ms var(--sai);
  visibility: hidden;
}
.sacola.aberta { transform: none; visibility: visible; }
.sacola-alca { width: 40px; height: 5px; border-radius: 9px; background: var(--linha); margin: 10px auto 0; }
.sacola-cab { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px 8px; }
.sacola-cab h2 { margin: 0; font: 400 26px/1 'Anton', sans-serif; text-transform: uppercase; color: var(--vermelho); }
.fechar { border: 0; background: var(--papel); width: 44px; height: 44px; border-radius: 50%; font-size: 24px; line-height: 1; box-shadow: var(--sombra); }
.sacola-corpo { overflow-y: auto; padding: 4px 16px 16px; overscroll-behavior: contain; }

.aviso { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--papel); box-shadow: inset 0 0 0 1px var(--linha); font-size: 14px; }
#blocoEndereco .aviso { margin: 10px 0 0; }

.sacola-itens { list-style: none; margin: 0; padding: 0; background: var(--papel); border-radius: 14px; box-shadow: var(--sombra); }
.sacola-itens li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.sacola-itens li + li { border-top: 1px solid var(--linha); }
.si-info { flex: 1; min-width: 0; }
.si-nome { font-weight: 700; font-size: 15px; line-height: 1.25; }
.si-tam { font-size: 13px; color: var(--texto-2); }
.si-preco { font-weight: 800; font-size: 15px; white-space: nowrap; }
.qtd { display: flex; align-items: center; background: var(--suave); border-radius: 10px; }
.qtd button { border: 0; background: none; width: 36px; height: 40px; font-size: 18px; font-weight: 700; color: var(--vermelho); }
.qtd span { min-width: 18px; text-align: center; font-weight: 800; font-size: 14px; }
.sacola-vazia { padding: 26px 16px; text-align: center; color: var(--texto-2); }

.brinde { margin-top: 12px; background: var(--papel); border-radius: 14px; padding: 14px; box-shadow: var(--sombra); font-size: 14px; }
.brinde:empty { display: none; }
.brinde-barra { height: 8px; border-radius: 9px; background: var(--suave); margin-top: 8px; overflow: hidden; }
.brinde-barra i { display: block; height: 100%; background: var(--vermelho); border-radius: 9px; transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform 400ms var(--sai); }
.brinde-ok { display: block; font-weight: 700; color: var(--verde); }
.brinde .seg { margin-top: 10px; }

.dados h3 { margin: 22px 0 10px; font-size: 16px; font-weight: 800; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--papel); padding: 4px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--linha); }
.seg-3 { grid-template-columns: repeat(3, 1fr); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: grid; place-items: center; min-height: 42px; text-align: center; padding: 0 6px; border-radius: 9px; font-weight: 700; font-size: 14px; transition: background-color 150ms var(--sai), color 150ms var(--sai); }
.seg input:checked + span { background: var(--vermelho); color: var(--papel); }
.seg input:focus-visible + span { outline: 2px solid var(--preto); outline-offset: 1px; }

.campo { display: block; margin-top: 12px; }
.campo span { display: block; font-size: 14px; font-weight: 700; margin-bottom: 5px; }
.campo input, .campo textarea, .campo select {
  width: 100%; border: 0; border-radius: 12px; padding: 12px 14px; min-height: 48px;
  background: var(--papel); box-shadow: inset 0 0 0 1px var(--linha);
  font: 500 16px/1.3 'Figtree', sans-serif; color: var(--texto); resize: vertical;
}
.campo select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background: var(--papel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23553331' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center / 12px 8px;
}
.campo input::placeholder, .campo textarea::placeholder { color: var(--texto-2); }
.campo input:focus, .campo textarea:focus, .campo select:focus { outline: none; box-shadow: inset 0 0 0 2px var(--vermelho); }
.campo.invalido input, .campo.invalido select { box-shadow: inset 0 0 0 2px var(--erro); }
.campo-dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }

.sacola-pe { padding: 12px 16px max(14px, env(safe-area-inset-bottom)); background: var(--papel); border-top: 1px solid var(--linha); }
.contas { margin: 0; display: grid; gap: 2px; }
.contas div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; color: var(--texto-2); }
.contas dd { margin: 0; text-align: right; }
.contas-total { margin-top: 4px; color: var(--texto) !important; font-size: 17px !important; font-weight: 800; }
.contas-total dd { color: var(--vermelho); font-size: 20px; }
.erro { margin: 8px 0 0; color: var(--erro); font-size: 14px; font-weight: 700; }
.erro:empty { display: none; }
.enviar {
  margin-top: 10px; width: 100%; border: 0; border-radius: 14px; min-height: 54px;
  background: var(--vermelho); color: var(--papel); font-weight: 800; font-size: 17px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.pe-nota { margin: 8px 0 0; text-align: center; font-size: 13px; color: var(--texto-2); }
.enviar:disabled { opacity: 0.5; cursor: default; }

/* ---------- toast ---------- */
.toast {
  position: fixed; z-index: var(--z-toast); left: 50%; top: 14px; translate: -50% -150%;
  background: var(--preto); color: var(--papel); padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600;
  transition: translate 300ms var(--sai); max-width: calc(100% - 32px); text-align: center;
}
.toast.show { translate: -50% 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
