<?php

require_once __DIR__ . '/../app/config/config.php';
require_once __DIR__ . '/../app/config/database.php';
require_once __DIR__ . '/../app/helpers/functions.php';
require_once __DIR__ . '/../app/helpers/auth.php';
require_once __DIR__ . '/../app/helpers/cart.php';
require_once __DIR__ . '/../app/helpers/settings.php';

$siteName = get_setting('site_name', APP_NAME);
$contactEmail = get_setting('contact_email', '');

$pageTitle = 'Return Policy | ' . $siteName;
$pageDescription = 'Read the return and refund policy for ' . $siteName . '.';

require_once __DIR__ . '/includes/header.php';
?>

<section class="shop-hero">
    <div class="container">
        <div class="eyebrow">Returns</div>
        <h1>Return Policy</h1>
        <p>Information about returns, refunds, damaged items, and order issues.</p>
    </div>
</section>

<section class="section">
    <div class="container" style="max-width:900px;">
        <div class="checkout-form">
            <h2>1. Return Eligibility</h2>
            <p>
                Return eligibility depends on the product type, condition, and reason for return. For hygiene,
                safety, or product integrity reasons, some personal care or opened products may not be eligible for return.
            </p>

            <h2>2. Damaged or Incorrect Items</h2>
            <p>
                If your order arrives damaged or incorrect, contact us as soon as possible with your order number,
                photos of the item, and packaging details.
            </p>

            <h2>3. Refunds</h2>
            <p>
                Approved refunds may be processed after the item is reviewed. Refund timing may depend on the payment method
                and payment provider.
            </p>

            <h2>4. Exchanges</h2>
            <p>
                Exchanges may be offered depending on stock availability and the condition of the returned product.
            </p>

            <h2>5. Non-Returnable Items</h2>
            <p>
                Gift cards, opened personal care products, used products, customised items, and final-sale products
                may not be returnable unless faulty or incorrect.
            </p>

            <h2>6. Return Shipping</h2>
            <p>
                Customers may be responsible for return shipping unless the item is faulty, damaged, or incorrectly supplied.
            </p>

            <h2>7. Contact</h2>
            <p>
                To request return support, contact us with your order number
                <?php if ($contactEmail): ?>
                    at <strong><?= e($contactEmail); ?></strong>.
                <?php else: ?>
                    through our contact page.
                <?php endif; ?>
            </p>

            <p style="color:#777; font-size:14px;">
                Last updated: <?= e(date('d M Y')); ?>
            </p>
        </div>
    </div>
</section>

<?php require_once __DIR__ . '/includes/footer.php'; ?>