<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
      <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
     
        <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>" />
         
		<title><?php echo $__env->yieldContent('title'); ?> - <?php echo e($generalsetting->name); ?></title>
		
        <!-- App favicon -->

        <link rel="shortcut icon" href="<?php echo e(asset($generalsetting->favicon)); ?>" alt="<?php echo e($generalsetting->name); ?> Favicon" />
        <meta name="author" content="Creative Design" />
        <link rel="canonical" href="https://creativedesign.com.bd" />
        <?php echo $__env->yieldPushContent('seo'); ?> 
        <?php echo $__env->yieldPushContent('css'); ?>
        <link rel="stylesheet" href="<?php echo e(asset('public/frontEnd/css/bootstrap.min.css')); ?>" />
        <link rel="stylesheet" href="<?php echo e(asset('public/frontEnd/css/animate.css')); ?>" />
        <link rel="stylesheet" href="<?php echo e(asset('public/frontEnd/css/all.min.css')); ?>" />
        <link rel="stylesheet" href="<?php echo e(asset('public/frontEnd/css/owl.carousel.min.css')); ?>" />
        <link rel="stylesheet" href="<?php echo e(asset('public/frontEnd/css/owl.theme.default.min.css')); ?>" />
        <link rel="stylesheet" href="<?php echo e(asset('public/frontEnd/css/mobile-menu.css')); ?>" />
        <link rel="stylesheet" href="<?php echo e(asset('public/frontEnd/css/select2.min.css')); ?>" />
        <!-- toastr css -->
        <link rel="stylesheet" href="<?php echo e(asset('public/backEnd/')); ?>/assets/css/toastr.min.css" />

        <link rel="stylesheet" href="<?php echo e(asset('public/frontEnd/css/wsit-menu.css')); ?>" />
<link rel="stylesheet" href="<?php echo e(url('/style.css')); ?>?v=<?php echo e(time()); ?>">
<link rel="stylesheet" href="<?php echo e(url('/responsive.css')); ?>?v=<?php echo e(time()); ?>">
        <link rel="stylesheet" href="<?php echo e(asset('public/frontEnd/css/main.css')); ?>" />

        <meta name="facebook-domain-verification" content="<?php echo e($generalsetting->facebook_verification); ?>" />
        <meta name="google-site-verification" content="<?php echo e($generalsetting->google_verification); ?>" />

        
        <script>
            window.dataLayer = window.dataLayer || [];
            window.dataLayer.push({
                pageType: '<?php echo e($pageType ?? (\Illuminate\Support\Facades\Route::currentRouteName() ?? "general")); ?>',
                pageTitle: '<?php echo e(addslashes($generalsetting->name ?? "")); ?>',
                siteName: '<?php echo e(addslashes($generalsetting->name ?? "")); ?>',
                currency: 'BDT',
                language: 'bn'
            });
            <?php echo $__env->yieldPushContent('dataLayer'); ?>
        </script>
		
		<style> 

</style> 
		

        <?php
            $pixels = $pixels ?? collect();
            $gtm_code = $gtm_code ?? collect();
            $tiktok_pixels = $tiktok_pixels ?? collect();
        ?>
        <?php $__currentLoopData = $pixels; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $pixel): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <!-- Facebook Pixel Code -->
        <script>
            !(function (f, b, e, v, n, t, s) {
                if (f.fbq) return;
                n = f.fbq = function () {
                    n.callMethod ? n.callMethod.apply(n, arguments) : n.queue.push(arguments);
                };
                if (!f._fbq) f._fbq = n;
                n.push = n;
                n.loaded = !0;
                n.version = "2.0";
                n.queue = [];
                t = b.createElement(e);
                t.async = !0;
                t.src = v;
                s = b.getElementsByTagName(e)[0];
                s.parentNode.insertBefore(t, s);
            })(window, document, "script", "https://connect.facebook.net/en_US/fbevents.js");
            fbq("init", "<?php echo e($pixel->code); ?>");
            fbq("track", "PageView");
        </script>
        <noscript>
            <img height="1" width="1" style="display: none;" src="https://www.facebook.com/tr?id=<?php echo e($pixel->code); ?>&ev=PageView&noscript=1" />
        </noscript>
        <!-- End Facebook Pixel Code -->
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        
        <?php $__currentLoopData = $gtm_code; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $gtm): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <!-- Google Tag Manager -->
        <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
        new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
        j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
        'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
        })(window,document,'script','dataLayer','<?php echo e(str_starts_with($gtm->code, "GTM-") ? $gtm->code : "GTM-".$gtm->code); ?>');</script>
        <!-- End Google Tag Manager -->
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

        <?php $__currentLoopData = $tiktok_pixels; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tp): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <!-- TikTok Pixel -->
        <script>
            !function (w, d, t) {
                w.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[];ttq.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"],ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var i=0;i<ttq.methods.length;i++)ttq.setAndDefer(ttq,ttq.methods[i]);ttq.instance=function(t){for(var e=ttq._i[t]||[],n=0;n<ttq.methods.length;n++)ttq.setAndDefer(e,ttq.methods[n]);return e},ttq.load=function(e,n){var i="https://analytics.tiktok.com/i18n/pixel/events.js";ttq._i=ttq._i||{},ttq._i[e]=[],ttq._i[e]._u=i,ttq._t=ttq._t||{},ttq._t[e]=+new Date,ttq._o=ttq._o||{},ttq._o[e]=n||{};var o=document.createElement("script");o.type="text/javascript",o.async=!0,o.src=i+"?sdkid="+e+"&lib="+t;var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(o,a)};
                ttq.load('<?php echo e($tp->code); ?>');
                ttq.page();
            }(window, document, 'ttq');
        </script>
        <!-- End TikTok Pixel -->
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        <style>
            .whatsapp-float {
                position: fixed;
                bottom: 20px; /* Adjust vertical position */
                left: 20px; /* Adjust horizontal position */
                z-index: 1000;
                background-color: #25D366;
                color: white;
                border-radius: 50%;
                padding: 15px;
                font-size: 24px; /* Icon size */
                box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
                display: flex;
                align-items: center;
                justify-content: center;
            }
        
            .whatsapp-float:hover {
                color: white;
                box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
            }
            /* Hide the .whatsapp-float element on mobile devices */
            @media (max-width: 768px) {
                .whatsapp-float {
                    display: none;
                }
            }
            .stock-out-overlay {
                position: absolute;
                top: 50%;
                left: 0;
                transform: translateY(-50%);
                width: 100%;
                background-color: white;
                color: black;
                font-size: 1em;
                opacity:0.8;
                font-weight: bold;
                text-align: center;
                padding: 10px 0;
                overflow: hidden;
                white-space: nowrap;
            }
            /* Facebook icon */
            .social_list .fa-facebook-f {
                padding:5px 8px;
                color:white;
                background-color: #3b5998; 
                
            }
            
            .social_list .fa-facebook-f:hover {
                background-color: #2d4373;  /* Darker Facebook blue on hover */
            }
            
            /* Twitter icon */
            .social_list .fa-twitter {
                padding:5px 8px;
                color:white;
                background-color: #1da1f2;  /* Twitter blue */
            }
            
            .social_list .fa-twitter:hover {
                padding:5px 8px;
                color:white;
                background-color: #0c85d0;  /* Darker Twitter blue on hover */
            }
            
            /* Instagram icon */
            .social_list .fa-instagram {
                padding:5px 8px;
                color:white;
                background-color: #e4405f;  /* Instagram pink */
            }
            
            .social_list .fa-instagram:hover {
                padding:5px 8px;
                color:white;
                background-color: #bc2a8d;  /* Darker Instagram purple-pink on hover */
            }
            
            /* LinkedIn icon */
            .social_list .fa-linkedin {
                padding:5px 8px;
                color:white;
                background-color: #0077b5;  /* LinkedIn blue */
            }
            
            .social_list .fa-linkedin:hover {
                background-color: #005983;  /* Darker LinkedIn blue on hover */
            }
            
            /* WhatsApp icon */
            .social_list .fa-whatsapp {
                padding:5px 8px;
                color:white;
                background-color: #25d366;  /* WhatsApp green */
            }
            
            .social_list .fa-whatsapp:hover {
                background-color: #128c7e;  /* Darker WhatsApp green on hover */
            }
            
            /* YouTube icon */
            .social_list .fa-youtube {
                padding:5px 8px;
                color:white;
                background-color: #ff0000;  /* YouTube red */
            }
            
            .social_list .fa-youtube:hover {
                background-color: #cc0000;  /* Darker YouTube red on hover */
            }

            /* Footer Background Fix - Ensure footer always displays correctly on all pages */
            /* Note: Footer colors are set via inline styles and style.blade.php */
            footer {
                position: relative !important;
                z-index: 999 !important;
                clear: both !important;
                margin-top: 0 !important;
            }
            
            /* Ensure content doesn't overlap footer */
            #content {
                position: relative;
                z-index: 1;
                background: transparent !important;
                background-color: transparent !important;
            }
            
            /* Prevent body background from affecting footer */
            body {
                background: transparent !important;
                background-color: transparent !important;
            }

            /* App Store Badges Styles */
            .app-badges {
                display: flex;
                flex-direction: row;
                align-items: center;
                justify-content: center;
                gap: 10px;
                margin-top: 15px;
            }
            
            .app-badge-btn {
                display: inline-block;
                transition: transform 0.3s ease, opacity 0.3s ease;
                text-decoration: none;
            }
            
            .app-badge-btn:hover {
                transform: scale(1.05);
                opacity: 0.9;
            }
            
            .app-badge-btn img {
                height: 35px !important;
                max-height: 35px !important;
                width: auto !important;
                max-width: 140px !important;
                display: block;
            }
            
            /* Responsive App Badges */
            @media (max-width: 768px) {
                .app-badges {
                    gap: 10px;
                }
                
                .app-badge-btn img {
                    height: 32px !important;
                    max-height: 32px !important;
                    max-width: 130px !important;
                }
            }
            
            @media (max-width: 576px) {
                .app-badge-btn img {
                    height: 30px !important;
                    max-height: 30px !important;
                    max-width: 120px !important;
                }
            }

            /* Newsletter Subscribe Styles */
            .footer-newsletter {
                margin: 15px 0 25px 0;
                padding: 15px;
                border-radius: 8px;
                border: none;
            }
            
            /* Newsletter Title Color - White */
            .footer-menu .title.stay_conn a {
                color: #ffffff !important;
            }
            
            .footer-menu ul + ul {
                margin-top: 20px;
            }

            .modern-subscribe {
                width: 100%;
            }

            .newsletter-input-group {
                display: flex;
                flex-direction: row;
                gap: 0;
                width: 100%;
                border-radius: 50px;
                overflow: hidden;
                padding: 2px;
            }

            .newsletter-input {
                flex: 1;
                padding: 12px 20px;
                border: none;
                border-radius: 50px 0 0 50px;
                color: #fff;
                font-size: 14px;
                transition: all 0.3s ease;
            }

            .newsletter-input::placeholder {
                color: rgba(255, 255, 255, 0.7);
            }

            .newsletter-input:focus {
                outline: none;
            }

            .newsletter-btn {
                padding: 12px 20px;
                border-radius: 50px;
                border: none;
                color: #fff;
                font-weight: 500;
                font-size: 16px;
                transition: all 0.3s ease;
                cursor: pointer;
                display: flex;
                align-items: center;
                justify-content: center;
                min-width: 50px;
            }

            .newsletter-btn:hover {
                transform: scale(1.05);
                color: #fff;
                opacity: 0.85;
            }

            .newsletter-btn i {
                font-size: 16px;
            }

            /* Responsive Styles for Newsletter */
            @media (max-width: 768px) {
                .footer-newsletter {
                    margin: 12px 0 15px 0;
                }

                .newsletter-input-group {
                    flex-direction: row;
                    border-radius: 50px;
                }

                .newsletter-input {
                    border-radius: 50px 0 0 50px;
                    padding: 10px 18px;
                    font-size: 13px;
                }

                .newsletter-btn {
                    border-radius: 50px;
                    padding: 10px 18px;
                    min-width: 50px;
                }
            }

            @media (max-width: 576px) {
                .newsletter-input {
                    padding: 10px 15px;
                    font-size: 13px;
                }

                .newsletter-btn {
                    padding: 10px 15px;
                    font-size: 14px;
                }
            }

            /* Top headline scrolling text - CSS animation */
            .headline-scroll-wrapper {
                display: flex;
                width: max-content;
                animation: headlineScroll 25s linear infinite;
                white-space: nowrap;
            }
            .headline-scroll-text {
                padding-right: 3em;
                flex-shrink: 0;
            }
            .headline-scroll-duplicate { padding-right: 3em; }
            @keyframes headlineScroll {
                0% { transform: translateX(0); }
                100% { transform: translateX(-50%); }
            }
        </style>
        <?php echo $generalsetting->header_code; ?>

    </head>
    <body class="gotop">
       
        <?php $subtotal = Cart::instance('shopping')->subtotal(); ?>
        <div class="mobile-menu">
                <div class="mobile-menu-logo">
                    <div class="logo-image">
                        <img src="<?php echo e(asset($generalsetting->dark_logo)); ?>" alt="" />
                    </div>
                    <div class="mobile-menu-close">
                        <i class="fa fa-times"></i>
                    </div>
                </div>
                <ul class="first-nav">
                    <?php $__currentLoopData = $menucategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $scategory): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <li class="parent-category">
                        <a href="<?php echo e(url('category/'.$scategory->slug)); ?>" class="menu-category-name">
                            <img src="<?php echo e(asset($scategory->image)); ?>" alt="" class="side_cat_img" />
                            <?php echo e($scategory->name); ?>

                        </a>
                        <?php if($scategory->subcategories->count() > 0): ?>
                        <span class="menu-category-toggle">
                            <i class="fa fa-chevron-down"></i>
                        </span>
                        <?php endif; ?>
                        <ul class="second-nav" style="display: none;">
                            <?php $__currentLoopData = $scategory->subcategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $subcategory): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <li class="parent-subcategory">
                                <a href="<?php echo e(url('subcategory/'.$subcategory->slug)); ?>" class="menu-subcategory-name"><?php echo e($subcategory->subcategoryName); ?></a>
                                <?php if($subcategory->childcategories->count() > 0): ?>
                                <span class="menu-subcategory-toggle"><i class="fa fa-chevron-down"></i></span>
                                <?php endif; ?>
                                <ul class="third-nav" style="display: none;">
                                    <?php $__currentLoopData = $subcategory->childcategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $childcat): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <li class="childcategory"><a href="<?php echo e(url('products/'.$childcat->slug)); ?>" class="menu-childcategory-name"><?php echo e($childcat->childcategoryName); ?></a></li>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </ul>
                            </li>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </ul>
                    </li>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </ul>
            </div>
        <header id="navbar_top">
            <div class="top_header" style="background-color:<?php echo e($generalsetting->secodery_color); ?>">
                    <div class="container d-flex align-items-center">
                        <!-- Hotline button on the left side -->
                        <a href="tel:<?php echo e($contact->hotline); ?>" class="text-center bg-light px-2 d-none d-sm-block fw-bold fs-4" style="color:#13027D;min-width:270px;">
                            <i class="fa-solid fa-headset"></i> <?php echo e($contact->hotline); ?>

                        </a>
                        
                        <!-- Marquee headline - CSS animation (marquee deprecated) -->
                        <div class="d-flex align-items-center flex-grow-1 overflow-hidden">
                            <div class="headline-scroll-wrapper">
                                <span class="headline-scroll-text text-light fs-6"><?php echo e($generalsetting->top_headline); ?></span>
                                <span class="headline-scroll-text headline-scroll-duplicate text-light fs-6" aria-hidden="true"><?php echo e($generalsetting->top_headline); ?></span>
                            </div>
                        </div>
                    </div>
                </div>
            <div class="mobile-header sticky">
                <div class="mobile-logo">
                    <div class="menu-bar">
                        <a class="toggle">
                            <i class="fa-solid fa-bars"></i>
                        </a>
                    </div>
                    <div class="menu-logo">
                        <a href="<?php echo e(route('home')); ?>"><img src="<?php echo e(asset($generalsetting->dark_logo)); ?>" alt="" /></a>
                    </div>
    <div class="menu-bag">
    <a href="<?php echo e(route('customer.checkout')); ?>" class="margin-shopping">
        <i class="fa-solid fa-cart-shopping"></i>
        <span class="mobilecart-qty"><?php echo e(Cart::instance('shopping')->count()); ?></span>
    </a>
</div>

                </div>
            </div>

            <div class="mobile-search">
                <form action="<?php echo e(route('search')); ?>">
                    <input type="text" placeholder="Search Product ... " value="" class="msearch_keyword msearch_click" name="keyword" />
                    <button><i data-feather="search"></i></button>
                </form>
                <div class="search_result"></div>
            </div>

            

            <div class="main-header">
                
            

                <div class="logo-area">
                    <div class="container">
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="logo-header">
                                    <div class="main-logo">
                                        <a href="<?php echo e(route('home')); ?>"><img src="<?php echo e(asset($generalsetting->dark_logo)); ?>" alt="" /></a>
                                    </div>
                                    <div class="main-search">
                                        <form action="<?php echo e(route('search')); ?>">
                                            <input type="text" placeholder="Search Product..." class="search_keyword search_click" name="keyword" />
                                            <button>
                                                <i data-feather="search"></i>
                                            </button>
                                        </form>
                                        <div class="search_result"></div>
                                    </div>
                                    <div class="header-list-items">
                                        <ul>
                                            <li class="track_btn">
                                                <a href="<?php echo e(route('customer.order_track')); ?>"> <i class="fa fa-truck"></i>Track Order</a>
                                            </li>
                                            <?php if(Auth::guard('customer')->user()): ?>
                                            <li class="for_order">
                                                <p>
                                                    <a href="<?php echo e(route('customer.account')); ?>">
                                                        <i class="fa-regular fa-user"></i>

                                                        <?php echo e(Str::limit(Auth::guard('customer')->user()->name,14)); ?>

                                                    </a>
                                                </p>
                                            </li>
                                            <?php else: ?>
                                            <li class="for_order">
                                                <p>
                                                    <a href="<?php echo e(route('customer.login')); ?>">
                                                        <i class="fa-regular fa-user"></i>
                                                        Login / Sign Up
                                                    </a>
                                                </p>
                                            </li>
                                            <?php endif; ?>

                                            <li class="cart-dialog" id="cart-qty">
                                                <a href="<?php echo e(route('customer.checkout')); ?>">
                                                    <p class="margin-shopping">
                                                        <i class="fa-solid fa-cart-shopping"></i>
                                                        <span><?php echo e(Cart::instance('shopping')->count()); ?></span>
                                                    </p>
                                                </a>
                                                <div class="cshort-summary">
                                                    <ul>
                                                        <?php $__currentLoopData = Cart::instance('shopping')->content(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <li>
                                                            <a href=""><img src="<?php echo e(asset($value->options->image)); ?>" alt="" /></a>
                                                        </li>
                                                        <li><a href=""><?php echo e(Str::limit($value->name, 30)); ?></a></li>
                                                        <li>Qty: <?php echo e($value->qty); ?></li>
                                                        <li>
                                                            <p>৳<?php echo e($value->price); ?></p>
                                                            <button class="remove-cart cart_remove" data-id="<?php echo e($value->rowId); ?>"><i data-feather="x"></i></button>
                                                        </li>
                                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                    </ul>
                                                    <p><strong>সর্বমোট : ৳<?php echo e($subtotal); ?></strong></p>
                                                    <a href="<?php echo e(route('customer.checkout')); ?>" class="go_cart"> অর্ডার করুন </a>
                                                </div>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="menu-area">
                    <div class="container">
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="catagory_menu text-center">
                                    <ul>
                                        <?php $__currentLoopData = $menucategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $scategory): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <li class="cat_bar ">
                                            <a href="<?php echo e(url('category/' . $scategory->slug)); ?>"> 
                                                <span class="cat_head"><?php echo e($scategory->name); ?></span>
                                                <?php if($scategory->subcategories->count() > 0): ?>
                                                <i class="fa-solid fa-angle-down cat_down"></i>
                                                <?php endif; ?>
                                            </a>
                                            <?php if($scategory->subcategories->count() > 0): ?>
                                            <ul class="Cat_menu">
                                                <?php $__currentLoopData = $scategory->subcategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $subcat): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <li class="Cat_list cat_list_hover">
                                                    <a href="<?php echo e(url('subcategory/' . $subcat->slug)); ?>">
                                                        <span><?php echo e(Str::limit($subcat->subcategoryName, 25)); ?></span>
                                                        <?php if($subcat->childcategories->count() > 0): ?><i class="fa-solid fa-chevron-right cat_down"></i><?php endif; ?>
                                                    </a>
                                                    <?php if($subcat->childcategories->count() > 0): ?>
                                                    <ul class="child_menu">
                                                        <?php $__currentLoopData = $subcat->childcategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $childcat): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <li class="child_main">
                                                            <a href="<?php echo e(url('products/'.$childcat->slug)); ?>"><?php echo e($childcat->childcategoryName); ?></a>
                                                            
                                                        </li>
                                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                    </ul>
                                                    <?php endif; ?>
                                                </li>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </ul>
                                            <?php endif; ?>
                                        </li>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- main-header end -->
        </header>
        <div id="content">
            <?php echo $__env->yieldContent('content'); ?>
        </div>
            <!-- content end -->
        <footer style="background: <?php echo e($generalsetting->footer_color ?? '#1a1a1a'); ?> !important;">
            <div class="footer-top" style="background: <?php echo e($generalsetting->footer_color ?? '#1a1a1a'); ?> !important;">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-4 mb-3 mb-sm-0">
                            <div class="footer-about">
                                <a href="<?php echo e(route('home')); ?>">
                                    <img src="<?php echo e(asset($generalsetting->dark_logo)); ?>" alt="" />
                                </a>
                                <p><?php echo e(optional($generalsetting)->footer_about_text ?? 'আপনার ব্যবসার ডিজিটাল পার্টনার। আমরা বিশ্বাস করি গুণগত মান এবং গ্রাহক সন্তুষ্টিতে। প্রযুক্তির সাথে এগিয়ে চলুন আমাদের সাথে।'); ?></p>
                                <a href="tel:<?php echo e($contact->hotline); ?>" class="footer-hotlint"><?php echo e($contact->hotline); ?></a>
                                
                                <!-- App Store Buttons -->
                                <div class="app-badges mt-3">
                                    <a href="<?php echo e(optional($generalsetting)->google_play_link ?? '#'); ?>" class="app-badge-btn" target="_blank" rel="noopener">
                                        <img src="/public/uploads/play.svg" alt="Get it on Google Play" style="height: 35px !important; max-height: 35px !important; width: auto !important; max-width: 140px !important;">
                                    </a>
                                    <a href="<?php echo e(optional($generalsetting)->app_store_link ?? '#'); ?>" class="app-badge-btn" target="_blank" rel="noopener">
                                        <img src="/public/uploads/app.png" alt="Download on the App Store" style="height: 35px !important; max-height: 35px !important; width: auto !important; max-width: 140px !important;">
                                    </a>
                                </div>
                            </div>
                        </div>
                        <!-- col end -->
                        <div class="col-sm-3 mb-3 mb-sm-0 col-6">
                            <div class="footer-menu">
                                <ul>
                                    <li class="title"><a>Useful Link</a></li>
                                    <li>
                                        <a href="<?php echo e(route('sellers')); ?>"> All Sellers</a>
                                    </li>
									     <li>
                                        <a href="<?php echo e(route('complaint')); ?>"> Complaints</a>
                                    </li>
                                    <?php $__currentLoopData = $pages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $page): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <li><a href="<?php echo e(route('page',['slug'=>$page->slug])); ?>"><?php echo e($page->name); ?></a></li>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </ul>
                            </div>
                        </div>
                        <!-- col end -->
                        <div class="col-sm-2 mb-3 mb-sm-0 col-6">
                            <div class="footer-menu">
                                <ul>
                                    <li class="title"><a>Link</a></li>
                                     <li>
                                        <a href="<?php echo e(route('shop')); ?>">All Products</a>
                                    </li>
                                    <?php $__currentLoopData = $pagesright; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <li>
                                        <a href="<?php echo e(route('page',['slug'=>$value->slug])); ?>"><?php echo e($value->name); ?></a>
                                    </li>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </ul>
                            </div>
                        </div>

                        <!-- col end -->
                        <div class="col-sm-3 mb-3 mb-sm-0">
                            <div class="footer-menu">
                                <!-- Newsletter Subscribe Section -->
                                <ul>
                                    <li class="title stay_conn"><a style="color: #000000 !important;">Newsletter Subscribe</a></li>
                                </ul>
                                <div class="footer-newsletter" style="background: transparent; background-color: transparent; padding: 0;">
                                    <form action="<?php echo e(route('frontend.newsletter.subscribe')); ?>" method="POST" class="modern-subscribe">
                                        <?php echo csrf_field(); ?>
                                        <div class="input-group newsletter-input-group" style="background: transparent; background-color: transparent; border: none;">
                                            <input type="email" name="email" class="form-control newsletter-input" placeholder="Enter your email..." required style="background: <?php echo e(optional($generalsetting)->primary_color ?? '#007bff'); ?>; background-color: <?php echo e(optional($generalsetting)->primary_color ?? '#007bff'); ?>;">
                                            <button class="btn btn-primary newsletter-btn" type="submit" style="background: #dc3545; background-color: #dc3545;">
                                                <i class="fas fa-paper-plane"></i>
                                            </button>
                                        </div>
                                    </form>
                                </div>
                                <!-- Newsletter End -->
                                
                                <!-- Follow Us Section -->
                              
                                <ul class="social_link">
                                    <?php $__currentLoopData = $socialicons; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <li class="social_list">
                                        <a class="mobile-social-link" href="<?php echo e($value->link); ?>"><i class="<?php echo e($value->icon); ?>"></i></a>
                                    </li>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </ul>
                               
                            </div>
                        </div>
                        <!-- col end -->
                    </div>
                </div>
            </div>
                       <div class="footer-bottom" style="background: <?php echo e($generalsetting->copyright_color ?? '#000000'); ?> !important;">
    <div class="container">
        <div class="row">
            <div class="col-sm-12">
                <div class="copyright">
                    <p style="margin: 0; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px;">
                        Copyright © <?php echo e(date('Y')); ?> <?php echo e($generalsetting->name); ?>. All rights reserved 
                        
                        <span style="margin: 0 5px;">|</span>
                        
                        <span>Website Designed by:</span>

                        <a href="https://www.creativedesign.com.bd" target="_blank" style="display: inline-flex; align-items: center; text-decoration: none; color: white; margin-left: 5px;">
                            <img src="<?php echo e(asset('public/uploads/creativedesign.png')); ?>" alt="Creative Design" style="height: 24px; margin-right: 5px;">
                            <strong>Creative Design</strong>
                        </a>
                    </p>
                </div>
            </div>
        </div>
    </div>
</div>
        </footer>

        
        <a href="javascript:void(0)" class="floating-cart-widget" id="floatingCartBtn" title="কার্ট দেখুন">
            <i class="fa-solid fa-cart-shopping"></i>
            <span class="floating-cart-badge mobilecart-qty"><?php echo e(Cart::instance('shopping')->count()); ?></span>
        </a>

        
        <div id="sidebarCartOverlay" class="sidebar-cart-overlay" onclick="closeSidebarCart()"></div>
        <div id="sidebarCartDrawer" class="sidebar-cart-drawer">
            <div id="sidebarCartContent">
                
            </div>
        </div>

        <style>
            .floating-cart-widget {
                position: fixed;
                top: 50%;
                right: 0;
                transform: translateY(-50%);
                width: 52px;
                height: 70px;
                background: <?php echo e($generalsetting->primary_color ?? '#007bff'); ?>;
                color: #fff;
                display: flex;
                align-items: center;
                justify-content: center;
                border-radius: 12px 0 0 12px;
                box-shadow: -3px 0 15px <?php echo e(($generalsetting->primary_color ?? '#007bff')); ?>66;
                z-index: 9998;
                text-decoration: none;
                transition: all 0.3s ease;
            }
            .floating-cart-widget:hover {
                color: #fff;
                width: 56px;
                box-shadow: -4px 0 20px <?php echo e(($generalsetting->primary_color ?? '#007bff')); ?>80;
            }
            .floating-cart-widget, #floatingCartBtn {
                transform-origin: center center;
            }
            .floating-cart-widget i {
                font-size: 24px;
            }
            .floating-cart-badge {
                position: absolute;
                top: -6px;
                left: 50%;
                transform: translateX(-50%);
                min-width: 22px;
                height: 22px;
                background: #fff;
                color: <?php echo e($generalsetting->primary_color ?? '#007bff'); ?>;
                font-size: 11px;
                font-weight: bold;
                border-radius: 50%;
                border: 2px solid <?php echo e($generalsetting->primary_color ?? '#007bff'); ?>;
                display: flex;
                align-items: center;
                justify-content: center;
                padding: 0 4px;
            }
            @media (max-width: 768px) {
                .floating-cart-widget {
                    top: 35%;
                    width: 48px;
                    height: 60px;
                    z-index: 9999;
                }
                .floating-cart-widget i { font-size: 20px; }
                .floating-cart-badge { min-width: 20px; height: 20px; font-size: 10px; }
            }
            /* Sidebar Cart Styles */
            .sidebar-cart-overlay {
                position: fixed;
                inset: 0;
                background: rgba(0,0,0,0.4);
                z-index: 10010;
                opacity: 0;
                visibility: hidden;
                transition: opacity 0.3s, visibility 0.3s;
            }
            .sidebar-cart-overlay.active {
                opacity: 1;
                visibility: visible;
            }
            .sidebar-cart-drawer {
                position: fixed;
                top: 0;
                right: 0;
                width: 380px;
                max-width: 95vw;
                height: 100%;
                height: 100dvh;
                background: #fff;
                z-index: 10011;
                transform: translateX(100%);
                transition: transform 0.35s ease;
                box-shadow: -5px 0 25px rgba(0,0,0,0.15);
                display: flex;
                flex-direction: column;
                overflow: hidden;
            }
            .sidebar-cart-drawer.active {
                transform: translateX(0);
            }
            #sidebarCartContent {
                flex: 1;
                min-height: 0;
                display: flex;
                flex-direction: column;
                overflow: hidden;
            }
            .sidebar-cart-header {
                background: <?php echo e($generalsetting->primary_color ?? '#007bff'); ?>;
                color: #fff;
                padding: 16px 20px;
                display: flex;
                align-items: center;
                gap: 12px;
                flex-shrink: 0;
            }
            .sidebar-cart-close {
                background: transparent;
                border: none;
                color: #fff;
                font-size: 22px;
                cursor: pointer;
                padding: 4px;
                line-height: 1;
            }
            .sidebar-cart-close:hover { opacity: 0.9; }
            .sidebar-cart-title {
                font-size: 20px;
                font-weight: 700;
                margin: 0;
                flex: 1;
            }
            .sidebar-cart-body {
                flex: 0 1 auto;
                min-height: 0;
                overflow-y: auto;
                padding: 16px;
                background: #f8f9fa;
            }
            .sidebar-cart-item {
                display: flex;
                gap: 12px;
                padding: 12px;
                background: #fff;
                border-radius: 8px;
                margin-bottom: 10px;
                box-shadow: 0 1px 3px rgba(0,0,0,0.06);
            }
            .sidebar-cart-item-img {
                width: 70px;
                height: 85px;
                flex-shrink: 0;
                border-radius: 6px;
                overflow: hidden;
            }
            .sidebar-cart-item-img img {
                width: 100%;
                height: 100%;
                object-fit: cover;
            }
            .sidebar-cart-item-details {
                flex: 1;
                min-width: 0;
                position: relative;
            }
            .sidebar-cart-item-title {
                font-weight: 600;
                color: #222;
                text-decoration: none;
                display: block;
                margin-bottom: 4px;
                font-size: 14px;
                line-height: 1.3;
            }
            .sidebar-cart-item-title:hover { color: <?php echo e($generalsetting->primary_color ?? '#007bff'); ?>; }
            .sidebar-cart-item-price {
                font-size: 13px;
                color: #444;
                margin: 0 0 4px 0;
            }
            .sidebar-cart-item-savings {
                font-size: 12px;
                color: #28a745;
                font-weight: 500;
                margin: 0 0 8px 0;
            }
            .sidebar-cart-item-remove {
                position: absolute;
                bottom: 0;
                right: 0;
                background: none;
                border: none;
                color: <?php echo e($generalsetting->primary_color ?? '#007bff'); ?>;
                cursor: pointer;
                padding: 4px;
                font-size: 14px;
            }
            .sidebar-cart-item-remove:hover { color: <?php echo e($generalsetting->primary_color ?? '#007bff'); ?>; opacity: 0.85; }
            .sidebar-cart-qty {
                display: flex;
                align-items: center;
                gap: 0;
                margin: 8px 0 6px 0;
                width: fit-content;
                border: 1px solid #ddd;
                border-radius: 6px;
                overflow: hidden;
            }
            .sidebar-qty-btn {
                width: 28px;
                height: 28px;
                border: none;
                background: #f0f0f0;
                color: #333;
                font-size: 18px;
                font-weight: bold;
                cursor: pointer;
                display: flex;
                align-items: center;
                justify-content: center;
                transition: background 0.2s;
            }
            .sidebar-qty-btn:hover {
                background: <?php echo e($generalsetting->primary_color ?? '#007bff'); ?>;
                color: #fff;
            }
            .sidebar-qty-num {
                min-width: 28px;
                height: 28px;
                display: flex;
                align-items: center;
                justify-content: center;
                font-weight: 600;
                font-size: 14px;
                background: #fff;
            }
            .sidebar-cart-empty {
                text-align: center;
                padding: 40px 20px;
                color: #888;
            }
            .sidebar-cart-empty i {
                font-size: 48px;
                margin-bottom: 12px;
                opacity: 0.5;
            }
            .sidebar-cart-footer {
                padding: 16px 20px;
                border-top: 1px solid #eee;
                background: #fff;
                flex-shrink: 0;
            }
            .sidebar-cart-total {
                display: flex;
                justify-content: space-between;
                align-items: baseline;
                margin-bottom: 12px;
            }
            .sidebar-cart-total-label {
                font-size: 14px;
                color: #666;
            }
            .sidebar-cart-total-amount {
                font-size: 20px;
                font-weight: 700;
                color: #222;
            }
            .sidebar-cart-checkout-btn {
                display: block;
                width: 100%;
                padding: 14px 24px;
                background: <?php echo e($generalsetting->primary_color ?? '#007bff'); ?>;
                color: #fff !important;
                text-align: center;
                font-weight: 600;
                font-size: 16px;
                border-radius: 6px;
                text-decoration: none;
                transition: background 0.2s, opacity 0.2s;
            }
            .sidebar-cart-checkout-btn:hover {
                background: <?php echo e($generalsetting->primary_color ?? '#007bff'); ?>;
                opacity: 0.9;
                color: #fff !important;
            }
            @media (max-width: 768px) {
                .sidebar-cart-drawer {
                    width: 100%;
                    max-width: 100%;
                }
                .sidebar-cart-header { padding: 14px 16px; }
                .sidebar-cart-body { padding: 12px; }
                .sidebar-cart-item { padding: 10px; }
                .sidebar-cart-item-img { width: 60px; height: 72px; }
                .sidebar-qty-btn { width: 36px; height: 36px; }
                .sidebar-qty-num { min-width: 36px; height: 36px; }
            }
            /* Fly to cart animation - Fabrilife style */
            .fly-to-cart-img {
                position: fixed;
                z-index: 99999;
                pointer-events: none;
                border-radius: 8px;
                box-shadow: 0 8px 30px rgba(0,0,0,0.35);
                object-fit: cover;
                border: 2px solid #fff;
            }
            @keyframes cartBump {
                0% { transform: scale(1); }
                40% { transform: scale(1.25); }
                70% { transform: scale(0.95); }
                100% { transform: scale(1); }
            }
            .cart-bump-animate {
                animation: cartBump 0.45s ease-out;
            }
            .menu-bag a, .mobile_bottom_nav .nav_item .icon_box {
                transform-origin: center center;
            }
        </style>

       <div class="mobile_bottom_nav">
    <div class="nav_container">
        <a href="javascript:void(0)" class="nav_item toggle">
            <div class="icon_box">
                <i class="fa-solid fa-bars"></i>
            </div>
            <span class="nav_text">Category</span>
        </a>

        <a href="<?php echo e(route('customer.order_track')); ?>" class="nav_item <?php echo e(Route::is('customer.order_track') ? 'active' : ''); ?>">
            <div class="icon_box">
                <i class="fa fa-truck"></i>
            </div>
            <span class="nav_text">Tracking</span>
        </a>

        <div class="nav_item home_wrapper">
            <a href="<?php echo e(route('home')); ?>" class="home_fab <?php echo e(Route::is('home') ? 'active' : ''); ?>">
                <i class="fa-solid fa-house"></i>
            </a>
        </div>

        <a href="<?php echo e(route('customer.checkout')); ?>" class="nav_item <?php echo e(Route::is('customer.checkout') ? 'active' : ''); ?>">
            <div class="icon_box">
                <i class="fa-solid fa-cart-shopping"></i>
                <span class="cart_badge mobilecart-qty"><?php echo e(Cart::instance('shopping')->count()); ?></span>
            </div>
            <span class="nav_text">Cart</span>
        </a>

        <?php if(Auth::guard('customer')->user()): ?>
            <a href="<?php echo e(route('customer.account')); ?>" class="nav_item <?php echo e(Route::is('customer.account') ? 'active' : ''); ?>">
                <div class="icon_box">
                    <i class="fa-solid fa-user"></i>
                </div>
                <span class="nav_text">Account</span>
            </a>
        <?php elseif(Auth::guard('admin')->check() && Auth::guard('admin')->user()->hasRole('vendor')): ?>
            <a href="<?php echo e(route('vendor.dashboard')); ?>" class="nav_item">
                <div class="icon_box">
                    <i class="fa-solid fa-store"></i>
                </div>
                <span class="nav_text">Vendor</span>
            </a>
        <?php elseif(Auth::guard('admin')->check() && (Auth::guard('admin')->user()->hasRole('reseller') || (isset(Auth::guard('admin')->user()->role) && strtolower(Auth::guard('admin')->user()->role) === 'reseller'))): ?>
            <a href="<?php echo e(route('reseller.dashboard')); ?>" class="nav_item">
                <div class="icon_box">
                    <i class="fa-solid fa-handshake"></i>
                </div>
                <span class="nav_text">Reseller</span>
            </a>
        <?php else: ?>
            <a href="<?php echo e(route('customer.login')); ?>" class="nav_item <?php echo e(Route::is('customer.login') ? 'active' : ''); ?>">
                <div class="icon_box">
                    <i class="fa-solid fa-right-to-bracket"></i>
                </div>
                <span class="nav_text">Login</span>
            </a>
        <?php endif; ?>
    </div>
</div>
<style>
/* --- Mobile Bottom Navigation Styles --- */
.mobile_bottom_nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    padding: 10px 0;
    border-radius: 20px 20px 0 0; /* উপরের কোনা গুলো একটু গোল হবে */
    display: none; /* ডেস্কটপে হাইড থাকবে */
}

/* শুধুমাত্র মোবাইলে দেখানোর জন্য */
@media (max-width: 768px) {
    .mobile_bottom_nav {
        display: block;
    }
}

.nav_container {
    display: flex;
    justify-content: space-around;
    align-items: flex-end; /* আইটেমগুলো নিচে সমান থাকবে */
    position: relative;
    padding: 0 10px;
}

/* সাধারণ মেনু আইটেম */
.nav_item {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #6c757d; /* ডিফল্ট কালার */
    font-size: 12px;
    transition: all 0.3s ease;
    width: 20%;
}

.icon_box {
    position: relative;
    font-size: 20px;
    margin-bottom: 4px;
    transition: transform 0.2s;
}

.nav_text {
    font-weight: 500;
}

/* হোভার এবং একটিভ কালার */
.nav_item:hover, .nav_item.active {
    color: #FF6600; /* আপনার ব্র্যান্ড কালার এখানে দিন */
}

.nav_item.active .icon_box {
    transform: translateY(-3px); /* একটিভ হলে একটু উপরে উঠবে */
}

/* --- Center Floating Home Button --- */
.home_wrapper {
    position: relative;
    bottom: 25px; /* স্বাভাবিকের চেয়ে উপরে থাকবে */
}

.home_fab {
    width: 60px;
    height: 60px;
    background: <?php echo e($generalsetting->primary_color); ?>; /* ব্র্যান্ড কালার */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 24px;
    box-shadow: 0 8px 15px rgba(255, 102, 0, 0.4);
    border: 4px solid #fff; /* সাদা বর্ডার */
    transition: transform 0.3s ease;
}

.home_fab:hover {
    transform: scale(1.1); /* হোভারে বড় হবে */
    color: #fff;
}

/* --- Cart Badge Style --- */
.cart_badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #ff0000;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #fff;
}
</style>
        
<!-- ЁЯМР Floating Chat Widget -->
<div class="chat-widget">
  <!-- Main Toggle Button -->
  <div class="chat-toggle" id="chatToggle">
    <i class="fas fa-comment-dots"></i>
  </div>

  <!-- Chat Options -->
  <div class="chat-options" id="chatOptions">
          <a href="https://m.me/<?php echo e($generalsetting->facebook_page_username); ?>" target="_blank" class="chat-btn messenger" title="Messenger">
      <i class="fab fa-facebook-messenger"></i>
    </a>
          <a href="https://wa.me/<?php echo e($contact->whatsapp); ?>" target="_blank" class="chat-btn whatsapp" title="WhatsApp">
      <i class="fab fa-whatsapp"></i>
    </a>
    <a href="tel:<?php echo e($contact->hotline); ?>" class="chat-btn hotline" title="Hotline">
      <i class="fas fa-phone"></i>
    </a>


  </div>
</div>

<!-- Font Awesome CDN -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">

<style>
/* Floating Container */
.chat-widget {
  position: fixed;
  bottom: 60px; /* ⬅ Chat icon এখন 55px উপরে */
  right: 25px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* Main Toggle Button */
.chat-toggle {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.3s ease;
  font-size: 26px;
}
.chat-toggle:hover {
  transform: scale(1.1);
}

/* Chat Options Hidden by Default */
.chat-options {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
  align-items: flex-end;
}

/* Each Chat Button */
.chat-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}
.chat-btn:hover {
  transform: translateY(-3px);
}

/* Button Colors */
.chat-btn.whatsapp { background: #25D366; }
.chat-btn.messenger { background: #0084FF; }
.chat-btn.instagram { background: #E1306C; }
.chat-btn.hotline { background: #FF3B30; }

/* Animation */
.chat-options.show {
  display: flex;
  animation: fadeInUp 0.3s ease;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tooltip */
.chat-btn[title]:hover::after {
  content: attr(title);
  position: absolute;
  right: 65px;
  background: #222;
  color: #fff;
  padding: 5px 10px;
  font-size: 13px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0.9;
}

</style>
<?php
    $popup = App\Models\Popup::where('status', 1)->latest()->first();
?>

<?php if($popup): ?>
<div class="modal fade" id="popShopModal" tabindex="-1" aria-hidden="true" style="z-index: 10000;">
    <div class="modal-dialog modal-dialog-centered ps-modal-dialog">
        <div class="modal-content ps-content">
            <button type="button" class="ps-close" data-bs-dismiss="modal" aria-label="Close">&times;</button>
            <div class="ps-image-only">
                <?php if($popup->link): ?>
                    <a href="<?php echo e($popup->link); ?>" target="_blank" rel="noopener" class="d-block">
                        <img src="<?php echo e(url('public/'.$popup->image)); ?>" alt="<?php echo e($popup->title); ?>">
                    </a>
                <?php else: ?>
                    <img src="<?php echo e(url('public/'.$popup->image)); ?>" alt="<?php echo e($popup->title); ?>">
                <?php endif; ?>
            </div>
        </div>
    </div>
</div>

<style>
    .ps-modal-dialog { max-width: 520px; }
    .ps-content {
        border: none;
        border-radius: 12px;
        overflow: hidden;
        background: #fff;
        box-shadow: 0 15px 50px rgba(0,0,0,0.3);
        margin: 0 auto;
        position: relative;
    }
    .ps-image-only {
        position: relative;
        width: 100%;
        line-height: 0;
    }
    .ps-image-only img {
        width: 100%;
        height: auto;
        max-height: 75vh;
        object-fit: contain;
        display: block;
    }
    .ps-close {
        position: absolute;
        top: 15px;
        right: 15px;
        background: #fff;
        border: none;
        border-radius: 50%;
        width: 36px;
        height: 36px;
        font-size: 24px;
        line-height: 34px;
        color: #333;
        cursor: pointer;
        z-index: 1050;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        transition: 0.2s;
        padding: 0;
    }
    .ps-close:hover {
        color: #b93a3a;
        transform: scale(1.1);
        background: #fff;
    }
    @media (max-width: 768px) {
        .ps-modal-dialog { max-width: 92%; }
    }
</style>

<script>
    document.addEventListener("DOMContentLoaded", function() {
        // ৩ ঘন্টা পর পর দেখাবে
        const hoursToWait = 3;  
        // সাইটে ঢোকার ২ সেকেন্ড পর দেখাবে
        const delayInSeconds = 2; 

        const timeLimit = hoursToWait * 60 * 60 * 1000;
        const lastShown = localStorage.getItem('popupLastShown');
        const now = new Date().getTime();

        if (!lastShown || (now - lastShown > timeLimit)) {
            setTimeout(function() {
                // Try opening with jQuery (Standard for Laravel themes)
                if (typeof jQuery != 'undefined') {
                    $('#popShopModal').modal('show');
                } 
                // Try opening with Bootstrap 5
                else if (typeof bootstrap != 'undefined') {
                    var myModal = new bootstrap.Modal(document.getElementById('popShopModal'));
                    myModal.show();
                }

                localStorage.setItem('popupLastShown', now);
            }, delayInSeconds * 1000);
        }
    });
</script>
<?php endif; ?>

        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css">
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>

<?php if(session('show_order_limit_modal')): ?>
<script>
    document.addEventListener("DOMContentLoaded", function() {
        // ডাইনামিক হোয়াটসঅ্যাপ নাম্বার (ডাটাবেস থেকে)
        var whatsappNumber = "<?php echo e($contact->whatsapp ?? $contact->hotline ?? '8801700000000'); ?>"; 
        
        Swal.fire({
            title: '', 
            html: `
                <div class="custom-modal-content">
                    <div class="modal-header-custom">
                        <div class="header-left">
                            <i class="fas fa-exclamation-triangle header-icon"></i>
                            <span>Duplicate Order Detective Alert</span>
                        </div>
                        <i class="fas fa-times close-icon" onclick="Swal.close()"></i>
                    </div>

                    <div class="modal-body-custom">
                        <p>
                            <img src="https://img.icons8.com/emoji/48/000000/warning-emoji.png" style="width: 20px; vertical-align: text-bottom;"> 
                            <b>সতর্কতা!</b> আপনি ইতিমধ্যে এই পণ্যটির জন্য অর্ডার দিয়েছেন। নির্দিষ্ট সময়ের মধ্যে একই পণ্যের পুনরায় অর্ডার দেওয়া অনুমোদিত নয়। 
                            👉 আপনি যদি সত্যিই আবার অর্ডার করতে চান, তাহলে নিচে দেওয়া WhatsApp নম্বরে যোগাযোগ করুন:
                        </p>
                    </div>

                    <div class="modal-footer-custom">
                        <a href="https://wa.me/${whatsappNumber}?text=আমি একই পণ্য পুনরায় অর্ডার করতে চাই, অনুগ্রহ করে সাহায্য করুন।" target="_blank" class="btn-whatsapp-custom">
                            <i class="fab fa-whatsapp"></i> CONTACT ON WHATSAPP
                        </a>
                        <button onclick="Swal.close()" class="btn-close-custom">Close</button>
                    </div>
                </div>
            `,
            showConfirmButton: false, // ডিফল্ট বাটন বন্ধ রাখা হয়েছে
            background: 'transparent', // ডিফল্ট ব্যাকগ্রাউন্ড রিমুভ
            customClass: {
                popup: 'swal-no-padding'
            },
            allowOutsideClick: false
        });
    });
</script>

<style>
    /* পপ-আপ কন্টেইনার রিসেট */
    .swal-no-padding {
        padding: 0 !important;
        background: none !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    /* মেইন বক্স ডিজাইন */
    .custom-modal-content {
        background: white;
        border-radius: 8px;
        overflow: hidden;
        font-family: 'Arial', sans-serif;
        box-shadow: 0 10px 25px rgba(0,0,0,0.5);
        max-width: 500px;
        margin: 0 auto;
    }

    /* লাল হেডার (ছবির মতো হুবহু) */
    .modal-header-custom {
        background-color: #b91c1c; /* গাঢ় লাল */
        padding: 15px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: white;
        font-size: 18px;
        font-weight: bold;
    }

    .header-left {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .header-icon {
        color: #facc15; /* হলুদ আইকন */
        font-size: 20px;
    }

    .close-icon {
        cursor: pointer;
        opacity: 0.8;
        font-size: 20px;
        transition: 0.2s;
    }
    .close-icon:hover {
        opacity: 1;
    }

    /* বডি টেক্সট */
    .modal-body-custom {
        padding: 30px 25px;
        text-align: left;
        font-size: 15px;
        line-height: 1.6;
        color: #4b5563;
    }

    /* ফুটার এবং বাটন */
    .modal-footer-custom {
        padding: 0 25px 30px 25px;
        display: flex;
        justify-content: center;
        gap: 15px;
    }

    /* হোয়াটসঅ্যাপ বাটন (সবুজ) */
    .btn-whatsapp-custom {
        background-color: #10b981;
        color: white !important;
        text-decoration: none;
        padding: 10px 20px;
        border-radius: 50px;
        font-weight: bold;
        font-size: 13px;
        display: flex;
        align-items: center;
        gap: 8px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        transition: background 0.3s;
        border: none;
    }
    .btn-whatsapp-custom:hover {
        background-color: #059669;
    }

    /* ক্লোজ বাটন (লাল) */
    .btn-close-custom {
        background-color: #dc2626;
        color: white;
        padding: 10px 30px;
        border-radius: 50px;
        font-weight: bold;
        font-size: 14px;
        border: none;
        cursor: pointer;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        transition: background 0.3s;
    }
    .btn-close-custom:hover {
        background-color: #b91c1c;
    }

    /* রেস্পন্সিভ ডিজাইন */
    @media (max-width: 450px) {
        .modal-footer-custom {
            flex-direction: column;
        }
        .btn-whatsapp-custom, .btn-close-custom {
            width: 100%;
            justify-content: center;
        }
    }
</style>
<?php endif; ?>


<script>
/* ЁЯФ╣ Toggle Open/Close */
document.getElementById("chatToggle").addEventListener("click", function() {
  document.getElementById("chatOptions").classList.toggle("show");
});

/* Sidebar Cart - খোলা/বন্ধ ও রিফ্রেশ */
function openSidebarCart() {
    document.getElementById("sidebarCartOverlay").classList.add("active");
    document.getElementById("sidebarCartDrawer").classList.add("active");
    document.body.style.overflow = "hidden";
    sidebarCartRefresh();
}
function closeSidebarCart() {
    document.getElementById("sidebarCartOverlay").classList.remove("active");
    document.getElementById("sidebarCartDrawer").classList.remove("active");
    document.body.style.overflow = "";
}
function sidebarCartRefresh() {
    $.get("<?php echo e(route('cart.sidebar')); ?>", function(html) {
        $("#sidebarCartContent").html(html);
        if (typeof feather !== "undefined") feather.replace();
    });
}
document.getElementById("floatingCartBtn")?.addEventListener("click", function(e) {
    e.preventDefault();
    openSidebarCart();
});
document.getElementById("sidebarCartOverlay")?.addEventListener("click", closeSidebarCart);

function closeVariantModal() {
    $("#custom-modal").removeClass('variant-modal-open').hide().empty();
    $("#page-overlay").hide();
    document.body.style.overflow = "";
}
function openVariantModal(productId) {
    $("#loading").show();
    $.get("<?php echo e(route('variant.options.modal')); ?>", { id: productId }, function(html) {
        $("#custom-modal").html(html).addClass('variant-modal-open').show()
            .off('click.variantbackdrop').on('click.variantbackdrop', function(e) {
                if (!$(e.target).closest('.variant-modal-content').length) closeVariantModal();
            });
        $("#page-overlay").show().off('click').on('click', closeVariantModal);
        document.body.style.overflow = "hidden";
        $("#loading").hide();
    }).fail(function() {
        $("#loading").hide();
        toastr.error('লোড করতে ব্যর্থ');
    });
}
$(document).on("click", ".variant-modal-trigger, .order-btn-link, .cart-icon-link", function(e) {
    var $el = $(this);
    var productId = $el.data("product-id") || $el.closest('[data-product-id]').data('product-id') || $el.closest('.product_item, .wist_item, .search-item').find('[data-product-id]').first().data('product-id');
    if (!productId) return;
    if (!$el.hasClass('order-btn-link') && !$el.hasClass('cart-icon-link') && !$el.hasClass('variant-modal-trigger')) return;
    var skipModal = $el.data('skip-variant-modal') == 1 || $el.closest('[data-skip-variant-modal="1"]').length > 0;
    if (skipModal) return;
    e.preventDefault();
    e.stopImmediatePropagation();
    openVariantModal(productId);
    return false;
});
</script>


        <!-- /. fixed sidebar -->

        <div id="custom-modal"></div>
        <div id="page-overlay"></div>
        <div id="loading"><div class="custom-loader"></div></div>

        <script src="<?php echo e(asset('public/frontEnd/js/jquery-3.6.3.min.js')); ?>"></script>
        <script src="<?php echo e(asset('public/frontEnd/js/bootstrap.min.js')); ?>"></script>
        <script src="<?php echo e(asset('public/frontEnd/js/owl.carousel.min.js')); ?>"></script>
        <script src="<?php echo e(asset('public/frontEnd/js/mobile-menu.js')); ?>"></script>
        <script src="<?php echo e(asset('public/frontEnd/js/wsit-menu.js')); ?>"></script>
        <script src="<?php echo e(asset('public/frontEnd/js/mobile-menu-init.js')); ?>"></script>
        <script src="<?php echo e(asset('public/frontEnd/js/wow.min.js')); ?>"></script>
        <script>
            new WOW().init();
        </script>
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css" />
        <script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>

        <!-- feather icon -->
        <script src="https://cdnjs.cloudflare.com/ajax/libs/feather-icons/4.29.0/feather.min.js"></script>
        <script>
            feather.replace();
        </script>
        <script src="<?php echo e(asset('public/backEnd/')); ?>/assets/js/toastr.min.js"></script>
        <?php echo Toastr::message(); ?> <?php echo $__env->yieldPushContent('script'); ?>
        <script>
            $(".quick_view").on("click", function () {
                var id = $(this).data("id");
                $("#loading").show();
                if (id) {
                    $.ajax({
                        type: "GET",
                        data: { id: id },
                        url: "<?php echo e(route('quickview')); ?>",
                        success: function (data) {
                            if (data) {
                                $("#custom-modal").html(data);
                                $("#custom-modal").show();
                                $("#loading").hide();
                                $("#page-overlay").show();
                            }
                        },
                    });
                }
            });
        </script>
        <!-- quick view end -->
        <!-- cart js start -->
        <script>
            function runFlyToCart($sourceEl, onComplete) {
                var $flyImg;
                if ($sourceEl && $sourceEl.closest && $sourceEl.closest('.variant-modal-content').length)
                    $flyImg = $sourceEl.closest('.variant-modal-content').find('.variant-modal-img img').first();
                if (!$flyImg || !$flyImg.length)
                    $flyImg = $sourceEl.closest('.product_item, .wist_item, .search-item, .quick-product, .product-section, .main-details-page').find('.pro_img img, .quick-product-img img, .details_slider img, .block__pic, .dimage_item img').first();
                if (!$flyImg.length) $flyImg = $('.details_slider img, .block__pic, #details_slider_main img').first();
                if (!$flyImg.length) { if (typeof onComplete === 'function') onComplete(); return; }
                var rect = $flyImg[0].getBoundingClientRect();
                var $clone = $flyImg.clone().addClass('fly-to-cart-img').css({
                    position: 'fixed', width: 90, height: 110,
                    left: rect.left, top: rect.top, margin: 0, padding: 0, zIndex: 99999
                }).appendTo('body');
                var $target = $('#floatingCartBtn, .floating-cart-widget').first();
                if (!$target.length || !$target.is(':visible')) $target = $('.mobile_bottom_nav .cart_badge').closest('a').first();
                if (!$target.length) $target = $('.menu-bag a').first();
                var destRect = $target.length && $target.is(':visible') ? $target[0].getBoundingClientRect() : { left: $(window).width() - 60, top: $(window).height() / 2 - 40 };
                var endW = 36, endH = 44;
                var endLeft = destRect.left + ($target.length ? (destRect.width || 0) / 2 - endW / 2 : 0);
                var endTop = destRect.top + ($target.length ? (destRect.height || 0) / 2 - endH / 2 : 0);
                var midLeft = (rect.left + endLeft) / 2 - 20;
                var midTop = Math.min(rect.top, endTop) - 100;
                $clone.animate({ left: midLeft, top: midTop, width: 70, height: 85, opacity: 1 }, 300, 'swing', function() {
                    $(this).animate({ left: endLeft, top: endTop, width: endW, height: endH, opacity: 0.6 }, 350, 'swing', function() {
                        $clone.remove();
                        if ($target && $target.length) { $target.addClass('cart-bump-animate'); setTimeout(function() { $target.removeClass('cart-bump-animate'); }, 450); }
                        if (typeof onComplete === 'function') onComplete();
                    });
                });
            }
            function fireAddToCartEvent(el, id, qty, name, price, category) {
                qty = parseInt(qty) || 1;
                price = parseFloat(price) || 0;
                var item = { item_id: String(id), item_name: name || '', price: price, quantity: qty, item_category: category || '' };
                window.dataLayer = window.dataLayer || [];
                window.dataLayer.push({ event: 'add_to_cart', ecommerce: { currency: 'BDT', value: price * qty, items: [item] } });
                if (typeof fbq === 'function') fbq('track', 'AddToCart', { content_ids: [String(id)], content_name: name, content_type: 'product', value: price * qty, currency: 'BDT', num_items: qty });
                if (typeof ttq !== 'undefined') ttq.track('AddToCart', { content_type: 'product', content_id: String(id), content_name: name, value: price * qty, currency: 'BDT', quantity: qty });
            }
            $(document).on("click", ".addcartbutton", function (e) {
                var $btn = $(this);
                var id = $btn.data("id");
                if (!id) return;
                e.preventDefault();
                var qty = 1;
                var name = $btn.data("name") || $btn.closest('.product_item, .wist_item, .search-item').find('.pro_name a, .product-name a').first().text().trim();
                var price = parseFloat($btn.data("price")) || parseFloat($btn.closest('.product_item, .wist_item, .search-item').find('.pro_price span, .pro_price p, .price').first().text().replace(/[^\d.]/g, '')) || 0;
                var category = $btn.data("category") || '';
                if (id) {
                    $.ajax({
                        cache: "false",
                        type: "GET",
                        url: "<?php echo e(url('add-to-cart')); ?>/" + id + "/" + qty,
                        dataType: "json",
                        success: function (data) {
                            if (data) {
                                fireAddToCartEvent(null, id, qty, name, price, category);
                                toastr.success('কার্টে যোগ হয়েছে!', 'সফল');
                                cart_count();
                                mobile_cart();
                                if (typeof sidebarCartRefresh === "function") sidebarCartRefresh();
                                runFlyToCart($btn, function() { if (typeof openSidebarCart === "function") openSidebarCart(); });
                            }
                        },
                    });
                }
            });
            $(document).on("click", ".cart_store", function (e) {
                var $btn = $(this);
                var $form = $btn.closest('form');
                if ($form.length && $form.attr('action') && !$form.hasClass('cart-ajax-submit')) {
                    var id = $btn.data("id") || $form.find("input[name=id]").val();
                    var qty = $form.find("input[name=qty]").val() || 1;
                    var name = $btn.data("name") || $form.closest('.product_item, .wist_item, .product-cart, .quick-view-content, .quick-product').find('.name, .pro_name a').first().text().trim();
                    var priceText = $form.closest('.product_item, .wist_item, .product-cart, .quick-view-content, .quick-product').find('.details-price, .pro_price span').first().text();
                    var price = parseFloat($btn.data("price")) || parseFloat(String(priceText).replace(/[^\d.]/g, '')) || 0;
                    var category = $btn.data("category") || $form.closest('.quick-product').find('.delivery_details td').first().text().replace('Category:','').trim() || '';
                    if (id) {
                        e.preventDefault();
                        $form.addClass('cart-ajax-submit');
                        $.ajax({
                            type: "POST",
                            data: $form.serialize(),
                            url: $form.attr('action'),
                            headers: { 'X-Requested-With': 'XMLHttpRequest' },
                            success: function (data) {
                                if (data && data.success) {
                                    fireAddToCartEvent(null, id, qty, name, price, category);
                                    toastr.success('কার্টে যোগ হয়েছে!', 'সফল');
                                    cart_count();
                                    mobile_cart();
                                    if (typeof sidebarCartRefresh === "function") sidebarCartRefresh();
                                    runFlyToCart($btn, function() { if (typeof openSidebarCart === "function") openSidebarCart(); });
                                } else {
                                    $form.submit();
                                }
                            },
                            error: function() {
                                $form.submit();
                            },
                            complete: function() { $form.removeClass('cart-ajax-submit'); }
                        });
                    }
                }
            });

            $(document).on("click", ".cart_remove", function () {
                var id = $(this).data("id");
                if (id) {
                    $.ajax({
                        type: "GET",
                        data: { id: id },
                        url: "<?php echo e(route('cart.remove')); ?>",
                        success: function (data) {
                            if (data) {
                                $(".cartlist").html(data);
                                cart_count();
                                mobile_cart();
                                cart_summary();
                                if (typeof sidebarCartRefresh === "function") sidebarCartRefresh();
                            }
                        },
                    });
                }
            });

            $(document).on("click", ".cart_increment", function () {
                var id = $(this).data("id");
                if (id) {
                    $.ajax({
                        type: "GET",
                        data: { id: id },
                        url: "<?php echo e(route('cart.increment')); ?>",
                        success: function (data) {
                            if (data) {
                                $(".cartlist").html(data);
                                cart_count();
                                mobile_cart();
                                if (typeof sidebarCartRefresh === "function") sidebarCartRefresh();
                            }
                        },
                    });
                }
            });

            $(document).on("click", ".cart_decrement", function () {
                var id = $(this).data("id");
                if (id) {
                    $.ajax({
                        type: "GET",
                        data: { id: id },
                        url: "<?php echo e(route('cart.decrement')); ?>",
                        success: function (data) {
                            if (data) {
                                $(".cartlist").html(data);
                                cart_count();
                                mobile_cart();
                                if (typeof sidebarCartRefresh === "function") sidebarCartRefresh();
                            }
                        },
                    });
                }
            });

            function cart_count() {
                $.ajax({
                    type: "GET",
                    url: "<?php echo e(route('cart.count')); ?>",
                    success: function (data) {
                        if (data) {
                            $("#cart-qty").html(data);
                        } else {
                            $("#cart-qty").empty();
                        }
                    },
                });
            }
            function mobile_cart() {
                $.ajax({
                    type: "GET",
                    url: "<?php echo e(route('mobile.cart.count')); ?>",
                    success: function (data) {
                        if (data) {
                            $(".mobilecart-qty").html(data);
                        } else {
                            $(".mobilecart-qty").empty();
                        }
                    },
                });
            }
            function cart_summary() {
                $.ajax({
                    type: "GET",
                    url: "<?php echo e(route('shipping.charge')); ?>",
                    dataType: "html",
                    success: function (response) {
                        $(".cart-summary").html(response);
                    },
                });
            }
        </script>
        <!-- cart js end -->
        <script>
            $(".search_click").on("keyup change", function () {
                var keyword = $(".search_keyword").val();
                $.ajax({
                    type: "GET",
                    data: { keyword: keyword },
                    url: "<?php echo e(route('livesearch')); ?>",
                    success: function (products) {
                        if (products) {
                            $(".search_result").html(products);
                        } else {
                            $(".search_result").empty();
                        }
                    },
                });
            });
            $(".msearch_click").on("keyup change", function () {
                var keyword = $(".msearch_keyword").val();
                $.ajax({
                    type: "GET",
                    data: { keyword: keyword },
                    url: "<?php echo e(route('livesearch')); ?>",
                    success: function (products) {
                        if (products) {
                            $("#loading").hide();
                            $(".search_result").html(products);
                        } else {
                            $(".search_result").empty();
                        }
                    },
                });
            });
        </script>
        <!-- search js start -->
        <script></script>
        <script></script>
        <script>
            $(".district").on("change", function () {
                var id = $(this).val();
                $.ajax({
                    type: "GET",
                    data: { id: id },
                    url: "<?php echo e(route('districts')); ?>",
                    success: function (res) {
                        if (res) {
                            $(".area").empty();
                            $(".area").append('<option value="">Select..</option>');
                            $.each(res, function (key, value) {
                                $(".area").append('<option value="' + key + '" >' + value + "</option>");
                            });
                        } else {
                            $(".area").empty();
                        }
                    },
                });
            });
        </script>
        <script>
            $(".toggle").on("click", function () {
                $("#page-overlay").show();
                $(".mobile-menu").addClass("active");
            });

            $("#page-overlay").on("click", function () {
                $("#page-overlay").hide();
                $(".mobile-menu").removeClass("active");
                $(".feature-products").removeClass("active");
            });

            $(".mobile-menu-close").on("click", function () {
                $("#page-overlay").hide();
                $(".mobile-menu").removeClass("active");
            });

            $(".mobile-filter-toggle").on("click", function () {
                $("#page-overlay").show();
                $(".feature-products").addClass("active");
            });
        </script>
        <script>
            $(document).ready(function () {
                $(".parent-category").each(function () {
                    const menuCatToggle = $(this).find(".menu-category-toggle");
                    const secondNav = $(this).find(".second-nav");

                    menuCatToggle.on("click", function () {
                        menuCatToggle.toggleClass("active");
                        secondNav.slideToggle("fast");
                        $(this).closest(".parent-category").toggleClass("active");
                    });
                });
                $(".parent-subcategory").each(function () {
                    const menuSubcatToggle = $(this).find(".menu-subcategory-toggle");
                    const thirdNav = $(this).find(".third-nav");

                    menuSubcatToggle.on("click", function () {
                        menuSubcatToggle.toggleClass("active");
                        thirdNav.slideToggle("fast");
                        $(this).closest(".parent-subcategory").toggleClass("active");
                    });
                });
            });
        </script>

        <script>
            // MmenuLight শুধুমাত্র চালাবে যখন #menu element থাকে (null check)
            var menuEl = document.querySelector("#menu");
            var menuLink = document.querySelector('a[href="#menu"]');
            if (menuEl && menuLink) {
                var menu = new MmenuLight(menuEl, "all");
                var navigator = menu.navigation({
                    selectedClass: "Selected",
                    slidingSubmenus: true,
                    title: "ক্যাটাগরি",
                });
                var drawer = menu.offcanvas({});
                menuLink.addEventListener("click", function(evnt) {
                    evnt.preventDefault();
                    drawer.open();
                });
            }
        </script>

        <script>
            // document.addEventListener("DOMContentLoaded", function () {
            //     window.addEventListener("scroll", function () {
            //         if (window.scrollY > 200) {
            //             document.getElementById("navbar_top").classList.add("fixed-top");
            //         } else {
            //             document.getElementById("navbar_top").classList.remove("fixed-top");
            //             document.body.style.paddingTop = "0";
            //         }
            //     });
            // });
            /*=== Main Menu Fixed === */
            // document.addEventListener("DOMContentLoaded", function () {
            //     window.addEventListener("scroll", function () {
            //         if (window.scrollY > 0) {
            //             document.getElementById("m_navbar_top").classList.add("fixed-top");
            //             // add padding top to show content behind navbar
            //             navbar_height = document.querySelector(".navbar").offsetHeight;
            //             document.body.style.paddingTop = navbar_height + "px";
            //         } else {
            //             document.getElementById("m_navbar_top").classList.remove("fixed-top");
            //             // remove padding top from body
            //             document.body.style.paddingTop = "0";
            //         }
            //     });
            // });
            /*=== Main Menu Fixed === */

            $(window).scroll(function () {
                if ($(this).scrollTop() > 50) {
                    $(".scrolltop:hidden").stop(true, true).fadeIn();
                } else {
                    $(".scrolltop").stop(true, true).fadeOut();
                }
            });
            $(function () {
                $(".scroll").click(function () {
                    $("html,body").animate({ scrollTop: $(".gotop").offset().top }, "1000");
                    return false;
                });
            });
        </script>
        <script>
            $(".filter_btn").click(function(){
               $(".filter_sidebar").addClass('active');
               $("body").css("overflow-y", "hidden");
            })
            $(".filter_close").click(function(){
               $(".filter_sidebar").removeClass('active');
               $("body").css("overflow-y", "auto");
            })
        </script>
        <!--search ANIMAtion end-->
        <!-- Google Tag Manager (noscript) -->
        <?php $__currentLoopData = $gtm_code; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $gtm): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <?php $gtmId = str_starts_with($gtm->code, 'GTM-') ? $gtm->code : 'GTM-'.$gtm->code; ?>
        <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=<?php echo e($gtmId); ?>"
        height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        <!-- End Google Tag Manager (noscript) -->
		
        <?php echo $__env->yieldPushContent('modals'); ?>
		
    </body>
</html>
<?php /**PATH /home/creativedesignbd/myshop4.creativedesign.com.bd/resources/views/frontEnd/layouts/master.blade.php ENDPATH**/ ?>