/* TOPBAR Z-INDEX FIX - Bu dosya en son yükleniyor */

/* Navbar - En altta */
.navbar {
    position: relative !important;
    z-index: 100 !important;
}

/* Topbar - Navbar'ın üstünde */
.topbar {
    position: relative !important;
    z-index: 200 !important;
}

/* Modals - Orta seviye */
.modal {
    z-index: 5000 !important;
}

.modal-backdrop {
    z-index: 4999 !important;
}

/* Donor Modal özel */
#donorModal {
    z-index: 5000 !important;
}

/* Sepet ve Profil Container */
.topbar .d-flex.align-items-center.gap-2 {
    position: relative;
    z-index: 1000;
}

/* Cart Button */
.cart-btn.avatar--cart {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    cursor: pointer;
}

.cart-btn.avatar--cart:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.cart-btn.avatar--cart i {
    font-size: 1.25rem;
    color: #fff;
}

.cart-btn .badge-cart {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #dc2626;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Dropdown'lar için z-index */
.dropdown-menu {
    z-index: 1050;
}

/* Cart Dropdown Styles */
.cart-dropdown {
    min-width: 420px;
    max-width: 500px;
    max-height: 600px;
    border: none;
    border-radius: 12px;
}

.cart-dropdown-header {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.cart-dropdown-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.cart-dropdown-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
}

.cart-dropdown-item .item-left {
    flex: 1;
    min-width: 0;
}

.cart-dropdown-item .item-title {
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.125rem;
}

.cart-dropdown-item .item-price {
    font-size: 0.75rem;
    color: #64748b;
}

.cart-dropdown-item .item-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.cart-dropdown-item .btn-group {
    display: flex;
}

.cart-dropdown-item .btn-qty {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1;
    min-width: 28px;
}

.cart-dropdown-item .qty-display {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1;
    min-width: 32px;
    text-align: center;
}

.cart-dropdown-item .btn-remove {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1;
}

.cart-dropdown-item .item-total {
    font-weight: 700;
    color: #059669;
    font-size: 0.9rem;
    min-width: 70px;
    text-align: right;
}

.cart-dropdown-footer {
    padding: 0.875rem 1rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.cart-dropdown-footer .total {
    margin-bottom: 0.625rem;
    font-size: 1rem;
    font-weight: 600;
}

.cart-dropdown-footer .actions {
    display: flex;
    gap: 0.5rem;
}

.cart-dropdown-footer .actions .btn {
    flex: 1;
    font-size: 0.875rem;
    padding: 0.5rem;
}






/* Mobil linkler tıklanabilir olsun */
@media (max-width: 991px) {
    .cart-btn.d-lg-none,
    .profile-trigger.d-lg-none {
        pointer-events: auto !important;
        cursor: pointer !important;
        position: relative !important;
        z-index: 1000 !important;
    }
}

/* Profil dropdown - sadece ilk dropdown görünsün */
.dropdown-menu.profile-menu:not(:first-of-type) {
    display: none !important;
}

/* Veya aria-labelledby ile eşleşmeyen dropdown'ları gizle */
.dropdown-menu.profile-menu:not([aria-labelledby="profileMenu"]) {
    display: none !important;
}

/* Profil dropdown - sadece hover ile açılsın */
.profile-wrap:hover > .dropdown-menu.profile-menu {
    display: block !important;
}

/* Click ile açılan .show class'ını engelle */
.profile-wrap .dropdown-menu.profile-menu.show {
    display: none !important;
}

/* Hover ile açılanı göster */
.profile-wrap:hover .dropdown-menu.profile-menu {
    display: block !important;
}

/* Slider yüksekliğini artır */
.hero-img,
.hero-slider .carousel-item img,
.home-hero .carousel-item img {
    height: 550px !important;
    object-fit: cover !important;
}

@media (max-width: 992px) {
    .hero-img,
    .hero-slider .carousel-item img,
    .home-hero .carousel-item img {
        height: 450px !important;
    }
}

@media (max-width: 768px) {
    .hero-img,
    .hero-slider .carousel-item img,
    .home-hero .carousel-item img {
        height: 320px !important;
    }
}
