@props(['product']) @php $primaryImage = $product->primaryImage(); $imageUrl = $primaryImage?->image_path ? asset('storage/' . $primaryImage->image_path) : asset('images/placeholder.png'); $currentPrice = $product->currentPrice(); $rating = $product->averageRating(); $fullStars = floor($rating); $hasHalf = ($rating - $fullStars) >= 0.5; @endphp
{{-- Badge --}} @if($product->badge_visible && $product->badge_text) {{ $product->badge_text }} @endif {{-- Product Image --}} {{ $product->name }} {{-- Rating & Quick View --}}
@for($i = 1; $i <= 5; $i++) @if($i <= $fullStars) @elseif($i == $fullStars + 1 && $hasHalf) @else @endif @endfor ({{ $product->reviews_count ?? 0 }})
{{-- Product Info --}}
{{-- Title --}}

{{ $product->name }}

{{-- Price --}}
৳{{ number_format($currentPrice, 0) }} @if($product->isOnSale()) ৳{{ number_format($product->regular_price, 0) }} -{{ $product->discountPercent() }}% @endif
{{-- Quick Order Button --}}
{{-- Action Buttons --}}