/* ==========================================================================
   Wishlist — MRINGCO heart button and page styles
   ========================================================================== */

/* -----------------------------------------------------------------------
 * Heart button (on product cards and single product)
 * --------------------------------------------------------------------- */
.btn-wishlist {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color var(--duration-fast), border-color var(--duration-fast), background var(--duration-fast);
  flex-shrink: 0;
}

.btn-wishlist svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
  transition: transform var(--duration-fast) var(--ease-out), fill var(--duration-fast);
}

.btn-wishlist:hover {
  border-color: #E74C3C;
  color: #E74C3C;
}

.btn-wishlist.is-wishlisted {
  border-color: #E74C3C;
  background: rgba(231, 76, 60, 0.1);
  color: #E74C3C;
}

.btn-wishlist.is-wishlisted svg {
  fill: #E74C3C;
}

/* Pop animation on toggle */
.btn-wishlist--animate svg {
  animation: heartPop 0.4s var(--ease-out);
}

@keyframes heartPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.4); }
  70%  { transform: scale(0.85); }
  100% { transform: scale(1); }
}

/* -----------------------------------------------------------------------
 * Wishlist count badge (header + mobile nav)
 * --------------------------------------------------------------------- */
.wishlist-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  background: #E74C3C;
  color: #fff;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  line-height: 1;
  position: absolute;
  top: -6px;
  right: -6px;
}

/* -----------------------------------------------------------------------
 * Wishlist page
 * --------------------------------------------------------------------- */
.wishlist-page {
  padding-block: var(--space-10);
}

.wishlist-page__header {
  margin-bottom: var(--space-6);
}

.wishlist-page__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  text-transform: uppercase;
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-5);
}

.wishlist-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-16) var(--space-8);
  background: var(--color-surface-1);
  border: var(--border-thin);
  border-radius: var(--radius-md);
}

.wishlist-empty p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-5);
}

.wishlist-loading {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: var(--space-12);
}

.wishlist-loading::after {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-yellow);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
