/* ===================================================================
   GUPTA MACHINERY STORES - PROFESSIONAL STYLESHEET
   Industry-Level Design with Full Responsive Support
   =================================================================== */

/* === RESET & BASE STYLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0a2463;
    --primary-dark: #071940;
    --primary-light: #1e3a8a;
    --secondary: #d32f2f;
    --secondary-dark: #b71c1c;
    --secondary-light: #e53935;
    --accent: #ff6b35;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    color: var(--gray-900);
    background-color: var(--gray-50);
}

html {
    scroll-behavior: smooth;
}

img {
    max-width: 100%;
    height: auto;
}
/* === ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-scroll {
    animation: scroll 30s linear infinite;
}

.animate-scroll:hover {
    animation-play-state: paused;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.product-card-animated {
    animation: float 6s ease-in-out infinite;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }

/* === HERO CAROUSEL STYLES === */
.hero-bg-slide {
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 0s linear 1s;
}

.hero-bg-slide.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 1s ease-in-out, visibility 0s linear 0s;
}

.hero-bg-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* === CTA SECTION WITH BACKGROUND - FIXED === */
section.bg-gradient-to-r.from-primary {
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, #1e40af 100%) !important;
    overflow: hidden;
}

/* Background Image with Proper Overlay */
section.bg-gradient-to-r.from-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('./images/crousel8.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.2;
    z-index: 0;
}

/* Dark Overlay for Better Text Visibility */
section.bg-gradient-to-r.from-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(10, 36, 99, 0.85) 0%, 
        rgba(30, 58, 138, 0.85) 50%, 
        rgba(30, 64, 175, 0.85) 100%);
    z-index: 1;
}

section.bg-gradient-to-r.from-primary .container {
    position: relative;
    z-index: 10;
}

/* White Text with Strong Visibility - FIXED */
section.bg-gradient-to-r.from-primary h2 {
    color: #ffffff !important;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5),
                 0 0 20px rgba(0, 0, 0, 0.3);
    font-weight: 800 !important;
}

section.bg-gradient-to-r.from-primary p {
    color: #e0e7ff !important;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    font-weight: 500 !important;
}

/* Button Styles - FIXED */
section.bg-gradient-to-r.from-primary a,
section.bg-gradient-to-r.from-primary button {
    background: var(--secondary) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.4) !important;
    transition: all 0.3s ease !important;
}

section.bg-gradient-to-r.from-primary a:hover,
section.bg-gradient-to-r.from-primary button:hover {
    background: var(--secondary-dark) !important;
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.6) !important;
    transform: translateY(-2px) !important;
}

section.bg-gradient-to-r.from-primary a.bg-white,
section.bg-gradient-to-r.from-primary button.bg-white {
    background: #ffffff !important;
    color: var(--primary) !important;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3) !important;
}

section.bg-gradient-to-r.from-primary a.bg-white:hover,
section.bg-gradient-to-r.from-primary button.bg-white:hover {
    background: var(--gray-100) !important;
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.5) !important;
}

/* Hide decorative pattern */
section.bg-gradient-to-r.from-primary > .absolute.inset-0.opacity-10 {
    display: none !important;
}

/* === PRODUCT CARD EFFECTS === */
.product-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
}

.product-card:hover::before {
    left: 100%;
}

/* === HOVER EFFECTS === */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-2xl);
}

/* === GRADIENT BACKGROUNDS === */
.gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

.gradient-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
}

/* === BUTTON STYLES === */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(10, 36, 99, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: var(--white);
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(211, 47, 47, 0.3);
}

/* === FORM STYLES === */
input:focus, 
textarea:focus, 
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(10, 36, 99, 0.1);
}

input, 
textarea, 
select {
    transition: all 0.2s ease;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* === DIAGONAL SPLIT === */
.diagonal-split {
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

/* === PARALLAX EFFECTS === */
.parallax-container {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    transition: transform 0.1s ease-out;
}

.bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.bg-slide.active {
    opacity: 0.15;
}

.parallax-layer {
    transform: translateZ(0);
    will-change: transform;
}

/* === ACCESSIBILITY === */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* === RESPONSIVE BREAKPOINTS === */

/* Mobile First - Base Styles Above */

/* Small Tablets (640px+) */
@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

/* Tablets (768px+) */
@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

/* Large Desktop (1280px+) */
@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

/* Extra Large (1536px+) */
@media (min-width: 1536px) {
    .container {
        max-width: 1536px;
    }
}

/* Mobile Specific (max-width: 768px) */
@media (max-width: 768px) {
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    /* Mobile Hero Height */
    section[style*="height: 70vh"],
    section[style*="height: 60vh"] {
        min-height: 400px !important;
    }
    
    /* Mobile Buttons */
    .btn-primary,
    .btn-secondary {
        padding: 0.625rem 1.5rem;
        font-size: 0.875rem;
    }
    
    /* Mobile Cards */
    .product-card {
        margin-bottom: 1rem;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    /* Smaller padding for mobile */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Print Styles */
@media print {
    header, 
    footer, 
    .no-print,
    nav,
    button {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    * {
        box-shadow: none !important;
    }
}

/* === UTILITY CLASSES === */
.text-primary {
    color: var(--primary) !important;
}

.text-secondary {
    color: var(--secondary) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.bg-secondary {
    background-color: var(--secondary) !important;
}

.border-primary {
    border-color: var(--primary) !important;
}

.border-secondary {
    border-color: var(--secondary) !important;
}

/* === ENHANCED MOBILE RESPONSIVENESS === */
@media (max-width: 640px) {
    /* Product Grid - 2 columns on mobile */
    .grid-cols-2 > * {
        flex: 0 0 calc(50% - 0.5rem);
    }
    
    /* Stack buttons vertically on small screens */
    .flex.gap-4 {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    /* Full width buttons on mobile */
    a[class*="inline-flex"],
    button[class*="inline-flex"] {
        width: 100%;
        justify-content: center;
    }
}
/* === FIX FOR MODAL Z-INDEX === */
#quoteModal {
    z-index: 9999;
}

#quoteModalContent {
    z-index: 10000;
}

/* === ENSURE TEXT VISIBILITY ON ALL BACKGROUNDS === */
.text-white {
    color: #ffffff !important;
}

.text-gray-900 {
    color: var(--gray-900) !important;
}

.text-gray-700 {
    color: var(--gray-700) !important;
}

.text-gray-600 {
    color: var(--gray-600) !important;
}

  .step-item {
        opacity: 0;
        animation: fadeInUp 0.6s ease-out forwards;
    }

    @keyframes fadeInUp {
        0% { opacity: 0; transform: translateY(20px); }
        100% { opacity: 1; transform: translateY(0); }
    }
    .page-banner {
        height: 220px;
    }
/* ============================================================
   documentation.php - SPACING FIX
   Yeh <style> tag mein existing styles ke NEECHE daal
   ============================================================ */

/* Saare section padding override */
section.py-20,
section.py-16,
section[class*="py-16"],
section[class*="py-20"],
section[class*="py-24"] {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
}

/* sm: aur md: responsive classes bhi override */
@media (min-width: 640px) {
    section[class*="sm:py-20"],
    section[class*="sm:py-16"] {
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }
}

@media (min-width: 768px) {
    section[class*="md:py-24"],
    section[class*="md:py-20"] {
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }
}

/* Section headers ke neeche ka gap */
section .mb-16 {
    margin-bottom: 28px !important;
}

section .mb-12 {
    margin-bottom: 20px !important;
}

/* Mobile */
@media (max-width: 767px) {
    section.py-20,
    section.py-16,
    section[class*="py-16"],
    section[class*="py-20"],
    section[class*="py-24"] {
        padding-top: 28px !important;
        padding-bottom: 28px !important;
    }

    section .mb-16 {
        margin-bottom: 20px !important;
    }
}
  
.banner-img {
    width: 100%;
    height: auto;          
    object-fit: cover;      
    display: block;
}
@media (min-width: 640px) {
        .page-banner {
            height: 400px;
        }
        .banner-image {
            object-fit: cover;
        }
    }

    @media (min-width: 1024px) {
        .page-banner {
            height: 550px;
        }
    }

    @media (min-width: 1440px) {
        .page-banner {
            height: 650px;
        }
    }
     .lazy-load {
        opacity: 0;
        animation: fadeInUp 0.8s ease-out forwards;
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
  /* ══ Hide scrollbars (kept for any old refs) ══ */
        .mega-col-cat,
        .mega-col-sub,
        .mega-col-sub2 {
            scrollbar-width: none;
            -ms-overflow-style: none;
        }
        .mega-col-cat::-webkit-scrollbar,
        .mega-col-sub::-webkit-scrollbar,
        .mega-col-sub2::-webkit-scrollbar { display: none; }

        /* ════════════════════════════════════════════════════
           MEGA MENU — WIDE GRID (redesign)
           · position: fixed → panel always centered on
             VIEWPORT (not on the Products button), so it
             can never extend off-screen on either side
           · JS sets top/left/width on each open + on resize
           · 5-column grid of category cards
           · each card shows category + top 4 subs + view all
           · integrated search bar in header
           · max-height clamps to viewport, internal scroll
             only if absolutely necessary (smooth)
        ════════════════════════════════════════════════════ */
        .mega-parent { position: relative !important; }

        .mega-panel {
            display: none !important;
            /* header.css (loaded after this file on some pages) has a
               legacy .mega-panel rule using position:absolute — !important
               here locks this panel to position:fixed regardless of load order */
            position: fixed !important;
            z-index: 9999 !important;
            flex-direction: column !important;
            /* Horizontal centering is fully owned by CSS — JS no
               longer touches left/width/transform, and !important
               guarantees nothing else (on any page) can push this off-centre. */
            left: 50% !important;
            width: min(1280px, calc(100vw - 16px)) !important;
            transform: translateX(-50%) !important;
            top: 100%;   /* JS overrides this with the button's exact bottom edge */
        }

        .mega-panel-inner {
            background: #fff !important;
            border-radius: 18px !important;
            box-shadow: 0 28px 70px rgba(10,36,99,.22) !important;
            border: 1px solid #e8edf5 !important;
            overflow: hidden !important;
            display: flex !important;
            flex-direction: column !important;
            max-height: calc(100vh - 96px);   /* outer fallback only — JS caps
                                                  #megaBody itself to whole rows
                                                  of cards, see fitPanelHeight() */
            animation: megaPanelIn .18s ease-out !important;
        }

        @keyframes megaPanelIn {
            from { opacity: 0; transform: translateY(-6px); }
            to   { opacity: 1; transform: translateY(0); }
        }

        .mega-parent:hover .mega-panel,
        .mega-panel.is-open { display: flex !important; }

        /* legacy classes kept as no-ops (safe to drop later) */
        .mega-panel.align-right { left: auto !important; right: 0 !important; transform: none !important; }
        .mega-panel.align-left  { left: 0 !important; transform: none !important; }

        /* ── Header bar ── */
        .mega-header-bar {
            background: linear-gradient(120deg, #0a2463 0%, #123a8c 55%, #1a4fb0 100%) !important;
            color: #fff !important;
            padding: 22px 28px !important;
            display: flex !important;
            align-items: center !important;
            gap: 20px !important;
            flex-shrink: 0 !important;
            position: relative !important;
            overflow: hidden !important;
        }
        /* diagonal light-blue accent sweeping the right side */
        .mega-header-bar::after {
            content: "" !important;
            position: absolute !important;
            top: 0 !important; right: 0 !important; bottom: 0 !important;
            width: 46% !important;
            background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.08) 42%, rgba(255,255,255,.16) 100%) !important;
            clip-path: polygon(38% 0, 100% 0, 100% 100%, 0% 100%) !important;
            pointer-events: none !important;
        }
        .mega-header-icon {
            display: inline-flex !important; align-items: center !important; justify-content: center !important;
            width: 48px !important; height: 48px !important;
            border-radius: 14px !important;
            background: rgba(255,255,255,0.16) !important;
            border: 1px solid rgba(255,255,255,0.22) !important;
            flex-shrink: 0 !important;
            position: relative !important; z-index: 1 !important;
        }
        .mega-header-icon svg { width: 24px !important; height: 24px !important; color: #fff !important; }
        .mega-header-titles {
            display: flex !important; flex-direction: column !important;
            min-width: 0 !important;
            position: relative !important; z-index: 1 !important;
        }
        .mega-header-title {
            font-size: 19px !important; font-weight: 800 !important;
            letter-spacing: .04em !important; text-transform: uppercase !important;
            color: #fff !important; line-height: 1.15 !important;
        }
        .mega-header-sub {
            font-size: 12.5px !important; color: #cfe0ff !important; opacity: .9 !important;
            margin-top: 3px !important;
        }

        .mega-header-search {
            flex: 1 !important;
            max-width: 460px !important;
            margin: 0 auto !important;
            position: relative !important;
            display: flex !important; align-items: center !important;
            z-index: 1 !important;
        }
        .mega-header-search svg {
            position: absolute !important; left: 18px !important;
            width: 18px !important; height: 18px !important;
            color: #94a3b8 !important; pointer-events: none !important;
        }
        .mega-header-search input {
            width: 100% !important;
            padding: 15px 20px 15px 46px !important;
            border-radius: 999px !important;
            border: none !important;
            background: #fff !important;
            color: #1e293b !important;
            font-size: 14.5px !important;
            outline: none !important;
            box-shadow: 0 10px 24px rgba(4,17,54,.25) !important;
            transition: all .15s ease !important;
        }
        .mega-header-search input::placeholder { color: #94a3b8 !important; }
        .mega-header-search input:focus {
            box-shadow: 0 0 0 3px rgba(251,191,36,0.35), 0 10px 24px rgba(4,17,54,.25) !important;
        }

        .mega-header-right {
            display: flex !important; align-items: center !important; gap: 18px !important;
            flex-shrink: 0 !important;
            position: relative !important; z-index: 1 !important;
        }
        .mega-header-link {
            font-size: 13px !important; font-weight: 700 !important;
            color: #fff !important; text-decoration: none !important;
            white-space: nowrap !important;
            display: inline-flex !important; align-items: center !important; gap: 4px !important;
            transition: color .15s !important;
        }
        .mega-header-link:hover { color: #fde68a !important; }

        .mega-close-btn {
            display: inline-flex !important; align-items: center !important; justify-content: center !important;
            width: 34px !important; height: 34px !important;
            border-radius: 50% !important;
            background: rgba(255,255,255,0.18) !important;
            border: none !important; color: #fff !important;
            cursor: pointer !important; font-size: 15px !important; line-height: 1 !important;
            transition: background .15s !important;
            flex-shrink: 0 !important;
        }
        .mega-close-btn:hover { background: rgba(255,255,255,0.34) !important; }

        /* ── Body / Grid ── */
        .mega-body {
            flex: 1 !important;
            overflow-y: auto !important;
            overflow-x: hidden !important;
            background: #eef2fb !important;
            scrollbar-width: thin !important;
            scrollbar-color: #c7d2fe transparent !important;
        }
        .mega-body::-webkit-scrollbar { width: 10px !important; }
        .mega-body::-webkit-scrollbar-thumb {
            background: #c7d2fe !important; border-radius: 10px !important;
            border: 2px solid #f8faff !important;
        }
        .mega-body::-webkit-scrollbar-track { background: transparent !important; }

        .mega-grid {
            display: grid !important;
            grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
            grid-auto-rows: auto !important;   /* each row sizes to its own content —
                                                   cards sharing a row still match height
                                                   (standard grid behaviour), but a row is
                                                   never crushed below what its tallest
                                                   card needs */
            align-content: start !important;   /* last partial row doesn't stretch */
            gap: 18px !important;
            padding: 22px !important;
        }
        @media (max-width: 1180px) {
            .mega-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
        }
        @media (max-width: 940px) {
            .mega-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
        }
        @media (max-width: 640px) {
            .mega-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
        }
        @media (max-width: 460px) {
            .mega-grid { grid-template-columns: 1fr !important; }
        }
        /* ── ID-scoped duplicates ──
           A legacy stylesheet (header.css, loaded after this file on some
           pages) may define its own .mega-grid rules for narrow widths.
           When both rules carry !important, the browser breaks the tie by
           SPECIFICITY, and an ID beats a class regardless of load order —
           so these guarantee the same responsive behaviour on every page,
           no matter what else is loaded alongside this stylesheet. */
        #megaGrid { grid-auto-rows: auto !important; }
        #megaGrid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
        @media (max-width: 1180px) { #megaGrid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
        @media (max-width: 940px)  { #megaGrid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
        @media (max-width: 640px)  { #megaGrid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
        @media (max-width: 460px)  { #megaGrid { grid-template-columns: 1fr !important; } }

        /* ── Category card ── */
        .mega-cat-card {
            background: #fff !important;
            border-radius: 16px !important;
            padding: 18px 20px 16px !important;
            display: flex !important; flex-direction: column !important;
            min-height: 196px !important;
            box-shadow: 0 1px 3px rgba(10,36,99,.06) !important;
            transition: box-shadow .18s ease, transform .18s ease !important;
        }
        .mega-cat-card:hover {
            box-shadow: 0 10px 28px rgba(10,36,99,.14) !important;
            transform: translateY(-2px) !important;
        }

        .mega-cat-title {
            display: flex !important; align-items: center !important; gap: 12px !important;
            color: #0a2463 !important;
            text-decoration: none !important;
            padding-bottom: 14px !important;
            margin-bottom: 10px !important;
        }
        .mega-cat-icon {
            display: inline-flex !important; align-items: center !important; justify-content: center !important;
            width: 46px !important; height: 46px !important;
            border-radius: 50% !important;
            background: #dbe4fb !important;
            color: #0a2463 !important;
            flex-shrink: 0 !important;
        }
        .mega-cat-icon svg { width: 21px !important; height: 21px !important; }
        .mega-cat-name {
            font-size: 15px !important; font-weight: 800 !important;
            letter-spacing: .01em !important;
            color: #0a2463 !important;
            flex: 1 !important; min-width: 0 !important;
            line-height: 1.28 !important;
            /* allow long names to wrap to 2 lines */
            word-break: break-word !important;
            overflow-wrap: anywhere !important;
        }
        .mega-cat-count {
            font-size: 11px !important; font-weight: 800 !important;
            background: #e0e7ff !important; color: #0a2463 !important;
            padding: 3px 9px !important; border-radius: 999px !important;
            flex-shrink: 0 !important;
        }

        .mega-cat-list {
            list-style: none !important;
            margin: 0 !important; padding: 0 !important;
            flex: 1 !important;
        }
        .mega-cat-list li { margin: 0 !important; }
        .mega-cat-list a {
            display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 6px !important;
            padding: 6px 0 !important;
            font-size: 13px !important; font-weight: 500 !important;
            color: #334155 !important;
            text-decoration: none !important;
            line-height: 1.35 !important;
            /* allow long names to wrap to 2 lines */
            word-break: break-word !important;
            overflow-wrap: anywhere !important;
            transition: color .12s ease !important;
        }
        .mega-cat-list a::after {
            content: "" !important;
            flex-shrink: 0 !important;
            width: 6px !important; height: 6px !important;
            border-right: 1.5px solid #b6c0d6 !important;
            border-bottom: 1.5px solid #b6c0d6 !important;
            transform: rotate(-45deg) !important;
            transition: border-color .12s ease !important;
        }
        .mega-cat-list a:hover {
            color: #c0392b !important;
        }
        .mega-cat-list a:hover::after {
            border-color: #c0392b !important;
        }

        .mega-cat-viewall {
            display: inline-flex !important; align-items: center !important; gap: 5px !important;
            margin-top: 12px !important;
            padding-top: 12px !important;
            border-top: 1px solid #eef1f6 !important;
            font-size: 12.5px !important; font-weight: 700 !important;
            color: #1a4fb0 !important;
            text-decoration: none !important;
            letter-spacing: .01em !important;
            transition: gap .15s ease, color .15s ease !important;
        }
        .mega-cat-viewall:hover { color: #c0392b !important; gap: 8px !important; }

        /* ── Empty search state ── */
        .mega-empty {
            padding: 56px 24px !important;
            text-align: center !important;
            color: #475569 !important;
        }
        .mega-empty-icon {
            display: inline-flex !important; align-items: center !important; justify-content: center !important;
            width: 56px !important; height: 56px !important;
            border-radius: 50% !important;
            background: #e0e7ff !important; color: #0a2463 !important;
            margin-bottom: 12px !important;
        }
        .mega-empty-icon svg { width: 28px !important; height: 28px !important; }
        .mega-empty-title { font-size: 14px !important; font-weight: 700 !important; margin: 0 0 4px !important; }
        .mega-empty-sub   { font-size: 12px !important; color: #94a3b8 !important; margin: 0 !important; }
        .mega-empty-sub a { color: #0a2463 !important; font-weight: 700 !important; text-decoration: none !important; }
        .mega-empty-sub a:hover { color: #c0392b !important; }

        /* ── Footer bar ── */
        .mega-footer {
            display: flex !important; align-items: center !important; justify-content: space-between !important;
            gap: 16px !important;
            padding: 16px 22px !important;
            background: #f1f5f9 !important;
            border-top: 1px solid #e8edf5 !important;
            flex-shrink: 0 !important;
        }
        .mega-footer-text {
            display: flex !important; align-items: center !important; gap: 9px !important;
            font-size: 13px !important; color: #475569 !important;
        }
        .mega-footer-icon {
            width: 17px !important; height: 17px !important;
            color: #0a2463 !important;
            flex-shrink: 0 !important;
        }
        .mega-footer-link {
            display: inline-flex !important; align-items: center !important; gap: 7px !important;
            font-size: 13px !important; font-weight: 800 !important;
            color: #fff !important;
            background: #0a2463 !important;
            padding: 10px 20px !important;
            border-radius: 999px !important;
            text-decoration: none !important;
            white-space: nowrap !important;
            transition: background .15s !important;
        }
        .mega-footer-link svg { width: 14px !important; height: 14px !important; }
        .mega-footer-link:hover { background: #c0392b !important; }

        /* ══════════════════════════════════════
           SEARCH DROPDOWN
        ══════════════════════════════════════ */
        .search-header-bar { display:flex; align-items:center; justify-content:space-between; padding:10px 16px; background:linear-gradient(135deg,#0a2463,#1a3a7a); color:#fff; }
        .search-header-bar span { font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; opacity:.85; }
        .search-header-bar a    { font-size:11px; font-weight:700; color:#fbbf24; text-decoration:none; }
        .search-item { display:flex; align-items:center; border-bottom:1px solid #f1f5f9; cursor:pointer; transition:background .15s; }
        .search-item:hover { background:#f8faff; }
        .search-item-img-wrap { width:68px; min-width:68px; height:68px; background:#f8faff; display:flex; align-items:center; justify-content:center; border-right:1px solid #f1f5f9; padding:8px; }
        .search-item-img-wrap img { width:100%; height:100%; object-fit:contain; }
        .search-item-body { flex:1; padding:10px 14px; min-width:0; }
        .search-item-category { font-size:10px; font-weight:700; color:#0a2463; text-transform:uppercase; letter-spacing:.06em; margin-bottom:3px; opacity:.7; }
        .search-item-name { font-size:13px; font-weight:700; color:#1e293b; line-height:1.35; margin-bottom:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
        .search-item-sub  { font-size:11px; color:#94a3b8; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
        .search-footer { display:flex; align-items:center; justify-content:space-between; padding:10px 16px; background:#f8faff; border-top:1px solid #e8edf5; }
        .search-footer-left { font-size:11px; color:#94a3b8; }
        .search-footer-btn { font-size:12px; font-weight:700; color:#0a2463; background:#fff; border:1.5px solid #0a2463; padding:5px 14px; border-radius:20px; cursor:pointer; transition:all .2s; }
        .search-footer-btn:hover { background:#0a2463; color:#fff; }
        .search-empty { padding:32px 20px; text-align:center; }
        .search-empty-title { font-size:14px; font-weight:700; color:#475569; margin-bottom:6px; }
        .search-empty-sub   { font-size:12px; color:#94a3b8; }
        mark.sh { background:#fef08a; color:#1e293b; padding:0 2px; border-radius:2px; }

        /* ══════════════════════════════════════
           MOBILE ACCORDION
        ══════════════════════════════════════ */
        .mob-sub-panel      { display:none !important; }
        .mob-sub-panel.open { display:block !important; }
        