:root {
  --texto: #f5f4f0;
  --texto-suave: rgba(245, 244, 240, 0.72);
  --vidro: rgba(20, 20, 22, 0.45);

  --carta-texto: #f5f4f0;
  --carta-texto-suave: rgba(245, 244, 240, 0.68);
  --carta-riscado: rgba(245, 244, 240, 0.45);

  --verde: #2fa84f;
  --azul: #3b82f6;
  --amarelo: #d69e00;
  --laranja: #e2711d;

  --topo-altura: 140px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--texto);
  background: #000;
  -webkit-user-select: none;
  user-select: none;
  min-height: 100vh;
}

body.modal-aberto {
  overflow: hidden;
}

/* fundo fixo, separado do body pra não esticar/repetir no scroll da pilha
   (background-attachment:fixed é pouco confiável no Safari/iOS) */
.fundo-fixo {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url("../imagens/lp-background/fundo-gradiente-verde.jpg") center top / cover no-repeat;
}

#app {
  position: relative;
  z-index: 1;
}

button {
  font-family: inherit;
}

/* ---------- topo fixo ---------- */

.topo-mini {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: linear-gradient(180deg, rgba(16, 16, 24, 0.85), transparent);
}

.logo {
  height: 100px;
  width: auto;
  display: block;
  -webkit-user-drag: none;
}

/* ---------- pilha de cards (carrossel vertical por scroll) ---------- */

.pilha {
  position: relative;
  padding: 0 20px;
}

.rodape {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 36px 20px 56px;
  color: var(--texto-suave);
  font-size: 0.8rem;
}

/* cada peça ocupa uma tela cheia; o card gruda logo abaixo do cabeçalho e o
   da peça anterior encolhe/some por baixo (ver atualizarColapso em main.js) */
.carta-secao {
  position: sticky;
  top: 0;
  height: 100vh;
  box-sizing: border-box;
  padding-top: calc(var(--topo-altura) + 20px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* glow ambiente atrás do card — cor herdada do estado da peça (--cor-glow, definida inline) */
.carta-secao::before {
  content: "";
  position: absolute;
  /* acompanha onde o card realmente fica (perto do topo), não o centro da tela inteira */
  top: calc(var(--topo-altura) + 20px + 160px);
  left: 50%;
  width: min(80vw, 520px);
  height: min(80vw, 520px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--cor-glow) 0%, transparent 55%);
  opacity: 0.55;
  filter: blur(40px);
  pointer-events: none;
}

.carta {
  width: min(420px, 88vw);
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-align: left;
  transform-origin: top center;
  transition: box-shadow 0.2s ease;
}

.carta:hover {
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55);
}

.carta-foto {
  position: relative;
  width: 100%;
  height: 280px;
  flex-shrink: 0;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.carta-foto img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
  -webkit-user-drag: none;
}

.vendido .carta-foto img {
  filter: grayscale(70%);
  opacity: 0.5;
}

.vendido .carta-corpo {
  filter: grayscale(75%);
  opacity: 0.55;
}

.carimbo-vendido {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-10deg);
  border: 2px solid #3f6e14;
  color: #234a08;
  background: linear-gradient(180deg, #d7f34d 0%, #9ad12e 60%, #5e9a1a 100%);
  font-weight: 800;
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 9px 28px;
  border-radius: 8px;
  pointer-events: none;
}

.carta-selo {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
}

.carta-selo-burst {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.carta-selo-texto {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #234a08;
  font-weight: 800;
  font-size: 0.56rem;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  padding: 0 8px;
}

.carta-foto-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  text-align: center;
  padding: 12px;
}

.carta-corpo {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #000;
  color: var(--carta-texto);
}

.carta-categoria {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--carta-texto-suave);
}

.carta-nome {
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
  font-size: 1.35rem;
}

.carta-descricao {
  margin: 0;
  font-size: 0.9rem;
  color: var(--carta-texto-suave);
}

.estado {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--carta-texto-suave);
}

.estado-bolinha {
  position: relative;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.estado-bolinha::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: pulso-estado 1.8s ease-out infinite;
}

@keyframes pulso-estado {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

.carta-rodape {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.precos {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.preco-riscado {
  color: var(--carta-riscado);
  text-decoration: line-through;
  font-size: 0.9rem;
}

.preco-normal {
  font-size: 1.35rem;
  font-weight: 700;
}

.preco-pendente {
  font-size: 1rem;
  font-weight: 600;
  font-style: italic;
  color: var(--carta-texto-suave);
}

.carta-cta {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(37, 211, 102, 0.45);
}

.carta-cta:hover {
  background: #1ebe5b;
}

/* fotos da própria peça: setas + dots */

.carta-seta-foto {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
}

.carta-seta-foto.anterior {
  left: 8px;
}

.carta-seta-foto.proxima {
  right: 8px;
}

.foto-dots {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
}

.foto-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.22);
  cursor: pointer;
  padding: 0;
}

.foto-dot.ativo {
  background: #1a1a1a;
}

/* ---------- modal de detalhes ---------- */

.modal-fundo {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(8, 8, 12, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: default;
}

.modal-caixa {
  position: relative;
  width: min(440px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  cursor: default;
}

.modal-fechar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.modal-foto {
  height: 340px;
  cursor: zoom-in;
}

.icone-lupa {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* ---------- zoom de foto (dentro do modal) ---------- */

.zoom-fundo {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 5, 8, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.zoom-foto {
  width: min(94vw, 720px);
  height: min(80vh, 720px);
  cursor: default;
}

.zoom-foto img {
  padding: 24px;
}

/* ---------- responsivo ---------- */

@media (min-width: 900px) {
  .carta-secao::before {
    width: 780px;
    height: 780px;
    opacity: 0.6;
  }

  .carta {
    width: min(560px, 60vw);
  }

  .carta-foto {
    height: 380px;
  }

  .carta-corpo {
    padding: 28px 32px 30px;
    gap: 10px;
  }

  .carta-nome {
    font-size: 1.7rem;
  }

  .carta-descricao {
    font-size: 1rem;
  }

  .preco-normal {
    font-size: 1.6rem;
  }

  .carta-cta {
    width: 52px;
    height: 52px;
  }

  .carta-selo {
    width: 84px;
    height: 84px;
  }

  .carta-selo-texto {
    font-size: 0.64rem;
  }

  .carimbo-vendido {
    font-size: 1.9rem;
    padding: 12px 38px;
    border-width: 3px;
  }
}

@media (max-width: 480px) {
  :root {
    --topo-altura: 96px;
  }

  .topo-mini {
    padding: 10px 18px;
  }

  .logo {
    height: 74px;
  }

  .carta-foto {
    height: 220px;
  }

  .modal-foto {
    height: 260px;
  }

  .zoom-foto {
    width: 94vw;
    height: 70vh;
  }
}
