document.addEventListener('DOMContentLoaded', function() { // 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' }); }); }); // Parallax effect for hero section window.addEventListener('scroll', function() { const scrollPosition = window.pageYOffset; const heroSection = document.querySelector('section.relative'); if (heroSection) { heroSection.style.backgroundPositionY = scrollPosition * 0.5 + 'px'; } }); // Initialize tooltips const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')); tooltipTriggerList.map(function (tooltipTriggerEl) { return new bootstrap.Tooltip(tooltipTriggerEl); }); }); // Product hover effect function setupProductHover() { const products = document.querySelectorAll('.product-card'); products.forEach(product => { product.addEventListener('mouseenter', () => { product.querySelector('.product-overlay').classList.add('opacity-100'); }); product.addEventListener('mouseleave', () => { product.querySelector('.product-overlay').classList.remove('opacity-100'); }); }); }