| // Initialize feather icons | |
| document.addEventListener('DOMContentLoaded', function() { | |
| feather.replace(); | |
| // Smooth scrolling for anchor links | |
| document.querySelectorAll('a[href^="#"]').forEach(anchor => { | |
| anchor.addEventListener('click', function (e) { | |
| e.preventDefault(); | |
| document.querySelector(this.getAttribute('href')).scrollIntoView({ | |
| behavior: 'smooth' | |
| }); | |
| }); | |
| }); | |
| // Simple cart functionality | |
| const addToCartButtons = document.querySelectorAll('button:contains("Add to Cart")'); | |
| addToCartButtons.forEach(button => { | |
| button.addEventListener('click', function() { | |
| // In a real implementation, this would add to cart | |
| alert('Added to cart!'); | |
| }); | |
| }); | |
| }); |