/* ============================================
   MCDODO-STYLE MEGA MENU
   Matches Mcdodo's exact design with full-width dropdown
   ============================================ */

/* Main navigation container */
.main-nav {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1 1 auto;
    justify-content: center;
    max-width: 100%;
    overflow: visible;
}

.nav-list-mega {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.25rem;
}

.nav-item-mega {
    position: relative;
}

.nav-link-mega {
    display: block;
    padding: 1.5rem 0.85rem;
    color: inherit;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    transition: color 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-link-mega:hover,
.nav-link-mega.active {
    color: #ff6b00;
}

.nav-link-mega.has-dropdown::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    margin-left: 0.5rem;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.nav-item-mega:hover .nav-link-mega.has-dropdown::after {
    transform: rotate(180deg);
}

/* Mega Menu Dropdown - Full Width */
.mega-menu-dropdown {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    width: 100%;
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
}

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

/* Mega Menu Content Container */
.mega-menu-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2.5rem 2rem;
    box-sizing: border-box;
}

/* Mega Menu Column */
.mega-menu-column {
    display: flex;
    flex-direction: column;
}

.mega-menu-category {
    margin-bottom: 1.5rem;
}

.mega-menu-category-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 1rem;
    text-decoration: none;
    display: block;
    transition: color 0.3s ease;
}

.mega-menu-category-title:hover {
    color: #ff6b00;
}

.mega-menu-subcategories {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mega-menu-subcategory-link {
    font-size: 0.875rem;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
}

.mega-menu-subcategory-link:hover {
    color: #ff6b00;
    transform: translateX(4px);
}

/* Mega Menu Bottom Banner (optional) */
.mega-menu-banner {
    grid-column: 1 / -1;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mega-menu-banner-link {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: #f8f8f8;
    border-radius: 8px;
    text-decoration: none;
    color: #1a1a1a;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
}

.mega-menu-banner-link:hover {
    background: #ff6b00;
    color: white;
}

/* Active state for Products menu */
.nav-link-mega.active-menu {
    color: #ff6b00;
}

/* Dark Mode Styles */
[data-theme="dark"] .mega-menu-dropdown {
    background: #1a1a1a;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .mega-menu-category-title {
    color: #f8f8f8;
}

[data-theme="dark"] .mega-menu-subcategory-link {
    color: #b8b8b8;
}

[data-theme="dark"] .mega-menu-subcategory-link:hover {
    color: #ff6b00;
}

[data-theme="dark"] .mega-menu-banner {
    border-top: 1px solid #333;
}

[data-theme="dark"] .mega-menu-banner-link {
    background: #2a2a2a;
    color: #f8f8f8;
}

[data-theme="dark"] .mega-menu-banner-link:hover {
    background: #ff6b00;
    color: white;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .mega-menu-content {
        grid-template-columns: repeat(4, 1fr);
        gap: 3rem 2rem;
        padding: 3rem;
    }
}

@media (max-width: 992px) {
    .mega-menu-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem 2rem;
        padding: 2.5rem 2rem;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none; /* Hide on mobile, use mobile menu instead */
    }
    
    .mega-menu-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem 1.5rem;
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .mega-menu-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.5rem 1rem;
    }
}

/* Animation for menu items */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-item-mega:hover .mega-menu-category {
    animation: fadeInUp 0.3s ease-out forwards;
}

.nav-item-mega:hover .mega-menu-category:nth-child(1) { animation-delay: 0.05s; }
.nav-item-mega:hover .mega-menu-category:nth-child(2) { animation-delay: 0.1s; }
.nav-item-mega:hover .mega-menu-category:nth-child(3) { animation-delay: 0.15s; }
.nav-item-mega:hover .mega-menu-category:nth-child(4) { animation-delay: 0.2s; }
.nav-item-mega:hover .mega-menu-category:nth-child(5) { animation-delay: 0.25s; }

/* ============================================
   RESPONSIVE DESIGN FOR SMALLER SCREENS
   ============================================ */

/* Large tablets and small desktops (1024px - 1280px) */
@media (max-width: 1280px) {
    .nav-link-mega {
        padding: 1.5rem 0.75rem;
        font-size: 0.8125rem;
    }
    
    .header-content {
        gap: 0.75rem;
    }
    
    .search-input {
        width: 150px;
    }
    
    .mega-menu-content {
        padding: 2rem 1.5rem;
        gap: 2rem 1.5rem;
    }
}

/* Tablets and small laptops (900px - 1024px) */
@media (max-width: 1024px) {
    .nav-link-mega {
        padding: 1.5rem 0.6rem;
        font-size: 0.8125rem;
    }
    
    .nav-list-mega {
        gap: 0.15rem;
    }
    
    .header-content {
        gap: 0.5rem;
    }
    
    .search-input {
        width: 130px;
        font-size: 0.85rem;
    }
    
    .logo h1 {
        font-size: 1.4rem;
    }
    
    .mega-menu-content {
        padding: 1.75rem 1.25rem;
        gap: 1.5rem 1.25rem;
        grid-template-columns: repeat(4, 1fr);
    }
    
    .mega-menu-dropdown {
        max-height: 65vh;
    }
}

/* Smaller tablets (768px - 900px) */
@media (max-width: 900px) {
    .nav-link-mega {
        padding: 1.5rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .nav-list-mega {
        gap: 0.1rem;
    }
    
    .mega-menu-dropdown {
        font-size: 0.85rem;
        max-height: 60vh;
    }
    
    .mega-menu-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem 1rem;
        padding: 1.5rem 1rem;
    }
    
    .mega-menu-category {
        margin-bottom: 1.25rem;
    }
}

/* Mobile and very small screens (< 768px) */
@media (max-width: 768px) {
    /* Hide desktop mega menu on mobile */
    .nav-list-mega {
        display: none;
    }
    
    .main-nav {
        display: none;
    }
}

