@extends('web.layouts.layout')
@section('content')

    <main>

        <!-- Start Header -->
        <header class="header ">
            <div class="swiper-container header_swiper">
                <div class="swiper-wrapper">
                    @foreach($sliders as $row)
                        <div class="swiper-slide">
                            <div class="item">
                                <div class="container">
                                    <div class="col-lg-5">
                                        <div class="txt_box">
                                            <h5 class="subtitle color-secondary mb-3">{!! $row->title !!}</h5>
                                            <h1 class="title text-white fw-bold mb-5">
                                                {!! $row->description !!}
                                            </h1>
                                            <a href="{{route('web.product')}}" class="butn secondary_butn px-5 " >
                                               {{__('web.shop_now')}}
                                            </a>
                                        </div>
                                    </div>
                                </div>
                                <img src="{{asset($row->image)}}" class="bg" alt="">
                            </div>
                        </div>
                    @endforeach
                </div>
                <div class="swiper-pagination pb-4"></div>
            </div>
        </header>

        <!-- Start section -->
        <section class="categ_sec section">
            <div class="container">
                <div class="sec_head mb-5">
                    <h4 class="sec_title fw-bold">{{__('web.categories')}}</h4>
                </div>
                <div class="swiper-container categ_swiper">
                    <div class="swiper-wrapper">
                        @foreach($categories as $row)
                            <div class="swiper-slide">
                                <a href="{{route('web.product').'?category_id='.$row->id}}">
                                    <div class="categ_item">
                                        <div class="img_box">
                                            <img src="{{asset($row->image)}}" class="secImg" alt="" />
                                        </div>
                                        <h5 class="title text-center"> {!! $row->title !!} </h5>
                                    </div>
                                </a>
                            </div>
                        @endforeach

                    </div>
                </div>
            </div>
        </section>

        <!-- Start section -->
        <section class="products_sec section">
            <div class="container">
                <div class="sec_head mb-5">
                    <h4 class="sec_title fw-bold">{{__('web.new_come')}}</h4>
                </div>
                <div class="row">
                    <div class="col-lg-3">
                        <div class="banner_box">
                            <div class="txt_content">
                                <h5 class="title fw-bold color-secondary mb-4">{!! $home_new->description !!}</h5>
                                <a href="{{route('web.product')}}" class="butn secondary_butn px-5 mx-auto " >
                                   {{__('web.shop_now')}}
                                </a>
                            </div>
                            <img src="{{asset($home_new->image)}}" class="secImg" alt="" />
                        </div>
                    </div>
                    <div class="col-lg-9">
                        @foreach($newest_products as $products)
                        <div class="row">
                            @foreach($products as $row)
                                <div class="col-lg-3">
                                    @include('web.pages.components.products.card',['product'=>$row])
                                </div>
                            @endforeach
                        </div>
                        @endforeach
                    </div>
                </div>
                <a href="{{route('web.product')}}" class="butn secondary_butn px-5 mx-auto mt-4 " >
                    {{__('web.see_more')}}
                </a>
            </div>
        </section>

        <!-- Start section -->
        <section class="banner_sec section">
            <div class="container">
                <div class="inner">
                    <div class="zi-5">
                        <div class="txt_box">
                            <h5 class="title mb-4 fw-bold color-secondary" > {!! $banner->title !!} </h5>
                            <h6 class="subtitle mb-4" >{!! $banner->description !!} </h6>
                            <a href="{{route('web.product')}}" class="butn white_butn px-5 " >
                               {{__('web.shop_now')}}
                            </a>
                        </div>
                    </div>
                    <img src="{{asset($banner->image)}}" class="bg" alt="">
                </div>
            </div>

            <img src="{{url('')}}/assets/web/images/pattern_icon.svg" class="pattern" alt="" />
        </section>

        <!-- Start section -->
        <section class="products_sec section">
            <div class="container">

                <div class="sec_head d-flex align-items-center justify-content-between mb-5">
                    <h4 class="sec_title fw-bold"> {{__('web.biggest_sold')}}  </h4>

                    <div class="arrows">
                        <div class="swiper-button-next"></div>
                        <div class="swiper-button-prev"></div>
                    </div>
                </div>

                <div class="swiper-container products_swiper">
                    <div class="swiper-wrapper">
                        @foreach($sold_products as $row)
                            <div class="swiper-slide">
                                @include('web.pages.components.products.card',['product'=>$row])
                            </div>
                        @endforeach
                    </div>
                </div>
            </div>
        </section>

        <!-- Start section -->
        <section class="partners_sec section">
            <div class="container">
                <h3 class="fw-bold color-secondary mb-5 pb-4 text-center">{{__('web.partners')}}</h3>
                <div class="swiper-container partners_swiper pb-5">
                    <div class="swiper-wrapper">
                        @foreach($partners as $row)
                        <div class="swiper-slide">
                            <div class="logo_box">
                                <img src="{{asset($row->image)}}" class="partnerLogo" alt="">
                            </div>
                        </div>
                        @endforeach
                    </div>
                    <div class="swiper-pagination"></div>
                </div>
            </div>
        </section>

    </main>

@stop
