@extends('website.layouts.app') @section('content')

@if (session('app_language', 'en') == 'en') Special Flowers @else زهور خاصة @endif




@if (count($categories) > 0) @foreach ($categories as $index => $item)
@php $checkboxId = 'category_' . $index; $title = session('app_language', 'en') == 'en' ? $item->title_en ?? '' : $item->title_ar ?? ''; @endphp id, $categoriesArray ?? []) ? 'checked' : '' }} />
@endforeach @endif

@if (count($colors) > 0) @foreach ($colors as $index => $color)
id, $colorsArray ?? []) ? 'checked' : '' }} class="form-check-input color-label" type="checkbox" name="colors[]" value="{{ $color->id }}" id="color{{ $index }}">
@endforeach @endif

@if (!empty($brands) && count($brands) > 0) @foreach ($brands as $index => $brand) @php $checkboxId = 'brand_' . $index; $label = session('app_language', 'en') == 'en' ? $brand->title_en : $brand->title_ar; @endphp
id, $brandsArray) ? 'checked' : '' }} class="form-check-input brand-label" type="checkbox" name="brands[]" value="{{ $brand->id }}" id="{{ $checkboxId }}" />
@endforeach @endif


@if ($products->total() > 0)
@if (session('app_language', 'en') == 'en') Showing @else عرض @endif {{ $products->firstItem() }}–{{ $products->lastItem() }} @if (session('app_language', 'en') == 'en') of @else ل @endif {{ $products->total() }} @if (session('app_language', 'en') == 'en') results @else نتائج @endif
@else
@if (session('app_language', 'en') == 'en') Showing 0 @else عرض 0 @endif
@endif
@if (count($products) > 0) @foreach ($products as $item)
@if (!empty($item->after_discount))
@if (session('app_language', 'en') == 'en') BEST OFFER @else أفضل عرض @endif
@endif @if ($item->images->isNotEmpty()) Product Image @endif
@if (session('app_language', 'en') == 'en') {{ $item->title_en ?? '' }} @else {{ $item->title_ar ?? '' }} @endif
{{--
--}}
@php $avgRating = $item->reviews->avg('rating') ?? 0; $fullStars = floor($avgRating); $hasHalfStar = $avgRating - $fullStars >= 0.5; $emptyStars = 5 - $fullStars - ($hasHalfStar ? 1 : 0); @endphp @for ($i = 0; $i < $fullStars; $i++) @endfor @if ($hasHalfStar) @endif @for ($i = 0; $i < $emptyStars; $i++) @endfor {{-- ({{ $item->reviews->count() ?? 0 }}) --}}
{{ display_price($item->price) }}
@endforeach @foreach ($products as $item) @endforeach @if ($products->hasPages())
@endif @else

@if (session('app_language', 'en') == 'en') No Record Found @else لم يتم العثور على سجل @endif

@endif
@endsection @section('scriptJs') @endsection