/**
 * Header Menu Categories & Mega Menu Styles
 * 
 * @package ChildTheme_Clean
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* Header Menu Categories Container - Hidden by default */
.header-menu-categories {
    display: none !important;
}

.menu-categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.menu-category-item {
    position: relative;
    margin: 0;
    padding: 0;
}

.menu-category-link {
    display: block;
    padding: 0.75rem 1rem;
    color: #000000;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.5;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: 0.01em;
}

.menu-category-link:hover,
.menu-category-link:focus,
.menu-category-link:active {
    color: #000000;
    text-decoration: none;
    background-color: transparent;
}

/* Mega Menu - Hidden by default on mobile */
.mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    padding: 0;
    margin: 0;
}

.mega-menu-content {
    padding: 0;
}

.mega-menu-column {
    min-width: 200px;
}

.mega-menu-heading {
    margin: 0 0 1rem 0;
    padding: 0;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #000000;
}

.mega-menu-heading-link {
    color: #000000;
    text-decoration: none;
    display: block;
}

.mega-menu-heading-link:hover,
.mega-menu-heading-link:focus,
.mega-menu-heading-link:active {
    color: #000000;
    text-decoration: none;
}

.mega-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mega-menu-item {
    margin: 0;
    padding: 0;
}

.mega-menu-link {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #000000;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.6;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: 0.01em;
}

.mega-menu-link:hover,
.mega-menu-link:focus,
.mega-menu-link:active {
    color: #000000;
    text-decoration: none;
    background-color: transparent;
}

/* Desktop Styles - Enable mega menu on hover */
@media (min-width: 992px) {
    .header-menu-categories {
        display: block !important;
    }

    .menu-categories-list {
        flex-direction: row;
        align-items: center;
        gap: 0;
    }

    .menu-category-item {
        position: relative;
    }

    .menu-category-link {
        padding: 0.75rem 1.25rem;
        border-bottom: none;
        white-space: nowrap;
        font-weight: 500;
    }

    /* Show mega menu on hover (desktop only) - instant, no transitions */
    .menu-category-item.has-children:hover .mega-menu,
    .menu-category-item.has-children:focus-within .mega-menu {
        display: block;
    }

    /* Premium Mega Menu Styling */
    .header-menu-categories {
        position: relative !important;
        overflow: visible !important;
    }

    .menu-categories-list {
        position: relative;
        overflow: visible;
    }

    .menu-category-item.has-children {
        position: relative;
    }

    /* Mega menu - positioned directly below the menu item */
    .menu-category-item.has-children .mega-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: auto;
        min-width: 600px;
        max-width: 1200px;
        background-color: #ffffff;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        z-index: 1001;
        padding: 0;
        margin-top: 0;
    }

    .mega-menu-content {
        padding: 2.5rem 2rem;
        display: flex;
        gap: 0;
    }

    .mega-menu-column {
        min-width: 200px;
        padding-right: 2.5rem;
    }

    .mega-menu-column:last-child {
        padding-right: 0;
    }

    .mega-menu-heading {
        margin: 0 0 1rem 0;
        padding: 0;
        font-size: 0.875rem;
        font-weight: 600;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        letter-spacing: 0.02em;
        text-transform: uppercase;
        color: #000000;
    }

    .mega-menu-heading-link {
        color: #000000;
        text-decoration: none;
        display: block;
    }

    .mega-menu-heading-link:hover,
    .mega-menu-heading-link:focus,
    .mega-menu-heading-link:active {
        color: #000000;
        text-decoration: none;
    }

    .mega-menu-list {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .mega-menu-item {
        margin: 0;
        padding: 0;
    }

    .mega-menu-link {
        padding: 0.5rem 0;
        font-size: 0.875rem;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        font-weight: 400;
        letter-spacing: 0.01em;
        line-height: 1.5;
        color: #000000;
        text-decoration: none;
        display: block;
    }

    .mega-menu-link:hover,
    .mega-menu-link:focus,
    .mega-menu-link:active {
        color: #000000;
        text-decoration: none;
        background-color: transparent;
    }
}

/* Mobile: Keep mega menu hidden */
@media (max-width: 991px) {
    .header-menu-categories {
        display: none !important;
        visibility: hidden !important;
    }

    .mega-menu {
        display: none !important;
    }
}