import type { Metadata } from "next";
import { ContainerSm } from "@/app/components/layout/ContainerSm";
import Image from "next/image";
import { PackagingProductCard } from "./_components/PackagingProductCard";

import { textCopy } from "./_data/packaging-data";
import heroImg from "./_assets/packaging-hero-banner.png";
import sackImg from "./_assets/basmatipak-cotton-sack.png";
import privateLabelImg from "./_assets/private-label-brands-bags.png";

import packagingData from "./_data/packagingData.json";
import Heading from "@/app/components/ui/Heading";

export const metadata: Metadata = {
  title: "High-Quality Basmati Rice Packaging & Private Label Solutions",
  description:
    "We offer high quality rice packaging services with modern equipment, ensuring freshness, protection, and export-ready packaging for premium Basmati rice.",
  alternates: {
    canonical: "https://basmatipakistan.com/packaging/",
  },
  openGraph: {
    title: "High-Quality Basmati Rice Packaging & Private Label Solutions",
    description:
      "We offer high quality rice packaging services with modern equipment, ensuring freshness, protection, and export-ready packaging for premium Basmati rice.",
    url: "https://basmatipakistan.com/packaging/",
    images: [
      {
        url: "https://basmatipakistan.com/wp-content/uploads/2024/10/Private-Labeling-Services.png",
      },
    ],
    type: "website",
  },
  twitter: {
    card: "summary_large_image",
    title: "High-Quality Basmati Rice Packaging & Private Label Solutions",
    description:
      "We offer high quality rice packaging services with modern equipment, ensuring freshness, protection, and export-ready packaging for premium Basmati rice.",
    images: [
      "https://basmatipakistan.com/wp-content/uploads/2024/10/Private-Labeling-Services.png",
    ],
  },
};

export default function PackagingServicePage() {
  return (
    <>
      <section className="relative h-[65vh] w-full">
        <Image
          src={heroImg}
          alt="Packaging Service Hero"
          fill
          placeholder="blur"
          className="absolute top-0 left-0 w-full h-full object-cover object-center"
          priority
          fetchPriority="high"
          loading="eager"
        />
        <div className="relative bg-black/60 w-full h-full flex items-center">
          <ContainerSm>
            <Heading as="h1" variant="title" className="text-white">
              {textCopy.heroTitle}
            </Heading>
          </ContainerSm>
        </div>
        <div className="absolute z-10 bottom-0 w-full bg-white h-24 [clip-path:polygon(100%_100%,100%_0,0_100%)]"></div>
      </section>
      <section className="mt-16 lg:mt-32">
        <ContainerSm>
          <div className="flex flex-col lg:flex-row gap-8 justify-between">
            <div className="w-full lg:w-1/2 flex flex-col gap-4">
              <Heading as="h2" variant="section" className="text-primary">
                {textCopy.ricePackagingHeadline}
              </Heading>
              <p className="text-gray-600 leading-7">
                {textCopy.ricePackagingDesc1}
              </p>
              <p className="text-gray-600 leading-7">
                {textCopy.ricePackagingDesc2}
              </p>
            </div>
            <div className="w-full lg:w-1/2">
              <Image
                src={sackImg}
                alt="Basmati Pak burlap and cotton sack packaging"
                placeholder="blur"
                className="rounded-xl w-full object-contain"
              />
            </div>
          </div>
          <div className="flex flex-col lg:flex-row-reverse gap-8 justify-between mt-16 lg:mt-32">
            <div className="w-full lg:w-1/2 flex flex-col gap-4">
              <Heading as="h2" variant="section" className="text-primary">
                {textCopy.privateLabelHeadline}
              </Heading>
              <p className="text-gray-600 leading-7">
                {textCopy.privateLabelDesc1}
              </p>
              <p className="text-gray-600 leading-7">
                {textCopy.privateLabelDesc2}
              </p>
            </div>
            <div className="w-full lg:w-1/2">
              <Image
                src={privateLabelImg}
                alt="Custom branded packaging bags for Private Labeling Service"
                placeholder="blur"
                className="rounded-xl w-full object-contain"
              />
            </div>
          </div>
        </ContainerSm>
      </section>
      <section className="mt-16 lg:mt-32">
        <ContainerSm>
          <div className="flex flex-col gap-16">
            <div className="flex flex-col gap-2">
              <Heading
                as="h2"
                variant="section"
                className="text-primary text-center"
              >
                {textCopy.bottomHeadline}
              </Heading>
              <div className="w-full lg:w-4/5 mx-auto">
                <p className="text-gray-600 text-center">
                  {textCopy.bottomDescription}
                </p>
              </div>
            </div>
            <div className="grid justify-items-center grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-8">
              {packagingData.map((product, index) => (
                <PackagingProductCard
                  key={index}
                  img={product.thumbnail}
                  title={product.title}
                  weights={product.weights}
                  href={product.href}
                />
              ))}
            </div>
          </div>
        </ContainerSm>
      </section>
    </>
  );
}
