:root {
  --acai: #5b2a86;
  --acai-escuro: #3d1466;
  --manga: #ff8a00;
  --pitaya: #ff2d78;
  --amarelo: #ffe14a;
  --creme: #fff6ee;
  --tinta: #2a123f;
  --cartao: #ffffff;
  --linha: #f0e2d4;
  --fonte: "Nunito", "Segoe UI", sans-serif;
  --display: "Baloo 2", "Nunito", sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  background: #2a123f;
  color: var(--tinta);
  font-family: var(--fonte);
  font-size: 16px;
  line-height: 1.4;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.app {
  position: relative;
  width: min(480px, 100%);
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 138, 0, 0.16), transparent 28%),
    var(--creme);
}

.faixa {
  margin: 0;
  padding: calc(8px + env(safe-area-inset-top)) 14px 8px;
  background: var(--acai-escuro);
  color: white;
  text-align: center;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

#faixa-cidade {
  overflow: hidden;
  padding-right: 0;
  padding-left: 0;
  text-align: left;
}

.faixa-trilho {
  display: flex;
  width: max-content;
  animation: faixa-passar 12s linear infinite;
}

.faixa-texto {
  padding-right: 3rem;
  white-space: nowrap;
}

@keyframes faixa-passar {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .faixa-trilho {
    animation: none;
    width: 100%;
    justify-content: center;
  }

  #faixa-cidade {
    padding-right: 14px;
    padding-left: 14px;
    text-align: center;
  }

  .faixa-texto[aria-hidden="true"] {
    display: none;
  }
}

.topo {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 4px;
}

.marca {
  text-align: center;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--acai);
  line-height: 1;
}

.voltar,
.icone-carrinho {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--acai);
  text-decoration: none;
  background: white;
  box-shadow: 0 6px 16px rgba(61, 20, 102, 0.08);
}

.icone-carrinho {
  position: relative;
}

.selo {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--pitaya);
  color: white;
  font-size: 0.68rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

main {
  flex: 1;
  overflow: auto;
  padding: 8px 16px 20px;
  -webkit-overflow-scrolling: touch;
}

.tela {
  display: grid;
  gap: 14px;
}

.logotipo {
  width: 100%;
  height: auto;
  border-radius: 24px;
  background: white;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 26px 22px 22px;
  border-radius: 28px;
  color: white;
  background:
    radial-gradient(circle at 8% 100%, rgba(96, 224, 232, 0.7), transparent 34%),
    linear-gradient(155deg, #0074c4 0%, #00a0dc 52%, #1ec4e6 100%);
  container-type: inline-size;
}

.olho {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amarelo);
}

h1 {
  font-family: var(--display);
  font-size: 2rem;
  line-height: 1.05;
  font-weight: 800;
}

.hero h1 {
  margin-top: 8px;
  font-size: 1.6rem;
  max-width: 19rem;
}

h1:focus {
  outline: none;
}

.hero p:last-of-type {
  margin-top: 10px;
  font-size: 3.6cqi;
  font-weight: 700;
  line-height: 1.35;
}

.hero p:last-of-type span {
  display: block;
  white-space: nowrap;
}

.cta,
.confirmar,
#finalizar,
.secundario {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin-top: 16px;
  border: 0;
  border-radius: 999px;
  text-decoration: none;
  text-align: center;
  font-weight: 800;
  touch-action: manipulation;
}

.cta,
#finalizar,
.confirmar {
  background: var(--acai);
  color: white;
  box-shadow: 0 10px 20px rgba(91, 42, 134, 0.28);
}

.secundario {
  background: white;
  color: var(--acai);
  border: 2px solid #ead8f2;
}

.cancelar-pedido {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin-top: 16px;
  border: 0;
  border-radius: 999px;
  background: var(--pitaya);
  color: white;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(255, 45, 120, 0.28);
}

.redes {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.redes a {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border-radius: 999px;
  background: white;
  text-decoration: none;
  font-weight: 800;
}

.redes .whatsapp {
  color: #128c7e;
}

.redes .instagram {
  color: #c13584;
}

.vitrine {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.vitrine figure {
  position: relative;
  width: calc((100% - 20px) / 3);
  max-width: 148px;
  aspect-ratio: 3 / 4;
  margin: 0;
  border-radius: 24px;
  overflow: hidden;
  background: white;
  box-shadow: 0 12px 24px rgba(42, 18, 63, 0.12);
  animation: boiar 2.8s ease-in-out infinite alternate;
}

.vitrine figure:nth-child(2) {
  animation-delay: 0.35s;
}

.vitrine figure:nth-child(3) {
  animation-delay: 0.7s;
}

.vitrine .foto {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.passos {
  display: grid;
  gap: 8px;
}

.passos li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: white;
  font-weight: 800;
}

.passos strong {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pitaya);
  color: white;
  flex: none;
}

.passos li:nth-child(2) strong {
  background: var(--manga);
}

.passos li:nth-child(3) strong {
  background: #00a88e;
}

.nota-taxa {
  font-weight: 800;
  color: var(--acai);
  text-align: center;
}

.horarios {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 22px;
  background: white;
}

.horarios h2 {
  font-family: var(--display);
  font-size: 1.25rem;
}

.status-loja {
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 800;
  text-align: center;
}

.status-loja.aberto {
  background: #e5f8ef;
  color: #0d6b45;
}

.status-loja.fechado {
  background: #fff1d6;
  color: #6a3b00;
}

.grade-horarios {
  display: grid;
  gap: 8px;
}

.grade-horarios li {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--creme);
}

.grade-horarios li.hoje {
  outline: 2px solid var(--acai);
  background: white;
}

.horario-hoje {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--creme);
}

.ver-semana,
.fechar-horarios {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
}

.ver-semana {
  background: #fff1e4;
  color: var(--acai-escuro);
}

.dialogo-horarios {
  width: min(400px, calc(100% - 32px));
  max-height: min(640px, calc(100dvh - 32px));
  overflow: auto;
}

.dialogo-horarios .grade-horarios {
  margin-top: 14px;
}

.fechar-horarios {
  width: 100%;
  margin-top: 16px;
  background: var(--acai);
  color: white;
}

.em-breve {
  color: var(--acai-escuro);
  text-align: center;
  line-height: 1.45;
}

.turnos {
  display: grid;
  gap: 2px;
  color: #6d5878;
  font-size: 0.88rem;
  font-weight: 700;
}

.turnos em {
  font-style: normal;
  color: var(--tinta);
  font-weight: 800;
}

.aviso-minimo {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff1d6;
  color: #6a3b00;
  font-weight: 800;
  text-align: center;
}

.intro {
  color: #6d5878;
  font-weight: 700;
}

.grade-categorias,
.lista-produtos,
.lista-itens {
  display: grid;
  gap: 12px;
}

.categoria,
.produto,
.item-resumo,
.cartao {
  background: var(--cartao);
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(61, 20, 102, 0.06);
}

.categoria {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  text-decoration: none;
  border-left: 6px solid var(--acento, var(--pitaya));
}

.categoria img,
.produto img,
.item-resumo img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 20px;
  background: #fff1f6;
}

.categoria h2,
.produto h2,
.item-nome {
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1.1;
}

.categoria p,
.descricao,
.item-meta {
  margin-top: 4px;
  color: #6d5878;
  font-weight: 700;
  font-size: 0.92rem;
}

.categoria small {
  display: inline-block;
  margin-top: 6px;
  color: var(--acai);
  font-weight: 800;
}

.cat-geladinho { --acento: #ff2d78; }
.cat-acai-garrafa { --acento: #5b2a86; }
.cat-acai-copo { --acento: #7a3ff0; }
.cat-cone { --acento: #ff8a00; }
.cat-pudim { --acento: #e0a106; }

.produto {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 12px;
}

.produto-indisponivel {
  opacity: 0.55;
}

.estoque {
  margin-top: 4px;
  font-weight: 700;
}

.produto img {
  width: 104px;
  height: 104px;
}

.unitario {
  margin-top: 6px;
  font-weight: 700;
}

.unitario strong,
.campo-total output {
  color: var(--acai);
}

.qtd-bloco {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.qtd-bloco > span,
.campo-total span {
  font-size: 0.82rem;
  font-weight: 800;
  color: #6d5878;
}

.qtd {
  display: flex;
  align-items: center;
  border-radius: 999px;
  background: #fff1e4;
}

.qtd button,
.item-controles button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: white;
  color: var(--acai);
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
}

.qtd input {
  width: 42px;
  border: 0;
  background: transparent;
  text-align: center;
  font-weight: 800;
  appearance: textfield;
  -moz-appearance: textfield;
}

.qtd input::-webkit-outer-spin-button,
.qtd input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.campo-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 8px;
}

.campo-total output {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 800;
}

.adicionar,
.remover,
.guardar {
  border: 0;
  font-weight: 800;
  touch-action: manipulation;
}

.adicionar {
  grid-column: 1 / -1;
  min-height: 46px;
  border-radius: 14px;
  background: var(--acai);
  color: white;
}

.adicionar:disabled,
.qtd button:disabled,
.item-controles button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.aviso-qtd {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffe4ee;
  color: #8d123f;
  font-weight: 800;
}

.item-resumo {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.item-resumo img {
  width: 72px;
  height: 72px;
}

.item-controles {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.item-controles span {
  min-width: 1.4rem;
  text-align: center;
  font-weight: 800;
}

.remover {
  margin-left: auto;
  background: transparent;
  color: var(--pitaya);
  padding: 6px;
}

.item-total {
  font-family: var(--display);
  font-size: 1.05rem;
}

.totais {
  margin: 0;
  padding: 4px 4px 0;
}

.totais div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid var(--linha);
  font-weight: 700;
}

.totais .total-final {
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--acai);
}

.formulario {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 24px;
  background: white;
}

.formulario h2 {
  font-family: var(--display);
  font-size: 1.35rem;
}

.campo {
  display: grid;
  gap: 6px;
  font-weight: 800;
  font-size: 0.92rem;
}

.campo input {
  width: 100%;
  min-height: 48px;
  border: 2px solid #eadfef;
  border-radius: 14px;
  padding: 0 14px;
  background: #fffdfb;
  font-size: 16px;
}

.endereco {
  display: grid;
  grid-template-columns: 1fr 108px;
  gap: 10px;
}

.aceite {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 800;
}

.aceite input {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  accent-color: var(--acai);
  flex: none;
}

.pagamento-opcoes {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.pagamento-opcoes legend {
  margin-bottom: 4px;
  font-family: var(--display);
  font-weight: 800;
}

.pagamento-opcao {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border: 2px solid #eadfef;
  border-radius: 14px;
  background: #fffdfb;
  font-weight: 800;
}

.pagamento-opcao input {
  width: 22px;
  height: 22px;
  accent-color: var(--acai);
  flex: none;
}

.painel-pix {
  display: grid;
  gap: 12px;
}

.chave-pix {
  margin: 0;
  padding: 12px 14px;
  border: 2px dashed #eadfef;
  border-radius: 14px;
  background: #fffdfb;
  font-weight: 800;
  word-break: break-all;
}

.guardar {
  min-height: 52px;
  border-radius: 16px;
  border: 2px solid var(--acai);
  background: white;
  color: var(--acai-escuro);
}

.guardar.ativo {
  background: var(--acai);
  color: white;
}

.guardar.ativo::after {
  content: " · ativado";
}

.erros {
  padding: 10px 12px;
  border-radius: 14px;
  background: #ffe4ee;
  color: #8d123f;
  font-weight: 800;
}

.erros ul {
  display: grid;
  gap: 4px;
}

.erros li + li {
  margin-top: 4px;
}

.aviso-pagamento,
.aviso-rodape {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff1d6;
  color: #6a3b00;
  font-weight: 800;
}

.aviso-entrega {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #e5f8f2;
  color: #0d5c4d;
  font-weight: 800;
}

.etapas-pedido {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.etapas-pedido li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 12px;
  border: 2px solid #eadfef;
  border-radius: 14px;
  background: #fffdfb;
  font-weight: 800;
}

.etapas-pedido li.feita {
  border-color: #b7e6d8;
  background: #e5f8f2;
}

.etapa-ok {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: #0d5c4d;
  color: white;
  font-size: 0.8rem;
}

.etapa-ok[hidden] {
  display: none;
}

.rodape {
  padding: 8px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--creme) 72%, rgba(255, 246, 238, 0));
}

.rodape .aviso-rodape {
  margin-bottom: 8px;
}

#finalizar,
.confirmar {
  margin-top: 0;
}

.vazio {
  padding: 18px;
  border-radius: 24px;
  background: white;
  font-weight: 800;
}

.dialogo {
  width: min(360px, calc(100% - 32px));
  margin: auto;
  border: 0;
  border-radius: 24px;
  padding: 22px 18px 18px;
  background: white;
  color: var(--tinta);
  box-shadow: 0 24px 60px rgba(42, 18, 63, 0.28);
}

.dialogo::backdrop {
  background: rgba(42, 18, 63, 0.55);
}

.dialogo h2 {
  font-family: var(--display);
  font-size: 1.45rem;
}

.dialogo p {
  margin-top: 8px;
  font-weight: 700;
}

.dialogo-acoes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.dialogo-acoes button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
}

#cancelar-remocao,
#manter-pedido {
  background: #fff1e4;
  color: var(--acai-escuro);
}

#confirmar-remocao-botao,
#confirmar-cancelamento-botao {
  background: var(--pitaya);
  color: white;
}

.toast {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 3;
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: #12372f;
  color: white;
  font-weight: 800;
  text-align: center;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--manga);
  outline-offset: 2px;
}

@media (min-width: 520px) {
  body {
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    place-items: center;
  }

  .app {
    height: min(920px, calc(100dvh - 32px));
    border-radius: 32px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  .vitrine figure {
    animation: none;
  }
}

@keyframes boiar {
  from { transform: translateY(0); }
  to { transform: translateY(-6px); }
}
