/* Mega Menu Styles - Advanced Dropdown System */

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

.mega-menu-dropdown {
    position: absolute;
    top: calc(100% + 1rem);
    left: 0;
    min-width: 600px;
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25),
                0 0 0 1px rgba(255, 255, 255, 0.5),
                0 0 40px rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-1rem) scale(0.95);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1000;
    overflow: hidden;
}

.mega-menu-wrapper:hover .mega-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.mega-menu-container {
    padding: 2rem;
}

.mega-menu-grid {
    display: grid;
    gap: 2rem;
    align-items: start;
}

.mega-menu-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Standard Menu Items in Mega Menu */
.mega-menu-children .mega-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-decoration: none;
    color: #1f2937;
}

.mega-menu-children .mega-menu-item:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(79, 70, 229, 0.1));
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.mega-menu-children .mega-menu-item i {
    color: #3b82f6;
    font-size: 1.125rem;
}

.mega-menu-children .mega-menu-item span {
    font-weight: 600;
    font-size: 0.9375rem;
}

.mega-menu-children .mega-menu-item small {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Widget Styles */
.mega-menu-widget {
    padding: 1.25rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.mega-menu-widget:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.mega-menu-widget-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(59, 130, 246, 0.2);
}

.mega-menu-widget-content {
    color: #4b5563;
    font-size: 0.875rem;
    line-height: 1.6;
}

.mega-menu-widget-image {
    border-radius: 0.75rem;
    overflow: hidden;
    margin-top: 0.5rem;
}

.mega-menu-widget-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.mega-menu-widget-image:hover img {
    transform: scale(1.05);
}

.mega-menu-widget-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #3b82f6, #4f46e5);
    color: white;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
}

.mega-menu-widget-button:hover {
    background: linear-gradient(135deg, #2563eb, #4338ca);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

/* Products Section */
.mega-menu-products {
    grid-column: span 1;
}

.mega-menu-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(59, 130, 246, 0.2);
}

.mega-menu-products-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mega-menu-product-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.mega-menu-product-card:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.mega-menu-product-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #f3f4f6;
}

.mega-menu-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mega-menu-product-info {
    flex: 1;
    min-width: 0;
}

.mega-menu-product-info h5 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.mega-menu-product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.mega-menu-product-price .sale-price,
.mega-menu-product-price .price {
    font-weight: 700;
    color: #3b82f6;
}

.mega-menu-product-price .original-price {
    font-size: 0.75rem;
    color: #9ca3af;
    text-decoration: line-through;
}

/* Categories Section */
.mega-menu-categories {
    grid-column: span 1;
}

.mega-menu-categories-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mega-menu-category-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.mega-menu-category-item:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.mega-menu-category-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #f3f4f6;
}

.mega-menu-category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mega-menu-category-info {
    flex: 1;
    min-width: 0;
}

.mega-menu-category-info h5 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.mega-menu-category-info p {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
    margin: 0;
}

/* Widget Widths */
.widget-width-full {
    width: 100%;
}

.widget-width-half {
    width: 50%;
}

.widget-width-third {
    width: 33.333%;
}

.widget-width-quarter {
    width: 25%;
}

/* Responsive */
@media (max-width: 1024px) {
    .mega-menu-dropdown {
        min-width: 500px;
        max-width: 90vw;
    }
    
    .mega-menu-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .mega-menu-dropdown {
        min-width: calc(100vw - 2rem);
        left: 50%;
        transform: translateX(-50%) translateY(-1rem) scale(0.95);
    }
    
    .mega-menu-wrapper:hover .mega-menu-dropdown {
        transform: translateX(-50%) translateY(0) scale(1);
    }
    
    .mega-menu-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Animation */
@keyframes megaMenuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-1rem) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.mega-menu-dropdown {
    animation: megaMenuFadeIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
