.desktop-header .header {
    align-items: center;
    gap: 12px;
    height: auto;
    padding: 15px 0 20px;
}

.desktop-header .header__left {
    flex: 0 0 auto;
    width: auto;
}

.desktop-header .header__search {
    flex: 1 1 520px;
    max-width: 520px;
    min-width: 0;
    margin-right: auto;
}

.desktop-header .header__right {
    flex: 0 0 25%;
    margin-top: 0;
}

.desktop-header .header__right .webContacts {
    left: 0;
}

.desktop-header .my_orders_top {
    top: 0;
    height: 38px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.desktop-header .search_block {
    position: relative;
}

.desktop-header .search_block__input {
    display: block;
    width: 100%;
}

.desktop-header .serch-form-input {
    box-sizing: border-box;
    padding-right: 58px;
}

.desktop-header .search_block__submit {
    position: absolute;
    right: 4px;
    top: 1px;
    z-index: 1;
}

.desktop-header #submit-search {
    display: block;
    position: static;
    box-sizing: border-box;
    width: 28px;
    height: 28px;
    padding: 0;
    margin: 0;
}

.desktop-header .delete_icon {
    right: 32px;
    bottom: 3px;
}

/* The catalog menu lives next to the search, so the top menu bar needs no burger (shown at <=1320px) */
.desktop-header .list-menu > li.burger_small {
    display: none;
}

.home-catalog-menu {
    position: relative;
    flex: 0 0 44px;
    width: 44px;
    z-index: 7;
}

.home-catalog-menu.home-catalog-menu--navigation {
    flex-basis: 50px;
    width: 50px;
}

.home-catalog-menu--navigation .home-catalog-toggle {
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 0;
}

.home-catalog-menu--navigation ~ .navigation-new .burger_small {
    display: none;
}

.home-catalog-toggle {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #dbe9de;
    border-radius: 8px;
    background: #f2f8f3;
    cursor: pointer;
}

.home-catalog-toggle .icon_burger {
    width: 22px;
    height: 22px;
    padding: 0;
    color: #056a35;
}

.home-catalog-toggle[aria-expanded="true"] {
    border-color: #056a35;
    background: #056a35;
}

.home-catalog-toggle[aria-expanded="true"] .icon_burger {
    color: #fff;
}

.home-catalog-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 310px;
    margin: 0;
    background: #fff;
    box-shadow: 0 8px 22px rgba(24, 57, 36, 0.16);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.home-catalog-dropdown .body > ul,
.home-catalog-dropdown .body > ul > li {
    margin-right: 0;
}

.home-catalog-menu .home-catalog-dropdown .sub {
    /* Fixed flyouts escape the category list's overflow clipping. */
    position: fixed;
    display: none;
    width: clamp(375px, calc(100vw - 620px), 640px);
    box-sizing: border-box;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.home-catalog-dropdown .sub .c,
.home-catalog-dropdown .home-catalog-active > .sub--biggest {
    display: flex;
    gap: 10px;
}

.home-catalog-dropdown .sub--biggest > .m {
    display: none;
}

.home-catalog-dropdown .sub ul {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    overflow-wrap: anywhere;
}

.home-catalog-dropdown .sub ul:not(:last-child) {
    margin-right: 0;
}

.home-catalog-menu .home-catalog-dropdown .home-catalog-active > .sub {
    display: block;
}

.home-catalog-menu .home-catalog-dropdown .home-catalog-active > .sub--biggest {
    display: flex;
}

.home-catalog-dropdown .body > ul > li.hover:not(.home-catalog-active) > a {
    background-color: #fff;
}

.home-catalog-dropdown .body > ul > li.home-catalog-active > a {
    background-color: #e2e2e2;
}

.home-catalog-dropdown .body > ul > li:not(.home-catalog-active) .menu_icon_sub {
    display: none;
}

.home-catalog-dropdown .home-catalog-active .menu_icon_sub {
    display: block;
}

.desktop-home .main_new {
    width: 100%;
    max-width: none;
    padding: 0;
}

.desktop-home .main_new > .content {
    display: block;
    margin: 0;
}

.desktop-home .main-banner {
    --hero-height: clamp(433px, 43.3vw, 563px);
    gap: 20px;
}

.desktop-home .swiper-container-main {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    width: auto;
    height: var(--hero-height);
    margin: 0;
}

.desktop-home .main_rotator_banner {
    flex: 0 0 calc((100% - 20px) * 0.3263);
    margin: 0;
}

.desktop-home .main_rotator_banner:not(:has(.banner)) {
    display: none;
}

.desktop-home .main-banner .swiper-slide img,
.desktop-home .main_rotator_banner img {
    display: block;
    width: 100%;
    height: var(--hero-height);
    object-fit: cover;
}

.home-categories {
    margin: 20px 0 24px;
    padding: 16px;
    border-radius: 12px;
    background: #f1f5f2;
    text-align: left;
}

.home-category-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.home-category-tab,
.home-category-link {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
}

.home-category-tab {
    background: #fff;
    color: #143e27;
    text-transform: uppercase;
}

.home-category-tab:hover {
    background: #e0ede3;
}

.home-category-tab[aria-current="page"] {
    color: #fff;
    background: #056a35;
}

.home-category-link {
    color: #056a35;
}

.home-category-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.home-category-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    min-height: 86px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #fff;
    color: #143e27;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.home-category-card:hover {
    border-color: #7db991;
}

.home-category-card img {
    flex: 0 0 auto;
    width: 60px;
    height: 68px;
    object-fit: contain;
}

.home-category-grid.is-collapsed > .home-category-card.is-extra {
    display: none;
}

/* Smooth height change of the grid while cards are shown or hidden */
.home-category-grid.is-resizing {
    overflow: hidden;
    transition: height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-category-grid.is-revealing > .home-category-card.is-extra {
    animation: homeCardIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--card-order, 0) * 35ms);
}

.home-category-grid.is-hiding > .home-category-card.is-extra {
    animation: homeCardOut 0.22s ease-in both;
}

@keyframes homeCardIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes homeCardOut {
    from {
        opacity: 1;
        transform: none;
    }
    to {
        opacity: 0;
        transform: translateY(10px) scale(0.96);
    }
}

.home-category-more {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.home-category-more-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 8px 8px 8px 22px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #0b8f4a 0%, #056a35 100%);
    box-shadow: 0 6px 16px rgba(5, 106, 53, 0.25);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Light sweep across the button on hover */
.home-category-more-toggle::before {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 50%;
    height: 100%;
    background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
    pointer-events: none;
}

.home-category-more-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(5, 106, 53, 0.32);
}

.home-category-more-toggle:hover::before {
    left: 120%;
}

.home-category-more-toggle:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 4px 10px rgba(5, 106, 53, 0.25);
}

.home-category-more-toggle:focus-visible {
    outline: 3px solid #a8d5b8;
    outline-offset: 3px;
}

.home-category-more-text > span {
    display: inline-block;
    animation: homeLabelIn 0.3s ease both;
}

.home-category-more-toggle[aria-expanded="true"] .home-category-more-label,
.home-category-more-toggle[aria-expanded="false"] .home-category-less-label {
    display: none;
}

@keyframes homeLabelIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.home-category-more-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    color: #056a35;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.home-category-more-toggle[aria-expanded="false"]:hover .home-category-more-icon svg {
    animation: homeChevronNudge 0.9s ease-in-out infinite;
}

.home-category-more-toggle[aria-expanded="true"] .home-category-more-icon {
    transform: rotate(180deg);
}

@keyframes homeChevronNudge {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(3px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-category-grid.is-resizing,
    .home-category-more-toggle,
    .home-category-more-toggle::before,
    .home-category-more-icon {
        transition: none;
    }

    .home-category-grid.is-revealing > .home-category-card.is-extra,
    .home-category-grid.is-hiding > .home-category-card.is-extra,
    .home-category-more-text > span,
    .home-category-more-toggle[aria-expanded="false"]:hover .home-category-more-icon svg {
        animation: none;
    }
}

@media (max-width: 1199px) {
    .home-category-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}
