<!doctype html>
<html lang="es">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Hoja de Picking - <?php echo e($order->order_reference); ?></title>
    <style>
        @media print {
            .no-print { display: none !important; }
        }
        body { font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial; font-size: 12px; margin: 24px; }
        h1 { font-size: 18px; margin: 0 0 8px; }
        .meta { margin-bottom: 16px; }
        .meta div { margin: 2px 0; }
        table { width: 100%; border-collapse: collapse; }
        th, td { border: 1px solid #ddd; padding: 8px; vertical-align: top; }
        th { background: #f5f5f5; text-align: left; }
        .right { text-align: right; }
        .muted { color: #666; }
        .thumb { width: 52px; height: 52px; object-fit: contain; display: block; }
    </style>
</head>
<body>
    <div class="no-print" style="margin-bottom: 12px;">
        <button onclick="window.print()">Imprimir</button>
    </div>

    <h1>Hoja de Picking</h1>

    <div class="meta">
        <div><strong>Pedido:</strong> <?php echo e($order->order_reference); ?></div>
        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(filled($order->original_order_reference)): ?>
            <div class="muted"><strong>Orden original:</strong> <?php echo e($order->original_order_reference); ?></div>
        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
        <div><strong>Tienda:</strong> <?php echo e($universalSucursalName ?? $order->store_name ?? 'N/A'); ?></div>
        <div><strong>Fecha:</strong> <?php echo e(optional($order->date_order)->format('d/m/Y H:i')); ?></div>
        <div><strong>Cliente:</strong> <?php echo e($customerName ?? $order->customer_name); ?></div>
    </div>

    <table>
        <thead>
            <tr>
                <th style="width: 70px;">Imagen</th>
                <th style="width: 140px;">SKU</th>
                <th>Producto</th>
                <th style="width: 80px;" class="right">Cantidad</th>
                <th style="width: 160px;">Check</th>
            </tr>
        </thead>
        <tbody>
        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $details; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $detail): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <tr>
                <td>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(filled($detail->product_image_url ?? null)): ?>
                        <img class="thumb" src="<?php echo e($detail->product_image_url); ?>" alt="<?php echo e($detail->product_reference); ?>" />
                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </td>
                <td><?php echo e($detail->product_reference); ?></td>
                <td><?php echo e($detail->product_name); ?></td>
                <td class="right"><?php echo e($detail->product_quantity); ?></td>
                <td></td>
            </tr>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
        </tbody>
    </table>

    <div style="margin-top: 18px;">
        <div><strong>Empacado por:</strong> _______________________________</div>
        <div style="margin-top: 8px;"><strong>Observaciones:</strong> ________________________________________________</div>
    </div>
</body>
</html>
<?php /**PATH /home/orderflowpro/public_html/test.orderflowpro.site/resources/views/print/order-picking.blade.php ENDPATH**/ ?>