"use client";

import React, { useState } from "react";
import Image from "next/image";
import Link from "next/link";
import { FaDownload, FaEnvelope, FaChevronRight, FaArrowRight } from "react-icons/fa6";
import {
  LuLayers,
  LuShieldCheck,
  LuThermometer,
  LuSparkles,
  LuHammer,
  LuCpu
} from "react-icons/lu";
import Breadcrumb from "@/components/Common/Breadcrumb";
// Extracted metadata object for reference
// export const metadata = {
//   title: "Polycab Panel Wires & Industrial Cables | IS 694 1100V Grade",
//   description: "Explore Polycab 1100V grade industrial cables conforming to IS 694 standards. Premium thermoplastic PVC insulated wire designed for panels, hospitals, and industrial parks.",
//   keywords: ["Polycab Panel Wires", "IS 694 Cable", "1100V Grade Wire", "Industrial Power Cables", "Thermoplastic PVC Wire"],
// };

interface TechnicalSpec {
  id: string;
  title: string;
  category: string;
  technicalDetails: string;
}

export default function PolycabPanelWiresIS694() {
  const [activeSpecId, setActiveSpecId] = useState<string>("spec-1");

  const engineeringMetrics = [
    { label: "Voltage Grade", val: "1100 V Grade" },
    { label: "Compliance Model", val: "IS 694 BIS Standard" },
    { label: "Thermal Rating", val: "70°C to 85°C" },
    { label: "Core Processing", val: "Contirod Plain Copper" }
  ];

  const technicalSpecifications: TechnicalSpec[] = [
    {
      id: "spec-1",
      title: "High Conductivity Annealed Plain Bunched/Stranded Conductor",
      category: "Conductor Core Framework",
      technicalDetails: "Manufactured from premium, high-conductivity annealed plain bunched or stranded copper wires. The entire production sequence runs within an in-house, state-of-the-art Contirod line, delivering excellent electrical throughput and structural flexibility for tight control panel turns."
    },
    {
      id: "spec-2",
      title: "In-House Developed High Insulation Resistance Thermoplastic PVC",
      category: "Dielectric Insulation Skin",
      technicalDetails: "Layered with Polycab's custom-formulated thermoplastic PVC insulation compound, featuring exceptionally high dielectric properties. This insulation maintains system stability, safeguards adjacent lines from cross-faulting, and preserves line health across extended heat exposures."
    },
    {
      id: "spec-3",
      title: "Circular Core Assembly with Specially Formulated PVC Sheathing",
      category: "Outer Casing & Layering",
      technicalDetails: "The insulated internal cores are laid up uniformly to create a perfectly circular core assembly. The outer protection layer is extruded with a specially formulated PVC compound designed to stand up to physical abrasion during pull-through, while facilitating quick on-site stripping."
    },
    {
      id: "spec-4",
      title: "Comprehensive Stage-by-Stage Quality Control Protocol",
      category: "Quality Assurance System",
      technicalDetails: "Polycab ensures rigorous quality criteria across every production batch by implementing strict quality testing checkpoints. Requisite testing methodologies are applied at every single manufacturing tier, starting from raw polymer compounding to final wire spool inspections."
    },
    {
      id: "spec-5",
      title: "Customized Configuration Conforming to IS 694 Parameters",
      category: "Manufacturing Standards",
      technicalDetails: "The entire structural framework, core dimensions, and outer insulation thicknesses are engineered specifically to align with the application demands of the end-user in strict conformance with the Bureau of Indian Standards IS 694 specification."
    }
  ];

  return (
    <>
      <Breadcrumb pageName="Polycab Panel Wires IS 694" description="Polycab 1100V grade industrial cables conforming to IS 694 standards. Premium thermoplastic PVC insulated wire designed for panels, hospitals, and industrial parks." />
      <div className="min-h-screen bg-white text-slate-800 py-16 lg:py-28 xl:py-36 selection:bg-cyan-100 selection:text-slate-900">
        {/* Maximum content container stretched to 1600px for enhanced ultra-wide presentation */}
        <div className="container mx-auto px-4 sm:px-6 lg:px-8 max-w-[1600px]">

          {/* ─── HERO BRAND / DETAILS SECTION ──────────────────── */}
          <div className="grid grid-cols-1 lg:grid-cols-12 gap-12 xl:gap-20 items-center mb-24 xl:mb-32">

            {/* Left Frame: Image Asset Viewport */}
            <div className="lg:col-span-5 flex justify-center order-2 lg:order-1">
              <div className="relative w-full max-w-[450px] xl:max-w-[550px] aspect-square rounded-3xl overflow-hidden bg-white border border-slate-200 p-8 shadow-sm group">
                <div className="relative w-full h-full">
                  <Image
                    src="/images/polycab/Panel-wires-IS-694.png"
                    alt="Polycab 1100V Grade Thermoplastic PVC Insulated Industrial Panel Wires"
                    fill
                    priority
                    className="object-contain group-hover:scale-105 transition-transform duration-500"
                    sizes="(max-width: 768px) 100vw, (max-width: 1280px) 450px, 550px"
                  />
                </div>
              </div>
            </div>

            {/* Right Frame: Text Narrative Content */}
            <div className="lg:col-span-7 space-y-6 xl:space-y-8 order-1 lg:order-2">
              <span className="inline-flex items-center gap-1.5 rounded-full bg-slate-900 px-4 py-1.5 text-xs xl:text-sm font-bold tracking-wider text-cyan-400 uppercase border border-slate-800">
                BIS Standard Approved • 1100V Low-Voltage Main Line Power
              </span>

              <h1 className="text-3xl md:text-4xl xl:text-5xl font-black tracking-tight text-slate-900 leading-tight">
                Polycab Industrial Panel Wires <br />
                <span className="text-cyan-600 font-extrabold text-xl md:text-2xl xl:text-3xl block mt-3">
                  IS 694 Certified Thermoplastic PVC Power &amp; Control Cabling
                </span>
              </h1>

              <div className="space-y-4 xl:space-y-6 text-slate-600 text-sm md:text-base xl:text-lg leading-relaxed font-medium">
                <p>
                  Polycab provides a comprehensive selection of premium industrial panel wires and low-voltage cables engineered in full compliance with strict <strong className="text-slate-900">Bureau of Indian Standards (BIS) specifications</strong>.
                </p>
                <p>
                  Classified as dependable <strong className="text-slate-900">1100 V grade low-voltage solutions</strong>, these lines are used for distribution infrastructure throughout commercial complexes, modern hospitals, industrial parks, multi-tier residential setups, and schools.
                </p>
                <p>
                  Equipped with custom, in-house developed thermoplastic PVC insulating layers, these cables maintain a reliable continuous operating thermal threshold ranging from <strong className="text-slate-900">70°C to 85°C</strong>, ensuring protection against prolonged electrical stress.
                </p>
              </div>

              {/* Parameter Cards Summary Layout */}
              <div className="grid grid-cols-2 sm:grid-cols-4 gap-4 bg-slate-50 border border-slate-200/80 p-5 rounded-2xl shadow-2xs">
                {engineeringMetrics.map((metric, index) => (
                  <div key={index} className="bg-white border border-slate-200 p-4 rounded-xl text-center flex flex-col justify-center min-h-[80px]">
                    <span className="text-[10px] xl:text-xs text-slate-400 font-bold uppercase tracking-wider block mb-1">
                      {metric.label}
                    </span>
                    <span className="text-xs xl:text-sm font-black text-slate-900 leading-snug">
                      {metric.val}
                    </span>
                  </div>
                ))}
              </div>

              {/* Direct Brochure CTAs */}
              <div className="flex flex-wrap gap-4 pt-2">
                <Link
                  href="https://realswitchgears.com/assets/images/products/polycab-cable/panel-wires/pdf/Panel-wires-IS-694.pdf"
                  target="_blank"
                  className="inline-flex items-center gap-2 bg-slate-900 hover:bg-slate-800 text-white text-xs xl:text-sm font-bold px-6 py-4 rounded-xl transition-all group shadow-sm"
                >
                  <FaDownload className="w-3.5 h-3.5 group-hover:translate-y-0.5 transition-transform" />
                  Download IS 694 Catalogue
                </Link>
                <Link
                  href="/contact"
                  className="inline-flex items-center gap-2 bg-cyan-500 hover:bg-cyan-600 text-white text-xs xl:text-sm font-bold px-6 py-4 rounded-xl transition-all shadow-md shadow-cyan-500/10"
                >
                  Send Enquiry <FaEnvelope className="w-3.5 h-3.5" />
                </Link>
              </div>
            </div>

          </div>

          {/* ─── INTERACTIVE ARCHITECTURE SPECIFICATION VIEWER ──── */}
          <div className="mb-24 xl:mb-32">
            <div className="flex items-center gap-4 mb-10 border-b border-slate-200 pb-5">
              <div className="p-3 bg-slate-100 border border-slate-200 text-slate-700 rounded-xl">
                <LuLayers className="w-6 h-6" />
              </div>
              <div>
                <h2 className="text-xl xl:text-2xl font-black text-slate-900">Technical Specifications &amp; Material Profile</h2>
                <p className="text-xs xl:text-sm text-slate-500 font-medium mt-0.5">
                  Select an engineering layer or production segment module below to review testing tolerances, core lay-ups, and raw material properties.
                </p>
              </div>
            </div>

            <div className="grid grid-cols-1 lg:grid-cols-12 gap-8 xl:gap-12 items-start">

              {/* Left Control Panel Column */}
              <div className="lg:col-span-5 space-y-2.5">
                {technicalSpecifications.map((spec) => (
                  <button
                    key={spec.id}
                    onClick={() => setActiveSpecId(spec.id)}
                    className={`w-full text-left p-4 rounded-xl border text-xs xl:text-sm font-bold transition-all flex items-center justify-between group ${activeSpecId === spec.id
                      ? "bg-slate-900 text-white border-slate-950 shadow-md"
                      : "bg-slate-50 text-slate-700 border-slate-200 hover:bg-slate-100"
                      }`}
                  >
                    <span className="truncate pr-4">{spec.title}</span>
                    <FaChevronRight className={`w-2.5 h-2.5 shrink-0 opacity-70 group-hover:translate-x-0.5 transition-transform ${activeSpecId === spec.id ? "text-cyan-400" : "text-slate-400"
                      }`} />
                  </button>
                ))}
              </div>

              {/* Right Details Information Block */}
              <div className="lg:col-span-7 bg-slate-50 border border-slate-200 rounded-2xl p-6 md:p-8 xl:p-10 min-h-[260px] flex flex-col justify-between shadow-2xs">
                {(() => {
                  const specMatch = technicalSpecifications.find((s) => s.id === activeSpecId)!;
                  return (
                    <>
                      <div className="space-y-4">
                        <div>
                          <span className="text-[10px] xl:text-xs font-black tracking-widest text-cyan-600 uppercase block mb-1.5">
                            {specMatch.category}
                          </span>
                          <h3 className="text-base xl:text-lg font-black text-slate-900">
                            {specMatch.title}
                          </h3>
                        </div>
                        <p className="text-xs md:text-sm xl:text-base text-slate-600 font-medium leading-relaxed pt-3 border-t border-slate-200">
                          {specMatch.technicalDetails}
                        </p>
                      </div>

                      <div className="mt-8 pt-4 border-t border-slate-200 flex items-center justify-between text-[11px] xl:text-xs text-slate-400 font-bold">
                        <span className="flex items-center gap-1.5 text-slate-700">
                          <LuShieldCheck className="w-4 h-4 text-cyan-500" /> Full Multi-Stage Verification Checks
                        </span>
                        <span>IS 694 Certified Line</span>
                      </div>
                    </>
                  );
                })()}
              </div>

            </div>
          </div>

          {/* ─── SYSTEM UTILITY & APPLICATION OVERVIEW CARDS ────── */}
          <div className="grid grid-cols-1 md:grid-cols-3 gap-6 xl:gap-8 mb-24 xl:mb-32">
            <div className="bg-slate-50 border border-slate-200 rounded-2xl p-6 xl:p-8 shadow-2xs flex items-start gap-4">
              <div className="p-3 bg-cyan-50 border border-cyan-100 rounded-xl text-cyan-600 shrink-0">
                <LuThermometer className="w-6 h-6" />
              </div>
              <div className="space-y-1.5">
                <h4 className="text-xs xl:text-sm font-black text-slate-900">Extended Thermal Endurance</h4>
                <p className="text-[11px] xl:text-xs text-slate-500 font-medium leading-relaxed">
                  Formulated thermoplastic skins are rated safely for continuous temperature swings tracking between 70°C and 85°C.
                </p>
              </div>
            </div>
            <div className="bg-slate-50 border border-slate-200 rounded-2xl p-6 xl:p-8 shadow-2xs flex items-start gap-4">
              <div className="p-3 bg-cyan-50 border border-cyan-100 rounded-xl text-cyan-600 shrink-0">
                <LuSparkles className="w-6 h-6" />
              </div>
              <div className="space-y-1.5">
                <h4 className="text-xs xl:text-sm font-black text-slate-900">Commercial Substation Utility</h4>
                <p className="text-[11px] xl:text-xs text-slate-500 font-medium leading-relaxed">
                  The standard choice for supplying steady branch-circuit power feeds inside dense hospitals, schools, and busy industrial complexes.
                </p>
              </div>
            </div>
            <div className="bg-slate-50 border border-slate-200 rounded-2xl p-6 xl:p-8 shadow-2xs flex items-start gap-4">
              <div className="p-3 bg-cyan-50 border border-cyan-100 rounded-xl text-cyan-600 shrink-0">
                <LuHammer className="w-6 h-6" />
              </div>
              <div className="space-y-1.5">
                <h4 className="text-xs xl:text-sm font-black text-slate-900">Abrasion-Proof Circular Jacket</h4>
                <p className="text-[11px] xl:text-xs text-slate-500 font-medium leading-relaxed">
                  The circular layout is wrapped in easy-strip PVC that stands up to severe friction along masonry edges or structural trays.
                </p>
              </div>
            </div>
          </div>

          {/* ─── COMMERCIAL INQUIRY BLOCK ──────────────────────── */}
          <div className="flex flex-col sm:flex-row justify-center items-center gap-4 w-full">
            <Link
              href="https://realswitchgears.com/assets/images/products/polycab-cable/lv-power-cable/pdf/LV-Power-Cable-IS-1.pdf"
              target="_blank"
              className="inline-flex items-center justify-center gap-2 bg-slate-100 hover:bg-slate-200 text-slate-900 text-xs font-bold px-8 py-4 rounded-full transition-all w-full sm:w-auto uppercase tracking-wider border border-slate-200 shadow-xs"
            >
              <FaDownload className="w-3.5 h-3.5" />
              View Technical PDF
            </Link>

            <Link
              href="/contact"
              className="inline-flex items-center justify-center gap-2 bg-cyan-500 hover:bg-cyan-600 text-white text-xs xl:text-sm font-bold px-8 sm:px-10 py-4 rounded-full transition-all duration-200 active:scale-95 shadow-md shadow-cyan-500/10 w-full sm:w-auto uppercase tracking-wider"
            >
              Send Enquiry
              <FaArrowRight className="w-3.5 h-3.5 transition-transform group-hover:translate-x-0.5" />
            </Link>
          </div>

        </div>
      </div>
    </>
  );
}