@extends('layouts.app') @section('content') {{-- Category Hero Banner --}}
@if($category->image)
@endif

{{ $category->name }}

{{ $products->total() }}টি পণ্য পাওয়া গেছে

@if($products->count() > 0) {{-- Sort/Filter Bar (CardHeader style) --}}

সকল পণ্য

মোট {{ $products->total() }} টি পণ্য

{{-- Product Grid (ProductDropCard item style) --}}
@foreach($products as $product) @php $_origPrice = $product->price; $_salePrice = $product->sale_price ?? null; $_hasDiscount = $_salePrice && $_salePrice < $_origPrice; $_discountPct = $_hasDiscount ? round(($_origPrice - $_salePrice) / $_origPrice * 100) : 0; $_inStock = !isset($product->stock_quantity) || $product->stock_quantity > 0; @endphp
{{-- Image (aspect-square with rounded-md inner) --}}
{{ $product->name }} {{-- Wishlist Button --}} {{-- Sale Badge --}} @if($_hasDiscount)
-{{ $_discountPct }}%
@endif {{-- Out of Stock Overlay --}} @unless($_inStock)
Out of Stock
@endunless
{{-- Content --}}
@if(!empty($product->category?->name))

{{ $product->category->name }}

@endif

{{ $product->name }}

{{-- Rating --}} @if(!empty($product->average_rating))
@for($i = 1; $i <= 5; $i++) @endfor
({{ $product->reviews_count ?? 0 }})
@endif {{-- Price --}}
@if($_hasDiscount) ৳{{ number_format($_salePrice) }} ৳{{ number_format($_origPrice) }} @else ৳{{ number_format($_origPrice) }} @endif
{{-- Add to Cart (shadcn Button outline style) --}}
@endforeach
{{ $products->links() }}
@else

এই ক্যাটাগরিতে এখনো কোনো পণ্য যোগ করা হয়নি!

অন্যান্য পণ্য দেখুন
@endif
@endsection