/* Only items that actually have a category icon receive the extra layout. */
.bezpeka-lazy-desktop .menu_category > li > .category-link.catalog-menu-with-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}
.bezpeka-lazy-mobile .menu_category > li > .mobile-item.catalog-menu-with-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}
.catalog-menu-with-icon > img.catalog-menu-icon {
    display: block;
    width: 28px;
    height: 28px;
    min-width: 28px;
    max-width: 28px;
    margin: 0 !important;
    padding: 0;
    flex: 0 0 28px;
    object-fit: contain;
}
.catalog-menu-with-icon > .mobile-catalog__name { flex: 1 1 auto; min-width: 0; }
.catalog-menu-with-icon > .mobile-catalog__icon__arrow { flex: 0 0 auto; margin-left: auto; }
.bezpeka-lazy-desktop.catalog-icons-present .header-submenu__leftside {
    max-height: var(--catalog-menu-max-height, calc(100vh - 140px));
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

/* Keep the first two navigation levels on the same compact 32px rhythm. */
.bezpeka-lazy-desktop.catalog-icons-present .menu_category > li > .category-link,
.bezpeka-lazy-desktop.catalog-icons-present .header-submenu__rightside .left-inner .category-link {
    display: flex;
    align-items: center;
    min-height: 32px;
    box-sizing: border-box;
}
.bezpeka-lazy-desktop.catalog-icons-present .header-submenu__rightside > .left-inner,
.bezpeka-lazy-desktop.catalog-icons-present .header-submenu__rightside > .right-inner {
    max-height: var(--catalog-menu-max-height, calc(100vh - 140px));
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}
.bezpeka-lazy-mobile.catalog-icons-present > .mobile-catalog__inner > .menu_category > li > .mobile-item,
.bezpeka-lazy-mobile.catalog-icons-present .menu_category .catalog-children > .mobile-catalog__inner > ul > li > .mobile-item {
    display: flex;
    align-items: center;
    min-height: 28px;
}

.bezpeka-lazy-desktop.catalog-icons-present .menu_category > li > .category-link > span,
.bezpeka-lazy-desktop.catalog-icons-present .header-submenu__rightside .left-inner .category-link > span {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* A 28px icon plus 2px above and below keeps a 32px navigation row. */
.bezpeka-lazy-desktop.catalog-icons-present .menu_category > li > .category-link {
    padding-top: 2px;
    padding-bottom: 2px;
}
.bezpeka-lazy-desktop.catalog-icons-present .header-submenu__leftside {
    padding-bottom: 6px;
}
.bezpeka-lazy-desktop.catalog-icons-present .header-submenu__leftside > .switcher {
    margin-bottom: 8px;
}
.bezpeka-lazy-mobile.catalog-icons-present > .mobile-catalog__inner > .menu_category > li,
.bezpeka-lazy-mobile.catalog-icons-present .menu_category .catalog-children > .mobile-catalog__inner > ul > li {
    padding-top: 2px;
    padding-bottom: 2px;
}

/* Keep category rows stable when catalog-icons-present is first applied. */
.bezpeka-lazy-desktop .menu_category > li > .category-link.catalog-menu-with-icon {
    transition: none;
}
