

<?php $__env->startSection('title', 'Categories'); ?>
<?php $__env->startSection('meta_description', 'Browse categories – ' . ($store_name ?? config('app.name'))); ?>

<?php $__env->startSection('content'); ?>
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6">
    <h1 class="text-2xl font-bold text-gray-800 mb-6">Categories</h1>
    <div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4">
        <?php $__empty_1 = true; $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
        <a href="<?php echo e(route('categories.show', $category->slug)); ?>" class="card p-6 text-center group hover:border-primary/30 transition">
            <?php if($category->image): ?>
            <img src="<?php echo e(asset('storage/'.$category->image)); ?>" alt="<?php echo e($category->name); ?>" class="w-20 h-20 mx-auto rounded-2xl object-cover group-hover:scale-105 transition">
            <?php else: ?>
            <div class="w-20 h-20 mx-auto rounded-2xl bg-primary/10 flex items-center justify-center text-primary group-hover:bg-primary/20 transition">
                <i class="fas fa-leaf text-3xl"></i>
            </div>
            <?php endif; ?>
            <h2 class="mt-3 font-semibold text-gray-800 group-hover:text-primary transition"><?php echo e($category->name); ?></h2>
            <?php if($category->activeChildren->isNotEmpty()): ?>
            <p class="text-xs text-gray-500 mt-1"><?php echo e($category->activeChildren->count()); ?> subcategories</p>
            <?php endif; ?>
        </a>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
        <p class="col-span-full text-gray-500">No categories yet.</p>
        <?php endif; ?>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('store.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\laragon\www\ReactNative\grocery-api\resources\views/store/categories/index.blade.php ENDPATH**/ ?>