<nav id="mainnav">
    <div class="container-fluid">
        <div class="row">
            <div id="mainnavwrap">
                <ul>
                {{-- megamenu--}}

                @if(count($categories))
                        <li class="cc"><a href="#">{{__('frontside.header.all_products')}}</a>
                            <ul class="mm">
                                @php
                                    $cgn = '';
                                    $i = 0;
                                @endphp

                                @foreach($categories as $cat)

                                    @if($cat->cg_name != $cgn && $i > 0) </ul></li> @endif

                                    @if($cat->cg_name != $cgn )

                                        @php
                                            $grtitle = strtoupper($cat->cg_name);
                                        @endphp

                                        <li><a href="#">{{$grtitle}}</a>
                                        <ul style="background-image: url({{url($cat->cg_img)}}">
                                        <h3>{{$grtitle}}</h3>

                                    @endif

                                    @php
                                        $link  = tr_url($cat->slug);
                                        $title = ucfirst($cat->cat_name);
                                    @endphp

                                    @if($cat->cat_bold)
                                        <li class=""><strong><a href="{{url($link)}}" title="{{$title}}">{{$title}}</a></strong></li>
                                    @else
                                        <li class=""><a href="{{url($link)}}" title="{{$title}}">{{$title}}</a></li>
                                    @endif

                                    @php
                                        $cgn = $cat->cg_name;
                                        ++$i;
                                    @endphp
                                @endforeach
                            </ul>
                        </li>
                    </ul>
                @endif
                {{-- end megamenu--}}

                @php
                    $hlink  = locRoute('index');
                    $htitle = (/*session('clang')*/app()->getLocale() == 'sr') ? 'Početna' : 'Home';
                @endphp

                <li><a href="{{$hlink}}" title="{{$htitle}}">{{$htitle}}</a></li>

                {{-- Featured categories--}}
                @if(!empty($featcats))
                    {{--@php
                    $ccn = '';
                    $i = 0;
                    @endphp


                    @foreach($featcats as $row)


                        @if($row->cat_name != $ccn && $i > 0 )
                        </ul>
                        </li>
                        @endif

                        @if($row->cat_name != $ccn)

                        @php
                            $clink  = tr_url($row->slug);
                            $ctitle = ucfirst($row->cat_name);
                        @endphp

                        <li><a href="{{url($clink)}}" title="{{$ctitle}}">{{$ctitle}}</a>
                        <ul>

                        @endif

                        @php
                            $blink  = tr_url($row->slug.'/'.$row->brand_slug);
                            $btitle = strtoupper($row->brand_name);
                            $bctitle = ucwords($row->cat_name.' '.$row->brand_name);
                        @endphp

                        <li><a href="{{url($blink)}}" title="{{$bctitle}}">{{$btitle}}</a></li>




                    @php
                    $ccn = $row->cat_name;
                    ++$i;
                    @endphp

                    @endforeach

                    </ul>
                    </li>--}}


                    @foreach($featcats as $row)
                        @php
                            $clink  = tr_url($row->slug);
                            $ctitle = ucfirst($row->cat_name);
                        @endphp

                        <li><a href="{{url($clink)}}" title="{{$ctitle}}">{{$ctitle}}</a></li>

                    @endforeach


                @endif
                {{-- end Featured categories--}}

                {{-- Featured positions--}}
                @if(!empty($featpositions))
                    @foreach($featpositions as $pos)
                        @php
                            $plink  = tr_url($pos->slug);
                            $ptitle = ucfirst($pos->pos_name);
                        @endphp

                        <li><a href="{{url($plink)}}" title="{{$ptitle}}">{{$ptitle}}</a></li>

                    @endforeach
                @endif
                {{-- end Featured positions--}}

                {{-- Featured pages--}}
                @if(!empty($featpages))
                    @foreach($featpages as $page)
                        @php
                            $plink  = tr_url($page->slug);
                            $ptitle = ucfirst($page->page_name);
                        @endphp

                        <li><a href="{{url($plink)}}" title="{{$ptitle}}">{{$ptitle}}</a></li>

                    @endforeach
                @endif
                {{-- end Featured pages--}}

                {{--<li><a href="{{url(tr_url('contact'))}}" title="Contact">Contact</a></li>--}}
                @php
                    $hlink  = locRoute('contact');
                    $htitle = (/*session('clang')*/app()->getLocale() == 'sr') ? 'Kontakt' : 'Contact';
                @endphp

                <li><a href="{{$hlink}}" title="{{$htitle}}">{{$htitle}}</a></li>
                <br clear="all" />
                </ul>
            </div><!--mainnavwrap-->
        </div><!--row-->
    </div><!--container-->
</nav><!--mainnav-->
