/* ============================================
   WISHLIST — Estado y animaciones — Tu Rincón Ferretero
   Extraído de style.css en Fase 2 (Solución 2.0).
   No modificar selectores ni valores: paridad 1:1 con el original.
   ============================================ */

/* ============================================
   WISHLIST - Estado y animaciones
   ============================================ */

/* Estado "en favoritos" para botón tipo corazón del card */
.favorite-btn.tu-rincon-wishlist-btn {
  transition: transform .15s, background .15s, color .15s;
}
.favorite-btn.tu-rincon-wishlist-btn.in-wishlist {
  background: #e53935 !important;
  color: #fff !important;
  border-color: #e53935 !important;
}

/* Botón tipo "Guardar en favoritos" (single product) */
.btn.tu-rincon-wishlist-btn.in-wishlist {
  background: #e53935 !important;
  color: #fff !important;
  border-color: #e53935 !important;
}

/* Animación pulse al interactuar */
.tu-rincon-wishlist-btn.pulse {
  animation: tr-heart-pulse 0.45s ease both;
  transition: none !important; /* evita que transition de transform apague la animación */
}
@keyframes tr-heart-pulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35); }
  70%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* Corazón flotante que sube */
.tr-heart-float {
  position: fixed;
  pointer-events: none;
  font-size: 28px;
  color: #e53935;
  z-index: 9999;
  animation: tr-heart-float-up 0.9s ease-out forwards;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
@keyframes tr-heart-float-up {
  0%   { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
  20%  { transform: translate(-50%, -70%) scale(1.2); opacity: 1; }
  100% { transform: translate(-50%, -200%) scale(1.6); opacity: 0; }
}

/* Badge del corazón en header: animación cuando cambia */
.icon-btn .badge.tr-bump {
  animation: tr-badge-bump 0.4s ease;
}
@keyframes tr-badge-bump {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.5); background: #ff1744; }
  100% { transform: scale(1); }
}

/* Botón wishlist con "pulso" en el header cuando se agrega */
.icon-btn.tr-heart-active {
  animation: tr-heart-pulse 0.45s ease;
}

