/* ===== MODERN MEGA MENU STYLES ===== */

/* Modern Mega Menu Container */
.modern-mega-menu {
    background: #ffffff !important;
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 0;
    margin-top: 0.5rem;
    min-width: 400px;
    overflow: hidden;
}

/* Menu Headings */
.modern-mega-menu .menu-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: white !important;
    margin-bottom: 0;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary, #E43131) 0%, #c62828 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modern-mega-menu .menu-heading-icon {
    color: white !important;
    font-size: 1rem;
}

/* Categories Grid */
.modern-mega-menu .categories-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    background: #ffffff !important;
}

/* Category Items */
.modern-mega-menu .category-item {
    position: relative;
    margin-bottom: 0;
    border-bottom: 1px solid #f0f0f0;
    background: #ffffff !important;
}

.modern-mega-menu .category-item:last-child {
    border-bottom: none;
}

/* Menu Link Text */
.modern-mega-menu .menu-link-text {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    color: #333333 !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: #ffffff !important;
}

.modern-mega-menu .menu-link-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(228, 49, 49, 0.1), transparent);
    transition: left 0.5s ease;
}

.modern-mega-menu .menu-link-text:hover::before {
    left: 100%;
}

.modern-mega-menu .menu-link-text:hover {
    background: #f8f9fa !important;
    color: var(--primary, #E43131) !important;
    text-decoration: none;
    transform: translateX(5px);
}

.modern-mega-menu .menu-link-text:active {
    background: #e9ecef !important;
    transform: translateX(3px);
}

/* Menu Link Icon */
.modern-mega-menu .menu-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(228, 49, 49, 0.1);
    border-radius: 6px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.modern-mega-menu .menu-link-text:hover .menu-link-icon {
    background: rgba(228, 49, 49, 0.2);
    transform: scale(1.05);
}

.modern-mega-menu .menu-link-icon .icon {
    color: var(--primary, #E43131) !important;
    font-size: 16px;
    transition: all 0.3s ease;
}

.modern-mega-menu .menu-link-text:hover .menu-link-icon .icon {
    color: var(--primary, #E43131) !important;
    transform: scale(1.1);
}

/* Menu Link Label */
.modern-mega-menu .menu-link-label {
    flex: 1;
    font-weight: 500;
    color: inherit !important;
}

/* Menu Link Badge */
.modern-mega-menu .menu-link-badge {
    background: var(--primary, #E43131) !important;
    color: white !important;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
    margin-left: auto;
    margin-right: 0.5rem;
}

/* Submenu Indicator */
.modern-mega-menu .submenu-indicator {
    color: #666666 !important;
    font-size: 12px;
    transition: all 0.3s ease;
}

.modern-mega-menu .menu-link-text:hover .submenu-indicator {
    color: var(--primary, #E43131) !important;
    transform: translateX(3px);
}

/* Category and Brand Icons */
.modern-mega-menu .category-icon,
.modern-mega-menu .brand-icon {
    width: 20px;
    height: 20px;
    object-fit: cover;
    border-radius: 4px;
}

/* Submenu Styles */
.modern-mega-menu .category-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f8f9fa !important;
    border-left: 3px solid var(--primary, #E43131);
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
}

.modern-mega-menu .category-item:hover .category-submenu {
    max-height: 300px;
}

.modern-mega-menu .sub-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem 0.75rem 2rem;
    color: #666666 !important;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border-left: 2px solid transparent;
    background: #f8f9fa !important;
}

.modern-mega-menu .sub-link:hover {
    background: rgba(228, 49, 49, 0.1) !important;
    color: var(--primary, #E43131) !important;
    border-left-color: var(--primary, #E43131);
    text-decoration: none;
}

.modern-mega-menu .submenu-arrow {
    color: #666666 !important;
    font-size: 10px;
    transition: all 0.3s ease;
}

.modern-mega-menu .sub-link:hover .submenu-arrow {
    color: var(--primary, #E43131) !important;
    transform: translateX(2px);
}

/* Empty State */
.modern-mega-menu .empty-state {
    padding: 2rem;
    text-align: center;
    background: #ffffff !important;
}

.modern-mega-menu .empty-state-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #999999 !important;
}

.modern-mega-menu .empty-state-icon {
    font-size: 2rem;
    opacity: 0.5;
    color: #999999 !important;
}

/* Responsive Design */
@media (max-width: 991px) {
    .modern-mega-menu {
        padding: 0;
        min-width: 300px;
    }
    
    .modern-mega-menu .categories-grid {
        gap: 0;
    }
    
    .modern-mega-menu .menu-link-text {
        padding: 0.875rem 1rem;
        font-size: 0.85rem;
    }
    
    .modern-mega-menu .menu-link-icon {
        width: 28px;
        height: 28px;
    }
    
    .modern-mega-menu .menu-link-icon .icon {
        font-size: 14px;
    }
    
    .modern-mega-menu .menu-heading {
        padding: 0.875rem 1rem;
        font-size: 0.8rem;
    }
    
    .modern-mega-menu .sub-link {
        padding: 0.625rem 1rem 0.625rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .modern-mega-menu {
        min-width: 280px;
    }
    
    .modern-mega-menu .menu-heading {
        padding: 0.75rem 0.875rem;
    }
    
    .modern-mega-menu .menu-link-text {
        padding: 0.75rem 0.875rem;
    }
    
    .modern-mega-menu .sub-link {
        padding: 0.5rem 0.875rem 0.5rem 1.25rem;
    }
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Stagger animation for menu items */
.modern-mega-menu .category-item {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.modern-mega-menu .category-item:nth-child(1) { animation-delay: 0.1s; }
.modern-mega-menu .category-item:nth-child(2) { animation-delay: 0.2s; }
.modern-mega-menu .category-item:nth-child(3) { animation-delay: 0.3s; }
.modern-mega-menu .category-item:nth-child(4) { animation-delay: 0.4s; }
.modern-mega-menu .category-item:nth-child(5) { animation-delay: 0.5s; }
.modern-mega-menu .category-item:nth-child(6) { animation-delay: 0.6s; }
.modern-mega-menu .category-item:nth-child(7) { animation-delay: 0.7s; }
.modern-mega-menu .category-item:nth-child(8) { animation-delay: 0.8s; }

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .modern-mega-menu .menu-link-text,
    .modern-mega-menu .menu-link-icon,
    .modern-mega-menu .submenu-indicator,
    .modern-mega-menu .category-submenu {
        transition: none;
    }
    
    .modern-mega-menu .category-item {
        animation: none;
        opacity: 1;
    }
    
    .modern-mega-menu .menu-link-text:hover {
        transform: none;
    }
    
    .modern-mega-menu .menu-link-text:hover .menu-link-icon {
        transform: none;
    }
    
    .modern-mega-menu .menu-link-text:hover .submenu-indicator {
        transform: none;
    }
}

/* ===== LEGACY STYLES (for backward compatibility) ===== */

/* Shop Dropdown Styles */
.category-icon,
.brand-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    object-fit: cover;
    border-radius: 2px;
}

.submenu-indicator {
    float: right;
    font-size: 12px;
    color: #666;
}

/* Category hover functionality */
.category-item {
    position: relative;
}

.category-item .category-submenu {
    display: none !important;
    position: relative;
    background: #f8f9fa !important;
    border-left: 3px solid #007bff;
    margin: 5px 0 5px 15px;
    padding: 5px 0;
    border-radius: 0 4px 4px 0;
    overflow: hidden;
}

.category-item:hover .category-submenu {
    display: block !important;
}

.category-item:hover .submenu-indicator {
    color: #333;
    transform: rotate(90deg);
    transition: transform 0.2s ease;
}

.category-submenu .sub-link {
    display: block;
    padding: 6px 15px;
    color: #666 !important;
    text-decoration: none;
    font-size: 0.9em;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-left: 2px solid transparent;
    background: #f8f9fa !important;
}

.category-submenu .sub-link:hover {
    background-color: #e9ecef !important;
    color: #333 !important;
    border-left-color: #007bff;
}

/* Override any existing sub-menu-list styles */
.menu-list .category-item .sub-menu-list.category-submenu {
    display: none !important;
}

.menu-list .category-item:hover .sub-menu-list.category-submenu {
    display: block !important;
}

.sub-menu-list {
    margin-left: 15px;
    margin-top: 5px;
    list-style: none;
    padding-left: 0;
}

.sub-menu-list .sub-link {
    font-size: 0.9em;
    color: #666 !important;
    padding: 2px 0;
}

.sub-menu-list .sub-link:hover {
    color: #333 !important;
}

.menu-link-text .icon {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

.empty-state-icon {
    font-size: 48px;
    opacity: 0.3;
    color: #999999 !important;
}

/* Mega menu improvements */
.mega-menu .mega-menu-item {
    padding: 15px 0;
}

.mega-menu .menu-heading {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mega-menu .menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu .menu-list li {
    margin-bottom: 8px;
}

.mega-menu .menu-link-text {
    color: #666 !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 5px 0;
    transition: color 0.2s ease;
}

.mega-menu .menu-link-text:hover {
    color: #333 !important;
    text-decoration: none;
}

/* Featured products section */
.wrapper-sub-shop .card-product {
    margin-bottom: 15px;
}

.wrapper-sub-shop .card-product-info .title {
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 5px;
}

.wrapper-sub-shop .price {
    font-size: 13px;
}

.wrapper-sub-shop .old-price {
    text-decoration: line-through;
    color: #999;
    margin-right: 5px;
}

.wrapper-sub-shop .current-price {
    color: #e74c3c;
    font-weight: 600;
} 