/* ══ Wishlist Page ══ */
.wishlist-page {
  padding: 48px 0;
}
/* Template uses .wishlist-header / .wishlist-title; legacy .wishlist-page__*
   kept as aliases. Subtitle sits below the title on its own line. */
.wishlist-header,
.wishlist-page__header {
  margin-bottom: 32px;
}
.wishlist-title,
.wishlist-page__title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 4px 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.wishlist-subtitle {
  margin: 0;
  color: var(--text-muted, #9aa3c4);
  font-size: 14px;
}
.wishlist-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #00C853;
  color: #000;
  border-radius: 99px;
  min-width: 28px;
  height: 28px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

/* Grid */
.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* Card */
.wishlist-card {
  background: var(--card-bg, #0f1340);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.wishlist-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.wishlist-card__img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: #1a1d3a;
}
.wishlist-card__body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wishlist-card__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  margin: 0;
}
.wishlist-card__price {
  font-size: 18px;
  font-weight: 700;
  color: #00C853;
}
.wishlist-card__actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}
.wishlist-card__remove {
  background: none;
  border: 1px solid #333;
  color: #aaa;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.wishlist-card__remove:hover {
  border-color: #f44336;
  color: #f44336;
}

/* Empty state */
.wishlist-empty {
  text-align: center;
  padding: 80px 20px;
  color: #aaa;
}
.wishlist-empty svg {
  margin-bottom: 20px;
  opacity: 0.3;
}
.wishlist-empty h2 {
  font-size: 22px;
  margin-bottom: 10px;
  color: #fff;
}

/* Heart icon toggle — template uses class js-wishlist-toggle (+ legacy alias) */
.js-wishlist-toggle,
.wishlist-toggle-btn {
  background: rgba(255,255,255,0.08);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  color: #ffffff;
}
.js-wishlist-toggle.is-wishlisted,
.wishlist-toggle-btn.is-active {
  color: #00C853;
  background: rgba(0,200,83,0.12);
}
.js-wishlist-toggle:hover,
.wishlist-toggle-btn:hover { transform: scale(1.05); }

/* Single product page heart — .btn.btn--wishlist (also has .js-wishlist-toggle).
   Two-class selector beats the .js-wishlist-toggle defaults above, so this
   wins instead of the small circular product-card style. */
.btn.btn--wishlist {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-sm, 6px);
  width: 48px;
  height: 48px;
  padding: 0;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}
.btn.btn--wishlist:hover {
  border-color: #00C853;
  color: #00C853;
  transform: none;
}
.btn.btn--wishlist.is-wishlisted {
  border-color: #00C853;
  color: #00C853;
}
.btn.btn--wishlist svg {
  width: 22px;
  height: 22px;
  display: block;
  stroke: #ffffff;
  fill: none;
}
.btn.btn--wishlist.is-wishlisted svg,
.btn.btn--wishlist:hover svg {
  stroke: #00C853;
  fill: #00C853;
}

/* Make sure the "Browse Games" button in the empty state has visible text.
   .wishlist-empty sets color:#aaa which can override .btn--buy's color. */
.wishlist-empty .btn,
.wishlist-empty .btn--buy {
  color: #000;
}
.wishlist-toggle-btn.is-active { color: #00C853; background: rgba(0,200,83,0.12); }
.wishlist-toggle-btn:hover { transform: scale(1.1); }

/* Wishlist badge in nav */
.wishlist-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  background: #00C853;
  color: #000;
  font-size: 10px;
  font-weight: 700;
  border-radius: 99px;
  padding: 1px 5px;
  min-width: 16px;
  text-align: center;
}
.wishlist-badge:empty { display: none; }

@media (max-width: 640px) {
  .wishlist-grid { grid-template-columns: repeat(2, 1fr); }
}
