/*------------- #HEADER --------------*/


.header {
  position: relative;
  padding: 0;
  background: $white-color;
  width: 100%;
  z-index: 20;
  left: 0;
  color: $heading-color;
  transition: all .3s ease;
  min-height: 60px;

  & > .container {
    @media (max-width: 1200px) {
      width: 100%;
    }
  }

  .logo {
    margin-bottom: 0;
    margin-right: 10px;

    @media (max-width: 992px) {
      order: 1;
    }
  }

  nav {
	line-height: 1;

    @media (max-width: 992px) {
      order: 4;
      text-align: right;

      * {
        text-align: left;
      }
    }

    @media (max-width: 570px) {
      margin-left: 0;
    }

    &.not-nav-add {
      @media (max-width: 768px) {
        padding-right: 100px;
      }

      @media (max-width: 480px) {
        padding-right: 0;
      }
    }

    .menu .menu-item:hover > a {
      color: var(--primary-accent-color);
    }

    .menu .menu-item:hover > a + i {
      color: var(--primary-accent-color);
    }

    .header nav .menu .menu-item > a:after,
    .header nav .menu .menu-item > a:before {
      background-color: var(--primary-accent-color);
    }
  }

  &.header-color-inherit {
    .logo .logo-text .logo-sub-title,
    .nav-add li a,
    .logo .logo-text .logo-title,
    .nav-add li.cart i,
    .nav-add li.search i,
    #menu-icon-trigger,
    .mob-menu--title,
    .navigation-menu > li.current-menu-item a {
      color: inherit;
    }
    .menu-icon-wrapper svg path{
      stroke: currentColor;
    }

    @media (min-width: 992px) {
      .navigation-menu > li > .navigation-link {
        color: inherit;
      }
    }

    .navigation-menu > li > a.navigation-link::before,
    .navigation-menu > li > a.navigation-link::after {
      border-color: inherit;
    }

    .nav-add li.search i:hover {
      color: inherit;
    }

    .nav-add li.search a {
      opacity: .5;

      &:hover {
        opacity: 1;
      }
    }
  }

  &.header-sticky-mobile {
    @media (max-width: 992px) {
      position: -webkit-sticky;
      top: 0;
      will-change: opacity;
      position: sticky;
      @include admin-sticky-fix;
    }

    &.header--fixed {
      @media (max-width: 992px) {
        box-shadow: 9px 9px 9px 0 rgba(47, 44, 44, 0.2);

        .navigation-menu > .navigation-item {
          padding: 0;
        }
      }
    }
  }

  &.header-sticky-desktop {
	@media (min-width: 992px) {
      position: -webkit-sticky;
      top: 0;
      will-change: opacity;
      position: sticky;
      @include admin-sticky-fix;
	}

    &.header--fixed {

      @media (min-width: 992px) {
        box-shadow: 9px 9px 9px 0 rgba(47, 44, 44, 0.2);
      }

      @media (max-width: 992px) {
        .navigation-menu > .navigation-item {
          padding: 0;
        }
      }
    }
  }
}

.admin-bar .header.sticky-top.header--fixed {
  @media (max-width: 600px) {
    top: 0;
  }
}

.admin-bar .header.header-sticky-mobile.header--fixed {
  @media (max-width: 992px) {
    top: 32px;
  }

  @media (max-width: 768px) {
    top: 46px;
  }

  @media (max-width: 600px) {
    top: 0;
  }
}

.admin-bar .header.header-sticky-mobile.header--fixed + .top-bar {
  @media (max-width: 992px) {
	top: 32px;
  }

  @media (max-width: 768px) {
    top: 46px;
  }

  @media (max-width: 600px) {
	top: 0;
  }
}

.admin-bar .navigation-body {
  @media (max-width: 992px) {
    top: 32px;
  }

  @media (max-width: 768px) {
    top: 46px;
  }
}

.admin-bar .header--fixed .navigation-body {
  @media (max-width: 992px) {
    top: 32px;
  }

  @media (max-width: 768px) {
    top: 46px;
  }

  @media (max-width: 600px) {
    top: 0;
  }
}

.nav-add {
  padding: 0;
  margin: 0;
  line-height: 1;

  @media (max-width: 992px) {
    order: 2;
	margin-left: auto;
  }

  @media (max-width: 570px) {
    padding-left: 0;
    margin-left: auto;
  }

  li {
    display: inline-block;

    a {
      display: inline-block;
    }

    &.cart {
      position: relative;

      &.visible {
        .cart-popup-wrap {
          opacity: 1;
          visibility: visible;
          max-height: 80vh;
        }
      }

      a {
        position: relative;
      }

      .cart-popup-link {
        cursor: pointer;
        position: absolute;
        width: 100%;
        height: 100%;
        z-index: 999;
        top: 0;
        left: 0;

        @media(max-width: 991px) {
          display: none;
        }
      }

      .cart-count {
        display: block;
        position: absolute;
        left: -6px;
        top: 4px;
        width: 16px;
        height: 16px;
        line-height: 14px;
        font-size: 10px;
        color: $white-color;
        text-align: center;
        border: 1px solid transparent;
        border-radius: 50%;
        background-color: var(--primary-accent-color);
      }

      i {
        font-size: 28px;
        color: var(--header-font-color);
        transition: all .3s ease;

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

    &.search {
      position: relative;
      cursor: pointer;

      i {
        margin-left: 10px;
        transition: all .3s ease;
        font-size: 24px;
        color: var(--header-font-color);
        position: relative;

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

.logo {
  position: relative;
  margin-bottom: 20px;
  overflow: hidden;
  transition: all .3s ease;
  max-height: unset;
  display: flex;
  align-items: center;

  img {
    margin-right: 15px;
  }

  .logo-text {
    line-height: 1;

    .logo-title {
      font-size: 27px;
      text-transform: uppercase;
      color: inherit;

      @media (max-width: 1200px) {
		font-size: 20px;
      }
    }

    .logo-sub-title {
      font-size: 10px;
      text-transform: uppercase;
    }
  }
}

.user-menu {
  position: absolute;
  right: 85px;
  bottom: -35px;
  width: 70px;
  height: 70px;
  border: 3px solid $heading-color;
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  border-radius: 50%;
  -khtml-border-radius: 50%;
  transition: all .3s ease;
  transform: scale(1);
  overflow: hidden;
  background-color: $white-color;
  display: inline-block;

  @media (max-width: 1200px) {
	bottom: -25px;
	width: 50px;
	height: 50px;
  }

  @media (max-width: 992px) {
    position: relative;
    bottom: auto;
    right: auto;
    margin: 9px;
    width: 40px;
    height: 40px;
	float: right;
  }

  .user-menu-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 90%;
    height: 90%;
    border-radius: 50%;
    text-align: center;
    overflow: hidden;
    background-color: var(--secondary-accent-color);
     
    img {
        max-height: 70%;
        max-width: 70%;
    }

    span {
      display: block;
      height: 3px;
      background: $white-color;
      transition: all .3s ease;
      border-radius: 10px;
      margin: 2px auto;
      width: 50%;

      @media (max-width: 992px) {
        height: 3px;
        margin: 1px auto;
      }

      &:first-of-type {
        width: 25%;
      }

      &:last-of-type {
        width: 40%;
      }
    }

    &:hover {
      span {
        width: 70%;
      }
    }
  }
}


/*------------- #rulles for top-bar in header --------------*/

.header.header-top-bar {
  display: block;
}

.header.header-top-bar .top-bar {
  max-height: 50vh;
}

.header.header--fixed.header-top-bar .top-bar {
  visibility: hidden;
  opacity: 0;
  max-height: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

@media (max-width: 992px) {
  .header > .top-bar {
    display: none;
    visibility: hidden;
  }
}

@media (max-width: 600px) {
  .admin-bar .top-bar.open {
    top: 46px;
  }
}