/* Mobil Logo Alanı - Sadece mobilde görünür */
.mobile-logo-section {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    background: white;
}

.mobile-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--dark-color);
}

.mobile-brand:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.mobile-brand .brand-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

/* Mobil Navbar Actions */
.mobile-navbar-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 0;
    position: relative;
    min-height: 60px; /* Minimum yükseklik ekle */
}

.mobile-header-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    position: static; /* Absolute yerine static yap */
    margin-left: auto; /* Sağa yasla */
}

.mobile-cart-btn, .mobile-account-btn {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 12px 15px;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 50px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
}

.mobile-cart-btn:hover, .mobile-account-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 165, 80, 0.3);
}

.mobile-cart-btn .fas {
    font-size: 20px;
    color: var(--primary-color);
}

.mobile-cart-btn:hover .fas {
    color: white;
}

.mobile-account-btn .account-avatar {
    width: 28px;
    height: 28px;
    background: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 14px;
    border: 1px solid var(--primary-color);
}

.mobile-account-btn:hover .account-avatar {
    background: white;
    color: var(--primary-color);
}

.mobile-cart-btn .cart-badge {
    background: #ec1b23;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    position: absolute;
    top: -8px;
    right: -8px;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(236, 27, 35, 0.4);
}

/* Mobil Dropdown Menülerin Pozisyonu - Kesin Çözüm */
@media (max-width: 991.98px) {
    /* Mobil header buttons container'ı absolute yapıyoruz */
    .mobile-header-buttons {
        position: relative;
        z-index: 1050; /* Bootstrap'ın en yüksek z-index'inden daha yüksek */
    }

    /* Dropdown parent'ı da yüksek z-index veriyoruz */
    .mobile-dropdown {
        position: static !important; /* Static yaparak parent'tan bağımsız hale getiriyoruz */
        z-index: 1060;
    }

    /* Dropdown menüleri fixed position ile en üste çıkarıyoruz */
    .mobile-dropdown .dropdown-menu {
        position: fixed !important;
        top: auto !important;
        bottom: auto !important;
        left: auto !important;
        right: 10px !important; /* Sağdan 10px boşluk */
        transform: none !important;
        margin: 0 !important;
        z-index: 10000 !important; /* En yüksek z-index */
        width: 300px;
        max-width: calc(100vw - 20px);
        border: 1px solid #ddd;
        border-radius: 12px;
        box-shadow: 0 15px 35px rgba(0,0,0,0.25);
        background: white;
        backdrop-filter: blur(10px);
    }

    /* Sepet dropdown özel ayarları */
    .mobile-dropdown .cart-dropdown {
        width: 320px !important;
        max-width: calc(100vw - 20px) !important;
    }

    /* Hesap dropdown özel ayarları */
    .mobile-dropdown .account-dropdown {
        width: 280px !important;
        max-width: calc(100vw - 20px) !important;
    }

    /* Dropdown açık olduğunda pozisyon hesaplama */
    .mobile-dropdown .dropdown-menu.show {
        /* JavaScript ile dinamik olarak ayarlanacak */
    }

    /* Dropdown backdrop overlay - menü dışına tıklamayı yakalamak için */
    .mobile-dropdown-backdrop {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background: transparent;
        z-index: 9999 !important;
        display: none;
    }

    .mobile-dropdown-backdrop.active {
        display: block !important;
    }
}

/* Bottom Navbar Mobil Düzenlemeler */
@media (max-width: 991.98px) {
    .bottom-navbar {
        padding: 0;
        background: var(--primary-color);
        border-top: 1px solid rgba(255,255,255,0.2);
    }

    .bottom-navbar .container {
        padding: 0 15px;
    }

    .mobile-navbar-actions {
        width: 100%;
    }

    .navbar-toggler {
        border: 2px solid white;
        background: white;
        color: var(--primary-color);
        padding: 12px 15px;
        border-radius: 10px;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .navbar-toggler:hover {
        background: var(--light-color);
        border-color: var(--primary-color);
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 0 3px rgba(0, 165, 80, 0.2);
        border-color: white;
    }

    .navbar-toggler-icon {
        background-image: none;
        width: 20px;
        height: 2px;
        background-color: var(--primary-color);
        position: relative;
        display: block;
    }

    .navbar-toggler-icon::before,
    .navbar-toggler-icon::after {
        content: '';
        position: absolute;
        width: 20px;
        height: 2px;
        background-color: var(--primary-color);
        transition: all 0.3s ease;
    }

    .navbar-toggler-icon::before {
        top: -6px;
    }

    .navbar-toggler-icon::after {
        top: 6px;
    }
}

/* Desktop'ta mobil elementleri tamamen gizle */
@media (min-width: 992px) {
    .mobile-navbar-actions,
    .mobile-header-buttons,
    .mobile-cart-btn,
    .mobile-account-btn,
    .mobile-logo-section,
    .mobile-brand,
    .mobile-dropdown {
        display: none !important;
    }
}
