
<img src="{{url('')}}/assets/web/images/top-dividar.svg" alt="" class="dividar">


<!--Start navbar-->
<nav class="navbar navbar-expand-lg">
    <div class="container">
        <a class="navbar-brand me-lg-5" href="{{route('web.home')}}">
            <img src="{{url('')}}/assets/web/images/logo.svg" alt="">
        </a>
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
                aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarSupportedContent">
            <div class="city-dropdown">
                <div class="text"> {{__('web.delivery_to')}}</div>
                <select onchange="changeCity(this)" name="" id="" class="form-control form-select">
                    @foreach($nav_cities as $row)
                        <option {{$account->address->city_id == $row->id ? 'selected' : ''}} value="{{$row->id}}">{!! $row->title !!}</option>
                    @endforeach
                </select>

            </div>
            <form class="serch-form col-lg-5" role="search" method="get" action="{{route('web.search')}}">
                <input type="text" name="title" class="form-control" placeholder="{{__('web.looking_for')}}">
                <select name="category_id" id="" class="form-control form-select">
                    <option value=""> {{__('web.all_categories')}} </option>
                    @foreach($nav_categories as $row)
                        <option value="{{$row->id}}"> {!! $row->title !!} </option>
                    @endforeach
                </select>
                <button class="search-btn"> <i class="fal fa-search"></i> </button>
            </form>
            <div class="icon-links ms-lg-auto">
                @if(!auth()->user())
                    <a href="#0" data-bs-toggle="modal" data-bs-target="#modal-login"> <i class="fal fa-user"></i> <span class="txt"> {{__('web.login')}} </span> </a>
                @else
                {{--
                    <a href="{{route('web.logout')}}"> <i class="fal fa-user"></i> <span class="txt"> {{__('web.logout')}} </span> </a>
                --}}
                    <a href="{{route('web.profile')}}"> <i class="fal fa-user"></i> <span class="txt"> {{__('web.profile')}} </span> </a>
                @endif
                <a href="{{route('web.favorite')}}"> <i class="fal fa-heart"></i> <span class="txt"> {{__('web.favorite')}} </span> </a>
                <a href="{{route('cart.index')}}"> <i class="fal fa-shopping-bag"></i> <span class="txt"> {{__('web.cart')}} </span> </a>
                <div class="dropdown d-inline-block ms-3">
                    <button class="btn p-lg-0 border-0 bg-transparent dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
                        <i class="fal fa-globe"></i>
                    </button>
                    <ul class="dropdown-menu ltr">
                        <li><a class="dropdown-item" href="{{LaravelLocalization::getLocalizedUrl('en')}}">English</a></li>
                        <li><a class="dropdown-item" href="{{LaravelLocalization::getLocalizedUrl('ar')}}">Arabic</a></li>
                    </ul>
                </div>
            </div>
            <ul class="navbar-nav me-auto mb-2 mb-lg-0 d-lg-none">
                <li class="nav-item">
                    <a class="nav-link offer-link active" aria-current="page" href="#"> <i class="fas fa-bolt me-1"></i> {{__('web.daily_offer')}}</a>
                </li>
                @foreach($nav_categories as $row)
                    <li class="nav-item">
                        <a class="nav-link" href="{{route('web.product').'?category_id='.$row->id}}">{{$row->title}} </a>
                    </li>
                @endforeach
            </ul>
        </div>
    </div>
</nav>
<div class="links-navbar">
    <div class="navbar-wrapper">
        <div class="container">
            <div class="row align-items-center">
                <div class="col-lg-2">
                    <a href="#0" class="toggle-mega-btn">
                        <span class="icon cr-blue me-4"> <i class="far fa-bars"></i> </span>
                        <span class="txt"> {{__('web.all_categories')}} </span>
                        <span class="icon cr-blue ms-auto"> <i class="far fa-chevron-down"></i> </span>
                    </a>
                </div>
                <div class="col-lg-10 d-none d-lg-block">
                    <div class="cat-links align-items-center">
                        <a href="#0" class="cat-link butn rounded-3 text-white ms-0" data-bs-toggle="modal" data-bs-target="#modal-category"><span class=""> <i class="fas fa-grid-2 me-1"></i> {{__('web.categories')}}  </span> </a>
                        @if($offerDaily)
                            <a href="{{route('web.product').'?offer_id[]='.$offerDaily->id}}" class="offer-link"> <i class="fas fa-bolt me-1"></i> {{__('web.daily_offer')}} </a>
                        @endif
                        <div class="links-slider">
                            <div class="swiper-wrapper">
                                @foreach($nav_categories as $row)
                                    <div class="swiper-slide">
                                        <a href="{{route('web.product').'?category_id='.$row->id}}"> {{$row->title}}  </a>
                                    </div>
                                @endforeach
                            </div>
                            <!-- <div class="swiper-button-prev"></div>
                            <div class="swiper-button-next"></div> -->
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="megamenu">
        <div class="container">
            <div class="row">
                <div class="col-lg-2">
                    <div class="links-group">
                        <h5 class="mb-3"> {{__('web.categories')}} </h5>
                        <ul class="links-list">
                            @foreach($nav_sub_categories as $row)
                                <li> <a href="{{route('web.product').'?category_id='.$row->id}}"> <i class="far fa-circle"></i> {!! $row->title !!}  </a> </li>
                            @endforeach
                        </ul>
                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="brands-group">
                        <h5 class="mb-3"> {{__('web.best_brands')}} </h5>
                        <div class="brands">
                            @foreach($nav_brands as $row)
                                <a href="{{route('web.product').'?brand_id[]='.$row->id}}" class="brand wow zoomIn slow">
                                    <img src="{{asset($row->logo)}}" alt="">
                                </a>
                            @endforeach
                        </div>
                    </div>
                </div>
                <div class="col-lg-6">
                    @if($model_banner->active_status)
                        <div class="banners">
                            <div class="row gx-3">
                                @for($i=0;$i<$model_banner->count_photo;$i++)
                                    <div class="col-lg-{{$model_banner->count_photo == 2 ? ($i == 0 ? '7' : '5') : (12 / $model_banner->count_photo)}}">
                                        <a @if($model_banner->photos[$i]->link) href="{{$model_banner->photos[$i]->link}}" @endif class="banner d-block">
                                            <img src="{{asset($model_banner->photos[$i]->image)}}" alt="" class="img-cover rounded-3">
                                        </a>
                                    </div>
                                @endfor
                            </div>
                        </div>
                    @endif
                </div>
            </div>
        </div>
    </div>
</div>
<!--End-navbar-->
