document.addEventListener('DOMContentLoaded', function() { // Initialize animations const animateElements = document.querySelectorAll('.animate-fade-in'); animateElements.forEach((el, index) => { el.style.animationDelay = `${index * 0.1}s`; }); // Newsletter form handling const newsletterForm = document.querySelector('form'); if (newsletterForm) { newsletterForm.addEventListener('submit', function(e) { e.preventDefault(); const email = this.querySelector('input[type="email"]').value; // Here you would typically send the email to your backend alert('Thanks for subscribing! Check your email for confirmation.'); this.reset(); }); } // Product card interactions const productCards = document.querySelectorAll('.product-card'); productCards.forEach(card => { card.addEventListener('mouseenter', function() { this.querySelector('img').style.transform = 'scale(1.05)'; }); card.addEventListener('mouseleave', function() { this.querySelector('img').style.transform = 'scale(1)'; }); }); });