<?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 = 'Privacy Policy | ' . $siteName;
$pageDescription = 'Read the privacy policy for ' . $siteName . '.';

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

<section class="shop-hero">
    <div class="container">
        <div class="eyebrow">Legal</div>
        <h1>Privacy Policy</h1>
        <p>How <?= e($siteName); ?> collects, uses, and protects customer information.</p>
    </div>
</section>

<section class="section">
    <div class="container" style="max-width:900px;">
        <div class="checkout-form">
            <h2>1. Information We Collect</h2>
            <p>
                We may collect information such as your name, email address, phone number, billing address,
                shipping address, order details, account details, wishlist activity, and payment-related order status.
            </p>

            <h2>2. How We Use Your Information</h2>
            <p>
                Your information is used to process orders, manage deliveries, provide customer support,
                maintain customer accounts, manage loyalty points, handle gift orders, and improve our shopping experience.
            </p>

            <h2>3. Customer Accounts</h2>
            <p>
                When you create an account, we store your details so you can access order history, wishlist,
                loyalty points, and referral information.
            </p>

            <h2>4. Payment Information</h2>
            <p>
                We do not store full card details on this website. Payment processing will be handled through secure
                third-party payment providers once payment gateway integration is enabled.
            </p>

            <h2>5. Cookies and Tracking</h2>
            <p>
                This website may use basic cookies or session storage to support cart functionality, login sessions,
                checkout flow, and website performance.
            </p>

            <h2>6. Data Sharing</h2>
            <p>
                We do not sell customer data. We may share necessary order and delivery information with service
                providers involved in payment processing, delivery, hosting, or customer support.
            </p>

            <h2>7. Data Security</h2>
            <p>
                We take reasonable steps to protect customer data, including secure password hashing, restricted admin access,
                and planned security measures such as reCAPTCHA, login protection, and backups.
            </p>

            <h2>8. Your Rights</h2>
            <p>
                You may request access, correction, or deletion of your personal information where applicable.
            </p>

            <h2>9. Contact</h2>
            <p>
                For privacy-related questions, contact us
                <?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'; ?>