"use client"

import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarLayoutFloatingOverlay from '@/components/navbar/NavbarLayoutFloatingOverlay/NavbarLayoutFloatingOverlay';
import HeroBillboardRotatedCarousel from '@/components/sections/hero/HeroBillboardRotatedCarousel';
import FeatureProcessSteps from '@/components/sections/feature/FeatureProcessSteps';
import MetricCardThree from '@/components/sections/metrics/MetricCardThree';
import ProductCardTwo from '@/components/sections/product/ProductCardTwo';
import TestimonialCardOne from '@/components/sections/testimonial/TestimonialCardOne';
import FaqSplitMedia from '@/components/sections/faq/FaqSplitMedia';
import ContactSplit from '@/components/sections/contact/ContactSplit';
import FooterMedia from '@/components/sections/footer/FooterMedia';
import { Sparkles, Flame, Users, Globe, Award, TrendingUp, HelpCircle, Coffee } from "lucide-react";

export default function LandingPage() {
  return (
    <ThemeProvider
      defaultButtonVariant="text-shift"
      defaultTextAnimation="background-highlight"
      borderRadius="sharp"
      contentWidth="mediumSmall"
      sizing="medium"
      background="none"
      cardStyle="inset"
      primaryButtonStyle="inset-glow"
      secondaryButtonStyle="solid"
      headingFontWeight="light"
    >
      <div id="nav" data-section="nav">
        <NavbarLayoutFloatingOverlay
          brandName="Midnight Coffee"
          navItems={[
            { name: "Our Story", id: "about" },
            { name: "Process", id: "process" },
            { name: "Shop", id: "products" },
            { name: "Reviews", id: "testimonials" },
            { name: "Contact", id: "contact" }
          ]}
          button={{
            text: "Order Now",            href: "#products"
          }}
        />
      </div>

      <div id="hero" data-section="hero">
        <HeroBillboardRotatedCarousel
          title="Midnight Coffee."
          description="Hand-roasted specialty coffee sourced from sustainable farms across Africa and Central America. Each batch is crafted with obsessive attention to detail. Experience the difference in every sip."
          tag="Premium Specialty Coffee"
          tagIcon={Sparkles}
          background={{ variant: "plain" }}
          buttons={[
            { text: "Shop Now", href: "#products" },
            { text: "Book a Tasting", href: "#contact" }
          ]}
          carouselItems={[
            {
              id: "1",              imageSrc: "https://img.b2bpic.net/free-photo/coffee-beans-glass-jar-black-background-closeup-selective-focus-vertical-frame-roasting-preparing-coffee-vertical-frame_166373-2289.jpg",              imageAlt: "Premium dark roast specialty coffee"
            },
            {
              id: "2",              imageSrc: "https://img.b2bpic.net/free-photo/coffee-beans-glass-jar-black-background-closeup-selective-focus-vertical-frame-roasting-preparing-coffee-vertical-frame_166373-2308.jpg",              imageAlt: "Artisan pour over coffee preparation"
            },
            {
              id: "3",              imageSrc: "https://img.b2bpic.net/free-photo/coffee-beans-black-background-with-pralines_114579-16619.jpg",              imageAlt: "Espresso specialty beverage"
            },
            {
              id: "4",              imageSrc: "https://img.b2bpic.net/free-photo/jar-with-walnuts-wooden-board_95678-266.jpg",              imageAlt: "Close up of roasted coffee beans"
            },
            {
              id: "5",              imageSrc: "https://img.b2bpic.net/free-photo/fragrant-freshly-roasted-coffee-beans-ground-coffee-are-scattered-metal-tray-closeup-selective-focus-vertical-frame_166373-2292.jpg",              imageAlt: "Professional barista coffee station"
            },
            {
              id: "6",              imageSrc: "https://img.b2bpic.net/free-photo/fragrant-coffee-beans-are-scattered-from-jar-rustic-tabletop-background-closeup-selective-focus-copy-space-banner_166373-2290.jpg",              imageAlt: "Latte art specialty coffee skill"
            }
          ]}
          autoPlay={true}
          autoPlayInterval={4000}
        />
      </div>

      <div id="process" data-section="process">
        <FeatureProcessSteps
          title="Our Roasting Philosophy"
          description="We believe that exceptional coffee starts with exceptional sourcing. Every bean is carefully selected, roasted to perfection, and delivered at peak freshness to ensure you experience the true character of each origin."
          tag="Crafted with Precision"
          tagIcon={Flame}
          useInvertedBackground="noInvert"
          steps={[
            {
              number: "01",              title: "Source & Select",              tag: "Direct Trade",              description: "We work directly with sustainable farms, building long-term relationships to source the finest single-origin and blended beans. Every origin is verified for quality and ethics."
            },
            {
              number: "02",              title: "Roast to Perfection",              tag: "Small Batch",              description: "Our master roasters use precise temperature control and timing to unlock each bean's unique flavor profile. No batch over 25 lbs—every roast is intentional."
            },
            {
              number: "03",              title: "Ship Fresh",              tag: "Same Week",              description: "Roasted to order and shipped within 48 hours of roasting. You receive peak-freshness coffee at your doorstep, guaranteed to deliver exceptional flavor."
            }
          ]}
        />
      </div>

      <div id="metrics" data-section="metrics">
        <MetricCardThree
          title="Trusted by Coffee Lovers Worldwide"
          description="Midnight Coffee has become the go-to choice for specialty coffee enthusiasts who demand quality, transparency, and exceptional taste."
          useInvertedBackground="invertDefault"
          animationType="slide-up"
          textboxLayout="default"
          metrics={[
            {
              id: "1",              icon: Users,
              title: "Active Subscribers",              value: "12,000+"
            },
            {
              id: "2",              icon: Globe,
              title: "Countries Served",              value: "47"
            },
            {
              id: "3",              icon: Award,
              title: "5-Star Reviews",              value: "2,400+"
            },
            {
              id: "4",              icon: TrendingUp,
              title: "Annual Growth",              value: "180%"
            }
          ]}
        />
      </div>

      <div id="products" data-section="products">
        <ProductCardTwo
          title="Our Collection"
          description="Hand-selected roasts crafted for discerning palates. Each origin tells a story of sustainable farming, meticulous processing, and exceptional flavor."
          useInvertedBackground="noInvert"
          animationType="slide-up"
          textboxLayout="default"
          gridVariant="three-columns-all-equal-width"
          products={[
            {
              id: "1",              brand: "Midnight Coffee",              name: "Ethiopian Yirgacheffe",              price: "$28.00",              rating: 5,
              reviewCount: "389",              imageSrc: "https://img.b2bpic.net/free-photo/woman-grinding-coffee-coffee-machine_1303-31284.jpg",              imageAlt: "Ethiopian Yirgacheffe premium coffee"
            },
            {
              id: "2",              brand: "Midnight Coffee",              name: "Colombian Geisha Single Origin",              price: "$42.00",              rating: 5,
              reviewCount: "267",              imageSrc: "https://img.b2bpic.net/free-photo/coffee-beans-cup-black_114579-16741.jpg",              imageAlt: "Colombian Geisha specialty coffee"
            },
            {
              id: "3",              brand: "Midnight Coffee",              name: "Cold Brew Concentrate",              price: "$22.00",              rating: 5,
              reviewCount: "516",              imageSrc: "https://img.b2bpic.net/free-photo/coffee-beans-black-background-with-powder_114579-16635.jpg",              imageAlt: "Ready-to-drink cold brew concentrate"
            }
          ]}
        />
      </div>

      <div id="testimonials" data-section="testimonials">
        <TestimonialCardOne
          title="Loved by Coffee Connoisseurs"
          description="Real testimonials from customers who've discovered the Midnight Coffee difference."
          useInvertedBackground="invertDefault"
          animationType="blur-reveal"
          textboxLayout="default"
          gridVariant="two-columns-alternating-heights"
          testimonials={[
            {
              id: "1",              name: "Marcus Chen",              role: "Specialty Coffee Enthusiast",              company: "San Francisco, CA",              rating: 5,
              imageSrc: "https://img.b2bpic.net/free-photo/close-up-portrait-young-handsome-successful-man_1163-5475.jpg",              imageAlt: "Marcus Chen, coffee enthusiast"
            },
            {
              id: "2",              name: "Sarah Mitchell",              role: "Café Owner",              company: "Brooklyn, NY",              rating: 5,
              imageSrc: "https://img.b2bpic.net/free-photo/smiling-homosexual-man-official-suit-looking-camera-close-up-shot-happy-gay-getting-dressed-wedding-ceremony-standing-hotel-room-with-his-partner-background-love-emotion-concept_74855-22675.jpg",              imageAlt: "Sarah Mitchell, café owner"
            },
            {
              id: "3",              name: "David Park",              role: "Home Barista",              company: "Seattle, WA",              rating: 5,
              imageSrc: "https://img.b2bpic.net/free-photo/close-up-competitive-employee_1098-2870.jpg",              imageAlt: "David Park, home barista"
            },
            {
              id: "4",              name: "Jessica Williams",              role: "Food & Beverage Director",              company: "Los Angeles, CA",              rating: 5,
              imageSrc: "https://img.b2bpic.net/free-photo/positive-confident-businessman-posing-outside_74855-1183.jpg",              imageAlt: "Jessica Williams, beverage director"
            }
          ]}
        />
      </div>

      <div id="faq" data-section="faq">
        <FaqSplitMedia
          title="Frequently Asked Questions"
          description="Everything you need to know about our coffee and sourcing practices."
          tag="Help & Support"
          tagIcon={HelpCircle}
          useInvertedBackground="noInvert"
          textboxLayout="default"
          imageSrc="https://img.b2bpic.net/free-photo/fragrant-freshly-roasted-coffee-beans-are-scattered-from-jar-onto-countertop-copy-space-banner-closeup-selective-focus_166373-2310.jpg"
          imageAlt="Coffee brewing and preparation"
          mediaPosition="right"
          animationType="smooth"
          faqs={[
            {
              id: "1",              title: "How fresh is the coffee when I receive it?",              content: "All Midnight Coffee is roasted to order and shipped within 48 hours of roasting. You'll receive peak-freshness coffee at its optimal flavor window, typically 2-3 weeks after roasting when it arrives at your doorstep."
            },
            {
              id: "2",              title: "What makes your sourcing different?",              content: "We practice direct trade with our partner farms, visiting each location annually to ensure quality, fair compensation, and sustainable practices. We build long-term relationships rather than chasing the lowest price—this commitment to farmers directly translates to superior coffee quality."
            },
            {
              id: "3",              title: "Can I subscribe for regular deliveries?",              content: "Yes! Our subscription service lets you choose frequency (weekly, bi-weekly, or monthly) and customize your coffee selection. Subscribers receive 15% off and free shipping on all orders."
            },
            {
              id: "4",              title: "What's the difference between your single origins?",              content: "Each single origin reflects its terroir—the altitude, climate, and soil of its region. Ethiopian Yirgacheffe offers bright, floral notes; Colombian Geisha brings chocolate and caramel; Kenyan AA delivers fruity, wine-like complexity. Explore and discover your favorite."
            },
            {
              id: "5",              title: "Do you offer wholesale or bulk orders?",              content: "Absolutely. We work with cafés, restaurants, and corporate clients. Contact our wholesale team for custom pricing, dedicated support, and tailored roasting profiles for your business."
            },
            {
              id: "6",              title: "What's your return policy?",              content: "We're confident you'll love our coffee. If you're not satisfied with any order, we offer a 100% money-back guarantee within 30 days—no questions asked. Your satisfaction is our priority."
            }
          ]}
        />
      </div>

      <div id="contact" data-section="contact">
        <ContactSplit
          tag="Stay Updated"
          title="Join the Midnight Coffee Collective"
          description="Subscribe to our newsletter for exclusive roast releases, sourcing stories, brewing tips, and special subscriber-only offers. We only send genuinely valuable content—no spam."
          tagIcon={Coffee}
          useInvertedBackground="invertDefault"
          background={{ variant: "plain" }}
          imageSrc="https://img.b2bpic.net/free-photo/coffee-beans-black-background-with-metallic-pot_114579-16669.jpg"
          imageAlt="Cozy coffee shop atmosphere"
          mediaPosition="right"
          inputPlaceholder="your@email.com"
          buttonText="Subscribe"
          termsText="We respect your privacy. Unsubscribe anytime. See our privacy policy."
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterMedia
          imageSrc="https://img.b2bpic.net/free-photo/fragrant-coffee-beans-are-scattered-from-jar-rustic-tabletop-background-closeup-selective-focus-copy-space-banner_166373-2309.jpg"
          imageAlt="Premium coffee shop aesthetic"
          logoText="Midnight Coffee"
          copyrightText="© 2025 Midnight Coffee. All rights reserved."
          columns={[
            {
              title: "Shop",              items: [
                { label: "All Coffees", href: "#products" },
                { label: "Subscribe", href: "#contact" },
                { label: "Gift Cards", href: "#" },
                { label: "Brewing Gear", href: "#" }
              ]
            },
            {
              title: "About",              items: [
                { label: "Our Story", href: "#about" },
                { label: "Sourcing", href: "#process" },
                { label: "Roasting Process", href: "#process" },
                { label: "Sustainability", href: "#" }
              ]
            },
            {
              title: "Connect",              items: [
                { label: "Contact Us", href: "#contact" },
                { label: "Instagram", href: "#" },
                { label: "Book a Tasting", href: "#contact" },
                { label: "Wholesale Inquiry", href: "#" }
              ]
            }
          ]}
        />
      </div>
    </ThemeProvider>
  );
}