<div class="grid grid-cols-2 md:grid-cols-3 gap-5">

    @foreach ($feeds as $feed)
        <div class="border rounded-xl bg-white shadow-sm hover:shadow-md transition overflow-hidden flex flex-col">

            <img src="{{ $feed->image }}" class="w-full h-40 object-cover">

            <div class="p-4 flex flex-col flex-1">

                <div class="text-xs text-gray-400">
                    {{ $feed->unit?->name ?? '-' }}
                </div>

                <div class="font-semibold">
                    {{ $feed->name }}
                </div>

                <div class="font-bold text-lg mt-1">
                    Rp {{ $feed->formatted_price }}
                </div>

                <div class="flex items-center justify-end gap-3 mt-auto">

                    <a href="javascript:void(0)" wire:click="decreaseQty({{ $feed->id }})"
                        class="w-8 h-8 rounded-full border border-gray-200 flex items-center justify-center text-lg hover:bg-gray-50 transition-colors">
                        -
                    </a>

                    <span class="text-sm font-bold w-6 text-center">
                        {{ $this->cart[$feed->id]['qty'] ?? 0 }}
                    </span>

                    <a href="javascript:void(0)" wire:click="addFeed({{ $feed->id }})"
                        class="w-8 h-8 rounded-full flex items-center justify-center text-white text-lg transition-colors bg-teal-500 hover:bg-teal-600">
                        +
                    </a>

                </div>

            </div>
        </div>
    @endforeach

</div>
