/* Package cards — borda vidro + arte limpa (ref. Steam Key) */
.glow-card {
  --card-accent: #a855f7;
  --card-accent-rgb: 168, 85, 247;
  --card-accent-soft: rgba(168, 85, 247, 0.88);
  --card-bg-image: none;
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  min-height: 12.5rem;
  border-radius: 0.875rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  font-family: 'Geist', 'Kanit', system-ui, sans-serif;
  background: transparent;
  border: 1px solid rgba(var(--card-accent-rgb), 0.5);
  box-shadow: 0 0 14px rgba(var(--card-accent-rgb), 0.22), 0 8px 28px rgba(0, 0, 0, 0.35);
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

/* Linha de luz no topo da borda */
.glow-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  z-index: 7;
  border-radius: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.45) 35%,
    rgba(var(--card-accent-rgb), 0.9) 50%,
    rgba(255, 255, 255, 0.35) 65%,
    transparent
  );
  pointer-events: none;
}

/* Borda liquid glass — só o contorno, sem cobrir a img */
.glow-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 6;
  border-radius: inherit;
  pointer-events: none;
  padding: 1px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.32) 0%,
    rgba(var(--card-accent-rgb), 0.7) 28%,
    rgba(var(--card-accent-rgb), 0.45) 55%,
    rgba(255, 255, 255, 0.18) 80%,
    rgba(var(--card-accent-rgb), 0.55) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
}

/* Camadas antigas — sem overlay branco no centro */
.glow-card__gradient,
.glow-card__glass {
  display: none;
}

/* Textura opcional (atrás do vidro) */
.glow-card__decor {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  background-image: var(--card-bg-image, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: opacity 0.3s ease;
}

.glow-card--has-bg .glow-card__decor {
  opacity: 0.35;
  z-index: 2;
}

.glow-card--has-bg .glow-card__cover {
  z-index: 3;
}

/* Brilho central desligado — cor fica só na borda */
.glow-card__shine {
  display: none;
}

.glow-card:hover {
  border-color: rgba(var(--card-accent-rgb), 0.72);
  transform: scale(1.02);
  box-shadow:
    0 0 20px rgba(var(--card-accent-rgb), 0.34),
    0 10px 32px rgba(0, 0, 0, 0.4);
}

.glow-card--compact:hover {
  transform: scale(0.98);
}

/* Arte em tela cheia */
.glow-card__cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.35s ease;
  -webkit-mask-image: linear-gradient(#000 0%, #000 58%, transparent 92%);
  mask-image: linear-gradient(#000 0%, #000 58%, transparent 92%);
}

.glow-card:hover .glow-card__cover {
  transform: scale(1.05);
}

.glow-card--wide .glow-card__cover {
  object-position: center top;
}

.glow-card--tall .glow-card__cover {
  object-fit: contain;
  object-position: center 15%;
  -webkit-mask-image: linear-gradient(#000 0%, #000 48%, transparent 94%);
  mask-image: linear-gradient(#000 0%, #000 48%, transparent 94%);
}

.glow-card__cover.is-sold-out {
  opacity: 0.5;
  filter: grayscale(0.5) brightness(0.65);
}

/* Degradê preto no rodapé (legibilidade do texto) */
.glow-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.58) 0%,
    rgba(0, 0, 0, 0.32) 20%,
    rgba(0, 0, 0, 0.12) 38%,
    transparent 52%
  );
}

/* Texto sobre a arte */
.glow-card__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.65rem 0.75rem 0.75rem;
  background: transparent;
}

/* Tag NOVO — canto do card, mesma cor do accent */
.glow-card__badge,
.classic-card__badge {
  position: absolute;
  top: 0;
  right: 0;
  margin: 0;
  padding: 0.3rem 0.55rem 0.34rem 0.65rem;
  border-radius: 0 0 0 0.625rem;
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  line-height: 1;
  text-transform: uppercase;
  color: #fff;
  background: var(--card-accent);
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: -3px 3px 10px rgba(0, 0, 0, 0.28);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.glow-card__badge {
  z-index: 8;
}

.glow-card__sold-out {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  transform: translate(-50%, -50%);
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.78);
}

.glow-card__name,
.glow-card__tagline,
.glow-card__from,
.glow-card__compare,
.glow-card__amount {
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.95),
    0 2px 14px rgba(0, 0, 0, 0.8);
}

.glow-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.glow-card__name {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: #fff;
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.glow-card__tagline {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.25;
  color: var(--card-accent);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.glow-card__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
}

.glow-card__price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.glow-card__compare {
  margin-bottom: 0.125rem;
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.35);
  text-decoration: line-through;
}

.glow-card__from {
  font-size: 0.5625rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
  line-height: 1.35;
}

.glow-card__amount {
  margin-top: 0.125rem;
  font-size: 1.3125rem;
  font-weight: 500;
  line-height: 1;
  color: #fff;
  letter-spacing: -0.03em;
}

.glow-card__cart {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(var(--card-accent-rgb), 0.55);
  background: rgba(0, 0, 0, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 10px rgba(var(--card-accent-rgb), 0.12);
  color: var(--card-accent);
}

.glow-card__cart svg {
  width: 1.125rem;
  height: 1.125rem;
  stroke: var(--card-accent);
  stroke-width: 2;
}

.glow-card:hover .glow-card__cart {
  border-color: rgba(var(--card-accent-rgb), 0.85);
  background: rgba(0, 0, 0, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 14px rgba(var(--card-accent-rgb), 0.25);
}

/* Fallback */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glow-card__overlay {
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.55) 0%,
      transparent 48%
    );
  }
}

/* Grid dos cards */
.package-list,
.category-grid {
  align-items: stretch;
}

.package-list > .reveal-fade-up,
.category-grid > .reveal-fade-up {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.package-list > .reveal-fade-up > .glow-card,
.category-grid > .reveal-fade-up > .glow-card,
.package-list > .reveal-fade-up > .classic-card,
.category-grid > .reveal-fade-up > .classic-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  flex: 1 1 auto;
}

.category-page .category-grid,
.package-list {
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .category-page .category-grid,
  .package-list {
    gap: 0.875rem;
  }

  .glow-card {
    border-radius: 0.875rem;
  }

  .glow-card__name {
    font-size: 1rem;
  }

  .glow-card__amount {
    font-size: 1.25rem;
  }

  .glow-card__content {
    padding: 0.75rem 0.875rem 0.875rem;
  }
}

/* Card padrão (classic) — visual antigo / Caixa Misteriosa */
.classic-card {
  --card-accent: #a855f7;
  --card-accent-rgb: 168, 85, 247;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  min-height: 12.5rem;
  border-radius: 0.875rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  font-family: 'Geist', 'Kanit', system-ui, sans-serif;
  background: #12121a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.classic-card:hover {
  transform: scale(1.02);
  border-color: var(--card-accent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.classic-card--compact:hover {
  transform: scale(0.98);
}

.classic-card__media {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: #16161f;
  overflow: hidden;
}

.classic-card__cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.3s ease;
}

.classic-card:hover .classic-card__cover {
  transform: scale(1.04);
}

.classic-card__cover.is-sold-out {
  opacity: 0.55;
  filter: grayscale(0.45);
}

.classic-card__badge {
  z-index: 5;
}

.classic-card__sold-out {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
}

.classic-card__body {
  position: relative;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.65rem 0.7rem 0.75rem;
  background: #12121a;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.classic-card__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  align-self: flex-start;
  max-width: 100%;
  padding: 0.2rem 0.45rem;
  border-radius: 0.3125rem;
  border: 1px solid currentColor;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.2;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.03);
}

.classic-card__chip svg {
  width: 0.7rem;
  height: 0.7rem;
  flex-shrink: 0;
}

.classic-card__name {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.classic-card__price {
  margin: 0.1rem 0 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
}

.classic-card__stars {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.12rem;
  margin-top: 0.15rem;
  width: auto;
  max-width: 100%;
  color: rgba(255, 255, 255, 0.22);
}

.classic-card__stars svg,
.classic-card__stars i {
  display: block;
  flex: 0 0 auto;
  width: 0.6875rem !important;
  height: 0.6875rem !important;
  min-width: 0.6875rem;
  max-width: 0.6875rem;
  fill: currentColor;
  stroke: none;
}

.classic-card__cart {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.4375rem;
  border: 1px solid var(--card-accent);
  color: var(--card-accent);
  background: rgba(255, 255, 255, 0.04);
}

.classic-card__cart svg {
  width: 1rem;
  height: 1rem;
}

.classic-card:hover .classic-card__cart {
  background: rgba(255, 255, 255, 0.08);
  filter: brightness(1.1);
}

@media (min-width: 640px) {
  .classic-card__name {
    font-size: 0.9375rem;
  }

  .classic-card__price {
    font-size: 1.25rem;
  }
}