document.addEventListener('DOMContentLoaded', function() { // Initialize animations const animatedElements = document.querySelectorAll('.fade-in, .slide-up'); animatedElements.forEach((el, index) => { // Stagger animations el.style.animationDelay = `${index * 0.1}s`; }); // Handle cart buttons const addToCartButtons = document.querySelectorAll('[data-add-to-cart]'); addToCartButtons.forEach(button => { button.addEventListener('click', function() { const product = this.getAttribute('data-product'); alert(`Added ${product} to your cart`); }); }); });