/* --- 1. Base & Header Reset --- */
html, body { overflow-x: hidden; width: 100%; }
body { font-family: 'Poppins', sans-serif; margin: 0; padding-top: 100px; }

.navbar-wrapper * { margin: 0; padding: 0; box-sizing: border-box; text-decoration: none !important; list-style: none !important; }

/* --- 2. Floating Navbar --- */
.navbar-wrapper { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; /* पूरी स्क्रीन लेगा */
    z-index: 9999; 
    display: flex; 
    justify-content: center; 
    transition: none; 
}
.navbar { 
    width: 96%; 
    max-width: 1150px; /* फुल स्क्रीन फैलेगा */
    background: rgba(255, 255, 255, 0.95); 
    backdrop-filter: blur(10px); 
    border-radius: 0 0 20px 20px; /* चपटा रहेगा */
    padding: 12px 20px; 
    border-bottom: 1px solid #e2e8f0; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    border: 1px solid #e2e8f0; /* चारो तरफ हल्का बॉर्डर */
}
/* 2. Header Content (Max 1350px & Centered) */
.nav-container { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    width: 100%; 
    max-width: 1150px; /* 🔥 कंटेंट यहीं रुक जाएगा */
    margin: 0 auto;    /* 🔥 और बिल्कुल बीच में रहेगा */
}

/* --- 3. Logo Design --- */
.logo-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; color: #1e293b !important; flex-shrink: 0; }
.logo-icon-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.logo-icon-grid .sq { width: 10px; height: 10px; border-radius: 2px; }
.red { background: #ff4d4f; } .blue { background: #40a9ff; }
.yellow { background: #ffec3d; } .purple { background: #9254de; }
.logo-text span { color: #8b5cf6 !important; }

/* --- 4. Desktop Menu & Dropdowns --- */
.nav-main-links { display: flex; align-items: center; gap: 15px; }
.nav-item { display: inline-block; }

.mega-btn, .blog-link { background: #f1f5f9; border: none; padding: 10px 18px; border-radius: 8px; font-weight: 500; color: #1e293b !important; cursor: pointer; display: flex; align-items: center; justify-content: flex-start; gap: 8px; font-size: 15px; font-family: 'Poppins', sans-serif;}
.btn-text-group { display: flex; align-items: center; gap: 8px; } /* आइकॉन को टेक्स्ट के पास रखने के लिए */
.blog-link { background: transparent; color: #475569 !important; padding: 10px 18px; }
.mega-btn:hover { background: #e2e8f0; }
.blog-link:hover { color: #f97316 !important; background: #f1f5f9; }

/* Desktop Search Pill */
.search-pill { background: #ffffff; border: 1px solid #cbd5e1; border-radius: 10px; padding: 8px 15px; display: flex; align-items: center; gap: 10px; color: #64748b !important; font-size: 14px; cursor: pointer; margin-left: 10px; width: auto; min-width: 220px; max-width: 280px; justify-content: space-between; white-space: nowrap;}
.search-pill:hover { border-color: #8b5cf6; box-shadow: 0 4px 10px rgba(139,92,246,0.1); }
.search-pill kbd { background: #f1f5f9; padding: 2px 8px; border-radius: 5px; font-size: 11px; font-weight: 700; border: 1px solid #e2e8f0; color: #475569;}

/* --- 5. Actions & Icons --- */
.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.action-icon, .mobile-toggle-btn { font-size: 20px; cursor: pointer; color: #1e293b !important; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: transparent; border: none; }
.action-icon:hover, .mobile-toggle-btn:hover { background: #f1f5f9; }
.mobile-search-icon, .mobile-toggle-btn { display: none; } 

/* --- 6. Dropdown & Mega Menu Panels --- */
/* ========================================================= */
/* 🎯 UPDATED MEGA MENU PANEL (With Smart Scroll Fix) */
/* ========================================================= */

.mega-menu-panel { 
    position: absolute; 
    top: 110%; 
    left: 0; 
    right: 0; 
    margin: 0 auto; 
    width: 100%; 
    max-width: 1150px; 
    background: #ffffff; 
    border-radius: 15px; /* आपकी ओरिजिनल गोलाई */
    box-shadow: 0 20px 50px rgba(0,0,0,0.15); 
    border: 1px solid #e2e8f0; 
    opacity: 0; 
    visibility: hidden; 
    transform: translate3d(0, 15px, 0);
    will-change: transform, opacity;
    transition: opacity 0.2s ease-out, visibility 0.2s ease-out, transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 10px 20px; 
    cursor: default; 
    z-index: 1000;

    /* 🔥 NEW: स्क्रॉल फिक्स (ताकि मेनू कटे नहीं) */
    max-height: 85vh; /* स्क्रीन की 85% हाइट तक ही रहेगा */
    overflow-y: auto; /* ऊपर-नीचे स्क्रॉल चालू */
    overflow-x: hidden; /* दाएं-बाएं बंद */
    overscroll-behavior: contain; /* 🔥 पेज का स्क्रॉल लॉक कर देगा */
}

.mega-menu-panel.show { opacity: 1; visibility: visible; transform: translate3d(0, 0, 0); }

/* पुराने छोटे मेनू के लिए फिक्स */
#megaMenuPrint, #megaMenuPdf { width: auto; min-width: 500px; left: auto; right: auto; margin: 0; }


/* ========================================================= */
/* 🔥 CUSTOM ROUNDED SCROLLBAR (डिज़ाइन के साथ मैच करने के लिए) */
/* ========================================================= */

.mega-menu-panel::-webkit-scrollbar {
    width: 8px; /* पतला और स्लीक */
}

.mega-menu-panel::-webkit-scrollbar-track {
    background: transparent; 
    margin: 10px; /* 🔥 कोनों से दूरी ताकि रेडियस साफ़ दिखे */
}

.mega-menu-panel::-webkit-scrollbar-thumb {
    background-color: #cbd5e1; /* हल्का ग्रे */
    border-radius: 20px; /* एकदम गोल कैप्सूल जैसा */
    
    /* फ्लोटिंग इफ़ेक्ट के लिए पारदर्शी बॉर्डर */
    border: 2px solid #ffffff; 
    background-clip: content-box;
}

.mega-menu-panel::-webkit-scrollbar-thumb:hover {
    background-color: #8b5cf6; /* होवर करने पर पर्पल */
}

/* 🌙 DARK MODE SCROLLBAR FIX */
body.dark-mode .mega-menu-panel::-webkit-scrollbar-thumb {
    background-color: #475569;
    border: 2px solid #1e293b; /* डार्क मोड बैकग्राउंड से मैच */
}

.mega-grid-layout { 
    display: grid !important; 
    /* 7 के बजाय 4 कॉलम रखें ताकि टूल्स को सांस लेने की जगह मिले */
    grid-template-columns: repeat(4, 1fr); 
    
    /* कैटेगरीज़ के बीच का गैप (ऊपर-नीचे 40px, दाएं-बाएं 25px) */
    gap: 15px 20px; 
    
    /* 🔥 सबसे ज़रूरी: सारी कैटेगरीज़ को ऊपर से एक बराबर लाइन में रखेगा */
    align-items: start; 
    
    padding: 10px 5px;
}

.mega-column h5 { 
    font-size: 15px; 
    text-transform: uppercase; 
    margin-bottom: 6px; 
    display: flex; 
    align-items: center; 
    gap: 18px; 
    font-weight: 700; /* हेडिंग को थोड़ा बोल्ड किया */
    border-bottom: 1px solid rgba(0,0,0,0.05); /* पतली लाइन */
    padding-bottom: 6px;
}

.mega-links { 
    display: flex; 
    flex-direction: column; 
    gap: 8px; /* लिंक्स के बीच थोड़ा और गैप */
}

.mega-links a { 
    font-size: 13.5px; 
    font-weight: 500; 
    color: #475569 !important; 
    transition: all 0.2s ease; 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    text-decoration: none;
}

/* Hover Effect */
.mega-links a:hover { 
    color: #f97316 !important; 
    transform: translateX(5px); /* होवर करने पर हल्का सा आगे खिसकेगा */
}

/* =========================================================
   🔥 PRO TOOL ICON DESIGN (LIGHT & DARK MODE FULL FIX)
   ========================================================= */

/* 1. नार्मल (Light Mode) डिज़ाइन */
.tool-img { 
    width: 20px !important;  
    height: 20px !important; 
    object-fit: contain !important; 
    
    /* बॉक्स का डिज़ाइन */
    padding: 6px !important; 
    background-color: #f8fafc !important; /* लाइट मोड में हल्का ग्रे/सफ़ेद */
    border: 1px solid #e2e8f0 !important; /* लाइट मोड में हल्का बॉर्डर */
    border-radius: 50px !important; 
    box-sizing: content-box !important;
    margin-right: 5px !important; /* टेक्स्ट से थोड़ी दूरी बढ़ाई 
    
    /* स्मूथ एनिमेशन और शैडो */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05)) !important;
}

/* 2. Light Mode में होवर (माउस ले जाने पर) */
.mega-links a:hover .tool-img {
    background-color: #e0e7ff !important; /* हल्का नीला रंग */
    border-color: #c7d2fe !important;
    transform: scale(1.1) translateY(-2px) !important;
}

/* ---------------------------------------------------------
   🌙 DARK MODE FIX (सफ़ेद डिब्बे हमेशा के लिए गायब)
--------------------------------------------------------- */
/* मैंने यहाँ html और body दोनों लगा दिए हैं ताकि आपकी थीम का जो भी क्लास हो, वो कैच कर ले */
html.dark-mode .tool-img,
body.dark-mode .tool-img,
.dark-theme .tool-img {
    background-color: rgba(255, 255, 255, 0.05) !important; /* एकदम हल्का पारदर्शी रंग (सफ़ेद की जगह) */
    border: 1px solid rgba(255, 255, 255, 0.1) !important; /* डार्क मोड के लिए स्पेशल बॉर्डर */
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4)) !important; /* डार्क शैडो */
}

/* 🌙 Dark Mode में होवर करने पर */
html.dark-mode .mega-links a:hover .tool-img,
body.dark-mode .mega-links a:hover .tool-img,
.dark-theme .mega-links a:hover .tool-img {
    background-color: rgba(255, 255, 255, 0.15) !important; /* होवर पर थोड़ा सा चमकेगा */
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: scale(1.1) translateY(-2px) !important;
}

/* 🌙 DARK MODE SUPPORT (मिस मत करना!) */
body.dark-mode .mega-column h5 {
    border-bottom-color: rgba(255,255,255,0.1);
}
body.dark-mode .mega-links a {
    color: #cbd5e1 !important;
}
body.dark-mode .mega-links a:hover {
    color: #fb923c !important;
}

.menu-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.3); backdrop-filter: blur(2px); opacity: 0; visibility: hidden; transition: 0.3s; z-index: 990; }
.menu-overlay.active { opacity: 1; visibility: visible; }

/* --- 7. Spotlight Search Overlay --- */
.spotlight-overlay { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(5px); z-index: 10000; padding: 20px; }
.spotlight-box { width: 100%; max-width: 600px; margin: 80px auto 0; background: #fff; border-radius: 15px; box-shadow: 0 25px 50px rgba(0,0,0,0.25); overflow: hidden; animation: slideDown 0.3s ease; }
@keyframes slideDown { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.spotlight-header { display: flex; align-items: center; padding: 15px 20px; border-bottom: 1px solid #e2e8f0; gap: 15px; }
.spotlight-header i { color: #8b5cf6; font-size: 20px; flex-shrink: 0; }
.spotlight-header input { flex: 1; min-width: 0; border: none; outline: none; font-size: 16px; font-family: 'Poppins', sans-serif; padding: 5px 0; background: transparent; } /* min-width: 0 is important for mobile fix */
.close-spotlight { background: transparent; border: none; cursor: pointer; flex-shrink: 0; }
.close-spotlight kbd { background: #f1f5f9; padding: 4px 8px; border-radius: 5px; font-size: 12px; font-weight: 700; color: #64748b; border: 1px solid #cbd5e1; }
/* ========================================================= */
/* 🔥 SPOTLIGHT SCROLL FIX (Anti-Background Scroll) */
/* ========================================================= */
.spotlight-results { 
    max-height: 350px; 
    overflow-y: auto; 
    padding: 10px; 
    
    /* यह लाइन पीछे वाले पेज को 1 इंच भी नहीं हिलने देगी! */
    overscroll-behavior: contain; 
}

/* 🎨 सुंदर और पतला स्क्रॉल बार (ताकि गंदा न लगे) */
.spotlight-results::-webkit-scrollbar {
    width: 6px;
}
.spotlight-results::-webkit-scrollbar-track {
    background: transparent;
    margin: 5px;
}
.spotlight-results::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.spotlight-results::-webkit-scrollbar-thumb:hover {
    background: #8b5cf6;
}

/* 🌙 डार्क मोड स्क्रॉल बार सपोर्ट */
body.dark-mode .spotlight-results::-webkit-scrollbar-thumb { background: #475569; }
body.dark-mode .spotlight-results::-webkit-scrollbar-thumb:hover { background: #a78bfa; }
.spotlight-item { padding: 12px 15px; border-radius: 8px; font-size: 14px; font-weight: 500; color: #1e293b; cursor: pointer; transition: 0.2s; display: flex; align-items: center; gap: 12px; }
.spotlight-item:hover { background: #f8fafc; color: #8b5cf6; }

/* =========================================================
   8. MOBILE RESPONSIVENESS (100% Fixed & Tested) 
   ========================================================= */
@media (max-width: 1024px) {
    .mega-grid-layout { grid-template-columns: repeat(4, 1fr); }
    #megaMenuPrint, #megaMenuPdf { min-width: 400px; }
}

@media (max-width: 900px) {
    /* Navbar Floating in Mobile Setup */
        .navbar { 
        width: 100%;      /* पूरी स्क्रीन की चौड़ाई */
        padding: 10px 15px; 
        border-radius: 0 0 20px 20px; /* सिर्फ नीचे से गोल */
        border-top: none; 
        box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    }
        .navbar-wrapper { 
        position: fixed; 
        top: 0;           /* यह हेडर को मोबाइल में सबसे ऊपर चिपका देगा */
        left: 0; 
        width: 100%; 
        transition: none; 
    }

    /* Hide Desktop Pills & Show Icons */
    .search-pill { display: none; }
    .mobile-search-icon, .mobile-toggle-btn { display: flex; }
    
    .nav-container { gap: 5px; }
    .action-icon, .mobile-toggle-btn { width: 35px; height: 35px; font-size: 18px; }
    .logo-text { font-size: 18px; }

    /* Mobile Sidebar Sliding Menu - Adjusts perfectly with Floating Header */
    .nav-main-links {
        position: fixed !important; 
        top: 70px !important; /* हेडर के ठीक नीचे फिक्स */
        left: 0; 
        width: 100vw; 
        height: calc(100dvh - 60px) !important; /* स्क्रीन की पूरी ऊँचाई */
        background: #ffffff; 
        flex-direction: column; 
        align-items: flex-start;
        
        /* 🔥 जादुई बदलाव: सिर्फ यहाँ स्क्रॉल होगा */
        overflow-y: auto !important; 
        overflow-x: hidden !important;
        overscroll-behavior: contain !important; 
        
        /* नीचे एक्स्ट्रा जगह ताकि कुछ न कटे */
        padding: 20px 20px 20px 20px !important; 
        display: none; 
        box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
        z-index: 999;
    /* ये बदलाव आपके उस एरिया को गोल और साफ़ बना देंगे */
        border-radius: 20px 20px 20px 20px; /* ऊपर के दोनों कोने गोल */
        margin-top: -6px;            /* हेडर से थोड़ा नीचे */
        box-shadow: 0 -10px 30px rgba(0,0,0,0.05); /* ऊपर की तरफ हल्की शैडो */
    }
    .navbar-wrapper.scrolled .nav-main-links { top: 60px; height: calc(100vh - 60px); }
    .nav-main-links.mobile-active { display: flex; } 
    
    .nav-item { width: 100%; margin-bottom: 10px; }
    
    /* Buttons in mobile (Icon attached to text, chevron on right) */
    .mega-btn, .blog-link { width: 100%; justify-content: space-between; padding: 12px 15px; font-size: 15px; background: #f1f5f9; border-radius: 8px; }
    .blog-link { color: #1e293b !important; }
    
    /* Mobile Accordion Style */
.mega-menu-panel {
    position: static !important; 
    display: none;
    visibility: visible !important;
    opacity: 1 !important;
    
    /* 🔥 जादुई बदलाव: अंदर का स्क्रॉल और हाइट लिमिट पूरी तरह खत्म! */
    max-height: none !important; 
    overflow: visible !important; 
    
    transform: none !important; 
    box-shadow: none !important; 
    border: none !important; 
    padding: 15px 15px !important;
    background: #f8fafc; 
    margin-top: 5px; 
    border-radius: 8px; 
    width: 100% !important; 
    min-width: 100% !important;
}
    .mega-menu-panel.show { visibility: visible; display: block; }
    
    /* ALL TOOLS, PRINT, PDF IN 2 COLUMNS IN MOBILE */
    .mega-grid-layout, #megaMenuPrint .mega-grid-layout, #megaMenuPdf .mega-grid-layout { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .mega-column h5 { font-size: 11px; margin-bottom: 10px; }
    .mega-links a { font-size: 11px; gap: 6px; }
    .tool-img { width: 18px; height: 18px; }
    .menu-overlay { display: none; }

    /* Spotlight Mobile Fix (Input Fit & Esc Key) */
    .spotlight-box { margin-top: 60px; width: 100%; }
    .spotlight-header { padding: 10px 15px; gap: 8px; }
    .spotlight-header input { font-size: 14px; width: 100%; }
    .close-spotlight kbd { padding: 4px 6px; font-size: 11px; }
}

@media (max-width: 450px) {
    .mega-grid-layout, #megaMenuPrint .mega-grid-layout, #megaMenuPdf .mega-grid-layout { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .logo-text { font-size: 16px; }
    .logo-brand { gap: 6px; }
    .logo-icon-grid .sq { width: 8px; height: 8px; }
}

/* =========================================================
   📱 MOBILE MEGA MENU FIX (Bigger Text & Icons for Touch)
   ========================================================= */

@media (max-width: 900px) {
    /* 2 कॉलम लेआउट और डिब्बों के बीच की दूरी बढ़ाई */
    .mega-grid-layout, #megaMenuPrint .mega-grid-layout, #megaMenuPdf .mega-grid-layout { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 25px; /* गैप बढ़ाया */
    }
    
    /* हेडिंग (Smart Print, Typing) का साइज़ बढ़ाया */
    .mega-column h5 { 
        font-size: 15px !important; 
        margin-bottom: 5px !important; 
    }
    
    /* लिंक्स के बीच की दूरी और साइज़ बढ़ाया (ताकि टच करने में आसानी हो) */
    .mega-links {
        gap: 15px !important; 
    }
    .mega-links a { 
        font-size: 14px !important; /* फॉन्ट बड़ा किया */
        gap: 5px !important; 
        padding: 5px 0; /* उंगली से क्लिक करने के लिए स्पेस दिया */
    }
    
    /* आइकॉन का साइज़ बढ़ाया */
    .tool-img { 
        width: 24px !important; 
        height: 24px !important; 
    }
}

/* 📱 बहुत छोटे फोन (जैसे iPhone SE, etc.) के लिए 1 कॉलम कर दें */
@media (max-width: 500px) {
    .mega-grid-layout, #megaMenuPrint .mega-grid-layout, #megaMenuPdf .mega-grid-layout { 
        grid-template-columns: 1fr !important; /* 1 लाइन में 1 ही टूल दिखेगा */
        gap: 30px !important;
    }
    .mega-column h5 {
        border-bottom: 1px dashed #e2e8f0; /* हर कैटेगरी के नीचे एक लाइन */
        padding-bottom: 10px;
    }
}

/* डार्क मोड के लिए डैश लाइन का कलर */
html.dark-mode .mega-column h5 {
    border-bottom-color: #334155;
}

/* --- 9. DARK MODE CSS (Fixes included) --- */
body.dark-mode { background-color: #0f172a; color: #f8fafc; }
body.dark-mode .navbar, body.dark-mode .mega-menu-panel, body.dark-mode .spotlight-box { background: rgba(30, 41, 59, 0.98); border-color: #334155; }
body.dark-mode .logo-brand, body.dark-mode .action-icon { color: #f8fafc !important; }

/* Mobile Menu Dark Mode Fixes */
body.dark-mode .mobile-toggle-btn i { color: #ffffff !important; }
body.dark-mode .mobile-toggle-btn, body.dark-mode .action-icon { background: transparent; }
body.dark-mode .mobile-toggle-btn:hover, body.dark-mode .action-icon:hover { background: #334155; }
body.dark-mode .nav-main-links { background: #1e293b; }
body.dark-mode .nav-main-links .mega-menu-panel { background: #0f172a; }

/* Buttons & Links Dark Mode Fix */
body.dark-mode .mega-btn { background: #334155; color: #f8fafc !important; }
body.dark-mode .mega-btn:hover { background: #475569; }
body.dark-mode .mega-links a { color: #cbd5e1 !important; }
body.dark-mode .mega-links a:hover { color: #f97316 !important; background: transparent; }

/* Blog Menu Dark Mode Mobile Fix */
body.dark-mode .blog-link { color: #f8fafc !important; background: transparent; } /* Desktop transparent */
@media (max-width: 900px) { body.dark-mode .blog-link { background: #334155; } } /* Mobile matched with buttons */
body.dark-mode .blog-link:hover { background: #334155; color: #f97316 !important; }

/* Search Box Dark Mode */
body.dark-mode .search-pill { background: #1e293b; border-color: #475569; color: #94a3b8 !important; }
body.dark-mode .search-pill kbd, body.dark-mode .close-spotlight kbd { background: #334155; color: #cbd5e1; border-color: #475569; }
body.dark-mode .spotlight-header { border-color: #334155; }
body.dark-mode .spotlight-header input { color: #f8fafc; }
body.dark-mode .spotlight-item { color: #cbd5e1; }
body.dark-mode .spotlight-item:hover { background: #334155; color: #a78bfa; }

/* =========================================================
   GLOBAL ADSENSE PLACEHOLDERS (Light & Dark Mode)
   ========================================================= */
.global-ad-container {
    text-align: center;
    margin: 30px auto;
    max-width: 1200px;
    padding: 0 20px;
}

.global-ad-label {
    font-size: 10px;
    color: #94a3b8;
    display: block;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.global-ad-placeholder {
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.5s, border-color 0.5s, color 0.5s;
}

.global-ad-placeholder.bottom-ad {
    height: 120px;
}

/* 🔥 DARK MODE FOR ADS (100% Fixed with !important) ✨ */
html.dark-mode .global-ad-placeholder,
body.dark-mode .global-ad-placeholder {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #cbd5e1 !important;
}

html.dark-mode .global-ad-label,
body.dark-mode .global-ad-label {
    color: #64748b !important;
}

/* =========================================================
   FLIPKART STYLE CATEGORY BAR (PERFECT BOXED DESIGN)
   ========================================================= */
.quick-category-bar {
    width: 96%; 
    max-width: 1150px; 
    margin: 15px auto 25px auto; 
    background-color: #ffffff;
    margin-top:-15px;
    
    border: 1px solid #e2e8f0; 
    border-radius: 16px; 
    padding: 15px 20px 5px 20px; 
    box-shadow: 0 8px 20px rgba(0,0,0,0.03); 
    box-sizing: border-box; 
    transition: 0.5s;
    position: relative; 
    z-index: 990;
}

.quick-category-container {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 15px; 
    
    overflow-x: auto; 
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 10px;
    padding-bottom: 12px; 
    
    scrollbar-width: thin; 
    scrollbar-color: #cbd5e1 transparent;
}

.quick-category-container::-webkit-scrollbar { height: 5px; } 
.quick-category-container::-webkit-scrollbar-track { background: transparent; }
.quick-category-container::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 10px; }
.quick-category-container::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* 🌟 Nav Items (PERFECT BOX FIX) */
.cat-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none !important;
    color: #475569;
    
    /* डब्बे का साइज़ और ओवरलैप फिक्स */
    min-width: 90px; 
    padding: 10px 12px; 
    background-color: #f8fafc; /* लाइट मोड में हल्का सा ग्रे डब्बा (ताकि बॉक्स फील आए) */
    border-radius: 12px; /* गोल डब्बा */
    border: 1px solid transparent; 
    border: 1px solid #e2e8f0;
    
    cursor: pointer;
    position: relative; 
    scroll-snap-align: center; 
    -webkit-tap-highlight-color: transparent; 
    transition: all 0.3s ease; 
    overflow: hidden; /* अगर लाइन बाहर जाए तो उसे काट देगा */
}

.cat-nav-item img {
    width: 32px; 
    height: 32px;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

.cat-nav-item span {
    font-size: 12px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    transition: color 0.3s;
    
    /* 👇 यहाँ से जादू शुरू होता है (Text Truncation) */
    white-space: nowrap;      /* टेक्स्ट को 2 लाइन में टूटने से रोकेगा */
    overflow: hidden;         /* जो हिस्सा डब्बे से बाहर जाएगा, उसे छुपा देगा */
    text-overflow: ellipsis;  /* छुपे हुए हिस्से की जगह '...' (3 डॉट) लगा देगा */
    
    /* डब्बे की मैक्सिमम चौड़ाई सेट करें (ताकि इसके बाद डॉट आए) */
    max-width: 85px;          /* आप इसे 80px या 90px भी कर सकते हैं */
    
    /* टेक्स्ट को सेंटर में रखने के लिए */
    display: inline-block;
}

/* 🌟 Hover & Active Animations */
.cat-nav-item:hover {
    background-color: #f1f5f9; 
    border-color: #cbd5e1;
}
.cat-nav-item:hover img { transform: translateY(-3px) scale(1.1); }
.cat-nav-item:hover span { color: #3b82f6; }

/* जादुई अंडरलाइन (Line Size Fixed) */
.cat-nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 4px; /* लाइन थोड़ी मोटी की */
    background-color: #3b82f6;
    border-radius: 4px 4px 0 0;
    transition: width 0.3s ease-in-out;
}

/* Active State */
.cat-nav-item.active {
    background-color: #eff6ff; 
    border-color: #bfdbfe; /* हल्का नीला बॉर्डर */
    box-shadow: 0 4px 10px rgba(59,130,246,0.1);
}
.cat-nav-item.active span { color: #3b82f6; font-weight: 700; }
.cat-nav-item.active::after { width: 100%; } /* अब लाइन डब्बे के बाहर नहीं जाएगी क्योंकि overflow:hidden है */

/* =========================================================
   DARK MODE FIX (The Real Magic)
   ========================================================= */
html.dark-mode .quick-category-bar,
body.dark-mode .quick-category-bar {
    background-color: #0f172a; /* एकदम डार्क बैकग्राउंड */
    border-color: #334155;     
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

html.dark-mode .quick-category-container { scrollbar-color: #475569 transparent; }
html.dark-mode .quick-category-container::-webkit-scrollbar-thumb { background: #334155; }
html.dark-mode .quick-category-container::-webkit-scrollbar-thumb:hover { background: #475569; }

/* डार्क मोड में नॉर्मल डब्बे का रंग */
html.dark-mode .cat-nav-item,
body.dark-mode .cat-nav-item {
    background-color: #1e293b; /* डार्क ग्रे बॉक्स */
    border-color: #334155;
    color: #cbd5e1;
}

html.dark-mode .cat-nav-item span,
body.dark-mode .cat-nav-item span { color: #94a3b8; }

/* डार्क मोड में होवर (Hover) करने पर रंग */
html.dark-mode .cat-nav-item:hover,
body.dark-mode .cat-nav-item:hover { 
    background-color: #334155; /* गंदा सफ़ेद नहीं, बल्कि गहरा ग्रे होगा */
    border-color: #475569; 
}
html.dark-mode .cat-nav-item:hover span,
body.dark-mode .cat-nav-item:hover span { color: #8b5cf6; } /* पर्पल टेक्स्ट */

/* डार्क मोड में एक्टिव (Active) रहने पर रंग */
html.dark-mode .cat-nav-item.active,
body.dark-mode .cat-nav-item.active { 
    background-color: rgba(139,92,246,0.15); /* बहुत ही हल्का पर्पल बैकग्राउंड */
    border-color: #8b5cf6; /* पर्पल बॉर्डर */
    box-shadow: 0 4px 10px rgba(139,92,246,0.2); 
}
html.dark-mode .cat-nav-item.active span,
body.dark-mode .cat-nav-item.active span { color: #a78bfa; font-weight: 700; }
html.dark-mode .cat-nav-item::after { background-color: #8b5cf6; } /* पर्पल अंडरलाइन */

/* =========================================================
   MOBILE RESPONSIVENESS (Strict Dot-Dot Fix)
   ========================================================= */
@media (max-width: 900px) {
    .quick-category-bar {
        width: 96%;
        padding: 12px 10px 5px 10px; 
        border-radius: 12px;
        margin-top: -35px;
    }
    .quick-category-container { gap: 10px; }
    .cat-nav-item { 
        min-width: 75px; 
        padding: 8px 5px; 
    }
    .cat-nav-item img { width: 28px; height: 28px; }
    
    /* 👇 यहाँ है मोबाइल के लिए "डॉट-डॉट" (Truncation) का सख्त (Strict) कोड 👇 */
    .cat-nav-item span { 
        font-size: 10px; 
        
        /* 1 लाइन में लॉक करने का सख्त नियम */
        white-space: nowrap !important; 
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        
        /* मोबाइल के डब्बे के हिसाब से अधिकतम चौड़ाई (Maximum Width) */
        max-width: 65px !important; 
        display: inline-block !important;
    }
    
    .cat-nav-item:hover img { transform: translateY(-2px) scale(1.1); }
}
/* =========================================================
   MAIN SEARCH BOX HEADER NIGHT MODE HEADER FIX
   ========================================================= */
/* Light Mode */
.spotlight-item { border-bottom: 1px solid #e2e8f0; }
.spotlight-item:hover { background-color: #f1f5f9; }
.spotlight-text-title { color: #1e293b; }

/* Dark Mode */
body.dark-mode .spotlight-item { border-bottom: 1px solid #334155; }
body.dark-mode .spotlight-item:hover { background-color: #1e293b; }
body.dark-mode .spotlight-text-title { color: #f8fafc !important; }

/* ========================================================= */
/* 🎯 MEGA MENU "VIEW ALL" - CLEAN PRO DESIGN */
/* ========================================================= */

.mega-view-all {
    margin-top: 8px;
    padding: 10px 16px;
    background-color: transparent; /* डिफ़ॉल्ट में कोई बैकग्राउंड नहीं */
    border: 1.5px solid #dadada; /* बहुत ही हल्की बॉर्डर */
    border-radius: 8px;
    
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%; /* कॉलम की पूरी चौड़ाई लेगा */
    box-sizing: border-box;
}

.mega-view-all i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

/* 🔥 PREMIUM HOVER EFFECT (Soft & High-End) */
.mega-view-all:hover {
    /* होवर करने पर कैटेगरी का हल्का सा रंग बैकग्राउंड में आएगा (10% Opacity) */
    background-color: rgba(var(--cat-color-rgb, 139, 92, 246), 0.08); 
    border-color: var(--cat-color) !important; /* बॉर्डर डार्क हो जाएगी */
    color: var(--cat-color) !important; /* टेक्स्ट वही रहेगा पर चमकेगा */
    transform: translateY(-3px); /* हल्का सा ऊपर उठेगा */
    box-shadow: 0 6px 15px rgba(0,0,0,0.05); /* बहुत हल्का सा साया */
}

.mega-view-all:hover i {
    transform: translateX(5px); /* तीर प्यार से आगे खिसकेगा */
}

/* ========================================================= */
/* 🌙 DARK MODE SAFE VISIBILITY FIX (No Design Change) */
/* ========================================================= */

body.dark-mode .mega-view-all {
    /* हम बैकग्राउंड नहीं बदल रहे, सिर्फ टेक्स्ट को थोड़ा चमकदार बना रहे हैं */
    color: #e2e8f0 !important; 
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* होवर करने पर वही "Best" इफ़ेक्ट जो आपने पहले पसंद किया था */
body.dark-mode .mega-view-all:hover {
    color: var(--cat-color) !important; /* होवर पर कैटेगरी का असली रंग आ जाएगा */
    border-color: var(--cat-color) !important;
    background-color: rgba(255, 255, 255, 0.05); /* बहुत हल्का सा ग्लो */
}

/* ========================================================= */
/* 🔥 THE ULTIMATE SLIM & ROUNDED SCROLLBAR (Premium Look) */
/* ========================================================= */

/* 1. स्क्रॉल बार की चौड़ाई (Width) - इसे पतला रखा गया है */
.nav-main-links::-webkit-scrollbar,
.mega-menu-panel::-webkit-scrollbar,
.spotlight-results::-webkit-scrollbar {
    width: 6px; 
}

/* 2. स्क्रॉल बार का रास्ता (Track) - इसे साफ़ रखा गया है */
.nav-main-links::-webkit-scrollbar-track,
.mega-menu-panel::-webkit-scrollbar-track,
.spotlight-results::-webkit-scrollbar-track {
    background: transparent; 
    margin: 10px 0; /* ऊपर-नीचे से थोड़ी जगह छोड़ी है */
}

/* 3. पकड़ने वाला हिस्सा (Thumb) - इसे "फ्लोटिंग पिल" डिज़ाइन दिया है */
.nav-main-links::-webkit-scrollbar-thumb,
.mega-menu-panel::-webkit-scrollbar-thumb,
.spotlight-results::-webkit-scrollbar-thumb {
    background-color: #cbd5e1; /* हल्का ग्रे */
    border-radius: 20px;       /* एकदम गोल कैप्सूल जैसा */
    border: 1px solid transparent; /* थोड़ा गैप देने के लिए */
}

/* 4. होवर (Hover) करने पर रंग बदलें */
.nav-main-links::-webkit-scrollbar-thumb:hover,
.mega-menu-panel::-webkit-scrollbar-thumb:hover,
.spotlight-results::-webkit-scrollbar-thumb:hover {
    background-color: #8b5cf6; /* आपकी थीम वाला पर्पल रंग */
}

/* ========================================================= */
/* 🌙 DARK MODE SCROLLBAR (डार्क मोड के लिए स्पेशल कलर्स) */
/* ========================================================= */

body.dark-mode .nav-main-links::-webkit-scrollbar-thumb,
body.dark-mode .mega-menu-panel::-webkit-scrollbar-thumb,
body.dark-mode .spotlight-results::-webkit-scrollbar-thumb {
    background-color: #475569; /* डार्क ग्रे */
}

body.dark-mode .nav-main-links::-webkit-scrollbar-thumb:hover,
body.dark-mode .mega-menu-panel::-webkit-scrollbar-thumb:hover,
body.dark-mode .spotlight-results::-webkit-scrollbar-thumb:hover {
    background-color: #a78bfa; /* हल्का पर्पल */
}

/* ========================================================= */
/* 🚀 PREMIUM PAGE PRELOADER (Logo Inside Spinner) */
/* ========================================================= */

.preloader-wrapper {
    position: fixed;
    inset: 0; 
    background-color: #ffffff; /* लाइट मोड के लिए सफ़ेद */
    z-index: 999999; 
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-in-out, visibility 0.5s;
}

/* 🌙 डार्क मोड के लिए बैकग्राउंड तुरंत काला (Dark) हो जाएगा */
html.dark-mode .preloader-wrapper,
body.dark-mode .preloader-wrapper {
    background-color: #0f172a !important; 
}

/* 🔥 THE MAGIC CONTAINER (Logo + Ring) */
.spinner-container {
    position: relative;
    width: 60px;  /* डब्बे की चौड़ाई */
    height: 60px; /* डब्बे की ऊँचाई */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* गोल घूमने वाली रिंग (Ring) */
.loader-ring {
    position: absolute;
    inset: 0; /* डब्बे के किनारे तक फैलेगा */
    border: 3px solid rgba(139, 92, 246, 0.15); /* हल्का पर्पल बेस */
    border-top: 3px solid #8b5cf6; /* डार्क पर्पल जो घूमेगा */
    border-radius: 50%;
    animation: spinLoader 1s cubic-bezier(0.4, 0, 0.2, 1) infinite; /* स्मूथ एनीमेशन */
}

@keyframes spinLoader {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* जब पेज लोड हो जाए, तो प्रिलोडर को गायब करने की क्लास */
.preloader-wrapper.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* =========================================================
   🌟 PRO CATEGORY HEADING ICONS (PERFECT SIZE)
   ========================================================= */

/* 1. लाइट मोड - बड़ा साइज़ और 3D लुक */
.section-title img, 
.mega-column h5 img {
    display: inline-block !important;
    vertical-align: middle !important;
    
    /* 🔥 यहाँ साइज़ बढ़ाया गया है (22px से 28px कर दिया) */
    width: 24px !important; 
    height: 24px !important;
    object-fit: contain !important;
    
    /* 🔥 पैडिंग भी बढ़ाई गई है ताकि गोल घेरा बड़ा दिखे */
    padding: 6px !important; 
    
    background: linear-gradient(135deg, #ffffff, #f1f5f9) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 20% !important; /* 100% गोल (Circle) */
    box-sizing: content-box !important;
    
    /* आइकॉन और टेक्स्ट के बीच की दूरी (Gap) */
    margin-right: 1px !important; 
    margin-top: -3px !important; /* टेक्स्ट के बिल्कुल बीच में सेट करने के लिए */
    
    /* शैडो और एनिमेशन */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* 2. होवर (Hover) करने पर */
.section-title:hover img, 
.mega-column h5:hover img {
    transform: translateY(-2px) scale(1.05) !important; 
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.15) !important; 
    border-color: #bfdbfe !important;
}

/* ---------------------------------------------------------
   🌙 DARK MODE FIX FOR CATEGORY ICONS
--------------------------------------------------------- */
html.dark-mode .section-title img, 
html.dark-mode .mega-column h5 img,
body.dark-mode .section-title img, 
body.dark-mode .mega-column h5 img {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02)) !important; 
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4) !important; 
    filter: drop-shadow(0 0 0 transparent) !important; 
}

html.dark-mode .section-title:hover img, 
html.dark-mode .mega-column h5:hover img,
body.dark-mode .section-title:hover img, 
body.dark-mode .mega-column h5:hover img {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05)) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.6) !important;
}

/* ---------------------------------------------------------
   📱 MOBILE RESPONSIVE (स्मार्टफोन्स के लिए)
--------------------------------------------------------- */
@media (max-width: 600px) {
    .section-title img, 
    .mega-column h5 img {
        /* मोबाइल पर भी साइज़ थोड़ा बड़ा किया (18px से 24px) */
        width: 24px !important; 
        height: 24px !important;
        padding: 6px !important; 
        margin-right: 8px !important;
    }
}

/* =========================================================
   🛑 MASTER FLASH FIX (For All Screens - No background flash)
   ========================================================= */
/* सिर्फ Transform और Shadow एनिमेट होगी, बैकग्राउंड तुरंत बदलेगा ताकि Flash न हो */
.tool-img, 
.section-title img, 
.mega-column h5 img,
.mega-links a {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out !important;
}

/* होवर एनिमेशन - माउस ले जाने पर हल्का सा उठना */
.mega-links a:hover .tool-img,
.section-title:hover img, 
.mega-column h5:hover img {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out !important;
}

/* =========================================================
   📱 FINAL PERFECT MOBILE FIX (Medium Compact & Pro Look)
   ========================================================= */
@media (max-width: 900px) {
    /* 1. कैटेगरी आइकॉन - थोड़ा बढ़ाकर (24px) किया ताकि साफ़ दिखे */
    .section-title img, 
    .mega-column h5 img {
        width: 30px !important;  
        height: 30px !important;
        padding: 5px !important; 
        
        /* आपका 20px वाला रेडियस (हल्का चकोर) */
        border-radius: 10px !important; 
        
        /* 🚨 पिचकने से रोकने के लिए मास्टर कमांड */
        flex-shrink: 0 !important; 
        margin-right: 4px !important; 
        object-fit: contain !important;
    }

    /* 2. कैटेगरी हेडिंग - टेक्स्ट थोडा बड़ा (14px) और परफेक्ट अलाइनमेंट */
    .mega-column h5 {
        display: flex !important;
        align-items: center !important; 
        justify-content: flex-start !important;
        font-size: 14px !important; /* हेडिंग का टेक्स्ट बढ़ा दिया */
        font-weight: 600 !important;
        
        /* बैलेंसिंग मार्जिन */
        margin-top: 12px !important;    
        margin-bottom: 8px !important;  
        padding-bottom: 5px !important; 
        
        line-height: 1.2 !important;
        width: 100% !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    }

    /* 3. टूल्स आइकॉन - (20px और पूरा गोल 50%) */
    .tool-img {
        width: 20px !important;   /* टूल्स आइकॉन बढ़ाकर 20px किया */
        height: 20px !important;
        padding: 5px !important;
        margin-right: 4px !important;
        
        /* टूल्स के लिए गोल शेप */
        border-radius: 50% !important; 
        flex-shrink: 0 !important;
    }

    /* 4. टूल्स के नाम - टच करने में आसान और पढ़ने में साफ़ */
    .mega-links {
        gap: 0px !important; 
    }

    .mega-links a {
        font-size: 13px !important; /* टूल्स का नाम बढ़ाकर 13px किया */
        padding: 5px 0px !important; /* उंगली से टच करने के लिए बढ़िया जगह */
        display: flex !important;
        align-items: center !important;
        margin-bottom: 2px !important;
    }

    /* 5. पूरे पैनल और ग्रिड की प्रीमियम सेटिंग */
    .mega-menu-panel {
        padding: 5px 15px !important; 
    }

    .mega-grid-layout {
        gap: 12px 18px !important; /* डिब्बों के बीच की दूरी बैलेंस की */
    }
}
/* ========================================================= */
/* 📱 TABLET LANDSCAPE - ULTIMATE VIEW ALL FIX */
/* ========================================================= */

/* जब स्क्रीन की ऊँचाई 700px से कम हो और टैबलेट आड़ा हो */
@media screen and (max-height: 700px) and (orientation: landscape) {
    
    .mega-menu-panel {
        /* 🔥 ऊँचाई को थोड़ा और कम किया ताकि नीचे जगह बचे */
        max-height: 75dvh !important; 
        max-height: 75vh !important;
    }

    .mega-grid-layout {
        /* 🔥 सबसे बड़ा फिक्स: नीचे 140px की खाली जगह (Cushion) */
        /* इससे 'View All' बटन के नीचे बहुत सारी जगह बचेगी और वो कभी नहीं कटेगा */
        padding-bottom: 60px !important; 
    }
    
    /* कैटेगरीज़ के बीच का गैप थोड़ा कम किया ताकि सब कुछ फिट रहे */
    .mega-grid-layout {
        gap: 30px 20px !important;
    }
}