document.addEventListener('DOMContentLoaded', function() {
            const favoriteBtns = document.querySelectorAll('.favorite-btn');
            
            favoriteBtns.forEach(btn => {
                btn.addEventListener('click', function() {
                    const icon = this.querySelector('i');
                    if (icon.classList.contains('far')) {
                        icon.classList.remove('far');
                        icon.classList.add('fas');
                        this.style.backgroundColor = '#e74c3c';
                        this.style.color = 'white';
                        this.style.borderColor = '#e74c3c';
                    } else {
                        icon.classList.remove('fas');
                        icon.classList.add('far');
                        this.style.backgroundColor = '';
                        this.style.color = '#e74c3c';
                        this.style.borderColor = '#eee';
                    }
                });
            });
            
            // Add to cart button interaction
            const addToCartBtns = document.querySelectorAll('.add-to-cart');
            addToCartBtns.forEach(btn => {
                btn.addEventListener('click', function() {
                    const originalText = this.innerHTML;
                    const originalBg = this.style.background;
                    
                    this.innerHTML = '<i class="fas fa-check"></i> Added to Cart!';
                    this.style.background = 'linear-gradient(to right, #2ecc71, #27ae60)';
                    
                    // Create a floating notification
                    const notification = document.createElement('div');
                    notification.textContent = 'Product added to cart!';
                    notification.style.position = 'fixed';
                    notification.style.top = '20px';
                    notification.style.right = '20px';
                    notification.style.backgroundColor = '#2ecc71';
                    notification.style.color = 'white';
                    notification.style.padding = '15px 25px';
                    notification.style.borderRadius = '8px';
                    notification.style.boxShadow = '0 5px 15px rgba(0,0,0,0.2)';
                    notification.style.zIndex = '1000';
                    notification.style.fontWeight = '600';
                    notification.style.transition = 'all 0.3s ease';
                    
                    document.body.appendChild(notification);
                    
                    // Remove notification after 3 seconds
                    setTimeout(() => {
                        notification.style.opacity = '0';
                        notification.style.transform = 'translateX(100px)';
                        setTimeout(() => {
                            document.body.removeChild(notification);
                        }, 300);
                    }, 3000);
                    
                    setTimeout(() => {
                        this.innerHTML = originalText;
                        this.style.background = originalBg;
                    }, 2000);
                });
            });
            
            // View all products button
            const viewAllBtn = document.querySelector('.view-all-btn');
            viewAllBtn.addEventListener('click', function() {
                this.innerHTML = '<i class="fas fa-spinner fa-spin"></i> Loading Products...';
                setTimeout(() => {
                    this.innerHTML = '<i class="fas fa-eye"></i> View All Products';
                    alert('In a real application, this would load more products or navigate to a products page.');
                }, 1500);
            });
        });