<?php
if (session_status() === PHP_SESSION_NONE) {
    session_start();
}
require_once 'includes/init.php';
require_once 'includes/header.php';
?>

<div class="container mt-5">
    <div class="row">
        <div class="col-md-8 offset-md-2 text-center">
            <div class="card">
                <div class="card-body">
                    <h1 class="card-title">Thank you for your order!</h1>
                    <p class="card-text">We are awaiting confirmation of your payment. You will be notified by email once the payment is processed.</p>
                    <p class="card-text">Your order ID is: <strong><?php echo htmlspecialchars($_SESSION['latest_order_id'] ?? 'N/A'); ?></strong></p>
                    <a href="/orders.php" class="btn btn-primary">View Your Orders</a>
                </div>
            </div>
        </div>
    </div>
</div>

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