.back-button {
  display: none;
}

.nav-catalog {
  width: 100%;
  max-width: 1360px;
  position: absolute;
  top: 100%;
  left: calc(50% - 680px);
  background-color: #FFFFFF;
  display: none;
  -webkit-box-shadow: 0px 20px 50px rgba(0, 0, 0, 0.15);
          box-shadow: 0px 20px 50px rgba(0, 0, 0, 0.15);
}
.nav-catalog__wrap {
  width: 320px;
  height: 500px;
  padding: 0.75rem 0 0.75rem 1rem;
  border-right: 2px solid #EBEBEB;
  overflow-y: auto;
  scrollbar-color: #EBEBEB #f8f8f8;
  scrollbar-width: thin;
  scroll-behavior: smooth;
  scrollbar-gutter: stable both-edges;
}
.nav-catalog__list {
  z-index: 1000;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-flow: column wrap;
          flex-flow: column wrap;
  -webkit-box-pack: start;
      -ms-flex-pack: start;
          justify-content: flex-start;
  width: 300px;
  border-radius: 3px;
}
.nav-catalog__list-item {
  -webkit-box-flex: 0;
      -ms-flex: 0 1 2.75rem;
          flex: 0 1 2.75rem;
}
.nav-catalog__list-extra {
  border-top: 2px solid #EBEBEB;
  border-radius: 0;
}
.nav-catalog__item-link {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
      -ms-flex-flow: row wrap;
          flex-flow: row wrap;
  -webkit-box-pack: start;
      -ms-flex-pack: start;
          justify-content: flex-start;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  padding: 20px 10px;
  -webkit-transition: background-color 0.3s ease;
  -o-transition: background-color 0.3s ease;
  transition: background-color 0.3s ease;
}
@media screen and (min-width: 768px) {
  .nav-catalog__item-link:hover {
    background-color: #F3FBFF;
  }
}
.nav-catalog__item-link:hover .nav-catalog__item-title {
  color: #3B7C9C;
}
.nav-catalog__item-img {
  -webkit-box-flex: 0;
      -ms-flex: 0 0 30px;
          flex: 0 0 30px;
  width: 30px;
  height: 30px;
  margin-right: 14px;
}
.nav-catalog__item-title {
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  line-height: normal;
  color: #000000;
}

.submenu {
  display: -ms-flex;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-flow: column wrap;
          flex-flow: column wrap;
  -webkit-box-pack: start;
      -ms-flex-pack: start;
          justify-content: flex-start;
  padding: 1rem 0 !important;
}
.submenu__wrap {
  display: none;
  width: calc(100% - 310px);
  max-height: 500px;
  position: absolute;
  top: 0;
  left: 320px;
  z-index: 1;
  padding: 10px 20px 20px;
  background-color: #FFFFFF;
}
.submenu__area {
  min-height: 550px;
  height: auto;
  width: 100%;
  -webkit-columns: 4;
     -moz-columns: 4;
          columns: 4;
}
.submenu__block {
  -webkit-box-flex: 0;
      -ms-flex: 0 0 250px;
          flex: 0 0 250px;
  width: 250px;
  margin-bottom: 1rem;
  padding: 1rem 1rem !important;
  -webkit-column-break-inside: avoid;
     -moz-column-break-inside: avoid;
          break-inside: avoid;
}
.submenu__title {
  margin-bottom: 0.5rem;
  font-size: 20px;
  font-weight: 700;
  color: #3B7C9C;
}
.submenu__button {
  display: none;
}
.submenu__item {
  width: 200px;
  margin-bottom: 5px;
}
.submenu__item-link {
  padding: 5px 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  color: #000000;
  -webkit-transition: color 0.3s ease;
  -o-transition: color 0.3s ease;
  transition: color 0.3s ease;
}
.submenu__item-link:hover {
  color: #3B7C9C;
}

.submenu__wrap {
  overflow-y: scroll;
  scrollbar-color: #EBEBEB #f8f8f8;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  border-radius: 3px;
}

.submenu__wrap::scroll-button(*) {
  display: none;
}

.submenu__wrap::-webkit-scrollbar-thumb {
  height: 50px;
  width: 4px;
  background-color: #EBEBEB;
  border-radius: 3px;
}

.submenu__wrap::-webkit-scrollbar-track {
  background-color: #f8f8f8;
  border-radius: 3px;
}

.submenu__wrap::-webkit-scrollbar-button {
  display: none;
}

.cs-icon {
  width: 30px;
  height: 30px;
  fill: #3B7C9C;
}

.cs-icon.cs-icon__stroke {
  stroke: #3B7C9C;
  fill: none;
}

.nav-catalog__list-item:first-of-type .submenu__wrap {
  display: block;
}

.nav-catalog__list-item:hover .submenu__wrap {
  display: block;
}
/* добавить к правилам для шапки сайта */
@media screen and (max-width: 1200px) {
.nav-catalog {
    left: 0;
    max-width: 100%;
  }

  .nav-catalog__list-item {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
  }

  .nav-catalog__item-link {
    padding: 15px 10px;
  }

  .submenu__area {
    -webkit-columns: 3;
       -moz-columns: 3;
            columns: 3;
  }

  .submenu__button {
    display: inline-block;
    height: 30px;
    width: 30px;
    margin-top: 17px;
    margin-left: auto;
    border: none;
    background: no-repeat center url(../images/icons/arr-right-small.svg);
  }
}  
@media screen and (max-width: 990px) {
.submenu__area {
    -webkit-columns: 2;
       -moz-columns: 2;
            columns: 2;
  }

  .submenu__item {
    margin-bottom: 10px;
  }
}

@media screen and (max-width: 768px) {
.submenu__area {
    -webkit-columns: 1;
       -moz-columns: 1;
            columns: 1;
  }

  .submenu__block {
    width: 225px;
  }
}

@media screen and (max-width: 576px) {
.back-button {
    height: 30px;
    margin: 10px 0 0 25px;
    padding: 0px 10px 0 30px;
    border: 1px solid #000;
    border-radius: 3px;
    background: no-repeat 10px center url(../images/icons/arr-left-small.svg) #f8f8f8;
    font-size: 0.75rem;
    line-height: 30px;
  }

  .back-button.active {
    display: block;
  }

  .nav-catalog__wrap {
    width: 100%;
    height: 360px;
    padding-top: 0;
    border-right: none;
  }

  .nav-catalog__list {
    width: 100%;
    position: relative;
    z-index: 1;
  }

  .nav-catalog__list-item {
    position: relative;
  }

  .nav-catalog__item-link {
    -webkit-box-align: start;
        -ms-flex-align: start;
            align-items: flex-start;
    padding: 10px;
  }

  .nav-catalog__item-title {
    font-size: 22px;
  }

  .submenu {
    display: none;
    height: auto;
    padding: 7px 20px !important;
  }
  .submenu__wrap {
    width: 100%;
    position: absolute;
    top: 45px;
    left: 0;
    z-index: 5;
    padding: 0 !important;
    background-color: #FFFFFF;
  }
  .submenu__area {
    position: relative;
  }
  .submenu__button {
    display: block;
    height: 30px;
    width: 30px;
    position: absolute;
    top: 10px;
    right: 10px;
    margin-top: 0;
    border: none;
    background: no-repeat center url(../images/icons/arr-right-small.svg);
  }
  .submenu__block {
    width: 100%;
    margin-bottom: 0;
    padding: 0.25rem 0 0.25rem 1.25rem !important;
  }
  .submenu__title {
    position: relative;
    width: 100%;
    margin-bottom: 5px;
  }
  .submenu__title::before {
    content: "";
    display: block;
    height: 30px;
    width: 30px;
    position: absolute;
    top: 0px;
    right: 10px;
    border: none;
    background: no-repeat center url(../images/icons/arr-down-small.svg);
    -webkit-transform: rotate(0.75turn);
        -ms-transform: rotate(0.75turn);
            transform: rotate(0.75turn);
  }

  .submenu__button.hide {
    display: none;
  }

  .nav-catalog__list-item:first-of-type .submenu__wrap {
    display: none;
  }

  .nav-catalog__list:has(.nav-catalog__list-item.active) {
    top: 30px;
  }

  .nav-catalog__list-item.active {
    width: 100%;
    position: absolute;
    top: 0px;
    left: 0;
    z-index: 5;
    background-color: #FFFFFF;
  }
  .nav-catalog__list-item.active .submenu__wrap {
    background-color: #FFFFFF;
  }

  .submenu__wrap.active .submenu__button {
    background: no-repeat center url(../images/icons/arr-up-small.svg);
  }

  .submenu {
    display: none;
  }

  .nav-catalog__list-item .submenu__wrap.active {
    display: block;
  }

  .submenu__wrap {
    height: 100%;
    min-height: 300px;
  }

  .submenu__area {
    height: 100%;
  }

  .submenu.active {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 10;
    width: 100%;
    height: calc(100% - 65px);
    background: #FFFFFF;
  }

  .nav-catalog__list-extra.hide {
    display: none;
  }
}  
