<div class="flex flex-wrap gap-1.5">
    @php
        $restCount = max($quote->items->count() - 3, 0);
    @endphp

    @foreach ($quote->items as $item)
        <div class="relative">
            <div class="relative h-[60px] max-h-[60px] w-full max-w-[60px] rounded">
                @if ($item->product?->images->count() > 0)
                    <img
                        class="h-full w-full rounded"
                        src="{{ $item->product->base_image_url }}"
                    >

                    <span class="bg-darkPink absolute bottom-px rounded-full px-1.5 text-xs font-bold leading-normal text-white ltr:left-px rtl:right-px">
                        {{ $item->qty }}
                    </span>
                @else
                    <div class="relative h-[60px] max-h-[60px] w-full max-w-[60px] rounded border border-dashed border-gray-300 dark:border-gray-800 dark:mix-blend-exclusion dark:invert">
                        <img src="{{ bagisto_asset('images/product-placeholders/front.svg') }}">
                        
                        <p class="absolute bottom-1.5 w-full text-center text-[6px] font-semibold text-gray-400"> 
                            @lang('b2b::app.admin.quotes.index.datagrid.product-image') 
                        </p>
                    </div>
                @endif
            </div>
        </div>
    @endforeach

    @if ($restCount >= 1)
        <a href="{{ route('admin.b2b.quotes.view', $quote->id) }}">
            <div class="flex h-[65px] w-[65px] items-center rounded bg-gray-50 dark:bg-gray-800">
                <p class="px-1.5 py-1.5 text-center text-xs font-bold text-gray-600 dark:text-gray-300">
                    @lang('b2b::app.admin.quotes.index.datagrid.product-count', ['count' => $restCount])
                </p>
            </div>
        </a>
    @endif
</div>