/* ========================================
   WISHLIST STYLES - VERSÃO FIREBASE
   Cole no CSS customizado da CartPanda
   ======================================== */

/* Animações */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.9); }
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(1.1); }
}

@keyframes slideIn {
  from { transform: translateX(400px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Botão de favoritar */
.wishlist-btn {
  background: white;
  border: 2px solid #e0e0e0;
  padding: 12px 24px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.wishlist-btn .heart {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.wishlist-btn:hover {
  border-color: #ff4757;
  color: #ff4757;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.2);
}

.wishlist-btn:hover .heart {
  animation: heartBeat 0.6s ease;
}

.wishlist-btn.active {
  background: linear-gradient(135deg, #ff4757 0%, #e84151 100%);
  border-color: #ff4757;
  color: white;
  box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
}

.wishlist-btn.active:hover {
  background: linear-gradient(135deg, #e84151 0%, #d13847 100%);
  transform: translateY(-2px) scale(1.02);
}

.wishlist-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.wishlist-btn.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  to { left: 100%; }
}

/* Contador no header */
.wishlist-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff4757;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

/* Página de favoritos */
#wishlist-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  animation: fadeIn 0.5s ease;
}

.wishlist-header {
  text-align: center;
  margin-bottom: 40px;
}

.wishlist-header h1 {
  font-size: 36px;
  margin-bottom: 10px;
  color: #333;
}

.wishlist-header p {
  font-size: 18px;
  color: #666;
}

/* Grid de produtos favoritos */
.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* Item individual */
.wishlist-item {
  background: white;
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  animation: fadeIn 0.5s ease;
}

.wishlist-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  border-color: #ff4757;
}

.wishlist-item-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
  background: #f5f5f5;
}

.wishlist-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.wishlist-item:hover .wishlist-item-image img {
  transform: scale(1.05);
}

.wishlist-item-info {
  padding: 20px;
}

.wishlist-item-info h3 {
  font-size: 18px;
  margin: 0 0 12px 0;
  color: #333;
  line-height: 1.4;
}

.wishlist-item-price {
  font-size: 26px;
  font-weight: bold;
  color: #ff4757;
  margin: 12px 0;
}

.wishlist-item-date {
  font-size: 13px;
  color: #999;
  margin: 8px 0 16px 0;
}

.wishlist-item-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.btn-view,
.btn-remove {
  flex: 1;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-view {
  background: #333;
  color: white;
}

.btn-view:hover {
  background: #000;
  transform: translateY(-2px);
}

.btn-remove {
  background: #f5f5f5;
  color: #666;
}

.btn-remove:hover {
  background: #ff4757;
  color: white;
  transform: translateY(-2px);
}

.btn-remove .icon {
  font-size: 16px;
}

/* Notificações */
.wishlist-notification {
  position: fixed;
  top: 24px;
  right: 24px;
  background: white;
  padding: 18px 24px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  z-index: 99999;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  animation: slideIn 0.4s ease forwards;
}

.wishlist-notification.show {
  opacity: 1;
  transform: translateX(0);
}

.wishlist-notification .notif-icon {
  font-size: 20px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.wishlist-notification.success {
  border-left: 4px solid #2ecc71;
}

.wishlist-notification.success .notif-icon {
  background: #d4edda;
  color: #2ecc71;
}

.wishlist-notification.error {
  border-left: 4px solid #ff4757;
}

.wishlist-notification.error .notif-icon {
  background: #f8d7da;
  color: #ff4757;
}

.wishlist-notification.warning {
  border-left: 4px solid #ffc107;
}

.wishlist-notification.warning .notif-icon {
  background: #fff3cd;
  color: #ffc107;
}

/* Responsivo */
@media (max-width: 768px) {
  .wishlist-item {
    flex-direction: column;
  }
  
  .wishlist-item img {
    width: 100%;
    height: 200px;
  }
  
  .wishlist-item-info .btn-remove,
  .wishlist-item-info .btn-view {
    width: 100%;
    margin: 5px 0;
  }
}