{{-- Increased space-y for better vertical spacing between elements --}} {{-- Filter Kategori --}}
{{-- Changed to justify-between for potential future additions --}}

Daftar Katalog

{{-- Added a title for context --}}
{{-- Daftar Katalog --}} {{-- Flex container to center the grid block when items don't fill a row --}}
{{-- Grid for catalog items. `justify-items-center` centers items within their cells. --}}
{{-- Removed conditional lg:grid-cols-1 as flex parent handles centering --}} @forelse ($catalogs as $catalog) @php // Define fallback image path in case the catalog image is missing or broken. $fallback = asset('storage/defaults/catalog-default.png'); $imgPath = $catalog->image_path ? asset('storage/' . $catalog->image_path) : $fallback; @endphp {{-- Catalog Card --}} {{-- Removed hover:shadow-xl to apply custom blue shadow --}} {{-- Catalog Image --}} {{ $catalog->name }} {{-- Increased height, added rounded-md, and hover scale --}} {{-- Catalog Details --}}

{{ $catalog->name }}

{{ Str::limit($catalog->description, 100) }}

{{-- Increased limit and added line-clamp --}}
Rp {{ number_format($catalog->price, 0, ',', '.') }} {{-- Tombol Favorit --}} @auth @php $fav = $catalog->allFavorites->where('user_id', auth()->id())->first(); @endphp @endauth
@empty {{-- Message when no catalogs are found --}}

Tidak ada katalog ditemukan.

Coba filter dengan kategori lain atau tambahkan katalog baru.

@endforelse
{{-- Pagination --}} @if(method_exists($catalogs, 'links'))
{{-- Adjusted margin-top and added flex justify-center for pagination --}} {{ $catalogs->links('pagination::tailwind') }} {{-- Specify pagination view if different from default --}}
@endif