{{-- resources/views/dashboard/cars/index.blade.php --}} @extends('layouts.user') @section('title', 'Inventory Shop') @section('content')
{{-- Header --}}

Inventory Shop

Browse and purchase from our curated vehicle inventory

{{-- Stat strip --}}
Available Cars
{{ $cars->total() }}
Total in inventory
Cart Items
{{ $cartItems->sum('quantity') }}
Items in your cart
Cart Total
${{ number_format((float)$cartTotal, 2) }}
Current cart value
Wallet Balance
${{ number_format((float)($walletSummary['available_balance'] ?? 0), 2) }}
Available to spend
{{-- Search / filter --}}
Search Inventory
Filter by name, make, model or year
Reset
{{-- Main layout: cars grid + cart --}}
{{-- Cars grid --}}
@forelse($cars as $car)
@if(!empty($car->hero_image)) {{ $car->name }} @else
@endif
{{ $car->name }}
{{ $car->make }} {{ $car->model }} · {{ $car->year }}
${{ number_format((float)$car->price, 2) }}
@csrf
@empty
No inventory matches Try adjusting your search or filter.
@endforelse
{{ $cars->links() }}
{{-- Cart sidebar --}}
Your Cart
{{ $cartItems->count() }} item{{ $cartItems->count() !== 1 ? 's' : '' }}
@if($cartItems->count())
@csrf
@endif
@forelse($cartItems as $item)
{{ $item->car?->name ?? 'Item' }}
Unit price: ${{ number_format((float)$item->unit_price, 2) }}
@csrf
@csrf
@empty
Your cart is empty.
@endforelse @if($cartItems->count()) @endif
{{-- /iv-layout --}}
{{-- /iv-page --}} @endsection @push('scripts') @endpush