:root {
  /* Marca LaLe (Canva): lilás #CB6CE6 e verde-água #5CE6DE. Tons mais escuros para botões com texto branco. */
  --lilas: #CB6CE6;
  --agua: #5CE6DE;
  --roxo: #9B3FBF;
  --roxo-escuro: #3B1A52;
  --roxo-claro: #F4E2FB;
  --rosa: #CB6CE6;
  --rosa-claro: #F7E8FC;
  --verde: #14998F;
  --vermelho: #dc2626;
  --texto: #3B1A52;
  --texto-suave: #6b5b85;
  --fundo: #FBF5FE;
  --cartao: #ffffff;
  --borda: #EED3F7;
  --raio: 20px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 17px; line-height: 1.45; color: var(--texto); background: var(--fundo);
  -webkit-tap-highlight-color: transparent;
}
body.travado { overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--roxo); }
[hidden] { display: none !important; }

.faixa-teste { background: #fef3c7; color: #92400e; text-align: center; font-weight: 800; font-size: .85em; padding: 6px 12px; }

.cabeca {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 16px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--borda);
}
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--texto); min-width: 0; }
.marca b { display: block; font-size: 1.25em; letter-spacing: .2px; }
.marca small { display: block; color: var(--texto-suave); font-size: .78em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }
.logo {
  display: grid; place-items: center; flex: none; height: 46px; padding: 0 12px; border-radius: 14px;
  background: var(--lilas); box-shadow: 0 3px 0 var(--agua);
}
.logo img { display: block; height: 28px; width: auto; }
.botao-sacola {
  position: relative; flex: none; display: flex; align-items: center; gap: 6px;
  border: 0; border-radius: 999px; padding: 10px 16px; background: var(--roxo); color: #fff; font-weight: 800;
}
.contador {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--rosa);
  font-size: .8em; line-height: 22px; text-align: center;
}

.aviso-loja { margin: 0; padding: 10px 16px; background: var(--rosa-claro); text-align: center; font-weight: 700; }

main { max-width: 1100px; margin: 0 auto; padding: 16px; outline: none; min-height: 60vh; }

.destaque-topo {
  margin: 4px 0 18px; padding: 28px 20px; border-radius: var(--raio); text-align: center; color: #fff;
  background: linear-gradient(135deg, var(--lilas), var(--roxo)); box-shadow: 0 6px 0 var(--agua);
}
.destaque-topo h1 { margin: 0 0 6px; font-size: 2em; }
.destaque-topo p { margin: 0; font-size: 1.05em; opacity: .95; }

.busca input {
  width: 100%; padding: 12px 16px; border: 2px solid var(--borda); border-radius: 999px; background: #fff; margin-bottom: 16px;
}
.busca input:focus { outline: 3px solid var(--roxo-claro); border-color: var(--roxo); }

.vitrine { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.produto {
  display: flex; flex-direction: column; background: var(--cartao); border: 1px solid var(--borda);
  border-radius: var(--raio); overflow: hidden; box-shadow: 0 6px 18px rgba(155, 63, 191, .08);
}
.produto-foto {
  display: grid; place-items: center; aspect-ratio: 1; width: 100%; border: 0; padding: 0;
  background: var(--roxo-claro); overflow: hidden;
}
.produto-foto img { width: 100%; height: 100%; object-fit: cover; }
.produto-foto .emoji { font-size: 4.5em; }
.produto-info { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 16px; flex: 1; }
.produto-info h3 { margin: 0; font-size: 1.02em; }
.preco { margin: 0; font-size: 1.2em; font-weight: 900; color: var(--roxo-escuro); }
.produto-info .botao { margin-top: auto; }
.esgotado .produto-foto { filter: grayscale(.8); opacity: .7; }
.etiqueta-esgotado { margin-top: auto; align-self: flex-start; background: #f3f4f6; color: #6b7280; border-radius: 999px; padding: 4px 12px; font-weight: 800; font-size: .85em; }
.poucos { color: var(--rosa); font-weight: 800; }

.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px;
  padding: 10px 18px; border: 0; border-radius: 999px; background: var(--roxo); color: #fff;
  font-weight: 800; text-decoration: none; text-align: center;
}
.botao:hover { background: var(--roxo-escuro); }
.botao:disabled { opacity: .6; cursor: wait; }
.botao.claro { background: var(--roxo-claro); color: var(--roxo-escuro); }
.botao.largo { width: 100%; margin-top: 12px; }

.cartao { background: #fff; border: 1px solid var(--borda); border-radius: var(--raio); padding: 20px; }
.centro { text-align: center; }

/* Sacola (gaveta lateral; no celular ocupa a tela) */
.sacola { position: fixed; inset: 0; z-index: 20; background: rgba(42, 24, 70, .45); display: flex; justify-content: flex-end; }
.sacola-caixa {
  width: min(440px, 100%); height: 100%; overflow-y: auto; background: #fff; padding: 16px 18px 28px;
  box-shadow: -10px 0 30px rgba(0, 0, 0, .15);
}
.sacola-topo { display: flex; justify-content: space-between; align-items: center; }
.sacola-topo h2 { margin: 0; font-size: 1.25em; }
.fechar { border: 0; background: var(--roxo-claro); border-radius: 50%; width: 40px; height: 40px; }
.lista-sacola { list-style: none; padding: 0; margin: 16px 0; }
.lista-sacola li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--borda); }
.mini { width: 56px; height: 56px; flex: none; border-radius: 14px; object-fit: cover; background: var(--roxo-claro); display: grid; place-items: center; font-size: 1.8em; }
.nome { flex: 1; font-weight: 700; }
.nome small { display: block; color: var(--texto-suave); font-weight: 600; }
.qtd { display: flex; align-items: center; gap: 8px; }
.qtd button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--roxo-claro); font-weight: 900; font-size: 1.1em; }
.total { display: flex; justify-content: space-between; font-size: 1.15em; margin: 12px 0 0; }

.detalhe { text-align: center; padding-top: 12px; }
.detalhe-foto { width: 100%; max-height: 360px; object-fit: cover; border-radius: var(--raio); }
.detalhe .emoji { display: block; font-size: 6em; background: var(--roxo-claro); border-radius: var(--raio); padding: 20px; }
.detalhe h2 { margin: 14px 0 4px; }

.form label { display: block; font-weight: 700; margin: 12px 0 4px; }
.form input:not([type=radio]):not([type=checkbox]), .form textarea {
  width: 100%; padding: 11px 14px; border: 2px solid var(--borda); border-radius: 14px; background: #fff;
}
.form input:focus, .form textarea:focus { outline: 3px solid var(--roxo-claro); border-color: var(--roxo); }
fieldset { border: 0; padding: 0; margin: 14px 0 0; }
legend { font-weight: 800; margin-bottom: 4px; }
.form label.opcao, .form label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; margin: 6px 0; }
.opcao { padding: 10px 12px; border: 2px solid var(--borda); border-radius: 14px; }
.opcao:has(input:checked) { border-color: var(--roxo); background: var(--roxo-claro); }
input[type=radio], input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--roxo); flex: none; margin-top: 2px; }

.pedido-final { max-width: 520px; margin: 0 auto; text-align: center; }
.pedido-final ul { list-style: none; padding: 0; }
.qr { width: 240px; max-width: 100%; image-rendering: pixelated; }
.alerta { background: #fef3c7; color: #92400e; border-radius: 14px; padding: 10px 12px; font-weight: 700; }
.etapa { font-size: 1.1em; }
.mini-texto { color: var(--texto-suave); font-size: .85em; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 30;
  background: var(--texto); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 700;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .2); max-width: calc(100% - 32px);
}
.toast.ok { background: var(--verde); }
.toast.erro { background: var(--vermelho); }

.rodape { text-align: center; padding: 28px 16px 40px; color: var(--texto-suave); border-top: 1px solid var(--borda); margin-top: 32px; }
.rodape p { margin: 6px 0; }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .vitrine { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .produto-info { padding: 10px; }
  .produto-info .botao { min-height: 40px; padding: 8px 10px; font-size: .9em; }
  .botao-sacola span { display: none; }
  .marca small { display: none; }
  .destaque-topo { padding: 22px 14px; }
  .destaque-topo h1 { font-size: 1.6em; }
  .sacola-caixa { width: 100%; }
}
