*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }

/* Campos e botões não herdam a cor do texto: o navegador pinta cada um com a
   cor própria dele, que é preta. Sobre o roxo do catálogo isso deixava os
   contadores de quantidade, o − / + e o texto digitado na observação quase
   invisíveis. Quem tem classe de cor própria continua mandando: um seletor de
   elemento perde para qualquer classe do Tailwind. */
button, input, textarea, select { color: inherit; }

.star-pattern {
  background-image:
    radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 50px 160px, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.5), transparent),
    radial-gradient(2px 2px at 130px 80px, rgba(242,193,78,0.4), transparent),
    radial-gradient(1.5px 1.5px at 160px 120px, rgba(255,255,255,0.6), transparent);
  background-repeat: repeat;
  background-size: 200px 200px;
  opacity: 0.3;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1;
  pointer-events: none;
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.sobreposicao {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(9,5,18,0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.sobreposicao[data-aberto='true'] { opacity: 1; pointer-events: auto; }

.folha {
  width: 100%;
  max-width: 620px;
  max-height: 88vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(180deg, #251547, #1b0f36);
  border: 1px solid #3d2470;
  border-bottom: none;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.22,1,0.36,1);
}
.sobreposicao[data-aberto='true'] .folha { transform: none; }

.folha__puxador {
  width: 44px;
  height: 4px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: #3d2470;
}

.folha__topo {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: linear-gradient(180deg, #251547 70%, transparent);
}

.folha__titulo {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.06rem;
  font-weight: 700;
  color: #f3ecff;
}

.fechar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: none;
  cursor: pointer;
  color: #f3ecff;
}
.fechar:active { transform: scale(0.9); }

.detalhe__galeria {
  position: relative;
  aspect-ratio: 1;
  background: #120a24;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.detalhe__galeria::-webkit-scrollbar { display: none; }
.detalhe__galeria img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  scroll-snap-align: center;
}

.detalhe__pontos {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0 0;
}

.ponto {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3d2470;
  transition: background 0.2s, width 0.2s;
}
.ponto[data-ativo='true'] {
  width: 20px;
  border-radius: 999px;
  background: #f2c14e;
}

.tag {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(168,85,247,0.18);
  border: 1px solid rgba(168,85,247,0.35);
  color: #d8b4fe;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Pronta entrega: mesma tag, outra leitura. O verde separa "já existe, sai
   hoje" do prazo a combinar, sem tocar no ouro do preço. */
.tag--pronta {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(52, 211, 153, 0.4);
  color: #6ee7b7;
}

#avisoTopo:not(.oculto) {
  /* Margens negativas: o aviso vive dentro do cabeçalho, mas sangra até as
     bordas, por cima do padding dele. */
  margin: -12px -16px 12px;
  /* Dourado mais fundo para carregar texto branco: no dourado claro o branco
     ficava em ~1,9:1 e era quase ilegível. Assim fica entre 4,7:1 e 6:1. */
  background: linear-gradient(90deg, #8a5709, #a06710);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  padding: 8px 16px;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.toasts {
  position: fixed;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}

.toast {
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(42,24,82,0.97);
  border: 1px solid #a855f7;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  color: #f3ecff;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', sans-serif;
  animation: toast-entra 0.25s ease both;
}
.toast--erro { border-color: #fb7185; }

@keyframes toast-entra {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.oculto { display: none !important; }

.girando {
  animation: girar 0.8s linear infinite;
}
@keyframes girar {
  to { transform: rotate(360deg); }
}

@media (min-width: 860px) {
  .sobreposicao { align-items: center; padding: 24px; }
  .folha {
    border-radius: 24px;
    border-bottom: 1px solid #3d2470;
    transform: translateY(24px) scale(0.97);
    opacity: 0;
    transition: transform 0.25s, opacity 0.25s;
  }
  .sobreposicao[data-aberto='true'] .folha { transform: none; opacity: 1; }
  .folha__puxador { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
