﻿/* ===================================================================
   MEGA DROPDOWN MENÜ STİLLERİ
   ================================================================== */

/* Ana navigasyon container */
.main-nav {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0;
}

/* Mega dropdown item */
.mega-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

/* Ana kategori linkleri */
.mega-dropdown > .nav-link {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.mega-dropdown > .nav-link:hover,
.mega-dropdown.show > .nav-link {
    color: #007bff;
    border-bottom-color: #007bff;
    background-color: rgba(0, 123, 255, 0.05);
}

/* Mega menü container */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    min-width: 800px;
    max-width: 1200px;
}

/* Mega menü açık durumu */
.mega-dropdown.show .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Mega menü içeriği */
.mega-menu .container {
    padding: 30px 20px;
}

/* Mega menü grid */
.mega-menu .row {
    margin: 0 -10px;
}

.mega-menu .col-lg-3,
.mega-menu .col-md-4,
.mega-menu .col-6 {
    padding: 0 10px;
    margin-bottom: 20px;
}

/* Mega menü item */
.mega-menu-item {
    display: block;
    text-decoration: none;
    color: #333;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
    background: #fff;
    border: 1px solid #f0f0f0;
    height: 100%;
}

.mega-menu-item:hover {
    color: #007bff;
    background: #f8f9fa;
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.1);
}

/* Mega menü resim container */
.mega-menu-image {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mega-menu-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mega-menu-item:hover .mega-menu-image img {
    transform: scale(1.1);
}

/* Mega menü başlık */
.mega-menu-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    display: block;
    margin-top: 8px;
}

/* Responsive tasarım */
@media (max-width: 1199.98px) {
    .mega-menu {
        min-width: 600px;
    }
    
    .mega-menu .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 991.98px) {
    .mega-dropdown > .nav-link {
        padding: 10px 15px;
        font-size: 16px;
    }
    
    .mega-menu {
        position: static;
        width: 100%;
        min-width: auto;
        box-shadow: none;
        border: none;
        background: #f8f9fa;
        margin-top: 0;
    }
    
    .mega-menu .container {
        padding: 15px;
    }
    
    .mega-menu .col-lg-3,
    .mega-menu .col-md-4,
    .mega-menu .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 15px;
    }
    
    .mega-menu-item {
        padding: 10px;
    }
    
    .mega-menu-image {
        width: 40px;
        height: 40px;
    }
    
    .mega-menu-title {
        font-size: 12px;
    }
}

@media (max-width: 767.98px) {
    .mega-menu .col-md-4,
    .mega-menu .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Header bottom sticky durumu */
.header-bottom.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-bottom.sticky .mega-menu {
    border-top: 1px solid #e0e0e0;
}

/* Loading animasyonu */
.mega-menu-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

.mega-menu-loading .spinner-border {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 10px;
}

/* Boş durum */
.mega-menu-empty {
    text-align: center;
    padding: 40px;
    color: #666;
}

.mega-menu-empty i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ddd;
}

/* Hover efektleri için ek stiller */
.mega-dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
    z-index: 999;
}

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

.mega-menu.show {
    animation: fadeInUp 0.3s ease forwards;
}

/* Kategori sayısı badge */
.mega-menu-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #007bff;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 500;
}

/* Özel kategori ikonları */
.mega-menu-icon {
    width: 24px;
    height: 24px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 50%;
    color: #007bff;
}

.mega-menu-item:hover .mega-menu-icon {
    background: #007bff;
    color: white;
}

/* ===================================================================
   MOBİL SIDEBAR DÜZELTME STİLLERİ
   ================================================================== */

/* Mobil menü butonu */
.mobile-menu-trigger {
    border: none !important;
    background: transparent !important;
    color: #333 !important;
    font-size: 18px;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    transition: all 0.3s ease;
}

.mobile-menu-trigger:hover,
.mobile-menu-trigger:focus {
    background: #f8f9fa !important;
    color: #007bff !important;
    box-shadow: none !important;
}

/* Offcanvas genel düzeltmeler */
.mobile-sidebar {
    width: 320px !important;
    max-width: 85vw !important;
    border: none;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
}

.mobile-sidebar-header {
    background: #007bff;
    color: white;
    border-bottom: none;
    padding: 20px;
}

.mobile-sidebar-header .offcanvas-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.mobile-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    opacity: 1;
    font-size: 14px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Mobil sidebar body */
.mobile-sidebar-body {
    padding: 0;
    background: #fff;
}

/* Mobil menü section'ları */
.mobile-menu-section {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-section:last-child {
    border-bottom: none;
}

.mobile-menu-title {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

/* Kullanıcı bilgileri */
.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.mobile-user-avatar {
    width: 48px;
    height: 48px;
    background: #007bff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.mobile-user-details h6 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.mobile-user-details small {
    font-size: 12px;
    color: #666;
}

/* Mobil navigasyon */
.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-nav-item-group {
    margin-bottom: 2px;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    gap: 12px;
}

.mobile-nav-item:hover {
    background: #f8f9fa;
    color: #007bff;
    text-decoration: none;
}

.mobile-nav-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.mobile-nav-item.parent-link {
    justify-content: space-between;
    cursor: pointer;
}

.mobile-nav-item.parent-link:hover {
    background: #f0f8ff;
}

/* Alt menü stilleri */
.mobile-submenu {
    background: #f8f9fa;
    border-radius: 6px;
    margin-top: 5px;
    overflow: hidden;
}

.mobile-nav-item.sub-link {
    padding: 10px 15px 10px 35px;
    font-size: 13px;
    color: #666;
    background: transparent;
}

.mobile-nav-item.sub-link:hover {
    background: #e9ecef;
    color: #007bff;
}

.mobile-nav-item.sub-link.fw-bold {
    color: #333;
    font-weight: 600;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 5px;
}

/* Çıkış linki */
.mobile-nav-item.logout-item {
    color: #dc3545;
    border-top: 1px solid #f0f0f0;
    margin-top: 10px;
    padding-top: 15px;
}

.mobile-nav-item.logout-item:hover {
    background: #f8faf8;
    color: #dc3545;
}

/* Responsive düzeltmeler */
@media (max-width: 576px) {
    .mobile-sidebar {
        width: 280px !important;
    }
    
    .mobile-menu-section {
        padding: 15px;
    }
    
    .mobile-nav-item {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Backdrop düzeltmesi */
.offcanvas-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Animasyon düzeltmeleri */
.mobile-sidebar.show {
    transform: translateX(0) !important;
}

.mobile-sidebar:not(.show) {
    transform: translateX(-100%) !important;
}

/* Touch device optimizasyonları */
@media (hover: none) and (pointer: coarse) {
    .mobile-nav-item {
        padding: 15px;
        font-size: 16px;
    }
    
    .mobile-nav-item i {
        font-size: 18px;
    }
    
    .mobile-menu-trigger {
        padding: 12px 16px !important;
        font-size: 20px;
    }
}