.menu__is-open{
  overflow: hidden;
}

.site-header {
  position: sticky;
  background: var(--1);
  z-index: 17;
  top: 0;
  transition: background 0.3s;
  color: var(--whiteColor);

  .page-front & {
    //background: rgba($white, 0);
    //position: fixed;
    //left: 0;
    //right: 0;
    //color: $white;
  }

  //.page-not-front & {
  //  box-shadow: var(--shadow-Light-16-32);
  //}
  //
  //&.is-open,
  //&.is-scrolled {
  //  box-shadow: var(--shadow-Light-16-32);
  //}

  &.menu__is-open {
    .site-header-btn::before{
      content: '\e943';
    }
  }

  &__wrapper {
    @include layout();
    padding-top: 16px;
    padding-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    @include pc {
      padding-top: remD(24px);
      padding-bottom: remD(24px);
      gap: remD(48px);
    }
  }

  &__info{
    @include pc{
      @include layout;
    }
    .personal-registration-block,
    .personal-social-media,
    .personal-menu-top{
      display: none;

      @include pc{
        display: block;
      }
    }

    .personal-social-media__container{
      display: flex;
      align-items: center;
    }

    .personal-social-media{
      flex-grow: 1;
      img{
        filter: invert(1) brightness(200%);
        width: remD(45px);
      }
    }

    .menu{
      display: flex;
      gap: remD(32px);

      .menu__item{
        align-items: center;
      }
      .menu__item a{
        font-size: remD(15px);
        font-weight: 400;
        text-decoration: none;
        transition: all 0.2s;
        @include hover_line(var(--secondary--500), var(--secondary--500));

        &:hover{

          color: var(--secondary--500);
        }
      }

      .menu__item--active-trail{
        a{
          color: var(--secondary--500);
        }
      }

      .field-menu-icon{
        img{
          height: remD(17px);
          width: remD(17px);
        }
      }
    }

    .region-header-info{
      display: flex;
      gap: remD(32px);
      align-items: center;
      position: relative;

      @include pc{
        min-height: remD(72px);
        &::after{
          content: '';
          left: 0;
          right: 0;
          bottom: 0;
          position: absolute;
          height: 1px;
          background-color: var(--whiteColor);
          opacity: 0.24;
        }

      }

    }

    .personal-registration-block__container{
      display: flex;
      align-items: center;
      gap: remD(12px);

      span{
        opacity: 0.48;

      }


      .type-user{
        display: flex;
        align-items: center;
        gap: remD(12px);

        &:before {
          content: '\e942';
          @include icomoon(24px);
        }
      }
      a{
        @include buttonSmallD;
        text-decoration: underline;
        text-underline-offset: 3px;
        transition: all 0.2s;
        &::before{
          display: none;
        }

        @include pc{
          &:hover{
            color: var(--secondary--500);
          }
        }
      }
      .register-link a{
        color: var(--secondary--500);
        transition: all 0.2s;

        @include pc{
          &:hover{
            color: var(--whiteColor);
          }
        }
      }
    }
  }


  &__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;

    @include pc{
      //flex-grow: unset;
    }

    .block-type-logo{
      flex-grow: 1;
      display: flex;
      justify-content: center;

      @include pc{
        flex-grow: unset;
        display: block;
        flex-shrink: 0;
      }
    }

    .region-header-top {
      display: flex;
      align-items: center;
      flex-grow: 1;
      justify-content: space-between;

      @include pc {
        justify-content: space-between;
        width: 100%;
      }
    }

    .phone-group{
      .field-block-phone a{
        @include h3D;
        white-space: nowrap;
      }

      .field-block-desc{
        @include regularSmallD;
        opacity: 0.48;
      }
    }

    .field_block_messenger{
      display: none;
    }
  }

  &__center {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    z-index: 15;
    padding: rem(12px) rem(24px);
    visibility: hidden;
    opacity: 0;
    color: var(--fontColor);

    @include pc {
      position: static;
      opacity: 1;
      visibility: visible;
      padding: 0;
      margin-left: auto;
      color: var(--whiteColor);
    }

    .is-scrolled & {
      opacity: 1;
      visibility: visible;
      @include animation(1s, unset);
      animation-name: bounceInUp;
      @include pc {
        animation: unset;
      }
    }

    .region-header-middle {
      background: $white;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 4px 16px 4px 4px;
      max-width: 320px;
      margin: 0 auto;
      box-shadow: var(--shadow-Light-8-16);
      @include pc {
        box-shadow: unset;
        padding: 0;
        background: none;
        max-width: unset;
      }
    }

    .type-user{
      @include pc{
        display: none;
      }
    }
  }

  &__side_menu {
    pointer-events: none;
    position: fixed;
    top: var(--headerHeight);
    color: var(--fontColor);
    bottom: 0;
    right: 0;
    left: 0;
    @include trans();
    overflow: hidden;
    z-index: 15;
    transform: translateY(20px);
    width: auto;
    //@include layout;
    opacity: 0;
    height: 100%;
    transition: opacity .25s ease, transform .25s ease;
    background: var(--whiteColor);

    @include pc {
      display: none;
    }

    @include pcFull{
      max-width: $pcFull;
    }

    &.menu__is-open {
      pointer-events: auto;
      opacity: 1;
      transform: translateX(0);

      .block-menu__for-customers .menu .menu__item,
      .personal-main-menu .menu .menu__item,
      .language-switcher{
        opacity: 1;
        transform: translateX(0);
      }

      .region-header-menu{
        visibility: visible;
      }


    }

    .region-header-menu {
      padding: 48px 24px;
      visibility: hidden;
      transition: all 0.3s;
      @include scroll();
      position: relative;
      z-index: 2;
      width: auto;
      overflow-y: auto;
      overflow-x: hidden;
      height: calc(100dvh - 66px);
    }

    .block-menu__for-customers,
    .personal-main-menu{
      z-index: 11;
      padding-bottom: 32px;
      margin-bottom: 32px;
      border-bottom: 1px solid rgba(48, 48, 48, 0.2);
      @include stagger('.block', 20, 0.05s);
      @include stagger('.menu__item', 20, 0.05s);

      .block__title{
        @include h3;
        margin-bottom: 16px;
      }

      .menu{
        display: flex;
        flex-direction: column;
        gap: 16px;
      }
      .menu__item{
        position: relative;
        display: flex;
        align-items: flex-start;
        opacity: 0;
        transform: translateX(15px);
        transition: opacity .25s ease, transform .25s ease;

        a {
          text-decoration: none;
        }

      }

      a{
        transition: all 0.2s;
        &:hover{
          color: var(--primary--500);
        }
        @include tablet{
          @include hover_line(var(--primary--500), var(--primary--500));

          &:hover{
            color: var(--primary--500);
          }
        }

      }

    }

    .contacts-menu{
      .block__title h2{
        @include h3;
        margin-bottom: 16px;
      }

      .phone-group{
        .field-block-phone{
          margin-bottom: 0;
          a{
            @include h3();

          }
        }

        .field-block-desc{
          @include regularSmall();
        }
      }
    }

    .block-menu__catalog{
      .menu__item:has(.menu){
        flex-wrap: wrap;

        a{
          display: flex;
        }

        & > .menu{
          width: 100%;
          padding: 10px 15px;
          display: none;

          @include pc{
            display: none;
          }
        }

        &.is-open{
          & > .menu{
            display: block;
          }

          & > .arrow{
            transform: rotate(180deg);
          }
        }

      }

      .arrow{
        position: absolute;
        z-index: 5;
        top: 0;
        right: 15px;
        cursor: pointer;
        transform-origin: center;
        height: fit-content;

        &:before {
          content: '\e91a';
          @include icomoon(16px, 20px);
          color: var(--fontColor);
          display: block;
        }

        @include pc{
          display: none;
        }
      }

    }

  }


  //&.info-open {
  //& + .site-main {
  //  .page-front & {
  //    margin-top: -86px;
  //    @include pc {
  //      margin-top: remD(-100px);
  //    }
  //  }
  //}

  //}

  &__info:has(.block-type-info-header) {
    & + .site-header__wrapper {
      .site-header__side_menu {
        margin-top: 90px;

        @include phone {
          margin-top: 66px;
        }

        @include tablet {
          margin-top: 42px;
        }

        @include pc {
          margin-top: remD(50px);
        }
      }

      .search {
        .search-block {
          @include pc {
            margin-top: remD(44px);
          }
        }
      }
    }
  }
}

//Меню

.personal-main-menu {
  overflow: hidden;
  background-color: unset !important;
}


//ANIMATION

//Кінець Меню


// КНОПКА МЕНЮ
.site-header-btn {
  &::before{
    content: '\e944';
    @include icomoon();
    font-size: 22px;
    color: var(--whiteColor);
    transition: all 0.2s;
  }

  @include pc{
    display: none;
  }
}

// END Кнопка меню


.logo-header {
  @include pc {
    margin-right: remD(20px);
  }

  .field-logo{
    display: none;
    @include pc{
      display: block;
    }

    img{
      width: remD(353px);
    }
  }

  .field-logo-mobile{
    @include pc{
      display: none;
    }

    img{
      width: 188px;
      height: 34px;
      display: flex;
      align-items: center;
    }
  }
}

.search {
  @include pc {
    margin: 0 0 0 remD(32px);
    flex-grow: 1;

    .search__btn {
      display: none;
    }
  }

  .search-block {
    position: fixed;
    //top: 90px;
    top: 112px;
    left: 15px;
    right: 15px;
    z-index: 15;
    background: $white;
    padding: 16px 20px;
    opacity: 0;
    visibility: visible;
    transform: scale(0.8);
    @include trans();
    pointer-events: none;
    box-shadow: var(--shadow-Light-8-16);
    @include pc {
      position: relative;
      top: unset !important;
      bottom: unset;
      right: unset;
      left: unset;
      transform: unset;
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      display: flex;
      align-items: center;
      background: var(--2);
      box-shadow: none;
      padding: remD(4px) remD(4px) remD(4px) remD(16px);
      gap: remD(12px);
      height: remD(56px);
      width: 100%;
      &::before{
        content: '\e946';
        @include icomoon();
        color: var(--secondary--500);

      }

    }

    .form-type-textfield{
      @include pc{
        flex-grow: 1;
      }
    }

    &:focus-within {
      opacity: 1;
      visibility: visible;
      pointer-events: unset;
    }

    .wait-load & {
      display: none;
    }

    .form-item {
      margin-bottom: 0;
    }

    input {
      border-radius: unset;
      border: none;
      border-bottom: 1px solid var(--greyscale--200);
      background-image: none !important;
      padding: 3px 0 7px;
      height: auto;
      @include h4;


      @include pc{
        @include regularSmallD;
        background-color: var(--2);
        border: none;
        padding: 0;
        color: var(--whiteColor);
      }

      &::placeholder{
        color: var(--whiteColor);
        opacity: 0.48;
      }

    }

    .si-wrapper {
      position: relative;

      .clear,
      .si-btn {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        font-size: 0;
        background: none;
        border: none;
        cursor: pointer;

        &:before {
          //content: '\e915';
          @include icomoon();
        }
      }

      .clear {
        &:before {
          content: '\e90b'
        }
      }

      .si-btn {
        &:before {
          content: '\e947';
        }

        @include pc{
          &::before{
            color: var(--secondary--500);
          }
        }
      }
    }
  }

  &__btn {
    font-size: 0;
    cursor: pointer;

    &:before {
      content: "\e905";
      @include icomoon(20px);
    }

    .is-open & {
      &:before {
        content: "\e90b";
      }
    }
  }

  .form-actions {
    display: none !important;
    @include pc{
      display: block !important;
      margin: 0;

    }

    button.form-submit{

      @include pc{
        height: remD(48px);
        background: var(--secondary--500);
        min-height: unset;
        font-size: remD(17px);

        padding: remD(14px) remD(16px);

      }

    }
  }



  &.is-open .search-block {
    animation-name: bounceIn;
    @include animation(1s, unset);
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    pointer-events: auto;
  }

  .search__container{
    @include pc{
      display: flex;
      align-items: flex-start;
      justify-content: flex-start;
    }

  }
}


//.language-switcher {
//  margin: 0 8px 0 auto;
//
//  @include pc {
//    margin-right: remD(20px);
//  }
//}
//
//.language-list {
//  @include button();
//  text-transform: uppercase;
//  position: relative;
//
//  &__current {
//    position: relative;
//    display: flex;
//    align-items: center;
//    cursor: pointer;
//    line-height: 1;
//
//    &:after {
//
//      content: '\e91a';
//      @include icomoon(12px);
//      color: var(--primary--500);
//      margin-left: 5px;
//    }
//  }
//
//  &__items {
//    position: absolute;
//    opacity: 0;
//    visibility: visible;
//    background: $white;
//    padding: 10px 15px;
//    border-radius: var(--itemRadius);
//    left: 50%;
//    transform: translateX(-50%);
//    box-shadow: var(--shadow-Light-8-16);
//    z-index: 19;
//    color: $font;
//
//    &:focus-within {
//      opacity: 1;
//      visibility: visible;
//    }
//  }
//
//  &__item {
//    a {
//      text-decoration: none;
//    }
//  }
//
//  &.is-open {
//    .language-list__items {
//      opacity: 1;
//      visibility: visible;
//    }
//  }
//}



.catalog-btn-mobile,
.catalog-menu {
  display: none;
  @include pc {
    display: block;
    margin: 0 remD(20px);
  }

  .site-header__center & {
    display: block;
    @include pc {
      display: none;
    }
  }

  &__btn {
    @include btn_std(1);
  }
}

.catalog-btn-mobile{
  &__btn {
    @include btn_std(1, 1, '\e948');
    //@include icomoon();
    flex-direction: row-reverse;
  }
}

.header-block {
  margin-left: auto;

  &__container {
    display: flex;
    align-items: center;

    @include pc {
      margin: 0;
    }
  }

  &__item {
    padding: 0 10px;
    text-decoration: none;

    @include pc {
      padding: 0;
    }

    a {
      font-size: 0;
      text-decoration: none;
      position: relative;
      display: block;

      @include pc{
        @include buttonSmallD;
        display: flex;
        align-items: center;
      }

      &:before {
        @include icomoon(24px);
      }
    }

    .basket-count__link--count,
    .count {
      position: absolute;
      width: 6px;
      height: 6px;
      top: 0;
      right: 0;
      border-radius: 50%;
      background: var(--mainColor);
      opacity: 0;

      @include pc {
        z-index: 1;
        //top: remD(4px);
        //right: remD(4px);
        padding: remD(2px) remD(2px);
        background: var(--primary--500);
        color: var(--whiteColor);
        @include captionD;
        opacity: 1;
        width: auto;
        height: auto;
        min-width: 1rem;
        min-height: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: remD(2px);
        right: remD(2px);
        border-radius: 10px;
      }


      &--active {
        opacity: 1;
      }
    }

    //&.type-compare {
    //  a {
    //    &:before {
    //      content: '\e902';
    //    }
    //  }
    //}

    &.type-user {
      a {
        &:before {
          content: '\e942';
        }
      }
    }

    &.type-favorites {
      a {

        @include pc{
          transition: all 0.2s;
          padding: remD(10px);
          background: var(--secondary--500);
          display: flex;
          align-items: center;
          justify-content: center;
          min-height: remD(56px);
          min-width: remD(56px);

          &:hover{
            background: var(--secondary--600);

          }
        }
        &:before {
          content: '\e941';

          @include pc{
            content: '\e940';

          }
        }
      }
    }

    &.type-search {

      @include toPc {
        display: none;
      }
    }

    &.type-basket {
      flex-shrink: 0;

      @include pc {
        padding: 0 0 0 remD(4px);
      }

      a {
        //display: block;
        //padding-right: 0;

        &:before {
          content: '\e945';
        }
      }

      .count-link {

        @include pc {
          padding: remD(10px);
          background: var(--secondary--500);
          display: flex;
          align-items: center;
          justify-content: center;
          min-height: remD(56px);
          min-width: remD(56px);
          transition: all 0.2s;

          &:hover{
            background: var(--secondary--600);
          }
        }

        &:before {

          @include pc {
            color: var(--whiteColor);
            font-size: remD(22px);
            flex-shrink: 0;
          }
        }
      }

      .basket-count__link {

        &--text {
          @include pc {
            display: none;
          }
        }

        &--count {

          @include pc {
            z-index: 1;
            //top: remD(4px);
            //right: remD(4px);
            padding: remD(2px) remD(2px);
            background: var(--primary--500);
            color: var(--whiteColor);
            @include captionD;
            opacity: 1;
            width: auto;
            height: auto;
            min-width: 1rem;
            min-height: 1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            position: absolute;
            top: remD(2px);
            right: remD(2px);
            border-radius: 10px;
          }
        }
      }
    }

    //&--active {
    //  .basket-count__link--count,
    //  .count {
    //    opacity: 1;
    //  }
    //}
  }


}


.block-type-link-bg {
  overflow: hidden;

  .block__layout {
    overflow: hidden;
    transform: translate3d(101%, 0, 0);
    height: 100%;
  }

  .block__content {
    position: relative;
    height: 100%;
    min-height: 306px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .field-block-media {
    @include block_full;
    z-index: -1;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }

  .field-block-link {
    &:before {
      content: '';
      @include block_full;
      background: rgba(25, 26, 29, 0.75);
    }

    a {
      @include btn_std(1);
    }
  }
}

.block-type-info-header {
  //background: var(--secondaryColor);
  //color: var(--whiteColor);
  background: var(--yellow-old);
  color: var(--dark-old);
  padding: 8px 36px 10px;
  text-align: center;

  .block__layout {
    position: relative;
    @include pc {
      @include layout();
    }
  }

  .block__content {
    @include pc {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: remD(47px);
    }
  }

  .js-close-btn {
    position: absolute;
    top: 0;
    left: 100%;
    cursor: pointer;
    @include pc {
      position: static;
      display: flex;
    }

    &:before {
      content: '\e90b';
      @include icomoon();
    }
  }
}



.fixed-pane-first {
  background: var(--2);
  display: none;
  color: var(--whiteColor);

  @include pc{
    display: block;
  }
  .region{
    @include layout;
    padding-top: remD(32px);
    padding-bottom: remD(32px);
  }
  .menu{
    display: flex;
    align-items: center;
    justify-content: space-between;

    .menu__item--12{
      display: none !important;
    }

    a{
      @include buttonSmallD;
      text-decoration: none;
      line-height: 1.1 !important;
      position: relative;

      &::before {
        white-space: nowrap;
        content: attr(data-text);
        position: absolute;
        left: 0;
        top: 0;
        clip-path: inset(0 0 35% 0);
        opacity: 0;
      }
      //&::after {
      //  white-space: nowrap;
      //  content: attr(data-text);
      //  position: absolute;
      //  color: var(--secondary--500);
      //  //transform: translate(1px, 0);
      //  left: 0;
      //  top: 0;
      //  //clip-path: inset(0 0 50% 0);
      //  opacity: 0;
      //  //transition: all 0.2s;
      //}

      &:hover::before {
        //width: 100%;

        //animation: glitchTop 0.3s;
        opacity: 1;
        animation: glitch 0.4s;
      }
      &:hover::after {

        opacity: 1;
        animation: glitch 0.3s;
        //color: var(--whiteColor);
      }


    }

    .menu__item{
      flex-direction: row;
      display: flex;

    }
    .menu__item:not(:last-child){
      //padding-right: ;
      //margin-right: ;
      position: relative;
      align-items: center;
    }

    .span_line{
      display: flex !important;
      flex-grow: 1;
      align-items: center;
      justify-content: center;

      &:nth-of-type(2),
      &:last-child{
        display: none !important;
      }
      span{
        display: block;
        width: 1px;
        height: remD(13px);
        background: var(--whiteColor);
        opacity: 0.12;
      }
    }
  }
}


@keyframes glitchTop {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, -2px); }
  40% { transform: translate(2px, 2px); }
  60% { transform: translate(-1px, 1px); }
  80% { transform: translate(1px, -1px); }
  100% { transform: translate(0); }
}

@keyframes glitch {
  0% { transform: translate(0); }
  25% { transform: translate(1px, -1px); }
  50% { transform: translate(-1px, 1px); }
  75% { transform: translate(1px, 1px); }
  100% { transform: translate(0); }
}