/* ==================== MEGA MENU STYLES ==================== */

.mega-menu-nav {
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
    position: relative;
    z-index: 100;
}

.mega-menu-list {
    display: flex;
    justify-content: space-around;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.mega-menu-item {
    position: relative;
    flex: 1;
}

.mega-menu-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 15px;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
    white-space: nowrap;
    background: transparent;
    border-bottom: 3px solid transparent;
}

.mega-menu-link i:first-child {
    font-size: 18px;
    color: #007bff;
}

.mega-menu-link i:last-child {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.mega-menu-link:hover {
    background: #fff;
    color: #007bff;
    border-bottom-color: #007bff;
}

.mega-menu-item:hover .mega-menu-link i:last-child {
    transform: rotate(180deg);
}

/* Mega Menu Dropdown */
.mega-menu-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 1200px;
    max-width: calc(100vw - 40px);
    background: #fff;
    border: 2px solid #e0e0e0;
    border-top: 4px solid #007bff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-top: 10px;
    z-index: 1000;
    overflow: hidden;
}

/* İlk item - sola yasla */
.mega-menu-item:first-child .mega-menu-dropdown,
.mega-menu-item:nth-child(1) .mega-menu-dropdown,
.mega-menu-item:nth-child(2) .mega-menu-dropdown {
    left: 0;
    transform: translateX(0);
}

/* Son item - sağa yasla */
.mega-menu-item:last-child .mega-menu-dropdown,
.mega-menu-item:nth-last-child(1) .mega-menu-dropdown,
.mega-menu-item:nth-last-child(2) .mega-menu-dropdown {
    left: auto;
    right: 0;
    transform: translateX(0);
}

.mega-menu-item:hover .mega-menu-dropdown {
    opacity: 1;
    visibility: visible;
    margin-top: 0;
}

.mega-menu-content {
    padding: 0;
}

.mega-menu-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    padding: 25px 30px;
    margin: 0;
    color: #fff;
}

.mega-menu-header h4 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mega-menu-header p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 400;
}

/* Mega Menu Columns */
.mega-menu-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 30px;
    background: #fff;
}

.mega-menu-column {
    padding: 0 20px;
    border-right: 1px solid #e8eaed;
}

.mega-menu-column:last-child {
    border-right: none;
}

.mega-menu-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mega-menu-column li {
    margin-bottom: 4px;
}

.mega-menu-column a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 10px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    line-height: 1.4;
}

.mega-menu-column a:hover {
    background: #e3f2fd;
    color: #007bff;
    border-left-color: #007bff;
    padding-left: 13px;
}

.mega-menu-column .product-count {
    flex-shrink: 0;
    font-size: 11px;
    color: #666;
    font-weight: 600;
    background: #f5f5f5;
    padding: 3px 10px;
    border-radius: 12px;
    min-width: 45px;
    text-align: center;
}

/* Mega Menu Footer */
.mega-menu-footer {
    padding: 25px 30px;
    background: #f8f9fa;
    text-align: center;
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 40px;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.view-all-link:hover {
    background: #0056b3;
    color: #fff;
    letter-spacing: 1.2px;
}

.view-all-link i {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.view-all-link:hover i {
    transform: translateX(5px);
}

/* Mobile Hide */
@media (max-width: 768px) {
    .mega-menu-nav {
        display: none !important;
    }
}

/* Tablet Responsive */
@media (max-width: 1024px) {
    .mega-menu-list {
        flex-wrap: wrap;
    }
    
    .mega-menu-link {
        padding: 12px 10px;
        font-size: 13px;
    }
    
    .mega-menu-link i:first-child {
        font-size: 16px;
    }
    
    .mega-menu-dropdown {
        width: 900px;
        max-width: calc(100vw - 30px);
    }
    
    /* Tüm dropdownlar için safe positioning */
    .mega-menu-item .mega-menu-dropdown {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
    
    .mega-menu-columns {
        grid-template-columns: repeat(3, 1fr);
        gap: 0;
        padding: 20px;
    }
    
    .mega-menu-column {
        padding: 0 15px;
    }
    
    .mega-menu-header {
        padding: 20px;
    }
    
    .mega-menu-footer {
        padding: 20px;
    }
}

/* Küçük ekranlar */
@media (max-width: 900px) {
    .mega-menu-link {
        padding: 10px 8px;
        font-size: 12px;
    }
    
    .mega-menu-link span {
        display: none;
    }
    
    .mega-menu-link i:first-child {
        font-size: 20px;
    }
    
    .mega-menu-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}
