"use client";

import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarStyleApple from '@/components/navbar/NavbarStyleApple/NavbarStyleApple';
import ProductCardFour from '@/components/sections/product/ProductCardFour';
import MetricCardTen from '@/components/sections/metrics/MetricCardTen';
import FaqBase from '@/components/sections/faq/FaqBase';
import FooterSimple from '@/components/sections/footer/FooterSimple';
import Link from 'next/link';
import { Sparkles, Zap, HelpCircle } from 'lucide-react';

export default function ProductsPage() {
  const navItems = [
    { name: "Home", id: "home" },
    { name: "Products", id: "products" },
    { name: "Bulk Orders", id: "bulk-orders" },
    { name: "Gallery", id: "gallery" },
    { name: "Contact", id: "contact" }
  ];

  const footerColumns = [
    {
      title: "Quick Links",
      items: [
        { label: "Home", href: "/" },
        { label: "Products", href: "/products" },
        { label: "Bulk Orders", href: "/bulk-orders" },
        { label: "Gallery", href: "/gallery" }
      ]
    },
    {
      title: "Contact",
      items: [
        { label: "📞 +91-98765-43210", href: "tel:+919876543210" },
        { label: "💬 WhatsApp Us", href: "https://wa.me/919876543210" },
        { label: "📍 Byculla West, Mumbai", href: "https://maps.google.com/?q=Byculla+Fruit+Market+Mumbai" },
        { label: "⏰ Open Daily until 10 PM", href: "#" }
      ]
    },
    {
      title: "Our Services",
      items: [
        { label: "Fresh Produce", href: "/products" },
        { label: "Bulk Orders", href: "/bulk-orders" },
        { label: "Wholesale Pricing", href: "/bulk-orders" },
        { label: "Seasonal Specialties", href: "/products" }
      ]
    },
    {
      title: "Trust & Reviews",
      items: [
        { label: "⭐ 4.1 Rating (1,781 reviews)", href: "#" },
        { label: "Local Business Since 2010", href: "#" },
        { label: "Trusted by 1000s", href: "#" },
        { label: "100% Fresh Guarantee", href: "#" }
      ]
    }
  ];

  return (
    <ThemeProvider
      defaultButtonVariant="text-stagger"
      defaultTextAnimation="entrance-slide"
      borderRadius="soft"
      contentWidth="mediumSmall"
      sizing="mediumLarge"
      background="noiseDiagonalGradient"
      cardStyle="solid"
      primaryButtonStyle="double-inset"
      secondaryButtonStyle="layered"
      headingFontWeight="extrabold"
    >
      <div id="nav" data-section="nav">
        <NavbarStyleApple
          brandName="Byculla Fruit Market"
          navItems={navItems}
        />
      </div>

      <div id="all-products" data-section="all-products">
        <ProductCardFour
          title="All Fresh Fruits & Vegetables"
          description="Complete range of fresh produce available daily. From everyday essentials to seasonal specialties, we have everything you need."
          tag="🍎 Fresh Daily"
          tagIcon={Sparkles}
          tagAnimation="blur-reveal"
          textboxLayout="default"
          animationType="blur-reveal"
          useInvertedBackground={false}
          gridVariant="bento-grid"
          products={[
            {
              id: "apples",
              name: "Fresh Apples",
              price: "₹80-120/kg",
              variant: "Red, Green, Golden",
              imageSrc: "http://img.b2bpic.net/free-photo/people-working-apple-orchard-picking-fruit-placing-them-into-basket_342744-600.jpg",
              imageAlt: "Fresh red apples"
            },
            {
              id: "bananas",
              name: "Yellow Bananas",
              price: "₹40-60/dozen",
              variant: "Ripe, Semi-Ripe",
              imageSrc: "http://img.b2bpic.net/free-photo/medium-shot-smiley-man-with-bananas_23-2150830594.jpg",
              imageAlt: "Fresh yellow bananas"
            },
            {
              id: "mangoes",
              name: "Seasonal Mangoes",
              price: "₹100-150/kg",
              variant: "Alphonso, Kesar, Langra",
              imageSrc: "http://img.b2bpic.net/free-photo/high-angle-colorful-delicious-fruits_23-2149672989.jpg",
              imageAlt: "Fresh golden mangoes"
            },
            {
              id: "tomatoes",
              name: "Fresh Tomatoes",
              price: "₹30-50/kg",
              variant: "Firm, Ripe Red",
              imageSrc: "http://img.b2bpic.net/free-photo/heap-fresh-red-tomatoes-market_23-2147916087.jpg",
              imageAlt: "Fresh red tomatoes"
            },
            {
              id: "leafy",
              name: "Leafy Greens",
              price: "₹20-40/bunch",
              variant: "Spinach, Lettuce, Kale",
              imageSrc: "http://img.b2bpic.net/free-photo/wet-fresh-green-baby-spinach-leaves-wooden-background_169016-27765.jpg",
              imageAlt: "Fresh leafy green vegetables"
            },
            {
              id: "seasonal",
              name: "Seasonal Fruits",
              price: "Varies",
              variant: "Guava, Papaya, Grapes",
              imageSrc: "http://img.b2bpic.net/free-photo/top-view-composition-autumn-fruits-with-copy-space_23-2148634412.jpg",
              imageAlt: "Fresh seasonal produce"
            }
          ]}
          carouselMode="buttons"
          buttons={[
            { text: "📞 Order by Phone", href: "tel:+919876543210" },
            { text: "💬 WhatsApp", href: "https://wa.me/919876543210" }
          ]}
          buttonAnimation="blur-reveal"
          ariaLabel="Complete product catalog with all fresh fruits and vegetables"
        />
      </div>

      <div id="product-benefits" data-section="product-benefits">
        <MetricCardTen
          title="Why Our Produce Stands Out"
          description="Quality guaranteed with every purchase from our verified farmers and quality control processes."
          tag="🎯 Quality Assurance"
          tagIcon={Zap}
          tagAnimation="blur-reveal"
          textboxLayout="centered"
          animationType="blur-reveal"
          useInvertedBackground={false}
          metrics={[
            {
              id: "metric-1",
              title: "Farm Fresh",
              subtitle: "Daily Supply",
              category: "🌾",
              value: "Same Day Quality",
              buttons: [
                { text: "Learn More", href: "/products" }
              ]
            },
            {
              id: "metric-2",
              title: "Verified Farmers",
              subtitle: "Direct Source",
              category: "👨‍🌾",
              value: "Trusted Suppliers",
              buttons: [
                { text: "Learn More", href: "/products" }
              ]
            },
            {
              id: "metric-3",
              title: "Quality Control",
              subtitle: "Tested & Approved",
              category: "✅",
              value: "100% Fresh Guarantee",
              buttons: [
                { text: "Learn More", href: "/products" }
              ]
            }
          ]}
          carouselMode="buttons"
          buttons={[
            { text: "📞 Call for Details", href: "tel:+919876543210" }
          ]}
          buttonAnimation="blur-reveal"
          ariaLabel="Product benefits and quality metrics"
        />
      </div>

      <div id="product-faq" data-section="product-faq">
        <FaqBase
          title="Product Questions"
          description="Common questions about our fresh produce and ordering process."
          tag="❓ Common Questions"
          tagIcon={HelpCircle}
          tagAnimation="blur-reveal"
          textboxLayout="default"
          faqsAnimation="blur-reveal"
          animationType="smooth"
          showCard={true}
          useInvertedBackground={false}
          faqs={[
            {
              id: "faq-1",
              title: "How do you ensure freshness?",
              content: "We source directly from verified farmers daily. All produce is inspected for quality before reaching customers. We remove unsold stock daily to guarantee freshness."
            },
            {
              id: "faq-2",
              title: "What are your seasonal produce options?",
              content: "We carry seasonal fruits like mangoes, grapes, guava, and papaya during their peak seasons. Our staff can guide you on what's fresh and in season each month."
            },
            {
              id: "faq-3",
              title: "Can I pre-order specific produce?",
              content: "Yes! You can call or WhatsApp us to pre-order specific items, especially for bulk purchases. We'll set aside fresh produce for you."
            },
            {
              id: "faq-4",
              title: "Do you have organic options?",
              content: "Yes, we stock organic and pesticide-free vegetables. Ask our staff which items are certified organic. Availability varies by season."
            },
            {
              id: "faq-5",
              title: "What's the best time to buy?",
              content: "Early morning (6-9 AM) offers the freshest selection. We restock throughout the day. Evening (after 5 PM) also has good deals on selected items."
            },
            {
              id: "faq-6",
              title: "How do you price your products?",
              content: "Our prices are market-competitive and updated daily based on quality and supply. Bulk orders receive wholesale pricing. Check with our staff for daily rates."
            }
          ]}
          buttons={[
            { text: "📞 Call for Details", href: "tel:+919876543210" }
          ]}
          buttonAnimation="blur-reveal"
          ariaLabel="Frequently asked questions about products"
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterSimple
          columns={footerColumns}
          bottomLeftText="© 2025 Byculla Fruit Market. All rights reserved."
          bottomRightText="Fresh Fruits & Vegetables | Local Market Trusted Since 2010"
          ariaLabel="Site footer"
        />
      </div>
    </ThemeProvider>
  );
}