/**
 * HEADER VE MENÜ MOBİL RESPONSIVE CSS
 * Üst menü, logo, sepet ve hamburger menü optimizasyonları
 */

/* ===== MASAÜSTÜNDE MOBİL MENÜYÜ GİZLE ===== */
.mobile-menu-button {
    display: none !important; /* Varsayılan olarak gizli */
}

.mobile-menulist {
    display: none !important; /* Varsayılan olarak gizli */
}

/* ===== MOBILE.CSS OVERRIDE (Eski stil kurallarını geçersiz kıl) ===== */
@media only screen and (max-width: 767px) {
    /* mobile.css'deki eski menü stilini geçersiz kıl */
    .mobile-menulist {
        left: auto !important; /* SOL tarafı kullanma! */
        display: block !important; /* Mobilde göster */
    }
}

/* ===== MOBİL HEADER (767px altı) ===== */
@media only screen and (max-width: 767px) {
    
    /* Top bar düzeltmeleri */
    #topmenu {
        display: none !important; /* Üst kırmızı bar'ı mobilde gizle */
    }
    
    /* Logo ve üst alan */
    #top {
        padding: 10px 0;
    }
    
    #top .box {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        padding: 0 15px;
    }
    
    #top .logo {
        width: 140px !important;
        margin: 0 !important;
        flex-shrink: 0;
    }
    
    #top .logo img {
        width: 100%;
        height: auto;
    }
    
    /* Menü Top (Sepet ve User) */
    #top .menuTop {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-left: auto;
    }
    
    #top .menuTop .search {
        display: none !important; /* Mobilde arama kutusunu gizle */
    }
    
    #top .menuTop .basket {
        order: 1;
    }
    
    #top .menuTop .basket a {
        display: flex;
        align-items: center;
        gap: 5px;
        font-size: 0; /* Text'i gizle, sadece ikon */
    }
    
    #top .menuTop .basket img {
        width: 20px !important;
        height: 20px;
    }
    
    #top .menuTop .basket .count {
        position: static !important;
        margin: 0;
        font-size: 12px !important;
    }
    
    #top .menuTop .user {
        order: 2;
    }
    
    #top .menuTop .user .dropdown-toggle {
        font-size: 0; /* Text'i gizle */
        padding: 5px;
    }
    
    #top .menuTop .user img {
        width: 20px !important;
        height: 20px;
    }
    
    #top .menuTop .user .text {
        display: none; /* Mobilde kullanıcı text'ini gizle */
    }
    
    /* Hamburger menü butonu - Sadece mobilde göster */
    .mobile-menu-button {
        display: flex !important; /* Mobilde göster */
        align-items: center !important;
        justify-content: center !important;
        order: 3;
        background: #e61b5d !important;
        border: none !important;
        border-radius: 6px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 20px !important;
        color: #fff !important;
        padding: 0 !important;
        cursor: pointer !important;
        z-index: 1000 !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 2px 8px rgba(230, 27, 93, 0.3) !important;
    }
    
    .mobile-menu-button:hover {
        background: #c41650 !important;
        transform: scale(1.05) !important;
    }
    
    .mobile-menu-button:active {
        transform: scale(0.95) !important;
    }
    
    /* Ana menü - Mobilde gizle */
    .menubg {
        display: none !important; /* Desktop menüyü mobilde gizle */
    }
    
    /* Mobil menü butonunu göster */
    .mobile-menu-button {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: none !important;
        border: none !important;
        color: #2c3e50 !important;
        font-size: 20px !important;
        padding: 10px !important;
        cursor: pointer !important;
    }
    
    /* Mobil menü stilleri */
    .mobile-menulist {
        position: fixed !important;
        top: 0 !important;
        right: -350px !important; /* Başlangıçta sağda gizli */
        left: auto !important; /* Sol değil sağ! */
        width: 300px !important;
        max-width: 85% !important;
        height: 100vh !important;
        background: #fff !important;
        box-shadow: -5px 0 20px rgba(0,0,0,0.2) !important;
        z-index: 99999 !important;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        overflow-y: auto !important;
        padding: 0 !important;
    }
    
    .mobile-menulist.activeMenu {
        right: 0 !important; /* Açıldığında sağa yapış */
    }
    
    .mobile-menulist .clickClose {
        display: block !important;
        text-align: right !important;
        font-size: 28px !important;
        color: #e61b5d !important;
        cursor: pointer !important;
        padding: 20px !important;
        background: #f8f9fa !important;
        border-bottom: 2px solid #e61b5d !important;
        margin: 0 !important;
    }
    
    .mobile-menulist .clickClose:hover {
        background: #e61b5d !important;
        color: #fff !important;
    }
    
    .mobile-menulist ul {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .mobile-menulist ul li {
        border-bottom: 1px solid #eee !important;
        margin: 0 !important;
    }
    
    .mobile-menulist ul li a {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 16px 20px !important;
        color: #333 !important;
        text-decoration: none !important;
        font-size: 15px !important;
        font-weight: 500 !important;
        transition: all 0.3s ease !important;
    }
    
    .mobile-menulist ul li a i {
        font-size: 18px !important;
        color: #e61b5d !important;
        width: 24px !important;
        text-align: center !important;
    }
    
    .mobile-menulist ul li a:hover {
        background: #f8f9fa !important;
        color: #e61b5d !important;
        padding-left: 25px !important;
    }
    
    .mobile-menulist ul li ul {
        padding-left: 20px;
        display: none;
        background: #f9f9f9;
        margin-top: 5px;
        border-radius: 5px;
    }
    
    .mobile-menulist ul li.active ul {
        display: block;
    }
    
    .mobile-menulist ul li ul li {
        border-bottom: none;
    }
    
    .mobile-menulist ul li ul li a {
        padding: 8px 0;
        font-size: 14px;
        color: #666;
    }
    
    /* Overlay */
    body:after {
        content: '' !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: rgba(0,0,0,0.6) !important;
        backdrop-filter: blur(3px) !important;
        -webkit-backdrop-filter: blur(3px) !important;
        z-index: -1 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: opacity 0.3s ease, visibility 0.3s ease !important;
        pointer-events: none !important;
    }
    
    body.activeBody:after {
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 9998 !important;
        pointer-events: all !important;
    }
    
    body.activeBody {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
    }
    
    /* Dropdown menü düzeltmeleri */
    .dropdown-menu {
        position: absolute !important;
        right: 0 !important;
        left: auto !important;
        min-width: 180px;
        font-size: 14px;
    }
    
    .dropdown-menu li a {
        padding: 8px 15px;
        font-size: 13px;
    }
}

/* ===== TABLET VE MASAÜSTÜ (768px ve üstü) ===== */
@media only screen and (min-width: 768px) {
    
    /* Mobil menüyü ve butonu gizle */
    .mobile-menu-button {
        display: none !important;
    }
    
    .mobile-menulist {
        display: none !important;
    }
    
    /* Desktop menüyü göster */
    .menubg {
        display: block !important;
    }
    
    /* Top bar'ı göster */
    #topmenu {
        display: block !important;
    }
}

/* ===== TABLET (768px - 991px) ===== */
@media only screen and (min-width: 768px) and (max-width: 991px) {
    
    #top .logo {
        width: 160px;
    }
    
    #top .menuTop .search {
        width: 200px;
        display: flex !important;
        align-items: center;
        gap: 8px;
    }
    
    #top .menuTop .search input[type="text"] {
        flex: 1;
        width: auto;
    }
    
    .menubg {
        margin: 0 20px !important;
        border-radius: 12px !important;
        padding: 8px 0 !important;
    }
    
    .menubg .container {
        padding: 0 15px !important;
    }
    
    .headermenu {
        justify-content: center !important;
        gap: 10px !important;
    }
    
    .headermenu > li {
        font-size: 13px !important;
        padding: 8px 10px !important;
    }
    
    .headermenu > li > a {
        padding: 8px 12px !important;
        font-size: 13px !important;
    }
}

/* ===== MOBIL YATAY (Landscape) ===== */
@media only screen and (max-width: 767px) and (orientation: landscape) {
    
    #top {
        padding: 5px 0;
    }
    
    #top .logo {
        width: 120px !important;
    }
    
    .mobile-menulist {
        width: 320px;
    }
}

