/* =========================================================
   DZ HEADER CATEGORY NAVIGATION FIX V4.1.1
   Fixes nested menu hover gaps introduced by V4.1.
   ========================================================= */

/* V4.1 styled every main-menu submenu with margin-top:6px.
   Keep that only for FIRST level. Nested levels must connect
   directly to their parent so hover state cannot collapse. */
@media (min-width: 1200px) {
    .header-main .main-menu > li > .sub-menu {
        margin-top: 6px !important;
    }

    .header-main .main-menu .sub-menu .sub-menu {
        margin-top: 0 !important;
    }

    /* Remove any visual/hover gap between parent and nested category menu. */
    .header-main .main-menu li.menu-item-has-children,
    .header-main .dropdown--menu li.menu-item-has-children {
        position: relative;
    }

    .header-main .main-menu li.menu-item-has-children > .sub-menu,
    .header-main .dropdown--menu li.menu-item-has-children > .sub-menu {
        margin-block-start: 0 !important;
    }

    /* Invisible hover bridges: keep menus open while pointer crosses
       the tiny spacing around first-level dropdowns. */
    .header-main .main-menu > li > .sub-menu::before,
    .header-main .dropdown > .dropdown--menu::before {
        content: "";
        position: absolute;
        inset-inline: 0;
        top: -8px;
        height: 8px;
        pointer-events: auto;
    }

    /* Nested menu links remain compact and clickable across full row. */
    .header-main .dropdown--menu li > a,
    .header-main .dropdown--menu .sub-menu li > a,
    .header-main .main-menu .sub-menu li > a {
        position: relative;
        z-index: 1;
        display: flex;
        width: 100%;
    }
}

/* Mobile category text should clearly indicate it is a navigation target. */
@media (max-width: 1199.98px) {
    .header-main .aside .get-view-by-onclick[data-link] {
        cursor: pointer;
        display: inline-flex;
        width: calc(100% - 22px);
        min-height: 34px;
        align-items: center;
    }
}
