

<?php $__env->startSection('title', '<?php echo e($category->name); ?> | Fashion Mitra'); ?>

<?php $__env->startSection('content'); ?>
<div class="space-y-6">
    <div class="rounded-3xl bg-white p-8 shadow-sm">
        <div class="flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between">
            <div>
                <h1 class="text-3xl font-semibold"><?php echo e($category->name); ?></h1>
                <p class="mt-2 text-slate-600"><?php echo e($category->description); ?></p>
            </div>
            <div class="rounded-full bg-slate-100 px-4 py-2 text-sm text-slate-700"><?php echo e($products->total()); ?> products</div>
        </div>
    </div>

    <div class="grid gap-6 md:grid-cols-2 xl:grid-cols-3">
        <?php $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <article class="rounded-3xl bg-white p-5 shadow-sm hover:shadow-md transition">
            <div class="relative overflow-hidden rounded-3xl">
                <img src="<?php echo e($product->image); ?>" alt="<?php echo e($product->name); ?>" class="h-56 w-full object-cover">
                <?php if($product->discount_percent): ?>
                    <span class="absolute left-4 top-4 rounded-full bg-slate-900 px-3 py-1 text-xs text-white">-<?php echo e($product->discount_percent); ?>%</span>
                <?php endif; ?>
            </div>
            <div class="mt-4 space-y-3">
                <h3 class="text-lg font-semibold"><a href="<?php echo e(route('product.show', $product->slug)); ?>"><?php echo e($product->name); ?></a></h3>
                <p class="text-slate-500 text-sm"><?php echo e(Str::limit($product->description, 90)); ?></p>
                <div class="flex items-center justify-between">
                    <div>
                        <p class="text-slate-900 font-bold">₹<?php echo e(number_format($product->display_price, 2)); ?></p>
                        <?php if($product->sale_price): ?>
                            <p class="text-sm text-slate-500 line-through">₹<?php echo e(number_format($product->price, 2)); ?></p>
                        <?php endif; ?>
                    </div>
                    <span class="rounded-full bg-slate-100 px-3 py-1 text-sm"><?php echo e(number_format($product->rating, 1)); ?> ★</span>
                </div>
                <div class="flex gap-2">
                    <form method="POST" action="<?php echo e(route('cart.add', $product->id)); ?>" class="flex-1">
                        <?php echo csrf_field(); ?>
                        <button type="submit" class="w-full rounded-full bg-slate-900 py-2 text-white text-sm font-semibold hover:bg-slate-800">Add to Cart</button>
                    </form>
                    <form method="POST" action="<?php echo e(route('wishlist.add', $product->id)); ?>" class="flex-1">
                        <?php echo csrf_field(); ?>
                        <button type="submit" class="w-full rounded-full border border-slate-300 py-2 text-slate-700 text-sm font-semibold hover:bg-slate-50">Wishlist</button>
                    </form>
                </div>
            </div>
        </article>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </div>

    <div class="mt-8">
        <?php echo e($products->links()); ?>

    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\phunt\resources\views/category/show.blade.php ENDPATH**/ ?>