@media (max-width: 1279px) {
    .topNavBlock.topNavBlock--single-level,
    div[class*="page-catalog"] .topNavBlock.topNavBlock--single-level,
    .siteArea[class*="page-personal"] .topNavBlock.topNavBlock--single-level {
        margin-top: 12px !important;
    }
}

@media (min-width: 981px) {
    .necrology-card-title {
        font-size: 20px !important;
    }

    .necrology-detail-hero h1 {
        font-size: 20px !important;
    }
}

.site-svg-icon {
    display: inline-block;
    flex: 0 0 auto;
    width: 1em;
    height: 1em;
    vertical-align: middle;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mobileHeaderActions {
    display: contents;
}

.header_phone .header-phone-icon {
    margin: 0 10px;
    font-size: 24px;
}

.logIn .personal-link .site-svg-icon {
    font-size: 24px;
    line-height: 1;
}

.topNavBlockItemImg picture {
    display: contents;
}

.mainMenuHeader .site-svg-icon {
    font-size: 36px;
    line-height: 1;
    margin-right: 24px;
    cursor: pointer;
}

.next-step a .site-svg-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.buttons_prod_block .site-svg-icon {
    font-size: 13px;
}

.prod_counter .site-svg-icon {
    text-align: center;
    width: 15px;
    height: 15px;
}

.addProductButton .site-svg-icon {
    position: absolute;
    left: 14px;
}

.header-cats .headerTextMobile {
    display: none;
}

.topNavBlockItemService {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 8px 0 0;
    box-sizing: border-box;
}

.topNavBlockItemServiceTitle {
    margin: 0;
    color: #000;
    font-family: Arial, sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-transform: uppercase;
}

.topNavBlockItemServiceCity {
    margin: auto 0;
    color: #000;
    font-family: Arial, sans-serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.topNavBlockItem--ritual-services .topNavBlockItemButtons {
    flex-wrap: nowrap;
    gap: 10px;
    margin-bottom: 0;
    width: 100%;
}

.topNavBlockItem--ritual-services .topNavBlockItemButtons .btn {
    flex: 1 1 0;
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;
    text-align: center;
}

@media (min-width: 1280px) {
    .topNavBlock {
        gap: 2%;
        margin-left: 0;
        margin-right: 0;
    }

    .topNavBlock > .topNavBlockItem {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        height: 215px;
        margin: 0;
        padding: 10px;
        box-sizing: border-box;
    }

    .topNavBlock > .topNavBlockItem .topNavBlockItemImg {
        height: 168px;
        max-height: 168px;
        padding-top: 18px;
        box-sizing: border-box;
    }

    .topNavBlock > .topNavBlockItem .topNavBlockItemImg img {
        max-height: 150px;
    }

    .topNavBlock > .topNavBlockItem p {
        width: 100%;
        font-size: 18px;
        text-align: center;
    }
}

@media (max-width: 1279px) {
    .topNavBlock > .topNavBlockItem--ritual-services,
    div[class*="page-catalog"] .topNavBlockItem--ritual-services,
    .siteArea[class*="page-personal"] .topNavBlockItem--ritual-services {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .topNavBlock > .topNavBlockItem.active,
    div[class*="page-catalog"] .topNavBlockItem.active,
    .siteArea[class*="page-personal"] .topNavBlockItem.active {
        background: #fff;
    }

    .header-cats .header-subnav--necrology .mainNewsBlockNewsList {
        height: auto !important;
        min-height: 0 !important;
        padding: 8px 0 10px !important;
        overflow: visible !important;
        border: 0 !important;
    }

    .header-cats .header-subnav--necrology .mainNewsBlockNewsListItem,
    .header-cats .header-subnav--necrology .mainNewsBlockNewsListItem:last-child {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
    }

    .header-cats .header-subnav--necrology .mainNewsBlockNewsListItemText {
        height: auto !important;
        padding: 6px 2px !important;
    }

    .header-cats .header-subnav--necrology .headerText {
        font-family: Arial, sans-serif;
        font-size: clamp(12px, 2.2vw, 16px) !important;
        font-weight: 400 !important;
        white-space: nowrap;
        overflow-wrap: normal;
    }

    .header-cats .header-subnav--necrology .headerTextFull {
        display: none;
    }

    .header-cats .header-subnav--necrology .headerTextMobile {
        display: inline;
    }

    .header-cats .header-subnav--necrology .mainNewsBlockNewsListItem.active {
        background: transparent !important;
    }

    .header-cats .header-subnav--necrology .mainNewsBlockNewsListItem.active .headerText {
        font-weight: 700 !important;
        text-decoration: underline;
        text-decoration-thickness: 1px;
        text-underline-offset: 3px;
    }

    .header-cats .header-subnav--necrology .mainNewsBlockNewsListItem:active,
    .header-cats .header-subnav--necrology .mainNewsBlockNewsListItem:focus {
        background: transparent !important;
    }
}

@media (max-width: 1279px) {
    .header.rowBlock {
        position: relative;
        z-index: 2;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-areas:
            "burger logo actions"
            "contact contact contact";
        align-items: center;
        width: 100%;
        gap: 10px 10px;
        padding: 12px 0 8px;
        background: #fff;
        overflow: visible;
        box-sizing: border-box;
    }

    .header.rowBlock::before {
        content: "";
        grid-area: 1 / 1 / 2 / -1;
        align-self: stretch;
        background: #fff;
        z-index: 0;
        pointer-events: none;
    }

    .header .burger {
        grid-area: burger;
        order: initial;
        flex: none;
        width: 30px;
        margin: 8px 0 8px 8px;
        padding: 0;
        justify-content: center;
        position: relative;
        z-index: 1;
    }

    .header .burger svg {
        width: 30px;
        height: 30px;
    }

    .mainHeader {
        grid-area: logo;
        order: initial;
        flex: none;
        min-width: 0;
        margin: 8px 0;
        font-family: Arial, sans-serif;
        font-size: clamp(22px, 4.6vw, 30px);
        font-weight: 700;
        text-align: center;
        line-height: 1.1;
        white-space: nowrap;
        position: relative;
        z-index: 1;
    }

    .mainHeader a {
        max-width: 100%;
        padding: 0;
        background: transparent;
        border: 0;
        border-radius: 0;
        font-family: Arial, sans-serif;
        font-weight: 700;
        overflow: visible;
        text-overflow: clip;
        white-space: nowrap;
    }

    .mobileHeaderActions {
        grid-area: actions;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 14px;
        margin: 8px 8px 8px 0;
        white-space: nowrap;
        position: relative;
        z-index: 1;
    }

    .mobileHeaderActions .bx-basket {
        order: initial;
        flex: none;
        margin: 0;
    }

    .mobileHeaderActions .header_basket_mob img {
        width: 30px;
        height: 30px;
    }

    .mobileHeaderActions .login_mob {
        order: initial;
        display: flex !important;
        align-items: center;
        justify-content: flex-end;
        gap: 12px;
    }

    .mobileHeaderActions .login_mob a {
        width: 30px;
        height: 30px;
        margin: 0;
    }

    .mobileHeaderActions .login_mob i,
    .mobileHeaderActions .login_mob .site-svg-icon {
        font-size: 24px;
    }

    .header_contact {
        grid-area: contact;
        order: initial;
        flex: none;
        width: 100%;
        padding-top: 2px;
    }

    .topNavBlock.topNavBlock--with-sublevel,
    div[class*="page-catalog"] .topNavBlock.topNavBlock--with-sublevel,
    .siteArea[class*="page-personal"] .topNavBlock.topNavBlock--with-sublevel {
        margin-bottom: 0 !important;
    }

    .topNavBlock.topNavBlock--with-sublevel + .header-cats {
        margin-top: 0 !important;
    }

    #panel:not(:empty) + .siteArea > .header.rowBlock {
        padding-top: 4px;
    }

    #panel:not(:empty) + .siteArea > .header.rowBlock .burger,
    #panel:not(:empty) + .siteArea > .header.rowBlock .mainHeader,
    #panel:not(:empty) + .siteArea > .header.rowBlock .mobileHeaderActions {
        margin-top: 4px;
    }
}

@media (max-width: 420px) {
    .header.rowBlock {
        gap: 10px 6px;
    }

    .mainHeader {
        font-size: clamp(17px, 5.2vw, 19px);
    }

    .header .burger {
        width: 26px;
        margin-left: 4px;
    }

    .header .burger svg,
    .mobileHeaderActions .header_basket_mob img {
        width: 26px;
        height: 26px;
    }

    .mobileHeaderActions {
        gap: 12px;
        margin-right: 4px;
    }

    .mobileHeaderActions .login_mob {
        gap: 10px;
    }

    .mobileHeaderActions .login_mob a {
        width: 28px;
        height: 28px;
    }

    .mobileHeaderActions .login_mob i,
    .mobileHeaderActions .login_mob .site-svg-icon {
        font-size: 22px;
    }
}
