// script.js

const galleryData = [
    {
        title: "Neon Pink Flow",
        imgSrc: "Image/cup1.png"
    },
    {
        title: "Purple Galaxy",
        imgSrc: "Image/cup2.png"
    },
    {
        title: "Blue Dream",
        imgSrc: "Image/cup3.png"
    },
    {
        title: "Cow Print Classic",
        imgSrc: "Image/cup4.png"
    },
    {
        title: "Neon Cow Mashup",
        imgSrc: "Image/cup5.png"
    },
    {
        title: "Midnight Sparkle",
        imgSrc: "Image/cup6.png"
    }
];

const galleryGrid = document.getElementById('gallery-grid');

// Inject Gallery Items
galleryData.forEach(item => {
    const div = document.createElement('div');
    div.classList.add('gallery-item');
    div.innerHTML = `
        <img src="${item.imgSrc}" alt="${item.title}">
        <h3>${item.title}</h3>
    `;
    galleryGrid.appendChild(div);
});

// Form Submission handling (Mock)
const form = document.getElementById('order-form');
form.addEventListener('submit', (e) => {
    e.preventDefault();
    const btn = form.querySelector('.submit-btn');
    const originalText = btn.textContent;
    btn.textContent = "Sending Request...";
    btn.style.background = "var(--neon-pink)";
    
    setTimeout(() => {
        btn.textContent = "Request Sent! ✓";
        btn.style.background = "var(--neon-purple)";
        form.reset();
        
        setTimeout(() => {
            btn.textContent = originalText;
            btn.style.background = "var(--neon-blue)";
        }, 3000);
    }, 1500);
});

// Smooth scroll for nav links (already handled by CSS scroll-behavior, but adding offset if needed)
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
    anchor.addEventListener('click', function (e) {
        e.preventDefault();
        document.querySelector(this.getAttribute('href')).scrollIntoView({
            behavior: 'smooth'
        });
    });
});
