/* ==========================================================================
   ZIJAZO Mega Menu - Yadea Style Design
   Two-level: Categories -> Products
   ========================================================================== */

/* Menu Wrapper - Positioned below header */
.mega-menu-wrapper {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1001;
}

.nav-item.has-dropdown:hover .mega-menu-wrapper,
.mega-menu-wrapper:hover {
    display: block;
}

/* Category Tabs */
.menu-categories {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    background: #fafafa;
}

.menu-category-tab {
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
    border: none;
    background: none;
}

.menu-category-tab:hover,
.menu-category-tab.active {
    color: var(--color-primary);
}

.menu-category-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--color-primary);
}

/* Category divider */
.menu-categories .divider {
    color: #d1d5db;
    margin: 0 1.5rem;
    font-weight: 300;
}

/* Products Section */
.menu-products-section {
    padding: 2.5rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.menu-subtitle {
    font-size: 1rem;
    font-weight: 400;
    color: #6b7280;
    margin-bottom: 1.5rem;
    text-align: left;
    font-style: italic;
    letter-spacing: 0.02em;
}

/* Products Grid - Large Icons */
.menu-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
}

.menu-product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
    background: #ffffff;
}

.menu-product-card:hover {
    background: #f8fafc;
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 102, 204, 0.1);
}

.menu-product-image {
    width: 100%;
    height: 160px;
    object-fit: contain;
    margin-bottom: 1.25rem;
    transition: transform 0.3s ease;
}

.menu-product-card:hover .menu-product-image {
    transform: scale(1.05);
}

.menu-product-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.menu-product-tag {
    font-size: 0.625rem;
    font-weight: 800;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.menu-product-tag.hot {
    background: #ff6b00;
    color: white;
}

.menu-product-tag.new {
    background: #10b981;
    color: white;
}

.menu-product-features {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
}

.menu-product-features span {
    margin: 0 0.25rem;
}

.menu-product-features .separator {
    color: #d1d5db;
}

/* Hide all product panels by default */
.menu-products-panel {
    display: none;
}

.menu-products-panel.active {
    display: block;
}

/* Menu Footer */
.menu-footer {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #fafafa;
}

.menu-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--color-primary);
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.menu-footer-link:hover {
    background: var(--color-primary);
    color: white;
}

/* Dropdown Menu - Energy (Simple) */
.dropdown-menu {
    position: fixed;
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    min-width: 320px;
    display: none;
    z-index: 999;
    border-top: 3px solid var(--color-secondary);
}

.nav-item.has-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.dropdown-menu a:hover {
    background: #f3f4f6;
    color: var(--color-primary);
}

.dropdown-menu a i {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: white;
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 1024px) {
    .mega-menu-wrapper {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: none !important;
        box-shadow: none !important;
        background: #f8fafc !important;
        z-index: auto !important;
        width: 100% !important;
        max-height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .nav-item.has-dropdown.active .mega-menu-wrapper {
        display: block !important;
        height: auto !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
    }
    
    /* Mobile: Vertical category tabs */
    .menu-categories {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
        padding: 0 !important;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .menu-categories .divider {
        display: none;
    }
    
    .menu-category-tab {
        display: block !important;
        width: 100% !important;
        text-align: left !important;
        padding: 0.75rem 1.5rem !important;
        font-size: 0.875rem !important;
        border-bottom: 1px solid #e5e7eb !important;
        background: transparent !important;
    }
    
    .menu-category-tab:last-child {
        border-bottom: none !important;
    }
    
    .menu-category-tab.active {
        background: #e5e7eb !important;
        color: #0066cc !important;
    }
    
    /* Mobile: Simplified text-only menu */
    .menu-products-section {
        padding: 0;
    }
    
    .menu-products-panel {
        display: none;
    }
    
    .menu-products-panel.active {
        display: block;
    }
    
    /* Hide subtitle and complex grid on mobile */
    .menu-subtitle {
        display: none;
    }
    
    .menu-products-grid {
        display: block;
        padding: 0;
    }
    
    /* Mobile: Simple list style */
    .menu-product-card {
        display: block;
        padding: 0.75rem 1.5rem;
        border-bottom: 1px solid #e5e7eb;
        background: transparent;
        text-decoration: none;
    }
    
    .menu-product-card:hover {
        background: #e5e7eb;
    }
    
    /* Hide images on mobile */
    .menu-product-card img,
    .menu-product-image {
        display: none;
    }
    
    /* Simplified product name */
    .menu-product-name {
        font-size: 0.9375rem;
        font-weight: 600;
        color: #1f2937;
        display: block;
        margin: 0;
    }
    
    /* Hide tags on mobile */
    .menu-product-tag {
        display: none;
    }
    
    /* Hide features on mobile */
    .menu-product-features {
        display: none;
    }
    
    /* Hide footer buttons on mobile */
    .menu-footer {
        display: none;
    }
}
