/* Hesabım / sepet dropdown: header-main stacking context nav’ın altında kalmasın */
@media (min-width: 992px) {
    /* Kardeş katmanlar: main > nav (aksi halde children z-index işe yaramaz) */
    .milla-header .header-main {
        position: relative !important;
        z-index: 40 !important;
    }

    .milla-header .header-nav {
        position: relative !important;
        z-index: 10 !important;
    }

    .milla-header .header-actions {
        position: relative !important;
        z-index: 2 !important;
    }

    /* Hesabım / sepet açıkken main’i kesin üstte tut */
    .milla-header:has(.action-item.dropdown:hover) .header-main,
    .milla-header:has(.mini-cart-wrapper:hover) .header-main,
    .milla-header:has(.action-item.dropdown:focus-within) .header-main {
        z-index: 80 !important;
    }

    /* Kategori mega menü açıkken nav üstte olsun */
    .milla-header:has(.milla-nav__item--has-menu:hover) .header-nav,
    .milla-header:has(.milla-nav__item--has-menu:focus-within) .header-nav {
        z-index: 90 !important;
    }

    .milla-header .action-item.dropdown:not(.mini-cart-wrapper)::after {
        height: 14px !important;
    }

    /* Eski “hover’da gizle” kuralını ez */
    .milla-header .action-item.dropdown:not(.mini-cart-wrapper):hover > .dropdown-menu,
    .milla-header .action-item.dropdown:not(.mini-cart-wrapper):focus-within > .dropdown-menu {
        display: block !important;
    }

    .milla-header .action-item.dropdown > .dropdown-menu,
    .milla-header .mini-cart-wrapper > .mini-cart-dropdown {
        position: absolute !important;
        inset: unset !important;
        top: calc(100% + 8px) !important;
        right: 0 !important;
        left: auto !important;
        bottom: auto !important;
        margin-top: 0 !important;
        z-index: 100 !important;
        transform: none !important;
    }

    .milla-header:has(.action-item.dropdown:hover) .header-nav,
    .milla-header:has(.mini-cart-wrapper:hover) .header-nav {
        pointer-events: none !important;
    }
}
