<?php $__env->startSection('title','Products'); ?>
<?php $__env->startSection('page-title','Products'); ?>
<?php $__env->startSection('content'); ?>
<div class="d-flex justify-content-between align-items-center mb-3">
    <div style="font-size:.82rem;color:#64748b"><?php echo e($products->count()); ?> products</div>
    <a href="<?php echo e(route('admin.products.create')); ?>" class="btn btn-admin btn-sm px-3">
        <i class="bi bi-plus-lg me-1"></i>Add Product
    </a>
</div>

<div class="card-admin">
    <table class="table table-hover mb-0">
        <thead>
            <tr>
                <th style="width:40px">#</th>
                <th>Name</th>
                <th>Standard Badge</th>
                <th>Status</th>
                <th>Order</th>
                <th style="width:130px">Actions</th>
            </tr>
        </thead>
        <tbody>
            <?php $__empty_1 = true; $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
            <tr>
                <td class="text-muted"><?php echo e($product->id); ?></td>
                <td>
                    <div class="fw-600" style="color:#0f172a"><?php echo e($product->name); ?></div>
                    <div style="font-size:.74rem;color:#94a3b8"><?php echo e(Str::limit($product->short_description, 60)); ?></div>
                </td>
                <td>
                    <?php if($product->standard_badge): ?>
                    <span class="badge" style="background:#dbeafe;color:#1e40af;font-size:.72rem"><?php echo e($product->standard_badge); ?></span>
                    <?php else: ?> <span class="text-muted">—</span> <?php endif; ?>
                </td>
                <td>
                    <?php if($product->is_active): ?>
                    <span class="badge" style="background:#f0fdf4;color:#166534;font-size:.72rem">Active</span>
                    <?php else: ?>
                    <span class="badge" style="background:#fee2e2;color:#991b1b;font-size:.72rem">Inactive</span>
                    <?php endif; ?>
                </td>
                <td class="text-muted"><?php echo e($product->sort_order); ?></td>
                <td>
                    <div class="d-flex gap-1">
                        <a href="<?php echo e(route('admin.products.edit', $product->id)); ?>" class="btn btn-sm" style="background:#eff6ff;color:#1d4ed8;border:none" title="Edit"><i class="bi bi-pencil"></i></a>
                        <a href="<?php echo e(route('product.show', $product->slug)); ?>" target="_blank" class="btn btn-sm" style="background:#f0fdf4;color:#166534;border:none" title="View"><i class="bi bi-eye"></i></a>
                        <form method="POST" action="<?php echo e(route('admin.products.destroy', $product->id)); ?>" onsubmit="return confirm('Delete this product?')">
                            <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
                            <button class="btn btn-sm" style="background:#fee2e2;color:#991b1b;border:none" title="Delete"><i class="bi bi-trash"></i></button>
                        </form>
                    </div>
                </td>
            </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
            <tr><td colspan="6" class="text-center py-4 text-muted">No products yet. <a href="<?php echo e(route('admin.products.create')); ?>">Add one</a>.</td></tr>
            <?php endif; ?>
        </tbody>
    </table>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Users\Justin\Documents\MUVR_Req\MUVRLABS\muvrlabs\resources\views/admin/pages/products/index.blade.php ENDPATH**/ ?>