<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>">

    <?php
        $seoEnabled = app()->environment('production');
        $customerUnreadNotifications = collect();
        $customerRecentNotifications = collect();
        $customerUnreadNotificationCount = 0;
        if (auth()->check() && \Illuminate\Support\Facades\Schema::hasTable('notifications')) {
            $customerUnreadNotifications = auth()->user()->unreadNotifications()->latest()->limit(8)->get();
            $customerRecentNotifications = auth()->user()->notifications()->latest()->limit(8)->get();
            $customerUnreadNotificationCount = $customerUnreadNotifications->count();
        }
    ?>
    <?php
        $__seoSiteName = \App\Models\Setting::get('site_name', 'Shaa Jewels');
        $__seoDefaultTitle = $__seoSiteName . ' | 1 Gram Gold & Imitation Jewellery Online';
        $__seoDefaultDesc = 'Shop 1 gram gold plated, imitation and bridal jewellery at ' . $__seoSiteName . '. Temple designs, necklaces, bangles and earrings with delivery across India.';
        $__seoDefaultKeywords = $__seoSiteName . ', 1 gram gold jewellery, imitation jewellery online, artificial bridal jewellery, temple jewellery India, buy jewellery online India';
        $__seoDefaultOg = 'Buy 1 gram gold look and imitation jewellery online — bridal, temple and daily wear — at ' . $__seoSiteName . '.';
    ?>
    <title><?php echo $__env->yieldContent('title', $__seoDefaultTitle); ?></title>
    <?php if($seoEnabled): ?>
        <!-- Primary SEO Meta Tags -->
        <meta name="description" content="<?php echo $__env->yieldContent('meta_description', $__seoDefaultDesc); ?>">
        <meta name="keywords" content="<?php echo $__env->yieldContent('meta_keywords', $__seoDefaultKeywords); ?>">
        <meta name="author" content="<?php echo e($__seoSiteName); ?>">
        <meta name="robots" content="index, follow">
        <link rel="canonical" href="<?php echo $__env->yieldContent('canonical_url', url()->current()); ?>">

        <!-- Open Graph / Facebook -->
        <meta property="og:title" content="<?php echo $__env->yieldContent('og_title', $__seoDefaultTitle); ?>">
        <meta property="og:description" content="<?php echo $__env->yieldContent('og_description', $__seoDefaultOg); ?>">
        <meta property="og:type" content="<?php echo $__env->yieldContent('og_type', 'website'); ?>">
        <meta property="og:url" content="<?php echo e(url()->current()); ?>">
        <meta property="og:image" content="<?php echo $__env->yieldContent('og_image', \App\Models\Setting::getLogoUrl() ?: url('assets/images/logo.png')); ?>">

        <!-- Twitter Card -->
        <meta name="twitter:card" content="summary_large_image">
        <meta name="twitter:title" content="<?php echo $__env->yieldContent('twitter_title', $__seoDefaultTitle); ?>">
        <meta name="twitter:description" content="<?php echo $__env->yieldContent('twitter_description', $__seoDefaultOg); ?>">
        <meta name="twitter:image" content="<?php echo $__env->yieldContent('twitter_image', \App\Models\Setting::getLogoUrl() ?: url('assets/images/logo.png')); ?>">

        <!-- Geo / Location -->
        <meta name="geo.region" content="IN-TG">
        <meta name="geo.placename" content="Shaa Jewels, Old Beet Bazaar, Warangal, Telangana, India">
        <meta name="geo.position" content="17.9765879;79.5980714">
        <meta name="ICBM" content="17.9765879, 79.5980714">

        <?php
            $__orgLogo = \App\Models\Setting::getLogoUrl() ?: url('assets/images/logo.png');
            $__schemaGraph = [
                [
                    '@type' => 'Organization',
                    'name' => $__seoSiteName,
                    'url' => url('/'),
                    'logo' => $__orgLogo,
                ],
                [
                    '@type' => 'WebSite',
                    'name' => $__seoSiteName,
                    'url' => url('/'),
                    'publisher' => [
                        '@type' => 'Organization',
                        'name' => $__seoSiteName,
                    ],
                ],
            ];
            $__schemaJson = json_encode(
                ['@context' => 'https://schema.org', '@graph' => $__schemaGraph],
                JSON_UNESCAPED_SLASHES | JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT
            );
        ?>
        <script type="application/ld+json"><?php echo $__schemaJson; ?></script>
    <?php else: ?>
        <meta name="robots" content="noindex, nofollow, noarchive, nosnippet">
    <?php endif; ?>

    <?php echo $__env->yieldPushContent('head'); ?>

    <?php
        $gaMeasurementId = config('services.google_analytics.measurement_id');
    ?>
    <?php if(!empty($gaMeasurementId)): ?>
        <!-- GA4 Global Site Tag -->
        <script async src="https://www.googletagmanager.com/gtag/js?id=<?php echo e($gaMeasurementId); ?>"></script>
        <script>
            window.dataLayer = window.dataLayer || [];
            function gtag(){dataLayer.push(arguments);}
            gtag('js', new Date());
            gtag('config', '<?php echo e($gaMeasurementId); ?>');

            // Safe wrapper so analytics errors never break storefront scripts.
            window.kkTrack = function () {
                try {
                    if (typeof window.gtag === 'function') {
                        window.gtag.apply(window, arguments);
                    }
                } catch (error) {
                    // Intentionally swallow analytics errors.
                }
            };
        </script>
    <?php else: ?>
        <script>
            window.kkTrack = function () {};
        </script>
    <?php endif; ?>

    <!-- Bootstrap 5 CSS -->
    <link href="<?php echo e(asset('css/bootstrap.min.css')); ?>" rel="stylesheet">
    <link rel="stylesheet" href="<?php echo e(asset('css/bootstrap-icons.css')); ?>">
    <link rel="stylesheet" href="<?php echo e(asset('css/select2.min.css')); ?>">
    <link rel="stylesheet" href="<?php echo e(asset('css/homepage.css')); ?>">

    <?php echo $__env->yieldPushContent('styles'); ?>
</head>
<body class="<?php echo e(($announcements && $announcements->count() > 0) ? 'has-announcement' : ''); ?>">
    <!-- Announcement Marquee Bar -->
    <?php if($announcements && $announcements->count() > 0): ?>
    <div class="announcement-marquee-bar">
        <div class="marquee-container">
            <div class="marquee-content">
                <?php $__currentLoopData = $announcements; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $announcement): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <span class="marquee-item"><?php echo e($announcement->text); ?></span>
                    <?php if(!$loop->last): ?>
                        <span class="marquee-separator"> • </span>
                    <?php endif; ?>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                <!-- Duplicate for seamless loop -->
                <?php $__currentLoopData = $announcements; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $announcement): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <span class="marquee-item"><?php echo e($announcement->text); ?></span>
                    <?php if(!$loop->last): ?>
                        <span class="marquee-separator"> • </span>
                    <?php endif; ?>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        </div>
    </div>
    <?php endif; ?>

    <!-- Modern Navbar -->
<nav class="navbar navbar-expand-lg modern-navbar d-none d-lg-block desktop-view fixed-top <?php echo e($announcements && $announcements->count() > 0 ? 'navbar-with-announcement' : ''); ?>">
    
    <div class="container position-relative d-flex align-items-center">
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon text-white"></span>
            </button>
        <!-- LEFT MENU -->
        <div class="collapse navbar-collapse justify-content-start" id="navbarNavDesktop">
             <ul class="navbar-nav navbar-nav-centered mx-auto ">
                    <li class="nav-item">
                        <a class="nav-link nav-link-modern <?php echo e(request()->routeIs('home') ? 'active' : ''); ?>" href="<?php echo e(route('home')); ?>">
                            <i class="bi bi-house-door d-md-none"></i> Home
                        </a>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link nav-link-modern dropdown-toggle <?php echo e(request()->routeIs('collections.show') && !in_array(request()->route('slug'), ['best-sellers', 'new-arrivals']) ? 'active' : ''); ?>" href="#" id="categoryDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                            <i class="bi bi-grid d-md-none"></i> Category
                        </a>
                        <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="categoryDropdown">
                            <?php if($menuCategories && $menuCategories->count() > 0): ?>
                                <?php $__currentLoopData = $menuCategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $menuCat): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <li>
                                        <a class="dropdown-item" href="<?php echo e(route('collections.show', $menuCat->slug)); ?>">
                                            <i class="bi bi-tag me-2"></i> <?php echo e($menuCat->name); ?>

                                        </a>
                                    </li>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            <?php else: ?>
                                <li><span class="dropdown-item text-muted">No categories available</span></li>
                            <?php endif; ?>
                            <li><hr class="dropdown-divider"></li>
                            <li>
                                <a class="dropdown-item" href="<?php echo e(route('product.search')); ?>">
                                    <i class="bi bi-search me-2"></i> View All Categories
                                </a>
                            </li>
                        </ul>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link nav-link-modern <?php echo e(request()->routeIs('collections.show') && request()->route('slug') === 'new-arrivals' ? 'active' : ''); ?>" href="<?php echo e(route('collections.show', 'new-arrivals')); ?>">
                            <i class="bi bi-stars d-md-none"></i> New Arrivals
                        </a>
                    </li>
                   
                    <li class="nav-item">
                        <a class="nav-link nav-link-modern <?php echo e(request()->routeIs('customer.orders.*') ? 'active' : ''); ?>" href="<?php echo e(route('customer.orders.index')); ?>">
                            <i class="bi bi-truck d-md-none"></i> Track Your Order
                        </a>
                    </li>
                </ul>
        </div>

        <!-- CENTER LOGO -->
        <div class="navbar-brand-section position-absolute start-50 translate-middle-x">
            <a class="navbar-brand-modern" href="<?php echo e(route('home')); ?>">
                <?php
                    $logoUrl = \App\Models\Setting::getLogoUrl('light');
                    $siteName = \App\Models\Setting::get('site_name', 'KIYOKART');
                ?>

                <?php if($logoUrl): ?>
                    <img src="<?php echo e($logoUrl); ?>" alt="<?php echo e($siteName); ?>" height="50" style="max-height:50px;width:auto;">
                <?php else: ?>
                    <span class="brand-icon">S</span>
                    <span><?php echo e(strtoupper($siteName)); ?></span>
                <?php endif; ?>
            </a>
        </div>

        <!-- RIGHT SECTION -->
        
        <!-- Search & Icons (Right) -->
                <div class="navbar-right-section icons-clone">
                    <!-- Search -->
                    
                    <!-- Search Icon -->
                     <div class="navbar-search-wrapper" id="navbarSearchWrapper">
    <form action="<?php echo e(route('product.search')); ?>" method="GET">
        <input type="text" name="search" class="navbar-search-input" placeholder="Search products...">
    </form>

    <span class="search-icon" id="searchToggle">
        <i class="bi bi-search"></i>
    </span>
</div>
                    <!-- Icons -->
                    <a href="<?php echo e(route('cart.index')); ?>" class="navbar-icon-link position-relative">
                        <i class="bi bi-bag"></i>
                        <?php if($cartItemCount > 0): ?>
                            <span class="icon-badge"><?php echo e($cartItemCount); ?></span>
                        <?php endif; ?>
                    </a>
                    <?php if(auth()->guard()->check()): ?>
                        <a href="<?php echo e(route('wishlist.index')); ?>" class="navbar-icon-link position-relative">
                            <i class="bi bi-heart"></i>
                            <?php if($wishlistCount > 0): ?>
                                <span class="icon-badge"><?php echo e($wishlistCount); ?></span>
                            <?php endif; ?>
                        </a>
                    <?php else: ?>
                        <a href="<?php echo e(route('login')); ?>" class="navbar-icon-link" title="Login to view wishlist">
                            <i class="bi bi-heart"></i>
                        </a>
                    <?php endif; ?>
                    <?php if(auth()->guard()->check()): ?>
                        <div class="dropdown">
                            <a class="navbar-icon-link dropdown-toggle" href="#" id="userDropdown" role="button" data-bs-toggle="dropdown">
                                <?php if(auth()->user()->avatar_url): ?>
                                    <img src="<?php echo e(auth()->user()->avatar_url); ?>" alt="<?php echo e(auth()->user()->name); ?>" class="navbar-avatar-img">
                                <?php else: ?>
                                    <i class="bi bi-person-circle"></i>
                                <?php endif; ?>
                            </a>
                            <ul class="dropdown-menu dropdown-menu-end">
                                <li class="px-3 py-2">
                                    <small class="text-muted d-block">Logged in as</small>
                                    <strong><?php echo e(auth()->user()->name); ?></strong>
                                </li>
                                <li><hr class="dropdown-divider"></li>
                                <li>
                                    <a class="dropdown-item" href="<?php echo e(route('customer.profile')); ?>">
                                        <i class="bi bi-person me-2"></i> Profile
                                    </a>
                                </li>
                                <li>
                                    <a class="dropdown-item" href="<?php echo e(route('customer.orders.index')); ?>">
                                        <i class="bi bi-bag-check me-2"></i> My Orders
                                    </a>
                                </li>
                                <?php if(!auth()->user()->isCustomer()): ?>
                                    <li><hr class="dropdown-divider"></li>
                                    <li>
                                        <a class="dropdown-item" href="<?php echo e(route('admin.dashboard')); ?>">
                                            <i class="bi bi-speedometer2 me-2"></i> Admin Panel
                                        </a>
                                    </li>
                                <?php endif; ?>
                                <li><hr class="dropdown-divider"></li>
                                <li>
                                    <form action="<?php echo e(route('logout')); ?>" method="POST">
                                        <?php echo csrf_field(); ?>
                                        <button type="submit" class="dropdown-item text-danger">
                                            <i class="bi bi-box-arrow-right me-2"></i> Logout
                                        </button>
                                    </form>
                                </li>
                            </ul>
                        </div>
                    <?php else: ?>
                        <a href="<?php echo e(route('login')); ?>" class="navbar-icon-link">
                            <i class="bi bi-box-arrow-in-right"></i>
                        </a>
                    <?php endif; ?>
                </div>
            </div>
        </nav>


    <!-- Modern Navbar -->
     <!-- Mobile to tab -->
    <nav class="navbar navbar-expand-lg d-block d-lg-none modern-navbar mobile-view fixed-top <?php echo e($announcements && $announcements->count() > 0 ? 'navbar-with-announcement' : ''); ?>">
        <div class="container">           
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon text-white"></span>
            </button>

            <a href="<?php echo e(route('product.search')); ?>" class="mobile-search-icon d-lg-none text-white">
                <i class="bi bi-search"></i>
            </a>
            
            <!-- Logo Section (Left) -->
            <div class="navbar-brand-section d-flex justify-content-center">
                <a class="navbar-brand-modern" href="<?php echo e(route('home')); ?>">
                    <?php
                        $logoUrl = \App\Models\Setting::getLogoUrl('light');
                        $siteName = \App\Models\Setting::get('site_name', 'KIYOKART');
                    ?>
                    <?php if($logoUrl): ?>
                        <img src="<?php echo e($logoUrl); ?>" alt="<?php echo e($siteName); ?>" height="50" style="max-height: 50px; width: auto;">
                    <?php else: ?>
                        <span class="brand-icon">S</span>
                        <span><?php echo e(strtoupper($siteName)); ?></span>
                    <?php endif; ?>
                </a>
            </div>
            <!-- Icons (Right) -->
            <div class="navbar-right-section m-0">
                <!-- Icons -->
                <a href="<?php echo e(route('cart.index')); ?>" class="navbar-icon-link position-relative">
                    <i class="bi bi-bag"></i>
                    <?php if($cartItemCount > 0): ?>
                        <span class="icon-badge"><?php echo e($cartItemCount); ?></span>
                    <?php endif; ?>
                </a>
                <?php if(auth()->guard()->check()): ?>
                    <a href="<?php echo e(route('wishlist.index')); ?>" class="navbar-icon-link position-relative">
                        <i class="bi bi-heart"></i>
                        <?php if($wishlistCount > 0): ?>
                            <span class="icon-badge"><?php echo e($wishlistCount); ?></span>
                        <?php endif; ?>
                    </a>
                <?php else: ?>
                    <a href="<?php echo e(route('login')); ?>" class="navbar-icon-link" title="Login to view wishlist">
                        <i class="bi bi-heart"></i>
                    </a>
                <?php endif; ?>
                <?php if(auth()->guard()->check()): ?>
                    <div class="dropdown">
                        <a class="navbar-icon-link dropdown-toggle" href="#" id="userDropdown" role="button" data-bs-toggle="dropdown">
                            <?php if(auth()->user()->avatar_url): ?>
                                <img src="<?php echo e(auth()->user()->avatar_url); ?>" alt="<?php echo e(auth()->user()->name); ?>" class="navbar-avatar-img">
                            <?php else: ?>
                                <i class="bi bi-person-circle"></i>
                            <?php endif; ?>
                        </a>
                        <ul class="dropdown-menu dropdown-menu-end">
                            <li class="px-3 py-2">
                                <small class="text-muted d-block">Logged in as</small>
                                <strong><?php echo e(auth()->user()->name); ?></strong>
                            </li>
                            <li><hr class="dropdown-divider"></li>
                            <li>
                                <a class="dropdown-item" href="<?php echo e(route('customer.profile')); ?>">
                                    <i class="bi bi-person me-2"></i> Profile
                                </a>
                            </li>
                            <li>
                                <a class="dropdown-item" href="<?php echo e(route('customer.orders.index')); ?>">
                                    <i class="bi bi-bag-check me-2"></i> My Orders
                                </a>
                            </li>
                            <?php if(!auth()->user()->isCustomer()): ?>
                                <li><hr class="dropdown-divider"></li>
                                <li>
                                    <a class="dropdown-item" href="<?php echo e(route('admin.dashboard')); ?>">
                                        <i class="bi bi-speedometer2 me-2"></i> Admin Panel
                                    </a>
                                </li>
                            <?php endif; ?>
                            <li><hr class="dropdown-divider"></li>
                            <li>
                                <form action="<?php echo e(route('logout')); ?>" method="POST">
                                    <?php echo csrf_field(); ?>
                                    <button type="submit" class="dropdown-item text-danger">
                                        <i class="bi bi-box-arrow-right me-2"></i> Logout
                                    </button>
                                </form>
                            </li>
                        </ul>
                    </div>
                <?php else: ?>
                    <a href="<?php echo e(route('login')); ?>" class="navbar-icon-link">
                        <i class="bi bi-box-arrow-in-right"></i>
                    </a>
                <?php endif; ?>
            </div>
        </div>

        <div class="collapse navbar-collapse d-lg-block " id="navbarNav">
                <!-- Menu Items (Center) -->
                <ul class="navbar-nav mx-auto w-100">
                    <li class="nav-item">
                        <a class="nav-link nav-link-modern <?php echo e(request()->routeIs('home') ? 'active' : ''); ?>" href="<?php echo e(route('home')); ?>">
                            <i class="bi bi-house-door d-md-none"></i> Home
                        </a>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link nav-link-modern dropdown-toggle <?php echo e(request()->routeIs('collections.show') && !in_array(request()->route('slug'), ['best-sellers', 'new-arrivals']) ? 'active' : ''); ?>" href="#" id="categoryDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                            <i class="bi bi-grid d-md-none"></i> Category
                        </a>
                        <ul class="dropdown-menu overflow-auto dropdown-menu-end" aria-labelledby="categoryDropdown" style="max-height: 300px;">
                            <?php if($menuCategories && $menuCategories->count() > 0): ?>
                                <?php $__currentLoopData = $menuCategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $menuCat): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <li>
                                        <a class="dropdown-item" href="<?php echo e(route('collections.show', $menuCat->slug)); ?>">
                                            <i class="bi bi-tag me-2"></i> <?php echo e($menuCat->name); ?>

                                        </a>
                                    </li>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            <?php else: ?>
                                <li><span class="dropdown-item text-muted">No categories available</span></li>
                            <?php endif; ?>
                            <li><hr class="dropdown-divider"></li>
                            <li>
                                <a class="dropdown-item category-dropdown-menu" href="<?php echo e(route('product.search')); ?>">
                                    <i class="bi bi-search me-2"></i> View All Categories
                                </a>
                            </li>
                        </ul>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link nav-link-modern <?php echo e(request()->routeIs('collections.show') && request()->route('slug') === 'new-arrivals' ? 'active' : ''); ?>" href="<?php echo e(route('collections.show', 'new-arrivals')); ?>">
                            <i class="bi bi-stars d-md-none"></i> New Arrivals
                        </a>
                    </li>
                
                    <li class="nav-item">
                        <a class="nav-link nav-link-modern <?php echo e(request()->routeIs('customer.orders.*') ? 'active' : ''); ?>" href="<?php echo e(route('customer.orders.index')); ?>">
                            <i class="bi bi-truck d-md-none"></i> Track Your Order
                        </a>
                    </li>
                </ul>
            </div>
    </nav>                

    <!-- MOBILE + TAB BOTTOM BAR -->
    <nav class="mobile-bottom-bar d-lg-none fixed-bottom">
        <a href="<?php echo e(route('home')); ?>">
            <i class="fa-solid fa-house"></i><span>Home</span>
        </a>
        <a href="<?php echo e(route('cart.index')); ?>" class="position-relative">
            <i class="bi bi-bag"></i>
            <?php if($cartItemCount > 0): ?>
                <span class="bottom-badge"><?php echo e($cartItemCount); ?></span>
            <?php endif; ?>
            <span>Cart</span>
        </a>
        <a href="<?php echo e(route('customer.orders.index')); ?>">
            <i class="bi bi-truck"></i> <span>Orders</span>
        </a>
        <?php if(auth()->guard()->check()): ?>
            <a href="<?php echo e(route('customer.profile')); ?>">
                <i class="bi bi-person"></i> <span>Profile</span>
            </a>
        <?php else: ?>
            <a href="<?php echo e(route('login')); ?>">
                <i class="bi bi-person"></i> <span>Login</span>
            </a>
        <?php endif; ?>
    </nav>

    
<?php if(View::hasSection('breadcrumb')): ?>
<section class="breadcrumb-bar">
    <div class="container breadcrumb-inner">
        <div class="breadcrumb-left">
            <a href="<?php echo e(route('home')); ?>">Home</a>
            <span>/</span>
            <span class="current"><?php echo $__env->yieldContent('breadcrumb'); ?></span>
        </div>
    </div>
</section>
<?php endif; ?>

    <!-- Main Content -->
    <main>
        <?php if(session('error')): ?>
            <div class="alert alert-danger admin-alert alert-dismissible fade show toast-modern toast-modern-error" role="alert" style="position: fixed; top: 80px; right: 20px; z-index: 1050; max-width: 400px;">
                <i class="bi bi-exclamation-triangle-fill toast-modern-icon"></i>
                <div class="toast-modern-content">
                    <div class="toast-modern-title">Error</div>
                    <div class="toast-modern-message"><?php echo e(session('error')); ?></div>
                </div>
                <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
            </div>
        <?php endif; ?>

        <?php if($errors->any()): ?>
            <div class="alert alert-danger admin-alert alert-dismissible fade show toast-modern toast-modern-error" role="alert" style="position: fixed; top: 80px; right: 20px; z-index: 1050; max-width: 400px;">
                <i class="bi bi-exclamation-triangle-fill toast-modern-icon"></i>
                <div class="toast-modern-content">
                    <div class="toast-modern-title">Validation Error</div>
                    <div class="toast-modern-message">
                        <ul class="mb-0" style="padding-left: 1.25rem;">
                            <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <li><?php echo e($error); ?></li>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </ul>
                    </div>
                </div>
                <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
            </div>
        <?php endif; ?>

        <?php if(session('success')): ?>
            <div class="alert alert-success admin-alert alert-dismissible fade show toast-modern toast-modern-success" role="alert" style="position: fixed; top: 80px; right: 20px; z-index: 1050; max-width: 400px;">
                <i class="bi bi-check-circle-fill toast-modern-icon"></i>
                <div class="toast-modern-content">
                    <div class="toast-modern-title">Success</div>
                    <div class="toast-modern-message"><?php echo e(session('success')); ?></div>
                </div>
                <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
            </div>
        <?php endif; ?>

        <?php echo $__env->yieldContent('content'); ?>
    </main>

    <!-- Footer -->
    <footer class="footer-main">
        <div class="container">
            <div class="row g-4">
                <!-- Left Section: Logo + Description -->
                <div class="col-lg-3 col-md-6">
                    <div class="footer-logo-container">
                        <?php
                            $footerLogoUrl = \App\Models\Setting::getLogoUrl('light');
                            $footerSiteName = \App\Models\Setting::get('site_name', 'SUDHEER KT');
                        ?>
                        <?php if($footerLogoUrl): ?>
                            <div class="footer-logo-image mb-3">
                                <img src="<?php echo e($footerLogoUrl); ?>" alt="<?php echo e($footerSiteName); ?>" style="max-height: 120px !important; width: auto !important;">
                            </div>                         
                        <?php endif; ?>                        
                    </div>
                    <p class="footer-description">Shaa Jewels is committed to offering elegant, affordable, and high-quality jewellery. With decades of expertise, we blend timeless tradition with modern design, ensuring every piece reflects purity, precision, and craftsmanship you can trust.</p>
                </div>
                
                <!-- Middle Section 1: Quick Links -->
                <div class="col-lg-3 col-md-6">
                    <h6 class="footer-section-title">QUICK LINKS</h6>
                    <ul class="footer-links">
                        <li><a href="<?php echo e(route('page.about-us')); ?>">About Us</a></li>
                        <li><a href="<?php echo e(route('page.contact-us')); ?>">Contact Us</a></li>
                        <li><a href="<?php echo e(route('page.faqs')); ?>">FAQs</a></li>
                        <li><a href="<?php echo e(route('customer.orders.index')); ?>">Track Order</a></li>
                        <li><a href="<?php echo e(route('page.size-care-guide')); ?>">Size / Care Guide</a></li>
                    </ul>
                </div>
                
                <!-- Middle Section 2: Our Policies -->
                <div class="col-lg-3 col-md-6">
                    <h6 class="footer-section-title">OUR POLICIES</h6>
                    <ul class="footer-links">
                        <li><a href="<?php echo e(route('policy.privacy')); ?>">Privacy Policy</a></li>
                        <li><a href="<?php echo e(route('policy.refund')); ?>">Refund & Return Policy</a></li>
                        <li><a href="<?php echo e(route('policy.shipping')); ?>">Shipping & Delivery Policy</a></li>
                        <li><a href="<?php echo e(route('policy.cancellation')); ?>">Cancellation Policy</a></li>
                        <li><a href="<?php echo e(route('policy.support')); ?>">Support & Policy</a></li>
                        <li><a href="<?php echo e(route('policy.terms')); ?>">Terms & Conditions</a></li>
                    </ul>
                </div>
                
                <!-- Right Section: Contact Us -->
                <div class="col-lg-3 col-md-6">
                    <h6 class="footer-section-title">CONTACT US</h6>
                    <div class="footer-contact-item footer-address">
                        <i class="bi bi-house-door-fill"></i>
                        <span style="text-align: justify;">Shaa jewels, 3 monkey Circle, Pragathi Nagar, Hyderabad, 500090</span>
                    </div>
                    <div class="footer-contact-item">
                        <i class="bi bi-telephone-fill"></i>
                        <span><a href="tel:+917075337448" style="text-decoration: none; color: inherit;">+91-7075337448</a></span>
                    </div>
                    <div class="footer-contact-item">
                        <i class="bi bi-whatsapp"></i>
                        <span><a href="https://wa.me/917075337448" target="_blank" rel="noopener noreferrer" style="text-decoration: none; color: inherit;">+91-7075337448</a></span>
                    </div>
                    <div class="footer-contact-item">
                        <i class="bi bi-envelope-fill"></i>
                        <span><a href="mailto:shaajewels@gmail.com" style="text-decoration: none; color: inherit;">shaajewels@gmail.com</a></span>
                    </div>

                    <!-- Social Media Icons -->
<div class="footer-social-icons">
  <a href="https://www.instagram.com/shaajewels/" target="_blank" class="social-icon" aria-label="Facebook">
        <i class="bi bi-facebook"></i>
    </a> 
    <a href="https://www.instagram.com/shaajewels/" target="_blank" class="social-icon" aria-label="Instagram">
        <i class="bi bi-instagram"></i>
    </a>
    <a href="https://www.youtube.com/shaajewels" target="_blank" class="social-icon" aria-label="YouTube">
        <i class="bi bi-youtube"></i>
    </a>
</div>

                </div>
            </div>
        </div>
    </footer>

    <!-- Footer Bottom Bar -->
    <div class="footer-bottom-bar">
        <div class="container">
            <p class="footer-copyright mb-0">
                &copy; <?php echo e(date('Y')); ?> <?php echo e(\App\Models\Setting::get('site_name', 'KiyoKart')); ?>. All Rights Reserved.  | Developed by <a href="https://kiyokart.in" target="_blank" rel="noopener noreferrer">KiyoKart</a>
            </p>
            <div class="footer-payment-icons">
                <i class="fa-brands fa-cc-visa" title="Visa"></i>
                <i class="fa-brands fa-cc-mastercard" title="Mastercard"></i>
                <i class="fa-brands fa-google-pay" title="Google Pay"></i>
                <i class="fa-brands fa-cc-apple-pay" title="Apple Pay"></i>
                <i class="fas fa-credit-card" title="Credit Card"></i> 
            </div>
        </div>
    </div>

    <!-- jQuery & Bootstrap 5 JS -->
    <script src="<?php echo e(asset('js/jquery.min.js')); ?>" defer></script>
    <script src="<?php echo e(asset('js/bootstrap.bundle.min.js')); ?>" defer></script>
    <script src="<?php echo e(asset('js/select2.min.js')); ?>" defer></script>
    
    <!-- Wishlist JS - Load once for all pages -->
    <script src="<?php echo e(asset('js/wishlist.js')); ?>"></script>

    <?php echo $__env->yieldPushContent('scripts'); ?>
    
    <script>
        setTimeout(function () {
            let alerts = document.querySelectorAll('.admin-alert');
            alerts.forEach(function(alert) {
                let bsAlert = new bootstrap.Alert(alert);
                bsAlert.close();
            });
        }, 2000); // 2 seconds
    </script>
    <script>
    document.addEventListener("DOMContentLoaded", function () {
    $(function() {
        const formatOption = (state) => {
            if (!state.id) return state.text;
            const $el = $(state.element);
            const image = $el.data('image');
            const barcode = $el.data('barcode');
            const stock = $el.data('stock');
            if (image || barcode || stock) {
                const name = state.text;
                return $(`
                    <div class="product-option d-flex align-items-center gap-2">
                        ${image ? `<img src="${image}" alt="${name}" style="width:32px;height:32px;object-fit:cover;border-radius:6px;">` : ''}
                        <div class="d-flex flex-column lh-sm">
                            <span class="fw-semibold">${name}</span>
                            ${barcode || stock ? `<small class="text-muted">${barcode ? `Barcode: ${barcode}` : ''}${barcode && stock ? ' · ' : ''}${stock ? `Stock: ${stock}` : ''}</small>` : ''}
                        </div>
                    </div>
                `);
            }
            return state.text;
        };

        $('select').each(function() {
            const $select = $(this);
            if ($select.hasClass('no-select2') || $select.data('select2')) return;
            $select.select2({
                width: '100%',
                placeholder: $select.data('placeholder') || $select.attr('placeholder') || '',
                allowClear: !$select.prop('multiple'),
                templateResult: formatOption,
                templateSelection: formatOption
            });
        });
    });
    });
   

        const wrapper = document.getElementById('navbarSearchWrapper');
        const icon = document.getElementById('searchToggle');
        const input = wrapper.querySelector('.navbar-search-input');
        const form = wrapper.querySelector('form');

        icon.addEventListener('click', function () {

            if (!wrapper.classList.contains('active')) {
                wrapper.classList.add('active');
                input.focus();
                return;
            }

            if (input.value.trim() !== '') {
                form.submit();
            } else {
                input.focus();
            }
        });

    

    </script>
    <script>
    // GA4: Track add-to-cart from product listing cards.
    document.addEventListener('submit', function (event) {
        const form = event.target.closest('.add-to-cart-form');
        if (!form) {
            return;
        }

        const itemId = form.dataset.gaItemId || '';
        const itemName = form.dataset.gaItemName || '';
        const itemCategory = form.dataset.gaItemCategory || '';
        const price = Number(form.dataset.gaPrice || 0);
        const qtyInput = form.querySelector('input[name="qty"]');
        const quantity = Math.max(1, parseInt(qtyInput ? qtyInput.value : '1', 10) || 1);

        window.kkTrack('event', 'add_to_cart', {
            currency: 'INR',
            value: Number((price * quantity).toFixed(2)),
            items: [{
                item_id: itemId,
                item_name: itemName,
                item_category: itemCategory,
                price: price,
                quantity: quantity,
            }],
        });
    });
    </script>
    <link rel="stylesheet" href="<?php echo e(asset('fontawesome/css/all.min.css')); ?>">
</body>
</html>
<?php /**PATH /var/www/html/shaa_jewels/live/resources/views/layouts/app.blade.php ENDPATH**/ ?>