<?php
/**
 * Pure Chemical — Polyurethanes / PU Additives
 * File: performance-chemicals/pu-additives.php
 *
 * Premium responsive page with:
 * - Shared header and footer
 * - Product category tabs
 * - Speciality chemical slider
 * - WhatsApp enquiry form
 * - Floating WhatsApp button
 * - CSRF token and honeypot field
 *
 * No strict_types declaration.
 */

if (session_status() === PHP_SESSION_NONE) {
    session_start();
}

/* =========================================================
   CONFIGURATION
========================================================= */

$puScriptDir = str_replace(
    '\\',
    '/',
    dirname($_SERVER['SCRIPT_NAME'] ?? '/')
);

$puScriptDir = rtrim($puScriptDir, '/');

$puRootUrl = preg_replace(
    '~/performance-chemicals$~',
    '',
    $puScriptDir
);

if ($puRootUrl === '/') {
    $puRootUrl = '';
}

$puUrl = static function ($path) use ($puRootUrl) {
    return $puRootUrl . '/' . ltrim($path, '/');
};

$puEsc = static function ($value) {
    return htmlspecialchars(
        (string) $value,
        ENT_QUOTES,
        'UTF-8'
    );
};

/* WhatsApp number: India country code +91 */
$puWhatsAppNumber = '917428465992';

/* Shared header */
foreach ([
    __DIR__ . '/header.php',
    __DIR__ . '/../header.php',
    __DIR__ . '/../../header.php'
] as $puHeaderFile) {
    if (is_file($puHeaderFile)) {
        include_once $puHeaderFile;
        break;
    }
}

/* CSRF token */
if (empty($_SESSION['pu_enquiry_token'])) {
    $_SESSION['pu_enquiry_token'] = bin2hex(random_bytes(32));
}
?>

<!-- Bootstrap & External CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.theme.default.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;700;800&family=Roboto:wght@400;500;700&display=swap" rel="stylesheet">


<style>
/* =========================================================
   PURE CHEMICAL — PREMIUM PU ADDITIVES PAGE
========================================================= */

.pu-page,
.pu-page * {
    box-sizing: border-box;
}

.pu-page {
    --pu-navy: #102747;
    --pu-blue: #087fe7;
    --pu-cyan: #00bfe8;
    --pu-red: #ed3346;
    --pu-green: #16866b;
    --pu-ink: #25364a;
    --pu-muted: #69798b;
    --pu-soft: #f3f7fb;
    --pu-border: #e4ebf2;

    color: var(--pu-ink);
    background: #fff;
    font-family: "Manrope", "Segoe UI", Arial, sans-serif;
    line-height: 1.7;
    overflow: hidden;
}

.pu-page img {
    display: block;
    max-width: 100%;
}

.pu-page a {
    text-decoration: none;
}

.pu-container {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

.pu-section {
    padding: 84px 0;
}

.pu-section-soft {
    background: var(--pu-soft);
}

.pu-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
    color: var(--pu-blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.pu-eyebrow::before {
    content: "";
    width: 26px;
    height: 3px;
    border-radius: 5px;
    background: var(--pu-red);
}

.pu-heading {
    max-width: 760px;
    margin: 0 auto 42px;
    text-align: center;
}

.pu-heading h2 {
    margin: 0 0 15px;
    color: var(--pu-navy);
    font-size: clamp(28px, 3.5vw, 42px);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.2;
}

.pu-heading p {
    margin: 0;
    color: var(--pu-muted);
    font-size: 15px;
}

/* BUTTONS */

.pu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 12px 22px;
    border: 1px solid transparent;
    border-radius: 7px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: .25s ease;
}

.pu-btn-primary {
    color: #fff;
    background: var(--pu-red);
    box-shadow: 0 8px 20px rgba(237,51,70,.22);
}

.pu-btn-primary:hover {
    color: #fff;
    background: #c91d31;
    transform: translateY(-2px);
}

.pu-btn-light {
    border-color: rgba(255,255,255,.45);
    color: #fff;
    background: rgba(255,255,255,.07);
}

.pu-btn-light:hover {
    color: var(--pu-navy);
    background: #fff;
}

/* HERO */

.pu-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 350px;
    padding: 76px 0;
    isolation: isolate;
    color: #fff;
    background:
        linear-gradient(110deg, rgba(7,24,48,.96),
        rgba(8,55,95,.84)),
        url("<?= $puEsc($puUrl('assets/images/pucategimg.jpg')) ?>")
        center/cover no-repeat;
}

.pu-hero::after {
    position: absolute;
    z-index: -1;
    right: -100px;
    bottom: -200px;
    width: 480px;
    height: 480px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 50%;
    box-shadow:
        0 0 0 45px rgba(255,255,255,.035),
        0 0 0 90px rgba(255,255,255,.025);
    content: "";
}

.pu-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 20px;
    color: rgba(255,255,255,.78);
    font-size: 13px;
}

.pu-breadcrumb a {
    color: #fff;
}

.pu-breadcrumb span:last-child {
    color: #75d7ff;
}

.pu-hero h1 {
    max-width: 850px;
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(34px, 5vw, 58px);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.12;
}

.pu-hero p {
    max-width: 720px;
    margin: 0;
    color: rgba(255,255,255,.86);
    font-size: 16px;
}

.pu-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

/* INTRO */

.pu-intro-grid {
    display: grid;
    grid-template-columns: .95fr 1.05fr;
    gap: 55px;
    align-items: center;
}

.pu-intro-image {
    position: relative;
    min-width: 0;
}

.pu-intro-image img {
    width: 100%;
    height: 390px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 18px 50px rgba(13,38,68,.14);
}

.pu-image-tag {
    position: absolute;
    right: -15px;
    bottom: 24px;
    max-width: 230px;
    padding: 17px 21px;
    border-radius: 10px;
    color: #fff;
    background: var(--pu-navy);
    box-shadow: 0 12px 30px rgba(16,39,71,.2);
}

.pu-image-tag strong {
    display: block;
    font-size: 15px;
}

.pu-image-tag span {
    color: #c9d7e8;
    font-size: 12px;
}

.pu-intro-copy h2,
.pu-feature-copy h2 {
    margin: 0 0 19px;
    color: var(--pu-navy);
    font-size: clamp(28px, 3.4vw, 40px);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.2;
}

.pu-intro-copy p,
.pu-feature-copy p {
    margin: 0 0 15px;
    color: var(--pu-muted);
    font-size: 15px;
}

.pu-check-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 12px 18px;
    margin: 24px 0 27px;
    padding: 0;
    list-style: none;
}

.pu-check-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--pu-navy);
    font-size: 13px;
    font-weight: 700;
}

.pu-check-list li span {
    display: inline-grid;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    color: var(--pu-green);
    background: #e3f6ee;
    font-size: 12px;
}

/* PRODUCTS AND TABS */

.pu-products-section {
    background:
        radial-gradient(circle at 5% 0%,
        rgba(0,191,232,.07), transparent 28%),
        var(--pu-soft);
}

.pu-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 34px;
}

.pu-tab {
    padding: 12px 19px;
    border: 1px solid #dce5ef;
    border-radius: 7px;
    color: #40536a;
    background: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: .2s ease;
}

.pu-tab:hover,
.pu-tab.is-active {
    border-color: var(--pu-blue);
    color: #fff;
    background: var(--pu-blue);
    box-shadow: 0 8px 18px rgba(8,127,231,.16);
}

.pu-tab-panel[hidden] {
    display: none !important;
}

.pu-tab-panel.is-active {
    animation: puFadeIn .3s ease both;
}

@keyframes puFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.pu-product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 20px;
}

.pu-product-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--pu-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(14,39,71,.035);
    transition: .25s ease;
}

.pu-product-card:hover {
    border-color: #c8d9eb;
    box-shadow: 0 16px 36px rgba(14,39,71,.1);
    transform: translateY(-5px);
}

.pu-product-image {
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #eaf0f6;
}

.pu-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

.pu-product-card:hover .pu-product-image img {
    transform: scale(1.055);
}

.pu-product-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
}

.pu-product-body h3 {
    margin: 0 0 10px;
    color: var(--pu-navy);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
}

.pu-product-body p {
    flex: 1;
    margin: 0 0 17px;
    color: var(--pu-muted);
    font-size: 13px;
}

.pu-product-link {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    color: var(--pu-blue);
    font-size: 12px;
    font-weight: 800;
}

.pu-product-link:hover {
    color: var(--pu-red);
}

/* EXPERTISE */

.pu-feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.pu-feature-image img {
    width: 100%;
    min-height: 350px;
    max-height: 470px;
    border-radius: 15px;
    object-fit: cover;
}

.pu-feature-points {
    display: grid;
    gap: 15px;
    margin-top: 24px;
}

.pu-feature-point {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.pu-feature-icon {
    display: grid;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 10px;
    color: var(--pu-blue);
    background: #eaf5ff;
    font-size: 19px;
}

.pu-feature-point strong {
    display: block;
    margin-bottom: 3px;
    color: var(--pu-navy);
    font-size: 14px;
}

.pu-feature-point span {
    display: block;
    color: var(--pu-muted);
    font-size: 13px;
}

/* SPECIALITY SLIDER */

.pu-speciality {
    overflow: hidden;
    background: var(--pu-navy);
}

.pu-speciality .pu-heading h2 {
    color: #fff;
}

.pu-speciality .pu-heading p {
    color: #c3d0df;
}

.pu-speciality .pu-eyebrow {
    color: #79d9ff;
}

.pu-speciality-track {
    display: grid;
    grid-auto-columns: calc((100% - 60px) / 4);
    grid-auto-flow: column;
    gap: 20px;
    overflow-x: auto;
    padding: 4px 2px 18px;
    scroll-behavior: smooth;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
}

.pu-speciality-track::-webkit-scrollbar {
    display: none;
}

.pu-speciality-card {
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    background: rgba(255,255,255,.06);
    scroll-snap-align: start;
    transition: .25s ease;
}

.pu-speciality-card:hover {
    background: rgba(255,255,255,.11);
    transform: translateY(-4px);
}

.pu-speciality-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.pu-speciality-card h3 {
    margin: 0;
    padding: 16px;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}

.pu-slider-controls {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.pu-slider-btn {
    display: grid;
    width: 43px;
    height: 43px;
    place-items: center;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 50%;
    color: #fff;
    background: transparent;
    font-size: 19px;
    cursor: pointer;
}

.pu-slider-btn:hover {
    border-color: var(--pu-cyan);
    color: var(--pu-navy);
    background: var(--pu-cyan);
}

/* SEO CONTENT */

.pu-seo-content {
    max-width: 960px;
    margin: 0 auto;
}

.pu-seo-content h2 {
    margin: 0 0 18px;
    color: var(--pu-navy);
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.25;
}

.pu-seo-content h3 {
    margin: 28px 0 10px;
    color: var(--pu-navy);
    font-size: 20px;
}

.pu-seo-content p {
    color: var(--pu-muted);
    font-size: 14px;
}

/* CONTACT SECTION */

.pu-contact {
    background:
        linear-gradient(100deg, rgba(7,24,48,.96),
        rgba(8,55,95,.89)),
        url("<?= $puEsc($puUrl('assets/images/about/getintouch.jpg')) ?>")
        center/cover no-repeat;
}

.pu-contact-grid {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: 50px;
    align-items: center;
}

.pu-contact-copy .pu-eyebrow {
    color: #8bdfff;
}

.pu-contact-copy h2 {
    margin: 0 0 17px;
    color: #fff;
    font-size: clamp(30px, 3.6vw, 44px);
    font-weight: 800;
    line-height: 1.15;
}

.pu-contact-copy p {
    margin: 0 0 20px;
    color: rgba(255,255,255,.78);
    font-size: 15px;
}

.pu-contact-note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 22px;
    color: #fff;
    font-size: 13px;
}

.pu-note-icon {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 9px;
    color: #fff;
    background: rgba(255,255,255,.13);
}

.pu-form-card {
    padding: clamp(22px, 4vw, 36px);
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 20px 55px rgba(0,0,0,.18);
}

.pu-form-card h3 {
    margin: 0 0 7px;
    color: var(--pu-navy);
    font-size: 24px;
    font-weight: 800;
}

.pu-form-card > p {
    margin: 0 0 23px;
    color: var(--pu-muted);
    font-size: 13px;
}

.pu-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.pu-form-field {
    min-width: 0;
}

.pu-form-field-full {
    grid-column: 1 / -1;
}

.pu-form-field label {
    display: block;
    margin-bottom: 6px;
    color: #34465a;
    font-size: 12px;
    font-weight: 800;
}

.pu-form-field input,
.pu-form-field select,
.pu-form-field textarea {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid #dce5ee;
    border-radius: 7px;
    outline: none;
    color: var(--pu-ink);
    background: #fbfdff;
    font-family: inherit;
    font-size: 13px;
    transition: border-color .2s, box-shadow .2s;
}

.pu-form-field textarea {
    min-height: 110px;
    resize: vertical;
}

.pu-form-field input:focus,
.pu-form-field select:focus,
.pu-form-field textarea:focus {
    border-color: var(--pu-blue);
    box-shadow: 0 0 0 3px rgba(8,127,231,.1);
}

.pu-form-submit {
    width: 100%;
    margin-top: 17px;
}

.pu-form-privacy {
    margin-top: 12px;
    color: #778596;
    font-size: 11px;
    text-align: center;
}

/* FLOATING WHATSAPP */

.pu-whatsapp-float {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 20px;
    border: 2px solid #fff;
    border-radius: 50px;
    color: #fff !important;
    background: #25d366;
    box-shadow: 0 8px 25px rgba(0,0,0,.2);
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    transition: transform .25s ease, background .25s ease;
}

.pu-whatsapp-float:hover {
    color: #fff !important;
    background: #128c7e;
    transform: translateY(-4px);
}

.pu-whatsapp-float svg {
    width: 25px;
    height: 25px;
    fill: currentColor;
}

/* RESPONSIVE */

@media (max-width: 1050px) {
    .pu-product-grid {
        grid-template-columns: repeat(3, minmax(0,1fr));
    }

    .pu-speciality-track {
        grid-auto-columns: calc((100% - 40px) / 3);
    }

    .pu-intro-grid,
    .pu-feature-grid,
    .pu-contact-grid {
        gap: 32px;
    }
}

@media (max-width: 760px) {
    .pu-section {
        padding: 60px 0;
    }

    .pu-container {
        width: calc(100% - 30px);
    }

    .pu-hero {
        min-height: auto;
        padding: 64px 0;
    }

    .pu-hero h1 {
        letter-spacing: -.7px;
    }

    .pu-intro-grid,
    .pu-feature-grid,
    .pu-contact-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .pu-intro-image {
        padding-right: 8px;
    }

    .pu-intro-image img {
        height: 300px;
    }

    .pu-image-tag {
        right: 0;
        bottom: 15px;
    }

    .pu-product-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
        gap: 14px;
    }

    .pu-product-body {
        padding: 15px;
    }

    .pu-product-body h3 {
        font-size: 14px;
    }

    .pu-product-body p {
        font-size: 12px;
    }

    .pu-tabs {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 7px;
    }

    .pu-tab {
        flex: 0 0 auto;
    }

    .pu-speciality-track {
        grid-auto-columns: calc((100% - 15px) / 2);
        gap: 15px;
    }

    .pu-check-list {
        grid-template-columns: 1fr;
    }

    .pu-feature-image img {
        min-height: 260px;
    }
}

@media (max-width: 480px) {
    .pu-product-grid {
        grid-template-columns: 1fr;
    }

    .pu-product-image {
        aspect-ratio: 16 / 10;
    }

    .pu-speciality-track {
        grid-auto-columns: 82%;
    }

    .pu-form-grid {
        grid-template-columns: 1fr;
    }

    .pu-form-field-full {
        grid-column: auto;
    }

    .pu-hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .pu-hero-actions .pu-btn {
        width: 100%;
    }

    .pu-whatsapp-float {
        right: 14px;
        bottom: 14px;
        min-height: 50px;
        padding: 0 16px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pu-page *,
    .pu-page *::before,
    .pu-page *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
</style>

<main class="pu-page">

    <!-- HERO -->
    <section class="pu-hero">
        <div class="pu-container">
            <nav class="pu-breadcrumb" aria-label="Breadcrumb">
                <a href="<?= $puEsc($puUrl('index.php')) ?>">Home</a>
                <span>›</span>
                <a href="<?= $puEsc($puUrl('performance-chemicals.php')) ?>">
                    Performance Chemicals
                </a>
                <span>›</span>
                <span>Polyurethanes / PU Additives</span>
            </nav>

            <h1>Polyurethanes &amp; PU Additives</h1>

            <p>
                High-performance polyurethane systems, foam additives and
                specialty solutions designed to support dependable processing
                and application performance across diverse industries.
            </p>

            <div class="pu-hero-actions">
                <a class="pu-btn pu-btn-primary" href="#pu-products">
                    Explore Our Products →
                </a>

                <a class="pu-btn pu-btn-light" href="#pu-contact">
                    Discuss Your Requirement
                </a>
            </div>
        </div>
    </section>

    <!-- INTRODUCTION -->
    <section class="pu-section">
        <div class="pu-container pu-intro-grid">

            <div class="pu-intro-image">
                <img
                    src="<?= $puEsc($puUrl('assets/images/pageimg/Solutionforhand.png')) ?>"
                    alt="Chemical solutions and industrial applications"
                    loading="lazy"
                    onerror="this.style.display='none';"
                >

                <div class="pu-image-tag">
                    <strong>Solutions for Industry</strong>
                    <span>Performance-driven chemical technologies</span>
                </div>
            </div>

            <div class="pu-intro-copy">
                <span class="pu-eyebrow">Polyurethane Solutions</span>

                <h2>Advanced Chemistry for Demanding Applications</h2>

                <p>
                    Polyurethane technology supports a wide range of applications,
                    from flexible and rigid foams to specialised industrial products.
                    Selecting the right system and additives can help manufacturers
                    achieve their required processing and end-product properties.
                </p>

                <p>
                    Explore our polyurethane product categories and contact our
                    team to discuss your application and technical requirements.
                </p>

                <ul class="pu-check-list">
                    <li><span>✓</span> Flexible foam systems</li>
                    <li><span>✓</span> Foam additives</li>
                    <li><span>✓</span> Polyether and polymer polyols</li>
                    <li><span>✓</span> Rigid foam systems</li>
                </ul>

                <a class="pu-btn pu-btn-primary" href="#pu-contact">
                    Request Product Information →
                </a>
            </div>

        </div>
    </section>

    <!-- PRODUCT CATEGORIES -->
    <section class="pu-section pu-products-section" id="pu-products">
        <div class="pu-container">

            <div class="pu-heading">
                <span class="pu-eyebrow">Our Product Range</span>
                <h2>Polyurethane Products &amp; Additives</h2>
                <p>
                    Browse the categories below to explore our product range.
                    Contact us for specifications and availability.
                </p>
            </div>

            <div class="pu-tabs" role="tablist"
                 aria-label="Polyurethane product categories">

                <button class="pu-tab is-active" type="button"
                    role="tab" id="pu-tab-flexible"
                    aria-controls="pu-panel-flexible"
                    aria-selected="true" data-pu-tab="flexible">
                    Flexible Foam Systems
                </button>

                <button class="pu-tab" type="button"
                    role="tab" id="pu-tab-additives"
                    aria-controls="pu-panel-additives"
                    aria-selected="false" tabindex="-1"
                    data-pu-tab="additives">
                    Foam Additives
                </button>

                <button class="pu-tab" type="button"
                    role="tab" id="pu-tab-polyols"
                    aria-controls="pu-panel-polyols"
                    aria-selected="false" tabindex="-1"
                    data-pu-tab="polyols">
                    Polyols
                </button>

                <button class="pu-tab" type="button"
                    role="tab" id="pu-tab-rigid"
                    aria-controls="pu-panel-rigid"
                    aria-selected="false" tabindex="-1"
                    data-pu-tab="rigid">
                    Rigid Foam Systems
                </button>

            </div>

            <?php
            $puCategories = [
                'flexible' => [
                    'tab' => 'pu-tab-flexible',
                    'products' => [
                        [
                            '1743844773.jpg',
                            'Flexible Foam System',
                            'Solutions for flexible polyurethane foam applications.'
                        ],
                        [
                            '1743844958.jpg',
                            'Flexible Foam Solutions',
                            'Product options for different foam processing needs.'
                        ],
                        [
                            '1743845056.jpg',
                            'Speciality Foam System',
                            'Explore options for specialised foam applications.'
                        ],
                        [
                            '1743845372.jpg',
                            'Flexible PU Technology',
                            'Discuss the right system for your manufacturing process.'
                        ]
                    ]
                ],
                'additives' => [
                    'tab' => 'pu-tab-additives',
                    'products' => [
                        [
                            '1746441936.jpg',
                            'Polyurethane Foam Additives',
                            'Additive solutions for polyurethane foam processing.'
                        ]
                    ]
                ],
                'polyols' => [
                    'tab' => 'pu-tab-polyols',
                    'products' => [
                        [
                            '1743847040.jpg',
                            'Polyether Polyols',
                            'Polyol options for polyurethane formulations.'
                        ],
                        [
                            '1743847061.jpg',
                            'Polymer Polyols',
                            'Polymer polyol products for industrial applications.'
                        ],
                        [
                            '1743847081.jpg',
                            'Polyol Solutions',
                            'Discuss suitable polyol options with our team.'
                        ]
                    ]
                ],
                'rigid' => [
                    'tab' => 'pu-tab-rigid',
                    'products' => [
                        [
                            '1743846039.jpg',
                            'Rigid Foam System',
                            'Polyurethane systems for rigid foam applications.'
                        ],
                        [
                            '1743845825.jpg',
                            'Rigid PU Solutions',
                            'Solutions for selected insulation and industrial uses.'
                        ],
                        [
                            '1743845846.jpg',
                            'Rigid Foam Technology',
                            'Product options for different manufacturing requirements.'
                        ],
                        [
                            '1743845869.jpg',
                            'Insulation Foam Systems',
                            'Discuss suitable systems for your insulation application.'
                        ],
                        [
                            '1743845923.jpg',
                            'Speciality Rigid Foam',
                            'Specialised product options for targeted applications.'
                        ],
                        [
                            '1743845952.jpg',
                            'Rigid Polyurethane Products',
                            'Find a product suitable for your requirements.'
                        ]
                    ]
                ]
            ];

            foreach ($puCategories as $categoryKey => $category):
            ?>
                <div
                    class="pu-tab-panel <?= $categoryKey === 'flexible' ? 'is-active' : '' ?>"
                    id="pu-panel-<?= $puEsc($categoryKey) ?>"
                    role="tabpanel"
                    aria-labelledby="<?= $puEsc($category['tab']) ?>"
                    data-pu-panel="<?= $puEsc($categoryKey) ?>"
                    <?= $categoryKey !== 'flexible' ? 'hidden' : '' ?>
                >
                    <div class="pu-product-grid">

                        <?php foreach ($category['products'] as $product): ?>
                            <article class="pu-product-card">

                                <div class="pu-product-image">
                                    <img
                                        src="<?= $puEsc($puUrl('assets/images/' . $product[0])) ?>"
                                        alt="<?= $puEsc($product[1]) ?>"
                                        loading="lazy"
                                        onerror="this.style.opacity='.2';"
                                    >
                                </div>

                                <div class="pu-product-body">
                                    <h3><?= $puEsc($product[1]) ?></h3>

                                    <p><?= $puEsc($product[2]) ?></p>

                                    <a
                                        class="pu-product-link"
                                        href="<?= $puEsc($puUrl('contact-us.php')) ?>"
                                    >
                                        Enquire Now →
                                    </a>
                                </div>

                            </article>
                        <?php endforeach; ?>

                    </div>
                </div>
            <?php endforeach; ?>

        </div>
    </section>

    <!-- APPLICATION EXPERTISE -->
    <section class="pu-section">
        <div class="pu-container pu-feature-grid">

            <div class="pu-feature-image">
                <img
                    src="<?= $puEsc($puUrl('assets/images/Solutionforolyurethanecollage.png')) ?>"
                    alt="Polyurethane chemical solutions and applications"
                    loading="lazy"
                >
            </div>

            <div class="pu-feature-copy">
                <span class="pu-eyebrow">Application Expertise</span>

                <h2>Supporting Your Polyurethane Requirements</h2>

                <p>
                    Every application has its own performance and processing
                    needs. Product selection should consider the manufacturing
                    process, intended end use and required technical properties.
                </p>

                <p>
                    Share your application details with our team so we can help
                    identify suitable products from the available range.
                </p>

                <div class="pu-feature-points">

                    <div class="pu-feature-point">
                        <div class="pu-feature-icon" aria-hidden="true">✦</div>
                        <div>
                            <strong>Application-focused selection</strong>
                            <span>
                                Discuss product requirements for your process and end use.
                            </span>
                        </div>
                    </div>

                    <div class="pu-feature-point">
                        <div class="pu-feature-icon" aria-hidden="true">⌘</div>
                        <div>
                            <strong>Product range support</strong>
                            <span>
                                Explore flexible foam, rigid foam, polyols and additives.
                            </span>
                        </div>
                    </div>

                    <div class="pu-feature-point">
                        <div class="pu-feature-icon" aria-hidden="true">↗</div>
                        <div>
                            <strong>Direct enquiry</strong>
                            <span>
                                Send your application details to begin a product discussion.
                            </span>
                        </div>
                    </div>

                </div>

                <div style="margin-top:28px">
                    <a class="pu-btn pu-btn-primary" href="#pu-contact">
                        Talk to Our Team →
                    </a>
                </div>
            </div>

        </div>
    </section>

    <!-- SPECIALITY CHEMICALS SLIDER -->
    <section class="pu-section pu-speciality">
        <div class="pu-container">

            <div class="pu-heading">
                <span class="pu-eyebrow">Explore More</span>

                <h2>Speciality Chemicals for Diverse Industries</h2>

                <p>
                    Explore related chemical segments and discover solutions
                    for a wide range of industrial applications.
                </p>
            </div>

            <?php
            $puSpecialities = [
                ['Paints.jpg', 'Paints & Coatings'],
                ['Paper.jpg', 'Paper Chemicals'],
                ['fine-chemicals.jpg', 'Fine Chemicals'],
                ['Finished.jpg', 'Finished Products'],
                ['Food Colours.jpg', 'Food Colours'],
                ['Textile.jpg', 'Textile Chemicals'],
                ['Water.jpg', 'Water Treatment']
            ];
            ?>

            <div class="pu-slider-shell">

                <div class="pu-speciality-track" id="puSpecialityTrack">

                    <?php foreach ($puSpecialities as $item): ?>
                        <article class="pu-speciality-card">
                            <img
                                src="<?= $puEsc($puUrl('assets/images/' . $item[0])) ?>"
                                alt="<?= $puEsc($item[1]) ?>"
                                loading="lazy"
                            >
                            <h3><?= $puEsc($item[1]) ?></h3>
                        </article>
                    <?php endforeach; ?>

                </div>

                <div class="pu-slider-controls">
                    <button
                        class="pu-slider-btn"
                        type="button"
                        id="puSliderPrev"
                        aria-label="Previous speciality chemicals"
                    >‹</button>

                    <button
                        class="pu-slider-btn"
                        type="button"
                        id="puSliderNext"
                        aria-label="Next speciality chemicals"
                    >›</button>
                </div>

            </div>
        </div>
    </section>

    <!-- SEO CONTENT -->
    <section class="pu-section">
        <div class="pu-container pu-seo-content">

            <span class="pu-eyebrow">Polyurethane Applications</span>

            <h2>Polyurethanes, Polyols and PU Additives</h2>

            <p>
                Polyurethanes are versatile materials used in a variety of
                industrial and commercial applications. Flexible foam systems
                are considered for cushioning and comfort, while rigid foam
                systems are used in selected insulation and industrial
                applications. Performance depends on formulation, processing
                conditions and intended product use.
            </p>

            <h3>Flexible Foam Systems</h3>
            <p>
                Flexible polyurethane foam systems are used in furniture,
                bedding, cushioning and other products where flexibility
                and comfort are important. Selection depends on production
                requirements and the desired finished-foam characteristics.
            </p>

            <h3>Polyurethane Foam Additives</h3>
            <p>
                Foam additives are selected according to formulation and
                process requirements. The appropriate additive depends on
                the chemistry, equipment, production conditions and
                targeted foam properties.
            </p>

            <h3>Polyether and Polymer Polyols</h3>
            <p>
                Polyols are important raw materials in polyurethane
                formulations. Different polyol types can contribute to
                different product properties, so technical specifications
                and application requirements should be reviewed before
                choosing a product.
            </p>

            <h3>Rigid Foam Systems</h3>
            <p>
                Rigid polyurethane foam systems serve selected insulation
                and industrial applications. The right solution depends on
                required performance, processing conditions and applicable
                product standards. Contact our team to request product
                information.
            </p>

        </div>
    </section>

    <!-- CONTACT / WHATSAPP ENQUIRY FORM -->
    <section class="pu-section pu-contact" id="pu-contact">
        <div class="pu-container pu-contact-grid">

            <div class="pu-contact-copy">
                <span class="pu-eyebrow">Get in Touch</span>

                <h2>Let's Discuss Your Chemical Requirements</h2>

                <p>
                    Tell us which polyurethane product or additive you are
                    looking for. Share your application and quantity
                    requirements and continue your enquiry on WhatsApp.
                </p>

                <div class="pu-contact-note">
                    <div class="pu-note-icon" aria-hidden="true">✉</div>
                    <div>
                        <strong>Product enquiries</strong><br>
                        Complete the form to prepare your WhatsApp message.
                    </div>
                </div>

                <div class="pu-contact-note">
                    <div class="pu-note-icon" aria-hidden="true">✓</div>
                    <div>
                        <strong>Helpful details to include</strong><br>
                        Product name, application, quantity and destination.
                    </div>
                </div>

                <div class="pu-contact-note">
                    <div class="pu-note-icon" aria-hidden="true">☎</div>
                    <div>
                        <strong>WhatsApp enquiry number</strong><br>
                        +91 74284 65992
                    </div>
                </div>
            </div>

            <div class="pu-form-card">
                <h3>Send an Enquiry</h3>
                <p>Fields marked * are required.</p>

                <form id="puEnquiryForm" method="post"
                      accept-charset="UTF-8">

                    <input
                        type="hidden"
                        name="csrf_token"
                        value="<?= $puEsc($_SESSION['pu_enquiry_token']) ?>"
                    >

                    <!-- Honeypot anti-spam field -->
                    <div
                        style="position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden"
                        aria-hidden="true"
                    >
                        <label for="pu_website">Leave this field empty</label>
                        <input
                            type="text"
                            id="pu_website"
                            name="website"
                            tabindex="-1"
                            autocomplete="off"
                        >
                    </div>

                    <div class="pu-form-grid">

                        <div class="pu-form-field">
                            <label for="pu_name">Full Name *</label>
                            <input
                                id="pu_name"
                                name="name"
                                type="text"
                                maxlength="100"
                                autocomplete="name"
                                required
                            >
                        </div>

                        <div class="pu-form-field">

                            <label for="pu_company">Company Name</label>
                            <input
                                id="pu_company"
                                name="company"
                                type="text"
                                maxlength="150"
                                autocomplete="organization"
                            >
                        </div>

                        <div class="pu-form-field">
                            <label for="pu_email">Business Email *</label>
                            <input
                                id="pu_email"
                                name="email"
                                type="email"
                                maxlength="190"
                                autocomplete="email"
                                required
                            >
                        </div>

                        <div class="pu-form-field">
                            <label for="pu_phone">Phone Number *</label>
                            <input
                                id="pu_phone"
                                name="phone"
                                type="tel"
                                maxlength="30"
                                autocomplete="tel"
                                required
                            >
                        </div>

                        <div class="pu-form-field pu-form-field-full">
                            <label for="pu_product">Product Category *</label>
                            <select id="pu_product" name="product" required>
                                <option value="">Select a product category</option>
                                <option value="Flexible Foam Systems">
                                    Flexible Foam Systems
                                </option>
                                <option value="Foam Additives">
                                    Foam Additives
                                </option>
                                <option value="Polyether and Polymer Polyols">
                                    Polyether and Polymer Polyols
                                </option>
                                <option value="Rigid Foam Systems">
                                    Rigid Foam Systems
                                </option>
                                <option value="Other">
                                    Other / Not Sure
                                </option>
                            </select>
                        </div>

                        <div class="pu-form-field">
                            <label for="pu_quantity">Required Quantity</label>
                            <input
                                id="pu_quantity"
                                name="quantity"
                                type="text"
                                maxlength="100"
                                placeholder="e.g. 500 kg / 1 MT"
                            >
                        </div>

                        <div class="pu-form-field">
                            <label for="pu_country">Country / City</label>
                            <input
                                id="pu_country"
                                name="location"
                                type="text"
                                maxlength="150"
                                autocomplete="country-name"
                            >
                        </div>

                        <div class="pu-form-field pu-form-field-full">
                            <label for="pu_message">Your Requirement *</label>
                            <textarea
                                id="pu_message"
                                name="message"
                                maxlength="3000"
                                placeholder="Describe your application or technical requirement..."

                                required
                            ></textarea>
                        </div>

                    </div>

                    <button
                        type="submit"
                        class="pu-btn pu-btn-primary pu-form-submit"
                    >
                        Continue to WhatsApp →
                    </button>

                    <div class="pu-form-privacy">
                        Your WhatsApp message will be prepared using the
                        details you enter. Review it before sending.
                    </div>

                </form>
            </div>

        </div>
    </section>

</main>

<!-- FLOATING WHATSAPP BUTTON -->
<a
    class="pu-whatsapp-float"
    href="https://wa.me/<?= $puEsc($puWhatsAppNumber) ?>?text=<?= rawurlencode('Hello, I am interested in your Polyurethane and PU Additives products. Please share product details.') ?>"
    target="_blank"
    rel="noopener noreferrer"
    aria-label="Contact Pure Chemical on WhatsApp"
>
    <svg viewBox="0 0 24 24" aria-hidden="true">
        <path d="M20.52 3.48A11.87 11.87 0 0 0 12.05 0C5.45 0 .08 5.37.08 11.97c0 2.11.55 4.17 1.59 5.98L0 24l6.22-1.63a11.96 11.96 0 0 0 5.83 1.49h.01c6.6 0 11.97-5.37 11.97-11.97a11.9 11.9 0 0 0-3.51-8.41ZM12.06 21.8a9.9 9.9 0 0 1-5.05-1.38l-.36-.21-3.69.97.98-3.6-.23-.37a9.88 9.88 0 0 1-1.52-5.24c0-5.45 4.44-9.89 9.9-9.89a9.83 9.83 0 0 1 7 2.9 9.83 9.83 0 0 1 2.89 7c0 5.45-4.44 9.89-9.9 9.89Zm5.43-7.41c-.3-.15-1.77-.87-2.04-.97-.27-.1-.47-.15-.67.15-.2.3-.77.97-.94 1.17-.17.2-.35.22-.65.07-.3-.15-1.26-.46-2.4-1.47-.89-.8-1.49-1.78-1.66-2.08-.17-.3-.02-.46.13-.61.14-.13.3-.35.45-.52.15-.17.2-.3.3-.5.1-.2.05-.37-.02-.52-.07-.15-.67-1.62-.92-2.22-.24-.58-.49-.5-.67-.51h-.57c-.2 0-.52.07-.8.37-.27.3-1.04 1.02-1.04 2.49s1.07 2.89 1.22 3.09c.15.2 2.1 3.21 5.08 4.5.71.31 1.26.49 1.69.63.71.23 1.36.2 1.87.12.57-.09 1.77-.72 2.02-1.42.25-.7.25-1.3.17-1.42-.07-.13-.27-.2-.57-.35Z"/>
    </svg>
    WhatsApp Enquiry
</a>

<script>
(function () {
    "use strict";

    /* =====================================================
       PRODUCT CATEGORY TABS
    ===================================================== */

    const puTabs = document.querySelectorAll("[data-pu-tab]");
    const puPanels = document.querySelectorAll("[data-pu-panel]");

    puTabs.forEach(function (tab) {
        tab.addEventListener("click", function () {
            const target = tab.getAttribute("data-pu-tab");

            puTabs.forEach(function (item) {
                const active = item === tab;

                item.classList.toggle("is-active", active);
                item.setAttribute(
                    "aria-selected",
                    active ? "true" : "false"
                );
                item.setAttribute("tabindex", active ? "0" : "-1");
            });

            puPanels.forEach(function (panel) {
                const active =
                    panel.getAttribute("data-pu-panel") === target;

                panel.classList.toggle("is-active", active);
                panel.hidden = !active;
            });
        });

        tab.addEventListener("keydown", function (event) {
            if (
                event.key !== "ArrowRight" &&
                event.key !== "ArrowLeft"
            ) {
                return;
            }

            event.preventDefault();

            const tabs = Array.from(puTabs);
            const currentIndex = tabs.indexOf(tab);
            const direction = event.key === "ArrowRight" ? 1 : -1;

            const nextIndex =
                (currentIndex + direction + tabs.length) % tabs.length;

            tabs[nextIndex].focus();
            tabs[nextIndex].click();
        });
    });

    /* =====================================================
       SPECIALITY CHEMICALS SLIDER
    ===================================================== */

    const track = document.getElementById("puSpecialityTrack");
    const previous = document.getElementById("puSliderPrev");
    const next = document.getElementById("puSliderNext");

    let puAutoSlide = null;

    if (track && previous && next) {

        function slideDistance() {
            const card = track.querySelector(".pu-speciality-card");

            if (!card) {
                return 280;
            }

            const gap =
                parseFloat(getComputedStyle(track).columnGap) || 20;

            return card.getBoundingClientRect().width + gap;
        }

        previous.addEventListener("click", function () {
            track.scrollBy({
                left: -slideDistance(),
                behavior: "smooth"
            });
        });

        next.addEventListener("click", function () {
            track.scrollBy({
                left: slideDistance(),
                behavior: "smooth"
            });
        });

        function startAutoSlide() {
            if (puAutoSlide !== null) {
                return;
            }

            puAutoSlide = window.setInterval(function () {
                if (
                    document.hidden ||
                    track.matches(":hover") ||
                    track.contains(document.activeElement)
                ) {
                    return;
                }

                const maxScroll = track.scrollWidth - track.clientWidth;

                if (maxScroll <= 5) {
                    return;
                }

                if (track.scrollLeft >= maxScroll - 5) {
                    track.scrollTo({
                        left: 0,
                        behavior: "smooth"
                    });
                } else {
                    track.scrollBy({
                        left: slideDistance(),
                        behavior: "smooth"
                    });
                }
            }, 4500);
        }

        function stopAutoSlide() {
            if (puAutoSlide !== null) {
                window.clearInterval(puAutoSlide);
                puAutoSlide = null;
            }
        }

        track.addEventListener("mouseenter", stopAutoSlide);
        track.addEventListener("mouseleave", startAutoSlide);
        track.addEventListener("focusin", stopAutoSlide);
        track.addEventListener("focusout", function (event) {
            if (!track.contains(event.relatedTarget)) {
                startAutoSlide();
            }
        });

        document.addEventListener("visibilitychange", function () {
            if (document.hidden) {
                stopAutoSlide();
            } else {
                startAutoSlide();
            }
        });

        startAutoSlide();
    }

    /* =====================================================
       WHATSAPP ENQUIRY FORM
    ===================================================== */

    const puForm = document.getElementById("puEnquiryForm");

    if (puForm) {
        puForm.addEventListener("submit", function (event) {
            event.preventDefault();

            if (!puForm.reportValidity()) {
                return;
            }

            const formData = new FormData(puForm);

            /* Basic honeypot spam check */
            if (
                String(formData.get("website") || "").trim() !== ""
            ) {
                return;
            }

            const name = formData.get("name") || "";
            const company = formData.get("company") || "";
            const email = formData.get("email") || "";
            const phone = formData.get("phone") || "";
            const product = formData.get("product") || "";
            const quantity = formData.get("quantity") || "";
            const location = formData.get("location") || "";
            const message = formData.get("message") || "";

            const whatsappMessage = [
                "NEW POLYURETHANE / PU ADDITIVES ENQUIRY",
                "",
                "Name: " + name,
                "Company: " + (company || "Not provided"),
                "Email: " + email,
                "Phone: " + phone,
                "Product Category: " + product,
                "Required Quantity: " + (quantity || "Not specified"),
                "Country / City: " + (location || "Not specified"),
                "",
                "Requirement:",
                message,
                "",
                "Source: Pure Chemical Website"
            ].join("\n");

            const whatsappNumber = "<?= $puEsc($puWhatsAppNumber) ?>";

            const whatsappURL =
                "https://wa.me/" +
                whatsappNumber +
                "?text=" +
                encodeURIComponent(whatsappMessage);

            const whatsappWindow = window.open(
                whatsappURL,
                "_blank",
                "noopener,noreferrer"
            );

            /*
             * Fallback if the browser blocks the new window.
             */
            if (!whatsappWindow) {
                window.location.href = whatsappURL;
            }
        });
    }

})();
</script>

<?php
/* =========================================================
   SHARED FOOTER
========================================================= */

foreach ([
    __DIR__ . '/footer.php',
    __DIR__ . '/../footer.php',
    __DIR__ . '/../../footer.php'
] as $puFooterFile) {
    if (is_file($puFooterFile)) {
        include_once $puFooterFile;
        break;
    }
}
?>
