@extends('frontEnd.masterNew')
@section('title', 'Product Page')
@section('body')
    <section class="top-space-margin page-title-big-typography cover-background magic-cursor round-cursor" style="background-image: url({{asset('/')}}fontEndNew/assets/images/demo-accounting-company-title-bg.jpg)">
        <div class="container">
            <div class="row extra-very-small-screen align-items-center">
                <div class="col-lg-5 col-sm-8 position-relative page-title-extra-small" data-anime="{ &quot;el&quot;: &quot;childs&quot;, &quot;opacity&quot;: [0, 1], &quot;translateX&quot;: [-30, 0], &quot;duration&quot;: 800, &quot;delay&quot;: 0, &quot;staggervalue&quot;: 300, &quot;easing&quot;: &quot;easeOutQuad&quot; }">
                    <h2 class="text-white text-shadow-medium fw-500 ls-minus-2px mb-0">Find our all {{$category->name}} product here</h2>
                </div>
            </div>
        </div>
    </section>

    <section class="py-5 ">
        <div class="container">
            <div class="row ">
                <div class="col-lg-3 col-12 ">
                        <div class="product-sidebar mb-3 p-5 bg-aluminium-grey">
                            <div class="single-widget">
                                <span style="color: #dddddd" class="mt-5">{{$category->name}}</span>
                                <ul class="list">
                                    @foreach($subCategories as $subCategory)
                                        <li>
                                            <a style="color: #dddddd" href="{{route('subCategory.product', ['id' => $subCategory->id])}}">--> {{$subCategory->name}} </a><span></span>
                                        </li>
                                    @endforeach
                                </ul>
                            </div>
                        </div>
                </div>
                <div class="col-lg-9 col-12">
                    <div class="product-grids-head">
                        <div class="tab-content" id="nav-tabContent">
                            <div class="tab-pane fade show active" id="nav-grid" role="tabpanel" aria-labelledby="nav-grid-tab">
                                <div class="row">
                                    @foreach($products as $product)
                                        <div class="col-lg-4 col-md-6 col-12">
                                            <div class="single-product">
                                                <div class="product-image">
                                                    <img src="{{asset($product->image)}}" height="200px" width="200px">
                                                </div>
                                                <div class="product-info">
                                                    <span class="category">{{$product->subCategory->name}}</span>
                                                    <h6 class="title">
                                                        {{$product->name}}
                                                    </h6>
                                                </div>
                                            </div>
                                        </div>
                                    @endforeach
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>


@endsection




