import { CheckCircle2 } from "lucide-react";
import { Seo } from "@/components/Seo";
import { PageHero } from "@/components/PageHero";
import { Reveal } from "@/components/Reveal";
import { useQuote } from "@/components/QuoteModal";
import { useContent } from "@/lib/content";

export default function Products() {
  const { openQuote } = useQuote();
  const { PRODUCTS, IMAGES } = useContent();
  return (
    <>
      <Seo
        title="Solar Products & Components | Panels, Inverters, Structures, Pumps | DHIYAA SOLAR ENERGY"
        description="Solar PV modules, inverters, mounting structures, solar pump systems, DCDB/ACDB, solar cables, earthing & lightning protection and solar monitoring solutions in Chennai."
      />
      <PageHero
        eyebrow="Our Products"
        title="Solar Products & Components"
        subtitle="Complete solar system solutions using carefully selected components suitable for residential, commercial, industrial and agricultural applications."
        image={IMAGES.products}
      />
      <section className="mx-auto max-w-7xl px-4 py-16 sm:px-6" data-testid="products-grid">
        <div className="grid gap-5 sm:grid-cols-2 lg:grid-cols-4">
          {PRODUCTS.map((p, i) => (
            <Reveal key={p.name} delay={i * 0.05}>
              <div className="group h-full rounded-2xl border border-slate-100 bg-white p-7 transition-all hover:-translate-y-1 hover:border-brand-blue/20 hover:shadow-xl">
                <span className="flex h-11 w-11 items-center justify-center rounded-xl bg-brand-blue/10 text-brand-blue transition-colors group-hover:bg-brand-blue group-hover:text-white">
                  <CheckCircle2 className="h-5 w-5" />
                </span>
                <h3 className="mt-4 font-heading text-lg font-bold text-brand-navy">{p.name}</h3>
                <p className="mt-2 text-sm leading-relaxed text-slate-600">{p.desc}</p>
              </div>
            </Reveal>
          ))}
        </div>
        <Reveal className="mt-12 text-center">
          <button onClick={() => openQuote()} className="rounded-full bg-brand-orange px-8 py-4 font-heading text-sm font-bold uppercase tracking-wider text-white transition-colors hover:bg-brand-orangedark" data-testid="products-quote-btn">
            Enquire About Products
          </button>
        </Reveal>
      </section>
    </>
  );
}
