{{-- Subtitle item count (judul sudah di header layout) --}} @if ($items->isNotEmpty())

{{ $items->sum('quantity') }} Item • {{ $partnerCount }} Toko

@else
@endif {{-- ══ KERANJANG KOSONG ════════════════════════════════════════════════ --}} @if ($items->isEmpty())

Keranjang masih kosong

Tambahkan produk dari mitra kami ke keranjang kamu

Mulai Belanja
@else {{-- ══ DAFTAR ITEM — dikelompokkan per mitra (tampilan saja) ══════════ --}}
@foreach ($groupedItems as $partnerId => $partnerItems) @php $partner = $partnerItems->first()->product->partner; @endphp
{{-- Header grup mitra --}}
{{ $partner->name ?? 'Mitra' }}
{{-- Item-item milik mitra ini --}}
@foreach ($partnerItems as $item) @php $product = $item->product; @endphp
{{-- Foto --}} @if ($product->image) {{ $product->name }} @else
@endif
{{-- Info --}}
{{ $product->name }}

Rp {{ number_format($product->sell_price, 0, ',', '.') }} / {{ $product->unit }}

{{ $item->quantity }}
Rp {{ number_format($item->subtotal, 0, ',', '.') }}
{{-- Hapus --}}
{{-- Catatan --}}
@endforeach
@endforeach
{{-- Tombol kosongkan --}}
{{-- ══ RINGKASAN HARGA ═════════════════════════════════════════════ --}}

Ringkasan Belanja

Subtotal ({{ $items->sum('quantity') }} item) Rp {{ number_format($subtotal, 0, ',', '.') }}
Ongkos Kirim dipilih saat checkout
Total Belanja Rp {{ number_format($subtotal, 0, ',', '.') }}

* Ongkos kirim belum termasuk, dipilih saat checkout

{{-- ══ TOMBOL CHECKOUT ══════════════════════════════════════════════ --}}
Lanjut ke Checkout
@endif {{-- Toast notifikasi --}}