<?php $__env->startSection('title','Order Confirmed | Shopora'); ?>
<?php $__env->startSection('content'); ?>
<div class="bg-gray-100 py-10 min-h-[calc(100vh-200px)]">
    <div class="max-w-3xl mx-auto px-4 sm:px-6 lg:px-8">
        
        <div class="bg-white rounded-lg shadow-sm border border-gray-200 p-8 text-center mb-6">
            <div class="w-16 h-16 bg-green-50 rounded-full flex items-center justify-center mx-auto mb-4">
                <i class="fa-solid fa-check text-3xl text-green-500"></i>
            </div>
            <h1 class="text-2xl font-medium text-gray-800 mb-2">Thank you for your purchase!</h1>
            <p class="text-sm text-gray-500 mb-6">Your order has been received and is being processed.</p>
            
            <div class="inline-block bg-gray-50 border border-gray-100 rounded px-6 py-3 text-left">
                <p class="text-xs text-gray-500 mb-1">Order Number</p>
                <p class="font-bold text-lg text-gray-800"><?php echo e($order->order_number); ?></p>
            </div>
        </div>

        <div class="bg-white rounded-lg shadow-sm border border-gray-200 p-6 mb-6">
            <div class="flex justify-between items-center mb-4 pb-2 border-b border-gray-100">
                <h3 class="font-medium text-gray-800">Order Summary</h3>
                <span class="text-xs text-gray-500"><?php echo e($order->created_at->format('d M Y, h:i A')); ?></span>
            </div>
            
            <div class="space-y-3 mb-6">
                <?php $__currentLoopData = $order->items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <div class="flex justify-between text-sm">
                    <div class="flex-1 min-w-0 pr-4">
                        <span class="text-gray-800 truncate block"><?php echo e($item->product_name); ?></span>
                        <span class="text-gray-500 text-xs">Qty: <?php echo e($item->quantity); ?></span>
                    </div>
                    <span class="font-medium text-gray-800">Rs. <?php echo e(number_format($item->total)); ?></span>
                </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
            
            <div class="space-y-2 text-sm text-gray-600 border-t border-gray-100 pt-4">
                <div class="flex justify-between"><span>Subtotal</span><span>Rs. <?php echo e(number_format($order->subtotal)); ?></span></div>
                <div class="flex justify-between"><span>Shipping Fee</span><span><?php echo e($order->shipping==0?'Free':'Rs. '.number_format($order->shipping)); ?></span></div>
                <?php if($order->discount>0): ?><div class="flex justify-between text-green-600"><span>Discount</span><span>- Rs. <?php echo e(number_format($order->discount)); ?></span></div><?php endif; ?>
                <div class="flex justify-between font-bold text-gray-800 text-base pt-2"><span>Total</span><span>Rs. <?php echo e(number_format($order->total)); ?></span></div>
            </div>
        </div>

        <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
            <div class="bg-white rounded-lg shadow-sm border border-gray-200 p-6">
                <h3 class="font-medium text-gray-800 mb-3 text-sm">Delivery Address</h3>
                <p class="text-sm font-medium text-gray-800 mb-1"><?php echo e($order->shipping_name); ?></p>
                <p class="text-sm text-gray-600"><?php echo e($order->shipping_address); ?>, <?php echo e($order->shipping_city); ?></p>
                <p class="text-sm text-gray-600"><?php echo e($order->shipping_phone); ?></p>
            </div>
            <div class="bg-white rounded-lg shadow-sm border border-gray-200 p-6">
                <h3 class="font-medium text-gray-800 mb-3 text-sm">Payment Method</h3>
                <p class="text-sm text-gray-600"><?php echo e(ucwords(str_replace('_',' ',$order->payment_method))); ?></p>
                <p class="text-xs text-gray-500 mt-1 uppercase"><?php echo e($order->payment_status); ?></p>
            </div>
        </div>

        <div class="mt-8 text-center space-x-4">
            <a href="<?php echo e(route('orders.show',$order)); ?>" class="btn-outline px-6 py-2.5 rounded text-sm font-medium">Track Order</a>
            <a href="<?php echo e(route('home')); ?>" class="btn-primary px-6 py-2.5 rounded text-sm font-medium shadow-sm">Continue Shopping</a>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/devlools/public_html/E-Commerce/resources/views/checkout/success.blade.php ENDPATH**/ ?>