@extends('layouts.app') @section('content') @if(count($banners)) {{-- Hero Section: Banner Slider + Promo Box --}}
{{-- Left: Banner Slider --}}
@foreach($banners as $index => $banner)
{{ $banner->title ?? 'Banner' }}
@endforeach @if(count($banners) > 1)
@foreach($banners as $index => $banner) @endforeach
@endif
{{-- Right: Promo Box --}} @php $box = $promoBox ?? null; $bgStyle = $box && $box->image_path ? 'background-image: url(' . asset('uploads/' . $box->image_path) . '); background-size: cover; background-position: center;' : 'background: linear-gradient(135deg, #f97316, #ea580c);'; @endphp
@endif
{{-- Category Icon Slider (Rokomari-style) --}}

বিষয় অনুসারে বাছাই

{{-- Products Grid --}}

আমাদের পণ্যসমূহ

সব দেখুন →
@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 --}}
{{ $product->name }} {{-- Wishlist Button (UI only, no backend logic added) --}} {{-- 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 --}}
@endforeach
@endsection