@if(count($featuredCategories) > 0) @foreach($featuredCategories as $category)
@foreach($category->products as $product)
@if($product->stock_qty == 0) @endif
@if($product->images && count($product->images) > 0) @foreach($product->images as $image) @endforeach @else @endif
@if (! $product->has_variants) @else {{-- Detail page button (when variants exist) --}} {{-- or any icon you prefer --}} @endif

{{$product->product_name}}

@if($product->discount > 0) {{discount($product)}} BDT {{$product->product_price}} BDT @else {{$product->product_price}} BDT @endif
@php $avg_rating = $product->reviews->avg('rating'); $total_reviews = $product->reviews->count(); @endphp
{{ number_format($avg_rating, 1) }}
({{ $total_reviews }} Reviews)
@endforeach
@endforeach @endif