{{-- resources/views/frontend/products/index.blade.php --}} @extends('frontend.app') @section('content') @php use App\Models\Information; $info = Information::first(); $minDb = (float)($minDb ?? 0); $maxDb = (float)($maxDb ?? 0); if($maxDb <= $minDb){ $minDb = 0; $maxDb = 5000; } // ✅ keep selected sort from query (ajax + normal) $sort = $sort ?? request('sort', request('shorting', 'latest')); $brandGradient = $info->gradient_code ?? 'linear-gradient(90deg,#0d6efd,#00276C)'; $brandText = $info->primary_color ?? '#ffffff'; $hasSizes = isset($sizes) && $sizes->count() > 0; @endphp {{-- ✅ Desktop breadcrumb --}} Shop {{-- ✅ Mobile top --}} Shop {{-- ✅ Desktop Filters --}} Filters Set options then Apply {{-- ✅ Categories --}} CATEGORIES @foreach($cats as $c) {{ $c->name }} @endforeach {{-- ✅ Price --}} PRICE MIN ৳ {{ (int)$minDb }} MAX ৳ {{ (int)$maxDb }} {{-- shared hidden --}} {{-- ✅ Brand --}} BRAND @foreach($types as $t) {{ $t->name }} @endforeach {{-- ✅ Size --}} @if($hasSizes) SIZE @foreach($sizes as $s) @php $label = $s->name ?? $s->title ?? $s->size ?? $s->value ?? ''; @endphp @if(trim((string)$label) !== '') {{ $label }} @endif @endforeach @endif Apply Filter {{-- ✅ Products --}} Showing {{ $items->firstItem() ?? 0 }} – {{ $items->lastItem() ?? 0 }} of {{ $items->total() ?? 0 }} results Sort Sort by Latest Sort by Oldest Sort by Name Price: Low to High Price: High to Low @include('frontend.products.partials.category_products', ['items'=>$items]) {{-- ✅ Mobile Offcanvas Filters --}} Filters Filters Set options then Apply {{-- ✅ Categories --}} CATEGORIES @foreach($cats as $c) {{ $c->name }} @endforeach {{-- ✅ Price --}} PRICE MIN ৳ {{ (int)$minDb }} MAX ৳ {{ (int)$maxDb }} {{-- ✅ Brand --}} BRAND @foreach($types as $t) {{ $t->name }} @endforeach {{-- ✅ Size --}} @if($hasSizes) SIZE @foreach($sizes as $s) @php $label = $s->name ?? $s->title ?? $s->size ?? $s->value ?? ''; @endphp @if(trim((string)$label) !== '') {{ $label }} @endif @endforeach @endif Apply Filter {{-- ✅ The duplicate mobile-bottom-nav DIV has been REMOVED from here --}} @endsection @push('js') @endpush