<!DOCTYPE html>
<html lang="en" class="scroll-smooth scroll- ">
    <div class="snowflakes" aria-hidden="true"></div>

<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link href="./assets/styles/output.css" rel="stylesheet" />
    <title>LeafHub</title>
    <link rel="icon" href="assets/images/logo.png" />

    <link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css" />

    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Sora:wght@100..800&display=swap" rel="stylesheet">
    <script src="https://cdn.sellix.io/static/js/embed.js"></script>

</head>
<div data-aos="fade-up">
    <div id="loader" class="loader">
        <div class="door"></div>
        <div class="door"></div>
    </div>
    <button id="backToTop" class="back-to-top hidden">↑</button>
<body class="bg-[#171717] scroll-smooth scroll-p-[30px] ">
    <nav class="px-[10%] mx-auto py-3 fixed w-full z-50 top-0 transition-all bg-[#171717]" id="main-nav">
        <div class="flex justify-between items-center ">
            <div class="relative z-30">
                <a href="/">
                    <img src="assets/images/logo.png" alt="LeafHub Logo" class="w-12" />
                </a>
            </div>

            <ul id="sidebar" class="flex flex-col fixed justify-center top-0 left-0 h-full w-[60%] max-w-[400px] z-20 md:flex-row md:static transform transition-transform duration-300 translate-x-[-100%] md:translate-x-0 bg-[#0E0E0E] md:bg-transparent">
                <li class="ml-8 my-2 md:my-0 text-white sora-bold uppercase">
                    <a href="/#services">Home</a>
                </li>
                <li class="ml-8 my-2 md:my-0 text-white sora-bold uppercase">
                    <a href="/#products">Products</a>
                </li>
                <li class="ml-8 my-2 md:my-0 text-white sora-bold uppercase">
                    <a href="/#feedbacks">Feedbacks</a>
                </li>
                <li class="ml-8 my-2 md:my-0 text-white sora-bold uppercase">
                    <a href="/#contacts">Contacts</a>
                </li>
            </ul>

            <div class="cursor-pointer z-30 relative md:hidden nav" onclick="toggleSidebar()">
                <div class="w-[36px] h-1 bg-white mb-1 rounded-sm"></div>
                <div class="w-[36px] h-1 bg-white mb-1 rounded-sm"></div>
                <div class="w-[36px] h-1 bg-white mb-1 rounded-sm"></div>
            </div>
        </div>
    </nav>

    <div class="mx-auto px-[5%] block py-[130px] md:py-[200px] bg-hero-pattern bg-cover relative">
        <img src="assets/images/stars.png" alt="" class="absolute z-1 top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%]">

        <div class="relative z-5">
            <h1 class="text-shadow-white sora-extrabold text-white text-[35px] md:text-[60px] max-w-[1000px] text-center mx-auto block" data-aos="fade-up">GET READY TO DESTROY SERVERS WITH <span class="text-blue">LEAFHUB</span></h1>

            <p class="mt-10 text-center max-w-[654px] mx-auto block sora-extralight text-lightGray" data-aos="fade-up" data-aos-delay="100">Unleash chaos in your Discord realm with our premium tools and bots. Elevate your server to a whole new level of domination!</p>

            <a href="#products" class="bg-darkBlue border border-blue px-[54px] py-[15px] text-white sora-extrabold rounded-lg text-center mx-auto block max-w-[250px] mt-8 text-[13px] md:text-[16px]" data-aos=" fade-up" data-aos-delay="200">Check Products</a>
        </div>
    </div>

    <div class="flex flex-wrap justify-between items-center gap-2 text-white mx-auto px-[5%] max-w-[1920px] py-20 ">
        <div class="border border-gray px-[10%] md:px-[57px] py-[40px] w-full lg:max-w-[32%]" data-aos="fade-up" data-aos-delay="100">
            <img src="./assets/images/globe.png" alt="Wide Selection" class="w-10 h-10 ">
            <h2 class="sora-extrabold mt-3">Wide Selection</h2>
            <p class="text-lightGray sora-extralight mt-3">Discover a vast array of Discord tools and bots tailored to enhance your server's functionality and user engagement.</p>
        </div>

        <div class="border border-gray px-[10%] md:px-[57px] py-[40px] w-full lg:max-w-[32%]" data-aos="fade-up" data-aos-delay="200">
            <img src="./assets/images/globe.png" alt="Instant Delivery" class="w-10 h-10 ">
            <h2 class="sora-extrabold mt-3">Instant Delivery</h2>
            <p class="text-lightGray sora-extralight mt-3">Get immediate access to your purchases. Our efficient delivery system ensures you receive your tools and bots right away.</p>
        </div>

        <div class="border border-gray px-[10%] md:px-[57px] py-[40px] w-full lg:max-w-[32%]" data-aos="fade-up" data-aos-delay="300">
            <img src="./assets/images/globe.png" alt="Warrantied Accounts" class="w-10 h-10 ">
            <h2 class="sora-extrabold mt-3">Warrantied Tools</h2>
            <p class="text-lightGray sora-extralight mt-3">Shop with confidence! All our tools come with a warranty, ensuring quality and support for your digital needs.</p>
        </div>
    </div>

    <section class="faq-section mx-auto px-[5%] py-[70px] text-white" id="faq">
        <h1 class="text-shadow-white sora-bold text-[35px] md:text-[45px] text-center">Frequently Asked Questions</h1>
        <div class="faq-container mt-10">
            <div class="faq-item">
                <div class="faq-question" onclick="toggleFAQ(this)">
                    <h3 class="sora-bold">What is LeafHub?</h3>
                    <span class="faq-icon">+</span>
                </div>
                <div class="faq-answer hidden">
                    <p class="sora-extralight">LeafHub is your one-stop shop for premium Discord tools and bots designed to enhance your server experience.</p>
                </div>
            </div>
            <div class="faq-item">
                <div class="faq-question" onclick="toggleFAQ(this)">
                    <h3 class="sora-bold">How do I purchase a product?</h3>
                    <span class="faq-icon">+</span>
                </div>
                <div class="faq-answer hidden">
                    <p class="sora-extralight">You can browse our products, select the one you want, and click the purchase button to complete your order.</p>
                </div>
            </div>
            <div class="faq-item">
                <div class="faq-question" onclick="toggleFAQ(this)">
                    <h3 class="sora-bold">Is there a warranty on the tools?</h3>
                    <span class="faq-icon">+</span>
                </div>
                <div class="faq-answer hidden">
                    <p class="sora-extralight">Yes, all our tools come with a warranty to ensure quality and support for your digital needs.</p>
                </div>
            </div>
            <div class="faq-item">
                <div class="faq-question" onclick="toggleFAQ(this)">
                    <h3 class="sora-bold">How can I contact support?</h3>
                    <span class="faq-icon">+</span>
                </div>
                <div class="faq-answer hidden">
                    <p class="sora-extralight">You can contact our support team via Discord or Telegram. Links are available in the contact section.</p>
                </div>
            </div>
        </div>
    </section>

    <section class="max-w-[1400px] py-[100px] mx-[5%] lg:mx-auto text-white" id="products">
        <div>
            <h3 class="text-white font-bold text-[35px] md:text-[45px] max-w-[706.8px] mx-auto text-center sora-bold text-shadow-white" data-aos="fade-up">
                Ready to <span class="text-violet">UNLEASH CHAOS?</span>
            </h3>
            
            <p class="text-white max-w-[706.8px] mt-4 leading-7 font-extralight mx-auto text-center sora-normal" data-aos="fade-up" data-aos-delay="200">
                Browse our collection of Discord tools and bots, designed to obliterate the competition and provide an exceptional user experience.
            </p>
        </div>
    
        <div class="flex items-center justify-center gap-3 mt-10 flex-wrap" id="category-buttons" data-aos="fade-up" data-aos-delay="300">
            <button class="sora-medium text-center min-w-[150px] px-6 py-4 text-black font-bold my-2 md:my-0 rounded-lg bg-white border border-gray hover:border-white w-full md:max-w-[171.98px] transition-all uppercase text-[14px] hover:text-shadow-white active-category" onclick="showProducts('all')">All</button>
            <button class="sora-medium text-center min-w-[150px] px-6 py-4 text-white font-bold my-2 md:my-0 rounded-lg bg-darkViolet border border-gray hover:border-white w-full md:max-w-[171.98px] transition-all uppercase text-[14px] hover:text-shadow-white" onclick="showProducts('bots')">Discord Bots</button>
            <button class="sora-medium text-center min-w-[150px] px-6 py-4 text-white font-bold my-2 md:my-0 rounded-lg bg-darkViolet border border-gray hover:border-white w-full md:max-w-[171.98px] transition-all uppercase text-[14px] hover:text-shadow-white" onclick="showProducts('tools')">Discord Tools</button>
            <button class="sora-medium text-center min-w-[150px] px-6 py-4 text-white font-bold my-2 md:my-0 rounded-lg bg-darkViolet border border-gray hover:border-white w-full md:max-w-[171.98px] transition-all uppercase text-[14px] hover:text-shadow-white" onclick="showProducts('OTHER')">Others</button>
        </div>
    
        <div class="flex items-center justify-center gap-3 mt-10" id="search-bar" data-aos="fade-up" data-aos-delay="400">
            <input type="text" id="search-input" placeholder="Search products..." class="w-full md:max-w-[500px] px-4 py-2 rounded-lg bg-[#232323] border border-[#545454] text-white">
        </div>
    
        <div class="flex flex-wrap justify-center gap-4 mt-20" id="product-container" data-aos="fade-up" data-aos-delay="500">
            <div class="border border-gray max-w-[391px] bg-[#181818] w-full group product rounded-lg" data-category="bots" data-title="Custom Bot">
                <div>
                    <div class="aspect-w-16 aspect-h-9 w-full rounded-lg overflow-hidden">
                        <video autoplay loop muted class="w-full h-full object-cover rounded-lg">
                            <source src="videos/1.mp4" type="video/mp4">
                            Your browser does not support the video tag.
                        </video>
                    </div>
                    <div class="p-10">
                        <div class="product-content">
                            <p class="sora-bold text-white text-shadow-white">Custom Bot</p>
                            <ul class="mt-4 sora-light text-gray-400 list-disc pl-5">
                                <li>Fully customizable features</li>
                                <li>Designed to meet unique needs</li>
                                <li>Advanced functionality</li>
                            </ul>
                            <h2 class="mt-8 sora-extralight text-white text-shadow-white">Price Depends on the Project</h2>
                            <h2 class="mt-8 sora-extralight text-white text-shadow-white"></h2>
                        </div>
                        <button 
                        class="bg-[#232323] mt-16 block mx-auto w-[180.76px] p-4 sora-bold border border-[#545454] rounded-md text-white hover:border-white transition-all" 
                        type="button" 
                        onclick="window.location.href='https://discord.gg/leafhub';">
                        Contact Us
                    </button>
                    </div>
                </div>
            </div>
    
            <div class="border border-gray max-w-[391px] bg-[#181818] w-full group product rounded-lg" data-category="tools" data-title="Boost Tool">
                <div>
                    <div class="aspect-w-16 aspect-h-9 w-full rounded-lg overflow-hidden">
                        <video autoplay loop muted class="w-full h-full object-cover rounded-lg">
                            <source src="videos/1.mp4" type="video/mp4">
                            Your browser does not support the video tag.
                        </video>
                    </div>
                    <div class="p-10">
                        <div class="product-content">
                            <p class="sora-bold text-white text-shadow-white">Boost Tool</p>
                            <ul class="mt-4 sora-light text-gray-400 list-disc pl-5">
                                <li>Automated server boosting</li>
                                <li>User-friendly interface</li>
                                <li>Optimized for performance</li>
                            </ul>
                            <h2 class="mt-8 sora-extralight text-white text-shadow-white">$20</h2>
                        </div>
                        <button class="bg-[#232323] mt-16 block mx-auto w-[180.76px] p-4 sora-bold border border-[#545454] rounded-md text-white hover:border-white transition-all" data-sellix-product="676c3acbe61ad" type="submit">Purchase</button>
                    </div>
                </div>
            </div>
    
            <div class="border border-gray max-w-[391px] bg-[#181818] w-full group product rounded-lg" data-category="tools" data-title="Vanity Sniper">
                <div>
                    <div class="aspect-w-16 aspect-h-9 w-full rounded-lg overflow-hidden">
                        <video autoplay loop muted class="w-full h-full object-cover rounded-lg">
                            <source src="videos/1.mp4" type="video/mp4">
                            Your browser does not support the video tag.
                        </video>
                    </div>
                    <div class="p-10">
                        <div class="product-content">
                            <p class="sora-bold text-white text-shadow-white">Token Joiner</p>
                            <ul class="mt-4 sora-light text-gray-400 list-disc pl-5">
                                <li>Make Tokens join servers for you</li>
                                <li>Fast Captcha Solving</li>
                                <li>High-speed performance</li>
                            </ul>
                            <h2 class="mt-8 sora-extralight text-white text-shadow-white">$20</h2>
                        </div>
                        <button class="bg-[#232323] mt-16 block mx-auto w-[180.76px] p-4 sora-bold border border-[#545454] rounded-md text-white hover:border-white transition-all" data-sellix-product="676c3d595ae03" type="submit">Purchase</button>
                    </div>
                </div>
            </div>
        
            <div class="border border-gray max-w-[391px] bg-[#181818] w-full group product rounded-lg" data-category="tools" data-title="Password Changer">
                <div>
                    <div class="aspect-w-16 aspect-h-9 w-full rounded-lg overflow-hidden">
                        <video autoplay loop muted class="w-full h-full object-cover rounded-lg">
                            <source src="videos/1.mp4" type="video/mp4">
                            Your browser does not support the video tag.
                        </video>
                    </div>
                    <div class="p-10">
                        <div class="product-content">
                            <p class="sora-bold text-white text-shadow-white">Password Changer</p>
                            <ul class="mt-4 sora-light text-gray-400 list-disc pl-5">
                                <li>Secure password updates</li>
                                <li>Easy-to-use interface</li>
                                <li>Enhanced account protection</li>
                            </ul>
                            <h2 class="mt-8 sora-extralight text-white text-shadow-white">$20</h2>
                        </div>
                        <button class="bg-[#232323] mt-16 block mx-auto w-[180.76px] p-4 sora-bold border border-[#545454] rounded-md text-white hover:border-white transition-all" data-sellix-product="676c3be5e6346" type="submit">Purchase</button>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- Empty Section -->
        <section class="mt-20" id="new-section" data-aos="fade-up" data-aos-delay="600">
            <!-- Add content here -->
        </section>
        
        <section class="mx-auto px-[5%] block py-[70px] relative" id="feedbacks">
            <div class="relative z-5">
                <h1 class="text-shadow-white sora-bold text-white text-[35px] md:text-[45px] max-w-[1000px] text-center mx-auto block" data-aos="fade-up" data-aos-delay="100">Customer Feedback</h1>
                <p class="mt-10 text-center max-w-[654px] mx-auto block sora-extralight text-lightGray" data-aos="fade-up" data-aos-delay="200">Hear what our customers have to say about their experience with LeafHub!</p>
            </div>
        
            <div class="flex flex-wrap text-white gap-6 items-center justify-center mt-10" data-aos="fade-up" data-aos-delay="100">
                <div class="border border-gray p-10 max-w-[490px] rounded-lg">
                    <div class="flex gap-1">
                        <img src="./assets/images/star.png" alt="">
                        <img src="./assets/images/star.png" alt="">
                        <img src="./assets/images/star.png" alt="">
                        <img src="./assets/images/star.png" alt="">
                        <img src="./assets/images/star.png" alt="">
                    </div>
                    <h3 class="sora-bold text-shadow-white mt-4">Boost Tool is a Game Changer!</h3>
                    <p class="mt-4 sora-extralight text-[14px]">The Boost Tool has made boosting any Discord server so much easier! It’s incredibly efficient and works flawlessly. Highly recommend it!</p>
                    <p class="text-shadow-white sora-bold mt-4">-XxEpicGamerxX</p>
                </div>
                <div class="border border-gray p-10 max-w-[490px] rounded-lg">
                    <div class="flex gap-1">
                        <img src="./assets/images/star.png" alt="">
                        <img src="./assets/images/star.png" alt="">
                        <img src="./assets/images/star.png" alt="">
                        <img src="./assets/images/star.png" alt="">
                        <img src="./assets/images/star.png" alt="">
                    </div>
                    <h3 class="sora-bold text-shadow-white mt-4">Token Joiner is Fantastic!</h3>
                    <p class="mt-4 sora-extralight text-[14px]">I’ve used several token joiners before, but this one is by far the best. Smooth performance, fast, and easy to use..</p>
                    <p class="text-shadow-white sora-bold mt-4">-ShadowMaster</p>
                </div>
                <div class="border border-gray p-10 max-w-[490px] rounded-lg">
                    <div class="flex gap-1">
                        <img src="./assets/images/star.png" alt="">
                        <img src="./assets/images/star.png" alt="">
                        <img src="./assets/images/star.png" alt="">
                        <img src="./assets/images/star.png" alt="">
                        <img src="./assets/images/star.png" alt="">
                    </div>
                    <h3 class="sora-bold text-shadow-white mt-4">Password Changer is Secure & Reliable!</h3>
                    <p class="mt-4 sora-extralight text-[14px]">The password changer tool works like a charm! It’s fast, secure, and really helped me keep my tokens safe. +rep.</p>
                    <p class="text-shadow-white sora-bold mt-4">-Nexon</p>
                </div>
            </div>
        </section>
        


    <footer class="my-20" id="contacts">
        <h1 class="sora-extrabold text-shadow-white text-2xl text-white uppercase text-center">Have a question? Contact Us!</h1>
    
        <div class="flex gap-[10px] justify-center my-[16px]">
            <!-- Discord -->
            <a href="https://discord.gg/leafhub" target="_blank" class="group relative rounded-full p-px text-zinc-400 duration-300 hover:text-zinc-100 hover:shadow-glow-discord" type="button" aria-haspopup="dialog" aria-expanded="false" aria-controls="radix-:Rvraqla:" data-state="closed">
                <span class="absolute inset-0 overflow-hidden rounded-full">
                    <span class="absolute inset-0 rounded-full bg-[image:radial-gradient(75%_100%_at_50%_0%,#5d6af2_0%,rgba(56,189,248,0)_75%)] opacity-0 transition-opacity duration-500 group-hover:opacity-100"></span>
                </span>
                <div class="relative z-10 rounded-full bg-zinc-950 px-4 py-1.5 ring-1 ring-white/10">
                    <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 640 512" height="2em" width="2em" xmlns="http://www.w3.org/2000/svg">
                        <path d="M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"></path>
                    </svg>
                </div>
            </a>
    
            <!-- Telegram -->
            <a href="https://telegram.me/leafhub" target="_blank" class="group relative rounded-full p-px text-zinc-400 duration-300 hover:text-zinc-100 hover:shadow-glow-telegram" type="button" aria-haspopup="dialog" aria-expanded="false" aria-controls="radix-:Rvraqla:" data-state="closed">
                <span class="absolute inset-0 overflow-hidden rounded-full">
                    <span class="absolute inset-0 rounded-full bg-[image:radial-gradient(75%_100%_at_50%_0%,#31a9dd_0%,rgba(56,189,248,0)_75%)] opacity-0 transition-opacity duration-500 group-hover:opacity-100"></span>
                </span>
                <div class="relative z-10 rounded-full bg-zinc-950 px-4 py-1.5 ring-1 ring-white/10">
                    <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 448 512" height="2em" width="2em" xmlns="http://www.w3.org/2000/svg">
                        <path d="M446.7 98.6l-67.6 318.8c-5.1 22.5-18.4 28.1-37.3 17.5l-103-75.9-49.7 47.8c-5.5 5.5-10.1 10.1-20.7 10.1l7.4-104.9 190.9-172.5c8.3-7.4-1.8-11.5-12.9-4.1L117.8 284 16.2 252.2c-22.1-6.9-22.5-22.1 4.6-32.7L418.2 66.4c18.4-6.9 34.5 4.1 28.5 32.2z"></path>
                    </svg>
                </div>
            </a>
        </div>
    </footer>    
</div>
<script>
    function toggleSidebar() {
        // Check if the screen is smaller than the medium breakpoint where the burger icon is visible
        if (window.innerWidth < 768) {
            // Adjust 768px according to your Tailwind's md breakpoint
            const sidebar = document.getElementById("sidebar");
            sidebar.classList.toggle("translate-x-[-100%]");
            sidebar.classList.toggle("translate-x-0");
        }
    }

    document.addEventListener('contextmenu', function(event) {
        event.preventDefault();
    });

    document.addEventListener("DOMContentLoaded", function() {
        const sidebarLinks = document.querySelectorAll("#sidebar a");
        sidebarLinks.forEach((link) => {
            link.addEventListener("click", function() {
                if (window.innerWidth < 768) {
                    // This ensures that the function only triggers under your responsive condition
                    closeSidebar();
                }
            });
        });
    });

    function closeSidebar() {
        const sidebar = document.getElementById("sidebar");
        if (sidebar.classList.contains("translate-x-0")) {
            sidebar.classList.remove("translate-x-0");
            sidebar.classList.add("translate-x-[-100%]");
        }
    }

    function showProducts(categoryId) {
        // Remove active classes from all buttons
        const categoryButtons = document.querySelectorAll('#category-buttons button');
        categoryButtons.forEach(button => {
            button.classList.remove('bg-white', 'text-black');
            button.classList.add('bg-darkViolet', 'text-white');
        });

        // Add active class to the clicked button
        const activeButton = Array.from(categoryButtons).find(button => button.getAttribute('onclick').includes(categoryId));
        if (activeButton) {
            activeButton.classList.add('bg-white', 'text-black');
            activeButton.classList.remove('bg-darkViolet', 'text-white');
        }

        // Show products of the selected category or all products if 'all' is selected
        const products = document.querySelectorAll('.product');
        products.forEach(product => {
            product.classList.add('hidden');
            if (categoryId === 'all') {
                // Remove duplicates in "All" view
                const seenProducts = new Set();
                document.querySelectorAll('.product').forEach(p => {
                    const uniqid = p.getAttribute('data-title');
                    if (!seenProducts.has(uniqid)) {
                        seenProducts.add(uniqid);
                        p.classList.remove('hidden');
                    }
                });
            } else if (product.getAttribute('data-category') === categoryId) {
                product.classList.remove('hidden');
            }
        });
    }

    function toggleFAQ(element) {
    const answer = element.nextElementSibling;
    answer.classList.toggle('hidden');
    element.classList.toggle('active');
}

window.addEventListener('load', function() {
        const loader = document.getElementById('loader');
        loader.classList.add('open');
        setTimeout(() => {
            loader.style.display = 'none';
        }, 1000); // Adjust time to match the CSS transition duration
    });

    // Back to Top button functionality
    const backToTopButton = document.getElementById('backToTop');

    window.onscroll = function() {
        if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
            backToTopButton.classList.remove('hidden');
        } else {
            backToTopButton.classList.add('hidden');
        }
    };

    backToTopButton.onclick = function() {
        window.scrollTo({top: 0, behavior: 'smooth'});
    };

    document.getElementById('search-input').addEventListener('input', function() {
    const searchTerm = this.value.toLowerCase();
    const activeCategory = document.querySelector('#category-buttons button.bg-white.text-black');
    const categoryId = activeCategory.getAttribute('onclick').match(/'(.*?)'/)[1];
    const products = document.querySelectorAll('.product');
    
    products.forEach(product => {
        const title = product.querySelector('.product-content p').textContent.toLowerCase();
        const productCategory = product.getAttribute('data-category');
        const shouldShow = 
            searchTerm === '' || 
            title.includes(searchTerm);
        
        if (categoryId === 'all') {
            product.classList.toggle('hidden', !shouldShow);
        } else {
            product.classList.toggle('hidden', 
                !shouldShow || productCategory !== categoryId
            );
        }
    });
});

// Add debouncing for search performance
function debounce(func, wait) {
    let timeout;
    return function executedFunction(...args) {
        const later = () => {
            clearTimeout(timeout);
            func(...args);
        };
        clearTimeout(timeout);
        timeout = setTimeout(later, wait);
    };
}

const debouncedSearch = debounce(
    (event) => document.getElementById('search-input')
        .dispatchEvent(new Event('input')), 
    300
);

document.getElementById('search-input')
    .addEventListener('keyup', debouncedSearch);    

            function createSnowflakes() {
                const snowflakes = 50;
                const container = document.querySelector('.snowflakes');
                
                for (let i = 0; i < snowflakes; i++) {
                    const snowflake = document.createElement('div');
                    snowflake.className = 'snowflake';
                    snowflake.style.left = Math.random() * 100 + '%';
                    snowflake.style.animationDelay = Math.random() * 10 + 's';
                    snowflake.innerHTML = '❅';
                    container.appendChild(snowflake);
                }
            }

            document.addEventListener('DOMContentLoaded', createSnowflakes);

    document.addEventListener("DOMContentLoaded", function() {
        showProducts('all'); // Initialize with 'All' category
    });
</script>
<script src="https://unpkg.com/aos@next/dist/aos.js"></script>
<script>
    AOS.init({
        once: true
    });
</script>
</body>
</html>