/* Favorites styling */

/* Product Item Favorite Button */
.product-item {
  position: relative;
  padding: 12px 12px 4px 12px;
}

.product-image {
  max-height: 150px;
  max-width: 150px;
  object-fit: contain;
  margin: 0 auto;
}

.favorite-btn {
  position: absolute !important;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(0,0,0,0.1) !important;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 100 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.favorite-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.favorite-btn:hover:not(:disabled) {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 1);
}

.favorite-btn.favorited:hover:not(:disabled) {
  background: rgba(231, 76, 60, 0.1);
}

.favorite-btn.toggling {
  pointer-events: none;
  cursor: wait;
}

.favorite-btn .fa-heart {
  color: #999 !important;
  font-size: 16px;
  transition: color 0.2s ease;
}

.favorite-btn.favorited .fa-heart {
  color: #e74c3c !important;
}

.favorite-btn:hover .fa-heart {
  color: #e74c3c !important;
}

.favorite-btn .fa-pulse {
  animation: fa-pulse 1s infinite linear;
}

/* Account Page Favorites Toggle */
.favorites-toggle-btn {
  background: none !important;
  border: none !important;
  width: 100% !important;
  text-align: left !important;
  justify-content: flex-start !important;
}

/* Checkout Guard Icons */
.address-guard-icon .fa-map-marker-alt {
  font-size: 4rem;
  color: #f39c12;
}

.beta-guard-icon .fa-lock {
  font-size: 4rem;
  color: #6c757d;
}

.feature-item .fa-shield-alt,
.feature-item .fa-calculator {
  font-size: 1.5rem;
}

.favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.favorite-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  background: white;
  transition: all 0.2s ease;
}

.favorite-item:hover {
  border-color: #76a713;
  box-shadow: 0 2px 8px rgba(118, 167, 19, 0.1);
}

.favorite-item-image {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  margin-right: 1rem;
  border-radius: 6px;
  overflow: hidden;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.favorite-item-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.favorite-item-details {
  flex: 1;
  min-width: 0;
}

.favorite-item-name {
  margin: 0 0 0.25rem 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-item-store {
  margin: 0 0 0.25rem 0;
  font-size: 0.8rem;
  color: #6c757d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-item-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: #76a713;
}

.favorite-item-actions {
  flex-shrink: 0;
  margin-left: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.favorite-item-actions .btn {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.favorite-item-actions .btn:hover {
  transform: translateY(-1px);
}

.favorite-btn {
  transition: all 0.2s ease;
}

.favorite-btn:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 1) !important;
}

.favorite-btn.favorited:hover {
  background: rgba(231, 76, 60, 0.1) !important;
}

.favorite-btn.toggling {
  pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .favorites-grid {
    grid-template-columns: 1fr;
  }
  
  .favorite-item {
    padding: 0.75rem;
  }
  
  .favorite-item-image {
    width: 50px;
    height: 50px;
    margin-right: 0.75rem;
  }
  
  .favorite-item-name {
    font-size: 0.85rem;
  }
  
  .favorite-item-store {
    font-size: 0.75rem;
  }
  
  .favorite-item-price {
    font-size: 0.85rem;
  }
}