<style>
    .fixed-cart {
        width: 50px;
        text-align: center;
        background: #fdad04;
        color: white;
        display: block;
        height: 50px;
        border-radius: 5px;
        position: fixed;
        bottom: 100px;
        right: 30px;
        line-height: 17px;
        z-index: 999;
    }
    .footer-item .title,
    .footer-item .title span {
        background: transparent;
        color: black;
        margin: 0 !important;
        padding: 0 !important;
    }
</style>



<li class="fixed-cart d-none"><a href="{{route('cart')}}"><span style="padding-top: 7px;display:block"><i
                class="fas fa-shopping-bag" aria-hidden="true"></i></span> x {{Cart::count()}} </a></li>
<div class="footer-menu">
    <div class="container">
        <ul>
            <li><a href="{{route('home')}}"><span><i class="fas fa-home" aria-hidden="true"></i></span> Home</a></li>
            <li><a href="{{route('cart')}}"><span><i class="fas fa-shopping-bag" aria-hidden="true"></i></span> Cart</a>
                <sup style="top: -50px;left: 15px;"> (<span id="mobile-total-cart-count">{{Cart::count()}}</span>)</sup></li>
            {{-- <li><a href="{{route('cart')}}"><img src="https://t4.ftcdn.net/jpg/01/36/29/27/240_F_136292799_kapdXE2Vhrk0ndKsZk8nyEvg3VwBuwwU.jpg" alt=""></a></li> --}}
            <li class="mobile-menu-openar"><a href="#" class="bars"><span><i class="fas fa-bars"
                            aria-hidden="true"></i></span> Category</a></li>
            @guest
            <li><a href="{{route('login')}}"><span><i class="fas fa-user" aria-hidden="true"></i></span> Login</a></li>
            @else
            @if (auth()->check() && auth()->user()->role_id != 1)
            <li><a href="{{route('dashboard')}}"><span><i class="fas fa-user" aria-hidden="true"></i></span> My
                    Account</a></li>
            @endif
            @if (auth()->check() && auth()->user()->role_id == 1)
            <li><a href="{{route('admin.dashboard')}}"><span><i class="fas fa-user" aria-hidden="true"></i></span>
                    Dash</a></li>
            @endif
            @endguest
        </ul>
    </div>
</div>
<footer class="m-0">
    <div class="container">
        <div class="row">
            <div class="footer-item  col-lg-3 col-md-3 col-sm-12">
                <li id="nav_menu-2" class="widget widget_nav_menu"> 
                    <div style="margin-bottom: 20px;" class="apps footer-logo">
                    <a href="{{route('home')}}">
                    <img src="@if (file_exists(public_path() .'/uploads/setting/'.setting('logo'))){{asset('/uploads/setting/'.setting('logo'))}}@else{{ asset('/icon/no-img-cat.png') }}@endif" alt="{{ setting('SITE_NAME') ?? env('APP_NAME') }}" style="width: 150px">
                </a>
                </div>
                    <div class="item-content ic2">
                        <div class="menu-main-container">
                            <ul id="menu-main-18" class="menu">
                                <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-76">
                                    {{setting('footer_description')}}
                                </li>
                            </ul>
                        </div>
                    </div>
                    
                </li>
            </div>
            <div class="footer-item  col-lg-3 col-md-3 col-sm-12">
                <li id="nav_menu-2" class="widget widget_nav_menu">
                    <div class="title t1">
                        <span>Info</span>
                        <span class="footer-sub-icon"><i class="icofont icofont-simple-right"></i></span>
                    </div>
                    <div class="item-content ic1">
                        <div class="menu-main-container">
                            <ul id="menu-main-18" class="menu">
                                @foreach($footerPages as $page)
                                <li><a href="{{route('page',['slug'=>$page->name])}}"> {{$page->name}}</a></li>
                                @endforeach
                                @foreach(App\Models\Page::where('position',2)->where('status',1)->get() as $page)
                                <li><a href="{{route('page',['slug'=>$page->name])}}"> {{$page->name}}</a></li>
                                @endforeach
                                <li><a href="{{ route('account_deletion') }}">Account Deletion</a></li>
                            </ul>
                        </div>
                    </div>
                </li>
            </div>
            <style>
                .fixed_what {
                    position: absolute;
                    list-style: none;
                }

                @media(max-width:767px) {
                    .item-content {
                        display: none;
                    }
                }
            </style>
            <div class="footer-item  col-lg-3 col-md-3 col-sm-12">
                <li id="nav_menu-2" class="widget widget_nav_menu">
                    <div class="title t3">
                        <span>Menu</span>
                        <span class="footer-sub-icon"><i class="icofont icofont-simple-right"></i></span>
                    </div>
                    <div class="item-content ic3">
                        <div class="menu-main-container">
                            <ul id="menu-main-18" class="menu">
                                <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-76"><a
                                        href="{{route('cart')}}"> Cart</a></li>
                                @auth
                                <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-76"><a
                                        href="{{route('account')}}"> Account</a></li>
                                <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-76"><a
                                        href="{{route('order')}}"> Order</a></li>
                                <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-76"><a
                                        href="{{route('checkout')}}"> Checkout</a></li>
                                <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-76">
                                    <a href="{{route('logout')}}" onclick="event.preventDefault();
                                    document.getElementById('logout-form').submit();"> Log Out</a>
                                    <form id="logout-form" action="{{ route('logout') }}" method="POST" class="d-none">
                                        @csrf
                                    </form>
                                </li>
                                @else
                                <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-76"><a
                                        href="{{route('login')}}"> Login</a></li>
                                <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-76"><a
                                        href="{{route('register')}}"> Registration</a></li>
                                <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-76"><a
                                        href="{{route('vendorJoin')}}"> Vendor Register</a></li>
                                @endauth
                            </ul>
                        </div>
                    </div>
                </li>
            </div>

            <div class="footer-item  col-lg-3 col-md-3 col-sm-12">
                <li id="nav_menu-2" class="widget widget_nav_menu">
                    <div class="title t2">
                        <span>Conatct US</span>
                        <span class="footer-sub-icon"><i class="icofont icofont-simple-right"></i></span>
                    </div>
                    <div class="item-content ic2">
                        <div class="menu-main-container">
                            <ul style="opacity: 0.8;" id="menu-main-18" class="menu">
                                <li style="line-height: 22px;">{{setting('SITE_INFO_ADDRESS')}}</li>
                                <li>Email: {{setting('SITE_INFO_SUPPORT_MAIL')}}</li>
                                <li>Contact No: {{setting('SITE_INFO_PHONE')}}</li>
                                <li><a style="font-weight: 700;border-radius: 5px;padding: 5px 15px;display: inline-block;background: var(--primary_color);color:var(--primary_bg_color_text);font-size: 16px;"
                                        href="{{route('connection.live.chat')}}"
                                        class="{{Request::is('connection') ? 'active':''}}"> Live Chat</a></li>
                            </ul>
                        </div>
                    </div>
                </li>
            {{-- </div>
            <div class="footer-item  col-lg-3 col-md-3 col-sm-12"> --}}
                <style>
                    #nav_menu-2 .aroow2 {
                        display: none;
                    }
                </style>
                <li id="nav_menu-2" class="widget widget_nav_menu pt-3">
                    <div class="title t4">
                        <span>Get In Touch</span>
                        <span class="footer-sub-icon"><i class="icofont icofont-simple-right"></i></span>
                    </div>
                    <ul style="margin-top: 0;" class="item-content  ic4">
                        @if(!empty(setting('facebook')))
                        <li class="s-l-i-3"><a href="{{setting('facebook')}}"><i class="fab fa-facebook-f"></i></a></li>
                        @endif
                        @if(!empty(setting('instagram')))
                        <li class="s-l-i-3"><a href="{{setting('instagram')}}"><i class="fab fa-instagram"></i></a></li>
                        @endif
                        @if(!empty(setting('messanger')))
                        <li class="s-l-i-3"><a href="{{setting('messanger')}}"><i class="fab fa-facebook-messenger"></i></a></li>
                        @endif
                        @if(!empty(setting('youtube')))
                        <li class="s-l-i-3"><a href="{{setting('youtube')}}"><i class="fab fa-youtube"></i></a></li>
                        @endif
                        @if(!empty(setting('whatsapp')))
                        <li class="s-l-i-3"><a href="https://wa.me/{{setting('whatsapp')}}"><i class="fab fa-whatsapp"></i></a></li>
                        @endif
                        @if(!empty(setting('twitter')))
                        <li class="s-l-i-3"><a href="{{setting('twitter')}}"><svg style="width:1rem;fill:var(--MAIN_MENU_BG);" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z"/></svg></a></li>
                        @endif
                        @if(!empty(setting('linkedin')))
                        <li class="s-l-i-3"><a href="{{setting('linkedin')}}"><i class="fab fa-linkedin-in"></i></a></li>
                        @endif
                        @if(!empty(setting('pinterest')))
                        <li class="s-l-i-3"><a href="{{setting('pinterest')}}"><i class="fab fa-pinterest-p"></i></a></li>
                        @endif
                        @if(!empty(setting('tiktok')))
                        <li class="s-l-i-3"><a href="{{setting('tiktok')}}"><i class="fab fa-tiktok"></i></a></li>
                        @endif
                    </ul>
                    @if(setting('android_app'))
                    <div class="platform item-content ic4 mt-4">
                        <ul class="m-0">
                            <li class="s-l-i-3"><a target="_blank" title="Download App!" href="{{ setting('android_app') }}"><svg class="w-8 d-inline" style="fill:var(--primary_color);" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M325.3 234.3L104.6 13l280.8 161.2-60.1 60.1zM47 0C34 6.8 25.3 19.2 25.3 35.3v441.3c0 16.1 8.7 28.5 21.7 35.3l256.6-256L47 0zm425.2 225.6l-58.9-34.1-65.7 64.5 65.7 64.5 60.1-34.1c18-14.3 18-46.5-1.2-60.8zM104.6 499l280.8-161.2-60.1-60.1L104.6 499z"/></svg>&nbsp;Download Now!</a></li>
                        </ul>
                    </div>
                    @endif
                </li>
                @php
                    echo setting('FOOTER_COL_4_HTML');
                @endphp
            </div>
        </div>
    </div>
    <br>
    <div class="copy " style="background: var(--primary_color);padding: 10px;text-align: center;">
        <div class="container">
            <div class="copy-rihgt-1 row">
                <p class="col-md-12" style="margin: 0 0px;color: white;">{{setting('copy_right_text')}}</p>
            </div>
        </div>
    </div>

    @include('layouts.frontend.partials.partial-part.live_gpt')

    <button id="back-to-top" class="btn btn-primary" style="outline: none;">
        <i class="fas fa-chevron-up"></i>
    </button>
    <style>
        #back-to-top {
            display: none;
            position: fixed;
            right: 20px;
            bottom: 20px;
            border-radius: 50%;
            width: 50px;
            height: 50px;
            text-align: center;
            cursor: pointer;
            box-shadow: 0 2px 5px rgba(0,0,0,0.3);
            background-color: var(--primary_color);
            color: white;
            border: none;
        }
    </style>
    <script>
        // Show button when scrolling down
        window.onscroll = function() {
            const button = document.getElementById('back-to-top');
            if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
                button.style.display = "block";
            } else {
                button.style.display = "none";
            }
        };

        // Smooth scroll to top
        document.getElementById('back-to-top').onclick = function() {
            window.scrollTo({top: 0, behavior: 'smooth'});
        };
    </script>
</footer>