@extends('storefront.layout') @section('title', ($settings->company_name ?? 'Shop') . ' — Products') @section('content') @if (session('cart_recovery_error'))
{{ session('cart_recovery_error') }}
@endif {{-- Search + filter bar --}}
@if(request('search') || request('category')) Clear @endif
{{-- Featured products (only when no filter active) --}} @if($featured->isNotEmpty())

Featured Products

@foreach($featured as $product) @endforeach

All Products

@endif {{-- Product grid --}} @if($products->isEmpty())

No products found.

@else
@foreach($products as $product)
{{-- Wishlist toggle (positioned over image) --}}
{{-- Product image --}} @if(filled($product->images)) {{ $product->name }} @else
📷
@endif
{{-- Product info --}} @if($product->category) {{ $product->category->name }} @endif

{{ $product->name }}

@if($product->is_on_sale && $product->sale_price) {{ $settings->currency_symbol ?? '$' }}{{ number_format($product->sale_price, 2) }} {{ $settings->currency_symbol ?? '$' }}{{ number_format($product->price, 2) }} @else {{ $settings->currency_symbol ?? '$' }}{{ number_format($product->price, 2) }} @endif
@if($product->track_inventory && $product->units_in_stock <= 0) Out of stock @endif
@endforeach
{{-- Pagination --}}
{{ $products->withQueryString()->links() }}
@endif @endsection