{{-- Section Header --}}

{{ $section->settings['title'] ?? 'Popular Categories' }}

{{-- Infinite Marquee Container --}}
@php $categories = App\Modules\Product\Models\Category::active() ->withCount(['products' => fn($q) => $q->published()->visible()]) ->take(12) ->get(); // Duplicate for infinite effect $displayCategories = $categories->concat($categories)->concat($categories); $tints = [ ['bg' => '#f0fdf4', 'text' => '#16a34a'], ['bg' => '#eff6ff', 'text' => '#2563eb'], ['bg' => '#faf5ff', 'text' => '#9333ea'], ['bg' => '#fff7ed', 'text' => '#ea580c'], ['bg' => '#f0f9ff', 'text' => '#0891b2'], ['bg' => '#fefce8', 'text' => '#ca8a04'], ]; @endphp @foreach($displayCategories as $index => $category) @php $t = $tints[$index % 6]; @endphp @endforeach