/* Vitrine do hero: achadinhos reais que já saíram no grupo.
   Só entra em ação quando o vitrine.js carrega os dados; sem eles, a pilha estática continua. */

.pilha--vitrine { touch-action: pan-y; -webkit-user-select: none; user-select: none; }

.vit-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Posições das três cartas (centro por cima) */
.vit-card {
  --vit-band: #b85a33;
  --vit-ink: #ffffff;
  position: absolute;
  aspect-ratio: 4 / 5;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0;
  background: #ffffff;
  border-radius: clamp(14px, 1.8vw, 24px);
  border: 1px solid rgba(59, 42, 34, .07);
  box-shadow: 0 18px 40px rgba(28, 16, 10, .16);
  will-change: transform, opacity;
}
.vit-card--esq { left: 1%;  top: 18%; width: 44%; transform: rotate(-9deg); z-index: 1; }
.vit-card--dir { right: 1%; top: 13%; width: 44%; transform: rotate(8deg);  z-index: 1; }
.vit-card--centro { left: 24%; top: 11%; width: 52%; transform: rotate(-2deg); z-index: 2; box-shadow: 0 28px 60px rgba(28, 16, 10, .26); }

/* Tons por série (texto sempre com contraste >= 4,5:1 sobre a faixa) */
.vit-tom--natal    { --vit-band: #b8322e; --vit-ink: #ffffff; }
.vit-tom--mel      { --vit-band: #d9a55b; --vit-ink: #3b2a22; }
.vit-tom--cacau    { --vit-band: #3b2a22; --vit-ink: #fbf6ef; }
.vit-tom--terracota{ --vit-band: #b85a33; --vit-ink: #ffffff; }
.vit-tom--rosa     { --vit-band: #e3a1a6; --vit-ink: #3b2a22; }

.vit-card__foto {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7% 7% 4%;
  background: #ffffff;
}
.vit-card__foto img { display: block; width: 100%; height: 100%; object-fit: contain; }

.vit-card__selo {
  position: absolute;
  top: 6%;
  left: 6%;
  max-width: 80%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 9px 3px;
  border-radius: 999px;
  background: var(--vit-band);
  color: var(--vit-ink);
  font-family: var(--serif, 'Fraunces', Georgia, serif);
  font-style: italic;
  font-size: clamp(11px, 1vw, 14px);
  line-height: 1.3;
}
.vit-card--dir .vit-card__selo { left: auto; right: 6%; }

.vit-card__faixa {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6% 7% 7%;
  background: var(--vit-band);
  color: var(--vit-ink);
}
.vit-card--dir .vit-card__faixa { align-items: flex-end; text-align: right; }

.vit-card__nome {
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-weight: 600;
  font-size: clamp(11px, 1.05vw, 15px);
  line-height: 1.3;
}
.vit-card__precos { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; }
.vit-card__de { font-size: clamp(10px, .9vw, 13px); font-weight: 500; text-decoration: line-through; }
.vit-card__por { font-weight: 800; letter-spacing: -.02em; font-size: clamp(15px, 1.7vw, 24px); line-height: 1.15; }
.vit-card__nota {
  align-self: flex-end;
  margin-top: 1px;
  font-family: var(--mao, 'Caveat', cursive);
  font-weight: 700;
  font-size: clamp(14px, 1.45vw, 21px);
  line-height: 1;
  transform: rotate(-3deg);
}

/* Cartas de lado: só foto, selo e preço (o nome fica visível na carta do centro; leitor de tela ouve todos) */
.vit-card--esq .vit-card__nome, .vit-card--dir .vit-card__nome {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.vit-card--esq .vit-card__nota, .vit-card--dir .vit-card__nota,
.vit-card--esq .vit-card__de,   .vit-card--dir .vit-card__de { display: none; }
.vit-card--esq .vit-card__por, .vit-card--dir .vit-card__por { font-size: clamp(13px, 1.4vw, 19px); }

/* Legenda e controles, no rodapé da pilha (espaço já reservado: sem salto de layout) */
.vit-controles {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}
.vit-legenda {
  margin: 0;
  font-family: var(--serif, 'Fraunces', Georgia, serif);
  font-style: italic;
  font-size: clamp(14px, 1.3vw, 17px);
  line-height: 1.3;
  color: var(--terracota-texto, #a9502b);
}
.vit-nav { display: flex; align-items: center; gap: 6px; }
.vit-dots { display: flex; align-items: center; }
.vit-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.vit-dot span {
  position: relative;
  display: block;
  width: 8px;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #a08a78;
  transition: width .3s ease, background-color .3s ease;
}
.vit-dot[aria-current="true"] { width: 34px; }
.vit-dot[aria-current="true"] span { width: 26px; background: #d8c6b4; }
.vit-dot[aria-current="true"] span::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--vit-dot, #b85a33);
  transform-origin: left center;
  animation: vit-progresso var(--vit-hold, 4500ms) linear forwards;
}
.vit-dot--natal { --vit-dot: #b8322e; }
.pilha--pausada .vit-dot[aria-current="true"] span::after { animation-play-state: paused; }
@keyframes vit-progresso { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.vit-pausa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  border: 1.5px solid #74604f;
  background: transparent;
  color: #3b2a22;
  cursor: pointer;
}
.vit-pausa svg { width: 14px; height: 14px; }
.vit-dot:focus-visible, .vit-pausa:focus-visible { outline: 2px solid #a9502b; outline-offset: 2px; border-radius: 999px; }

@media (prefers-reduced-motion: reduce) {
  .vit-dot[aria-current="true"] span::after { animation: none; transform: none; }
  .vit-dot span { transition: none; }
}
