<?php
// File: thank-you.php
include 'header.php';

$order_id = filter_var($_GET['order_id'] ?? 0, FILTER_SANITIZE_NUMBER_INT);
?>

<div class="bg-gray-100 py-12 md:py-20">
    <div class="max-w-2xl mx-auto px-4 sm:px-6 lg:px-8">
        <div class="bg-white p-8 rounded-lg shadow-md text-center">
            <div class="mx-auto flex items-center justify-center h-16 w-16 rounded-full bg-green-100 mb-6">
                <i class="fas fa-check-circle text-4xl text-green-600"></i>
            </div>
            <h1 class="text-3xl font-extrabold text-ucf-charcoal">Thank You For Your Order!</h1>
            <p class="text-gray-600 mt-4 text-lg">Your payment was successful and your order has been placed.</p>
            
            <?php if ($order_id > 0): ?>
                <p class="text-gray-800 mt-2 font-semibold">Your Order ID is: #UCF-<?php echo $order_id; ?></p>
            <?php endif; ?>

            <p class="mt-4">You will receive an email confirmation shortly. The artist has been notified and will handle the shipping.</p>

            <div class="mt-8">
                <a href="paintings.php" class="inline-block bg-ucf-green text-white font-bold py-3 px-6 rounded-lg hover:bg-ucf-green-dark transition-colors">
                    Continue Shopping
                </a>
            </div>
        </div>
    </div>
</div>

<?php include 'footer.php'; ?>
