{{-- Flash Fashion Deal Section ───────────────────────────────────────────────────────── $fashionCategories → Collection of Category, each with: $category->name $category->slug $category->products → each product has ->variants eager-loaded Slider images: Main image → $product->image_url Extra slides → unique color variants with image_url --}}
{{-- ── Heading ── --}}

Flash Fashion Deal

{{-- ── Tab Buttons ── --}}
@foreach($fashionCategories as $index => $category) @endforeach
{{-- ── Tab Panes ── --}}
@foreach($fashionCategories as $catIndex => $category)
@if($category->products->isNotEmpty())
@foreach($category->products as $cardIndex => $product) @php $inStock = $product->variants->where('in_stock', true); // Color variants with image — for slider $variantSlides = $inStock ->whereNotNull('color_code') ->whereNotNull('image_url') ->unique('color_code') ->values(); // Color swatches (up to 7) $allColors = $inStock ->whereNotNull('color_code') ->unique('color_code') ->take(7); $minPrice = $inStock->min('price'); $maxPrice = $inStock->max('price'); // Unique slider ID per card $bigSliderClass = 'fd-big-slider-' . $product->id; $smallSliderClass = 'fd-small-slider-' . $product->id; @endphp
{{-- ── Big Slider ── --}}
{{-- Main product image --}}
{{ $product->title }}
{{-- Color variant images --}} @foreach($variantSlides as $variant)
{{ $variant->color ?? $product->title }}
@endforeach
{{-- ── Small Thumbnail Slider ── --}}
{{-- Main product image thumb --}}
{{ $product->title }}
{{-- Color variant image thumbs --}} @foreach($variantSlides as $variant)
{{ $variant->color ?? $product->title }}
@endforeach
{{-- ── Product Content ── --}}
{{-- Title --}}
{{ $product->title }}
{{-- Color Swatches --}} @if($allColors->count() > 0)
@foreach($allColors as $color)
@endforeach
@endif {{-- Price --}}
@if($minPrice && $maxPrice) @if($minPrice == $maxPrice) ${{ number_format($minPrice, 2) }} @else ${{ number_format($minPrice, 2) }} – ${{ number_format($maxPrice, 2) }} @endif @else — @endif
{{-- Buttons --}}
@endforeach
@else

No products available in this category yet.

@endif
@endforeach
@push('scripts') @endpush