@extends('storefront.layout') @section('title', $activeCategory['label'] ?? 'Wholesale Catalog') @section('description', 'See current Vida Mansa wholesale pricing, check availability, and build your order online.') @php /** @var \App\Services\Catalog\CategoryResolver $categoryResolver */ $facets = ($filters['category'] ?? '') !== '' ? $categoryResolver->facetsFor($filters['category']) : []; $hasActiveFilter = ($filters['search'] ?? '') !== '' || ($filters['vendor'] ?? '') !== '' || ($filters['category'] ?? '') !== '' || ($filters['subcategory'] ?? '') !== '' || ($filters['volume'] ?? '') !== '' || ($filters['sort'] ?? 'best_selling') !== 'best_selling'; @endphp @section('content')
{{-- Breadcrumb / header --}}

{{ $activeSubcategory['label'] ?? ($activeCategory['label'] ?? 'Wholesale Catalog') }}

See current wholesale pricing, check availability, and build your order. ${{ number_format($minimumOrder, 0) }} minimum.

{{-- =================== SIDEBAR =================== --}} {{-- =================== MAIN =================== --}}
{{-- Search + sort form --}}
{{-- Preserve active facet so search keeps the filter --}} @if (($filters['volume'] ?? '') !== '') @endif
@if ($hasActiveFilter) Clear all @endif
{{-- Active facet chips --}} @if (($filters['volume'] ?? '') !== '')
Active filters: @php $clearParams = ['category' => $filters['category']]; if (($filters['subcategory'] ?? '') !== '') { $clearParams['subcategory'] = $filters['subcategory']; } @endphp Volume: {{ $filters['volume'] }}
@endif @if ($products->isEmpty())
No products match your filters.
@else
@foreach ($products as $p) @php $price = $pricePresenter->forProduct($p, $customer); $stockStatus = $catalogStockPresenter->forProduct($p); @endphp
@if ($p->image_url) {{ $p->title }} @else [ image ] @endif @if ($stockStatus) {{ $stockStatus->label() }} @endif
{{ $p->vendor ?? 'Vida Mansa' }}
{{ $p->title }}
Wholesale price
{{ $price?->from() ?? 'Price unavailable' }}
@endforeach
{{ $products->links() }}
@endif
{{-- Mirror desktop sidebar into the mobile
drawer on load --}} @endsection