/* Mega Menu Styles */

.mega-menu {
    position: relative;
}

.mega-menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    min-width: 600px;
    max-width: 800px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.mega-menu:hover .mega-menu-dropdown {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.mega-menu-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 300px;
    max-height: 500px;
}

/* Coluna 1: Categorias */
.mega-menu-categories {
    background: hsl(var(--muted));
    border-right: 1px solid hsl(var(--border));
    padding: 1rem 0;
    overflow-y: auto;
}

.mega-menu-category-item {
    padding: 0;
    transition: background 0.2s ease;
}

.mega-menu-category-item:hover {
    background: rgba(255, 255, 255, 0.5);
}

.mega-menu-category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    color: hsl(var(--foreground));
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.mega-menu-category-link:hover {
    color: hsl(var(--primary));
}

.mega-menu-category-link .arrow-right {
    opacity: 0.5;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.mega-menu-category-item:hover .arrow-right {
    opacity: 1;
    transform: translateX(4px);
}

/* Coluna 2: Itens */
.mega-menu-items {
    padding: 1.5rem;
    overflow-y: auto;
}

.mega-menu-items-group {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.mega-menu-items-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: hsl(var(--primary));
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid hsl(var(--primary));
}

.mega-menu-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mega-menu-item-link {
    display: block;
    padding: 0.5rem 0.75rem;
    color: hsl(var(--foreground));
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.mega-menu-item-link:hover {
    background: hsl(var(--muted));
    color: hsl(var(--primary));
    transform: translateX(4px);
}

/* Responsivo */
@media (max-width: 1024px) {
    .mega-menu-dropdown {
        min-width: 500px;
    }

    .mega-menu-container {
        grid-template-columns: 200px 1fr;
    }
}

@media (max-width: 768px) {
    .mega-menu-dropdown {
        display: none !important;
    }
}

/* Scrollbar personalizada */
.mega-menu-categories::-webkit-scrollbar,
.mega-menu-items::-webkit-scrollbar {
    width: 6px;
}

.mega-menu-categories::-webkit-scrollbar-track,
.mega-menu-items::-webkit-scrollbar-track {
    background: transparent;
}

.mega-menu-categories::-webkit-scrollbar-thumb,
.mega-menu-items::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.mega-menu-categories::-webkit-scrollbar-thumb:hover,
.mega-menu-items::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}
