// Wait until the DOM content is fully loaded before running any scripts
//document.addEventListener('DOMContentLoaded', () => {
   
    // Example: Change the greeting dynamically based on time of day
    const greetingElement = document.createElement('h2');
    const currentHour = new Date().getHours();
    const container = document.querySelector('.container'); // Assuming there is a container class
  
    // Set greeting based on the current time
    if (currentHour < 12) {
      greetingElement.textContent = 'Good Morning! Welcome to the Stock Management System';
    } else if (currentHour < 18) {
      greetingElement.textContent = 'Good Afternoon! Welcome to the Stock Management System';
    } else {
      greetingElement.textContent = 'Good Evening! Welcome to the Stock Management System';
    }
  
    // Append the greeting to the container
    if (container) {
      container.prepend(greetingElement);
    }
  
    // Example: Handle clicks on navigation links
    const navLinks = document.querySelectorAll('nav ul li a');
    
    navLinks.forEach(link => {
      link.addEventListener('click', (event) => {
        console.log(`Navigating to ${event.target.textContent} page.`);
      });
    });
  
    // You can add other homepage-specific interactivity here
  //});
  