{{--
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 --}}
{{-- Color variant images --}}
@foreach($variantSlides as $variant)
@endforeach
{{-- ── Small Thumbnail Slider ── --}}
{{-- Main product image thumb --}}
{{-- Color variant image thumbs --}}
@foreach($variantSlides as $variant)