@extends('layouts.account', ['title' => $title.' | RaseedNow']) @section('account_content')

{{ $title }}

{{ $subtitle }}

@if($categories->count() && ! $offersOnly)
$selectedCategory === ''])>الكل @foreach($categories as $category) $selectedCategory === $category->slug])> {{ $category->name_ar }} {{ $category->games_count }} @endforeach
@endif @if($products->count())
@foreach($products as $product) @php $game = $product->game; $image = $game?->image_path ? asset($game->image_path) : asset('images/kroti/product-108.webp'); $visibleOffer = $product->offers ->filter(fn ($offer) => $offer->appliesToUser(auth()->user())) ->sortByDesc('discount_percent') ->first(); $basePrice = max((int) $product->price_minor, 1); $salePrice = $visibleOffer ? $visibleOffer->salePriceMinor() : $product->sale_price_minor; $discount = $visibleOffer ? (int) round($visibleOffer->discount_percent) : ($salePrice ? max(1, round((($basePrice - $salePrice) / $basePrice) * 100)) : null); @endphp @endforeach
{{ $products->links() }}
@else

{{ $emptyMessage }}

ارجع لاحقًا، أو جرّب قسمًا آخر من القائمة.

@endif
@endsection