:root {
  --rosa: #d63c6b;
  --rosa-esc: #b02d56;
  --amarelo: #ffc23d;
  --verde: #2f9e5b;
  --vermelho: #d64545;
  --fundo: #fff8f3;
  --card: #ffffff;
  --texto: #2b2118;
  --muted: #7a6d63;
  --borda: #eee2d8;
  --raio: 14px;
  --sombra: 0 2px 10px rgba(43, 33, 24, .08);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--fundo); color: var(--texto); font-size: 16px; line-height: 1.4;
  padding-bottom: calc(90px + env(safe-area-inset-bottom));
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
h1, h2, h3 { margin: 0; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }

/* Topo */
.topo {
  background: linear-gradient(135deg, var(--rosa), #e8668c);
  color: #fff; padding: 18px 16px 16px; padding-top: calc(18px + env(safe-area-inset-top));
}
.marca { display: flex; gap: 12px; align-items: center; max-width: 900px; margin: 0 auto; }
.logo { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.topo h1 { font-size: 1.5rem; }
.status-loja { margin: 2px 0 0; font-size: .9rem; display: flex; align-items: center; gap: 6px; }
.status-loja::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #ccc; }
.status-loja.aberta::before { background: #6dff9c; }
.status-loja.fechada::before { background: #ffb3b3; }
.info-loja { max-width: 900px; margin: 10px auto 0; font-size: .85rem; opacity: .95; display: flex; gap: 14px; flex-wrap: wrap; }

.banner-pedido {
  display: block; background: var(--amarelo); color: var(--texto); text-decoration: none;
  padding: 10px 16px; font-weight: 600; text-align: center;
}

/* Categorias */
.categorias {
  position: sticky; top: 0; z-index: 5; background: var(--fundo);
  display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; scrollbar-width: none;
  border-bottom: 1px solid var(--borda);
}
.categorias::-webkit-scrollbar { display: none; }
.categorias a {
  white-space: nowrap; text-decoration: none; color: var(--texto); background: #fff;
  border: 1px solid var(--borda); padding: 7px 14px; border-radius: 99px; font-size: .9rem; font-weight: 500;
}
.categorias a.ativa { background: var(--rosa); color: #fff; border-color: var(--rosa); }

/* Cardápio */
.cardapio { max-width: 900px; margin: 0 auto; padding: 8px 16px; }
.carregando { text-align: center; padding: 40px 0; color: var(--muted); }
.secao h2 { font-size: 1.2rem; margin: 18px 0 10px; scroll-margin-top: 70px; }
.grade { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grade { grid-template-columns: 1fr 1fr; } }

.produto {
  background: var(--card); border-radius: var(--raio); box-shadow: var(--sombra);
  display: flex; gap: 12px; padding: 12px; align-items: stretch;
}
.produto .info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.produto h3 { font-size: 1rem; }
.produto p { margin: 4px 0 8px; color: var(--muted); font-size: .85rem; }
.produto .rodape { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.produto .preco { font-weight: 700; color: var(--rosa-esc); }
.produto img { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.qtd-badge { background: var(--rosa); color: #fff; border-radius: 99px; padding: 0 8px; font-size: .8rem; margin-left: 6px; }

.btn {
  border: 0; border-radius: 10px; padding: 9px 16px; font-weight: 600;
  background: #f1e6dd; color: var(--texto);
}
.btn.primario { background: var(--rosa); color: #fff; }
.btn.primario:active { background: var(--rosa-esc); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.grande { width: 100%; padding: 15px; font-size: 1.05rem; border-radius: 12px; }
.btn-add { width: 38px; height: 38px; padding: 0; border-radius: 50%; font-size: 1.4rem; line-height: 1; }

/* Botão flutuante */
.fab {
  position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 10;
  max-width: 600px; margin: 0 auto; border: 0; border-radius: 14px; padding: 16px 18px;
  background: var(--rosa); color: #fff; font-weight: 600; font-size: 1rem;
  display: flex; justify-content: space-between; box-shadow: 0 6px 20px rgba(214, 60, 107, .4);
}
.fab b { background: #fff; color: var(--rosa); border-radius: 99px; padding: 0 8px; margin-left: 4px; }

/* Bottom sheet */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 20; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--fundo);
  max-width: 600px; margin: 0 auto; border-radius: 20px 20px 0 0; max-height: 92vh; overflow-y: auto;
  padding: 0 16px calc(16px + env(safe-area-inset-bottom));
  transform: translateY(105%); transition: transform .25s ease;
}
.sheet.aberto { transform: translateY(0); }
.sheet-topo {
  position: sticky; top: 0; background: var(--fundo); display: flex; align-items: center; gap: 8px;
  padding: 16px 0 12px; z-index: 1;
}
.sheet-topo h2 { flex: 1; font-size: 1.2rem; }
.fechar, .voltar { background: #f1e6dd; border: 0; width: 36px; height: 36px; border-radius: 50%; font-size: 1rem; }

.lista-carrinho .vazio { text-align: center; color: var(--muted); padding: 30px 0; }
.item-carrinho { background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 10px; box-shadow: var(--sombra); }
.item-carrinho .linha { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.item-carrinho input { width: 100%; margin-top: 8px; border: 1px solid var(--borda); border-radius: 8px; padding: 8px; font-size: .9rem; }
.contador { display: flex; align-items: center; gap: 10px; }
.contador button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--borda); background: #fff; font-size: 1.1rem; }

.resumo { background: #fff; border-radius: 12px; padding: 12px 14px; margin: 14px 0; }
.resumo div { display: flex; justify-content: space-between; padding: 3px 0; }
.resumo .total { font-weight: 700; font-size: 1.1rem; border-top: 1px dashed var(--borda); margin-top: 6px; padding-top: 8px; }

/* Formulário */
.form fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.form legend { font-weight: 700; margin-bottom: 8px; }
.form label { display: block; font-size: .88rem; color: var(--muted); margin-bottom: 10px; }
.form input:not([type=radio]), .form textarea {
  display: block; width: 100%; margin-top: 4px; padding: 12px; border: 1px solid var(--borda);
  border-radius: 10px; background: #fff; color: var(--texto); font-size: 16px;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--rosa); border-color: transparent; }
.opcoes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.opcoes.tres { grid-template-columns: 1fr 1fr 1fr; }
.opcao { margin: 0 !important; }
.opcao input { position: absolute; opacity: 0; }
.opcao span {
  display: block; text-align: center; padding: 12px 6px; border-radius: 10px; background: #fff;
  border: 2px solid var(--borda); color: var(--texto); font-weight: 600; font-size: .92rem;
}
.opcao input:checked + span { border-color: var(--rosa); background: #fdeef3; color: var(--rosa-esc); }

/* Toast */
.toast {
  position: fixed; left: 50%; top: 16px; transform: translate(-50%, -150%); z-index: 100;
  background: var(--texto); color: #fff; padding: 12px 18px; border-radius: 10px; max-width: 90vw;
  transition: transform .25s; box-shadow: var(--sombra); text-align: center;
}
.toast.show { transform: translate(-50%, 0); }
.toast.erro { background: var(--vermelho); }

/* Acompanhamento */
.acomp { max-width: 600px; margin: 0 auto; padding: 16px; }
.card { background: #fff; border-radius: var(--raio); box-shadow: var(--sombra); padding: 16px; margin-bottom: 14px; }
.status-grande { text-align: center; }
.status-grande .num { color: var(--muted); font-size: .9rem; }
.status-grande .rotulo { font-size: 1.5rem; font-weight: 800; margin: 6px 0; }
.status-grande.recusado .rotulo, .status-grande.cancelado .rotulo { color: var(--vermelho); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 18px 34px; color: var(--muted); }
.timeline li::before {
  content: ""; position: absolute; left: 6px; top: 3px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--borda);
}
.timeline li::after { content: ""; position: absolute; left: 13px; top: 22px; bottom: 0; width: 2px; background: var(--borda); }
.timeline li:last-child::after { display: none; }
.timeline li.feito { color: var(--texto); font-weight: 600; }
.timeline li.feito::before { background: var(--verde); border-color: var(--verde); }
.timeline li.atual::before { background: var(--rosa); border-color: var(--rosa); box-shadow: 0 0 0 5px #fbd5e1; }
.timeline small { display: block; font-weight: 400; color: var(--muted); }
.itens-resumo div { display: flex; justify-content: space-between; padding: 4px 0; }
.itens-resumo small { color: var(--muted); display: block; }
