/* ==============================================================================
   KEYWALA - UPGRADED "ALL CATEGORY" MEGA MENU STYLES
   ============================================================================== */

/* Ensure dropdown appears above sliders and carousels */
.hs-has-mega-menu {
    position: static !important;
}

.hs-has-mega-menu > .hs-mega-menu {
    border: none !important;
    background: transparent !important;
    padding: 6px 0 0 0 !important;
    box-shadow: none !important;
    z-index: 99999 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    top: 100% !important;
    position: absolute !important;
}

/* Ensure navbar containers don't clip mega menu dropdown */
.min-height-45,
.u-header__navbar,
.u-header__navbar-collapse,
.u-header__navbar--wide {
    overflow: visible !important;
}

/* Pure CSS display & visibility for hover and opened states on desktop */
@media (min-width: 768px) {
    .hs-has-mega-menu:hover > .hs-mega-menu,
    .hs-has-mega-menu.hs-mega-menu-opened > .hs-mega-menu,
    .hs-has-mega-menu.is-active > .hs-mega-menu,
    .hs-has-mega-menu.show > .hs-mega-menu {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}

.kw-megamenu-panel {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.22), 0 4px 16px rgba(0, 0, 0, 0.06) !important;
    padding: 24px 28px 18px 28px !important;
    margin: 0 auto !important;
    max-width: 1240px !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Mega Menu Top Header */
.kw-megamenu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 16px;
    gap: 16px;
    flex-wrap: wrap;
}

.kw-megamenu-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kw-megamenu-title-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #ecfdf5;
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.kw-megamenu-heading {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    margin: 0;
}

.kw-megamenu-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
}

/* Quick Filter Search */
.kw-megamenu-search-box {
    position: relative;
    min-width: 280px;
}

.kw-megamenu-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: #94a3b8;
    pointer-events: none;
    z-index: 2;
}

.kw-megamenu-search-input {
    width: 100%;
    height: 38px;
    padding: 6px 14px 6px 36px;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    font-size: 12.5px;
    color: #0f172a;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.kw-megamenu-search-input:focus {
    outline: none;
    border-color: #10b981;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.kw-megamenu-search-input::placeholder {
    color: #94a3b8;
}

.kw-megamenu-viewall-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #059669 !important;
    text-decoration: none !important;
    transition: color 0.15s ease;
}

.kw-megamenu-viewall-btn:hover {
    color: #047857 !important;
}

/* Section Header */
.kw-section-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.kw-section-title {
    font-size: 12.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #065f46;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.kw-section-count {
    background: #e2e8f0;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Antivirus Brands Grid (14 items: 7 cols on large desktop) */
.kw-brands-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.kw-brand-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 10px 8px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    min-height: 84px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

.kw-brand-card:hover {
    border-color: #10b981 !important;
    background: #f0fdf4 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 14px rgba(16, 185, 129, 0.15) !important;
}

.kw-brand-logo-wrap {
    height: 40px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.kw-brand-logo-wrap img {
    max-height: 32px !important;
    max-width: 86% !important;
    height: auto !important;
    width: auto !important;
    object-fit: contain !important;
    transition: transform 0.2s ease;
}

.kw-brand-card:hover .kw-brand-logo-wrap img {
    transform: scale(1.06);
}

.kw-brand-name {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    line-height: 1.25 !important;
    margin: 0 !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
    transition: color 0.15s ease !important;
    text-decoration: none !important;
}

.kw-brand-card:hover .kw-brand-name {
    color: #059669 !important;
}

/* Specialized Software & Utilities Grid */
.kw-software-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.kw-software-card {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.kw-software-card:hover {
    border-color: #059669 !important;
    background: #ecfdf5 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 14px rgba(5, 150, 105, 0.12) !important;
}

.kw-software-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    padding: 4px;
    transition: border-color 0.2s ease;
}

.kw-software-card:hover .kw-software-icon-wrap {
    border-color: #a7f3d0;
}

.kw-software-icon-wrap img {
    max-height: 32px !important;
    max-width: 90% !important;
    height: auto !important;
    width: auto !important;
    object-fit: contain !important;
}

.kw-software-icon-wrap i {
    font-size: 18px;
    color: #059669;
}

.kw-software-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.kw-software-name {
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.25 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    transition: color 0.15s ease !important;
    text-decoration: none !important;
}

.kw-software-card:hover .kw-software-name {
    color: #059669 !important;
}

.kw-software-sub {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mega Menu Footer Strip */
.kw-megamenu-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 12px;
    color: #475569;
    flex-wrap: wrap;
    gap: 12px;
}

.kw-footer-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #334155;
}

.kw-footer-contact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    margin-left: auto;
}

.kw-footer-contact a {
    color: #059669 !important;
    font-weight: 700;
    text-decoration: none !important;
}

/* Fallback Icon for missing images */
.kw-fallback-badge {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #ecfdf5;
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .kw-brands-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    .kw-software-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .kw-brands-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .kw-software-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .kw-megamenu-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    .kw-footer-contact {
        margin-left: 0;
    }
}

/* ==============================================================================
   HEADER SEARCH AUTOCOMPLETE DROPDOWN STYLES
   ============================================================================== */
.search_list_auto {
    position: absolute !important;
    top: calc(100% + 4px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 999999 !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.22), 0 5px 15px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid #e2e8f0 !important;
    overflow: hidden !important;
    max-height: 420px !important;
    overflow-y: auto !important;
}

.search_list_auto .list-group {
    margin: 0 !important;
    padding: 4px 0 !important;
    list-style: none !important;
}

.search_list_auto .list-group-item {
    border: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 10px 16px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    cursor: pointer !important;
    background: #ffffff !important;
    transition: background 0.15s ease !important;
    text-decoration: none !important;
}

.search_list_auto .list-group-item:last-child {
    border-bottom: none !important;
}

.search_list_auto .list-group-item:hover {
    background: #f8fafc !important;
}

.search_list_auto .list-group-item img {
    width: 42px !important;
    height: 42px !important;
    object-fit: contain !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
    padding: 3px !important;
    border: 1px solid #e2e8f0 !important;
    flex-shrink: 0 !important;
}

.search_list_auto .list-group-item span {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    line-height: 1.3 !important;
}

.search_list_auto .list-group-item:hover span {
    color: #008746 !important;
}

.search_list_auto .badge-soft-success {
    background-color: #ecfdf5 !important;
    color: #059669 !important;
    border: 1px solid #a7f3d0 !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
}

