/* Desktop mega menu - Alughesti-style */

.navBg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 887;
}

.navBg.none {
    display: none;
}

.navigation {
    z-index: 888;
}

.navigation .categories {
    position: relative;
}

.mega-menu-container {
    position: relative;
}

.mega-menu-wrapper {
    position: relative;
}

.mega-menu-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 0;
    color: inherit;
    font-size: 14px;
    font-weight: 500;
    padding: 13px 18px;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.mega-menu-trigger:hover,
.mega-menu-container.is-open .mega-menu-trigger {
    opacity: 0.9;
}

.mega-menu-trigger .fa-th {
    font-size: 16px;
}

.mega-menu-trigger-arrow {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.mega-menu-container.is-open .mega-menu-trigger-arrow {
    transform: rotate(180deg);
}

.mega-menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: min(1140px, calc(100vw - 48px));
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    z-index: 889;
    overflow: hidden;
}

.mega-menu-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 0;
    right: 0;
    height: 6px;
}

.mega-menu-container.is-open .mega-menu-dropdown {
    display: block;
}

.mega-menu-inner {
    display: flex;
    flex-direction: row;
    min-height: 380px;
    max-height: 70vh;
}

.mega-menu-sidebar {
    width: 260px;
    min-width: 260px;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    background: #fafafa;
    overflow-y: auto;
}

.mega-cat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: background 0.15s ease;
}

.mega-cat-item:hover,
.mega-cat-item.active {
    background: #eef4fc;
    color: #1a5fb4;
    text-decoration: none;
}

.mega-cat-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #666;
    flex-shrink: 0;
}

.mega-cat-item.active .mega-cat-icon,
.mega-cat-item:hover .mega-cat-icon {
    color: #1a5fb4;
}

.mega-cat-title {
    flex: 1;
    text-align: right;
    line-height: 1.4;
}

.mega-cat-chevron {
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
}

.mega-menu-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.mega-cat-panel {
    display: none;
    flex-direction: column;
    height: 100%;
    padding: 20px 24px;
    overflow-y: auto;
}

.mega-cat-panel.active {
    display: flex;
}

.mega-all-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1a5fb4;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    text-decoration: none;
}

.mega-all-link:hover {
    color: #0d47a1;
    text-decoration: none;
}

.mega-all-link .fa-angle-left {
    font-size: 12px;
}

.mega-columns {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0 40px;
    align-content: flex-start;
}

.mega-column {
    min-width: 160px;
    max-width: 200px;
    margin-bottom: 24px;
    text-align: right;
}

.mega-column-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #222;
    margin-bottom: 10px;
    text-decoration: none;
    line-height: 1.5;
}

.mega-column-title:hover {
    color: #1a5fb4;
    text-decoration: none;
}

.mega-column-link {
    display: block;
    font-size: 13px;
    color: #666;
    padding: 4px 0;
    text-decoration: none;
    line-height: 1.6;
    transition: color 0.15s ease;
}

.mega-column-link:hover {
    color: #1a5fb4;
    text-decoration: none;
}

.navigation .categories .nav-extra-link {
    color: inherit;
    font-size: 14px;
    padding: 13px 15px;
    text-decoration: none;
    white-space: nowrap;
}

.navigation .categories .nav-extra-link:hover {
    opacity: 0.85;
    text-decoration: none;
}

@media screen and (max-width: 991px) {
    .mega-menu-dropdown {
        width: min(900px, calc(100vw - 32px));
    }

    .mega-column {
        min-width: 140px;
        max-width: 180px;
    }
}
