<?php if (isset($component)) { $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54 = $attributes; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\AppLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('header', null, []); ?> 
        <h2 class="serif" style="font-size: 1.3rem; color: var(--cream); font-weight: 400; letter-spacing: 0.05em;">
            <?php echo e(__('Admin / Stock / Inventory Management')); ?>

        </h2>
     <?php $__env->endSlot(); ?>

    <style>
        .admin-table-container {
            background: #fff;
            border-radius: 4px;
            border: 1px solid rgba(26,24,20,0.08);
            overflow: hidden;
        }
        .admin-table { width: 100%; border-collapse: collapse; text-align: left; }
        .admin-table th {
            background: var(--ivory);
            padding: 1rem 1.5rem;
            font-size: 0.65rem;
            letter-spacing: 0.15em;
            text-transform: uppercase;
            color: var(--warm-gray);
            font-weight: 600;
            border-bottom: 1px solid rgba(26,24,20,0.06);
        }
        .admin-table td {
            padding: 1.25rem 1.5rem;
            font-size: 0.9rem;
            color: var(--ink);
            border-bottom: 1px solid rgba(26,24,20,0.04);
            vertical-align: middle;
        }
        .product-thumb {
            width: 40px;
            height: 50px;
            object-fit: cover;
            border-radius: 2px;
            background: var(--cream);
        }
        .action-link {
            font-size: 0.75rem;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            font-weight: 600;
            text-decoration: none;
            transition: color 0.2s;
        }
        .manage-link { color: var(--sage); }
        .manage-link:hover { color: var(--charcoal); }
        
        .stock-badge {
            font-size: 0.75rem;
            font-weight: 500;
            color: var(--warm-gray);
        }
        .stock-low { color: var(--terracotta); font-weight: 600; }
    </style>

    <div style="padding: 4rem 0 8rem;">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            
            <?php if(session('success')): ?>
                <div class="alert-animate" style="background: var(--success); color: #fff; padding: 1rem 1.5rem; border-radius: 2px; margin-bottom: 3rem; font-size: 0.9rem; display: flex; align-items: center; gap: 0.75rem;">
                    <svg style="width:20px;height:20px;" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/></svg>
                    <?php echo e(session('success')); ?>

                </div>
            <?php endif; ?>

            <div class="admin-table-container">
                <table class="admin-table">
                    <thead>
                        <tr>
                            <th style="width: 80px;">Img</th>
                            <th>Product Name</th>
                            <th>Category</th>
                            <th>Current Stock</th>
                            <th style="text-align: right;">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td>
                                    <?php if($product->image): ?>
                                        <img src="<?php echo e(asset('storage/' . $product->image)); ?>" class="product-thumb">
                                    <?php else: ?>
                                        <div class="product-thumb" style="display:flex;align-items:center;justify-content:center;color:var(--mist);font-size:0.6rem;">N/A</div>
                                    <?php endif; ?>
                                </td>
                                <td>
                                    <div style="font-weight: 600; color: var(--charcoal);"><?php echo e($product->name); ?></div>
                                    <div style="font-size: 0.75rem; color: var(--mist);">ID: <?php echo e($product->id); ?></div>
                                </td>
                                <td>
                                    <span style="font-size: 0.8rem; color: var(--warm-gray);"><?php echo e($product->category->name); ?></span>
                                </td>
                                <td>
                                    <span class="stock-badge <?php echo e($product->stock <= 5 ? 'stock-low' : ''); ?>">
                                        <?php echo e($product->stock); ?> units
                                    </span>
                                </td>
                                <td style="text-align: right;">
                                    <a href="<?php echo e(route('admin.stock.edit', $product)); ?>" class="action-link manage-link">Manage Stock</a>
                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tbody>
                </table>
            </div>

        </div>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $attributes = $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $component = $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php /**PATH D:\Laravel\ecom\resources\views\admin\stock\index.blade.php ENDPATH**/ ?>