{{-- Product card. @include('partials.product-card', ['p' => $product]) optional: 'flash' => true (stock bar), 'variant' => 'shop' (full-width Add to cart button) --}} @php $flash = $flash ?? false; $variant = $variant ?? 'home'; $off = $p->discount_percent; $sold = $flash ? min(95, 40 + ($p->id * 7) % 55) : 0; @endphp
@if ($p->image_url) {{ $p->name }} @else {{ $p->icon ?: '📦' }} @endif @if ($off) -{{ $off }}% @elseif ($p->badge) {{ $p->badge }} @endif @unless ($p->in_stock)Out of Stock@endunless
{{ $p->category?->name }}@if ($p->brand) · {{ $p->brand->name }}@endif {{ $p->name }} @if ($variant === 'home')
{{ str_repeat('★', (int) round($p->rating)) }}{{ str_repeat('☆', 5 - (int) round($p->rating)) }} ({{ $p->reviews_count }})
@endif @if ($flash)
{{ $sold }}% বিক্রি হয়েছে @endif @if ($variant === 'shop')
৳{{ number_format($p->price) }}@if ($p->old_price)৳{{ number_format($p->old_price) }}@endif
@if ($p->in_stock) @else @endif @else
৳{{ number_format($p->price) }}@if ($p->old_price)৳{{ number_format($p->old_price) }}@endif
@if ($p->in_stock) @endif
@endif