<?php $__env->startSection('title', 'Proveedores'); ?>
<?php $__env->startSection('header', 'Gestión de Proveedores'); ?>

<?php $__env->startSection('content'); ?>
<div class="bg-white rounded-2xl shadow-md p-5 mb-5 flex flex-col md:flex-row gap-3 justify-between">
    <form method="GET" class="flex-1 flex gap-2 max-w-2xl">
        <div class="relative flex-1">
            <i class="fas fa-search absolute left-4 top-1/2 -translate-y-1/2 text-slate-400"></i>
            <input name="buscar" value="<?php echo e(request('buscar')); ?>" placeholder="Buscar proveedor..." class="w-full pl-12 pr-4 py-2.5 border border-slate-300 rounded-lg">
        </div>
        <button class="bg-slate-800 text-white px-4 py-2.5 rounded-lg"><i class="fas fa-search"></i></button>
    </form>
    <a href="<?php echo e(route('proveedores.create')); ?>" class="gradient-primary text-white px-5 py-2.5 rounded-lg font-semibold flex items-center gap-2">
        <i class="fas fa-plus"></i>Nuevo Proveedor
    </a>
</div>

<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
    <?php $__empty_1 = true; $__currentLoopData = $proveedores; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $p): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
        <div class="bg-white rounded-2xl shadow-md p-5 hover:shadow-lg transition">
            <div class="flex justify-between items-start mb-3">
                <div class="w-12 h-12 bg-blue-100 rounded-xl flex items-center justify-center">
                    <i class="fas fa-truck text-blue-600 text-xl"></i>
                </div>
                <div class="flex gap-1">
                    <a href="<?php echo e(route('proveedores.show', $p->id)); ?>" class="p-2 hover:bg-blue-50 text-blue-600 rounded-lg"><i class="fas fa-eye"></i></a>
                    <a href="<?php echo e(route('proveedores.edit', $p->id)); ?>" class="p-2 hover:bg-yellow-50 text-yellow-600 rounded-lg"><i class="fas fa-edit"></i></a>
                </div>
            </div>
            <h3 class="font-bold text-slate-800"><?php echo e($p->razon_social); ?></h3>
            <p class="text-sm text-slate-500 mb-3"><?php echo e($p->codigo); ?> • <?php echo e($p->ruc_nit ?: 'Sin RUC'); ?></p>
            <div class="space-y-1 text-sm">
                <?php if($p->contacto): ?><p><i class="fas fa-user text-slate-400 w-4"></i><?php echo e($p->contacto); ?></p><?php endif; ?>
                <?php if($p->telefono): ?><p><i class="fas fa-phone text-slate-400 w-4"></i><?php echo e($p->telefono); ?></p><?php endif; ?>
                <?php if($p->email): ?><p><i class="fas fa-envelope text-slate-400 w-4"></i><?php echo e($p->email); ?></p><?php endif; ?>
            </div>
        </div>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
        <p class="col-span-full text-center text-slate-400 py-12">Sin proveedores</p>
    <?php endif; ?>
</div>
<div class="mt-4"><?php echo e($proveedores->withQueryString()->links()); ?></div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\TVP\tvp-minimarket\resources\views/proveedores/index.blade.php ENDPATH**/ ?>