@extends('frontend.layouts.app')

@section('title', 'Products')

@section('content')

@include('frontend.sections.page-banner',[
    'title' => 'Menu',
    'subtitle' => 'Fresh ingredients, authentic flavors, and exceptional quality for every occasion..'
])


<section class="products-section py-5">

    <div class="container">

        <!-- Section Heading -->
        <div class="row justify-content-center mb-5">

            <div class="col-lg-7 text-center">

                <span class="section-subtitle">
                    FEATURED MENU
                </span>

                <h2 class="section-title mt-3">
                    Delicious Dishes
                    <span>Prepared With Love</span>
                </h2>

                <p class="section-description mt-3">
                    Explore our most popular catering dishes, prepared with
                    premium ingredients and served with exceptional quality.
                </p>

            </div>

        </div>

        <div class="row g-4">

            @forelse($menus as $menu)

                <div class="col-lg-3 col-md-6">

                    <div class="product-card h-100">

                        <div class="product-image">

                            @if($menu->image)
                                <img src="{{ asset($menu->image) }}"
                                     class="img-fluid"
                                     alt="{{ $menu->name }}">
                            @else
                                <img src="{{ asset('frontend/images/no-image.jpg') }}"
                                     class="img-fluid"
                                     alt="{{ $menu->name }}">
                            @endif

                            @if($menu->popular)
                                <span class="product-badge">
                                    Popular
                                </span>
                            @endif

                        </div>

                        <div class="product-content">

                            <div class="d-flex justify-content-between align-items-center mb-2">

                                <h5 class="mb-0">
                                    {{ $menu->title }}
                                </h5>

                                @if($menu->price)
                                    <strong class="text-success">
                                        Rs. {{ number_format($menu->price) }}
                                    </strong>
                                @endif

                            </div>

                            
                                
                                {{ \Illuminate\Support\Str::limit(strip_tags($menu->description), 80) }}
                            

                            <div class="d-flex justify-content-between align-items-center mt-3">

                                <small class="text-muted">

                                    <i class="fa-solid fa-layer-group"></i>

                                    {{ $menu->category }}

                                </small>

                                @if($menu->serving)
                                    <small class="text-muted">

                                        <i class="fa-solid fa-utensils"></i>

                                        {{ $menu->serving }}

                                    </small>
                                @endif

                            </div>

                        </div>

                    </div>

                </div>

            @empty

                <div class="col-12 text-center">

                    <h5>No menu available.</h5>

                </div>

            @endforelse

        </div>

        

    </div>

</section>


@endsection

