/**
 * Mega Menu Styles
 */

/* Ensure the parent menu item allows the mega menu to break out */
.menu-item.has-mega-menu {
    position: static !important;
}

/* Hide mega menu content by default */
#mega-menu-carrelli {
    display: none;
    position: absolute;
    top: 100%;

    /* Full width technique */
    width: 100vw !important;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;

    z-index: 9999;
    background-color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 30px 0;
    /* Add vertical padding */
    border-radius: 0;
    /* Remove radius for full width */

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    transform: translateY(10px);
}

/* Active state for mega menu */
#mega-menu-carrelli.active {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Optional: Add an arrow indicator */
.menu-item.has-mega-menu>a::after {
    content: '';
    display: inline-block;
    margin-left: 6px;
    vertical-align: middle;
    border-top: 4px solid;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
    opacity: 0.5;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    #mega-menu-carrelli {
        display: none !important;
    }
}