document.addEventListener('DOMContentLoaded', function() { // Smooth scrolling for navigation links const navLinks = document.querySelectorAll('nav a[href^="#"]'); navLinks.forEach(link => { link.addEventListener('click', function(e) { e.preventDefault(); const targetId = this.getAttribute('href'); const targetSection = document.querySelector(targetId); window.scrollTo({ top: targetSection.offsetTop - 80, behavior: 'smooth' }); }); }); // Order button functionality const orderBtn = document.getElementById('order-btn'); orderBtn.addEventListener('click', function() { showNotification('Your order will be ready soon!'); document.getElementById('menu').scrollIntoView({ behavior: 'smooth', block: 'start' }); }); // Notification system function showNotification(message) { // Check if notification already exists let notification = document.querySelector('.notification'); if (!notification) { notification = document.createElement('div'); notification.className = 'notification'; document.body.appendChild(notification); } notification.textContent = message; notification.classList.add('show'); setTimeout(() => { notification.classList.remove('show'); }, 3000); } });