.header-main-nav {

  .header-main-menu-col.text-center {
    > ul {
      justify-content: center;
    }
  }

  .header-main-menu-col.text-right {
    > ul {
      justify-content: right;
    }
  }

  .header-main-menu-col.text-left {
    > ul {
      justify-content: left;
    }
  }

  .header-main-menu-col {
    > ul {
      display: flex;
      align-items: center;
    }
  }

  .header-main-menu {
    ul {
      padding: 0;
      margin: 0;

      li {
        position: relative;
        text-align: right;

        &.menu-item-has-icon {
          & > a {
            display: flex;
            align-items: center;
            gap: 10px;

            .item-icon {
              width: 25px;
              height: 25px;
              display: block;
              opacity: 1 !important;
              background-size: 100% 100%;
              position: static !important;
            }
          }
        }
      }

      ul {
        li {
          &:not(:hover) {
            > ul {
              margin-top: 0;
              margin-right: -15px;
            }
          }
        }

        li.menu-item-has-children {
          > ul {
            &::before {
              width: 10px;
              height: 100%;
              bottom: 0;
              left: 100%;
            }
          }
        }
      }

      li.menu-item-has-mega-menu {
        &:not(:hover) {
          .tl-contents {
            display: none;
          }
        }
      }
    }

    > ul {
      > li {
        display: inline-block;
        font-size: 14px;
        margin-left: 15px;

        > a {
          transition: .2s;
          display: block;
          font-weight: 500;
          position: relative;

          &:not(:hover) {
            color: #666666;
          }

          i {
            position: absolute;
            top: 15px;
            left: 0;
            right: 0;
            text-align: center;
            font-size: 36px;
            opacity: 0.1;
          }
        }
      }

      &::after {
        content: "";
        display: block;
        clear: both;
      }

      > li.current-menu-item {
        > a {
          color: #999;
          pointer-events: none;
          font-weight: 500;
        }
      }

      > li.loaded {
        &:hover {
          > a {
            color: var(--ns-primary);
          }
        }
      }
    }

    li {
      > ul {
        position: absolute;
        top: 100%;
        right: 0;
        list-style: none;
        z-index: 9999;
        background: #fff;
        width: 200px;
        border-radius: var(--ns-radius) ;
        padding: 10px;
        transition: all .2s, width 0s;
        box-shadow: rgba(0, 0, 0, .1) 0 2px 5px;
        -webkit-animation-name: MenuSlideDown;
        animation-name: MenuSlideDown;
        -webkit-animation-duration: .2s;
        animation-duration: .2s;
        opacity: 0;
        visibility: hidden;
        margin: 0;
        transition-delay: .2s;
        animation-delay: .2s;
        -webkit-animation-delay: .2s;

        a {
          display: block;
          padding: 5px 10px;
          font-size: 14px;
          transition: .2s;
        }

        li {
          &:hover {
            > a {
              padding-right: 15px;
            }
          }
        }

        ul {
          top: -15px;
          right: 100%;
          margin-right: 10px;
        }

        li.menu-item-has-children {
          > a {
            &::after {
              font-family: "Font Awesome 5 Pro", sans-serif;
              content: "\f104";
              font-weight: 400;
              float: left;
              font-size: 14px;
              color: #aaa;
              transition: .2s;
            }
          }

          &:hover {
            > a {
              &::after {
                transform: rotate(-45deg);
                -webkit-transform: rotate(-45deg);
              }
            }
          }
        }

        &::before {
          content: "";
          display: block;
          width: 100%;
          height: 10px;
          position: absolute;
          bottom: 100%;
          left: 0;
        }
      }

      &:hover {
        > ul {
          margin-top: 10px;
          -webkit-animation-name: MenuSlideUp;
          animation-name: MenuSlideUp;
          opacity: 1;
          visibility: visible;
          transition-delay: 0s;
        }
      }

      > ul.is-mega-menu-con.is-two-level-mega-menu {
        align-items: start;
      }

      > ul.is-mega-menu-con.is-product-mega-menu {
        padding-bottom: 20px;
        display: flex;
        align-items: center;
      }
    }

    li[data-id] {
      position: static;

      > ul.is-mega-menu-con {
        width: 100vw;
        right: 10px;
        left: 0;
        background-repeat: no-repeat;
        background-position: bottom left;

        &::after {
          content: "";
          display: block;
          clear: both;
        }

        > li {
          width: 25%;
          float: right;

          > ul {
            opacity: 1;
            visibility: visible;
            position: static;
            margin: 0 !important;
            box-shadow: none;
            background: transparent;
            padding-top: 5px;
          }
        }

        li.menu-item-has-children {
          > a {
            &::after {
              display: none;
            }

            font-weight: 500;
            padding: 5px 10px !important;
          }
        }

        ul {
          animation: none;
          -webkit-animation: none;
        }

        &:not(.is-product-mega-menu) {
          ul {
            width: 100%;
            display: block;
            position: static;
          }

          a {
            display: inline-block;
          }
        }
      }

      &:not(:hover) {
        > ul.is-mega-menu-con {
          * {
            visibility: hidden;
          }
        }
      }
    }

    li[data-id][data-col="3"] {
      > ul.is-mega-menu-con {
        > li {
          width: 33.33%;
        }
      }
    }

    li[data-id][data-col="5"] {
      > ul.is-mega-menu-con {
        > li {
          width: 20%;
        }
      }
    }
  }

  .header-main-menu.col {
    position: static;
  }

  .header-main-menu.header-main-menu-col {
    li[data-id] {
      > ul.is-mega-menu-con {
        right: 0 !important;
      }
    }
  }

  ul.is-mega-menu-con {
    ul {
      background: transparent !important;
    }
  }
}

.responsive-menu {
  .menu-popup {
    background: #fff;
    border-left: 1px solid rgba(0, 0, 0, .12);
    bottom: 0;
    font-size: 14px;
    overflow-y: auto;
    padding: 15px 0;
    position: fixed;
    top: 0;
    right: 0;
    transform: translateX(100%);
    -webkit-transform: translateX(100%);
    transition: transform 0.15s cubic-bezier(.4, 0, .2, 1);
    transition-duration: 0.15s;
    width: 280px;
    z-index: 99999;
    margin-right: -50px;

    header.menu-header {
      text-align: center;
      margin-bottom: 15px;
      padding-bottom: 15px;
      border-bottom: 1px solid #dadce0;

      a {
        display: inline-block;

        img {
          height: 40px;
        }
      }
    }

    nav {
      ul {
        margin: 0;
        padding: 0;
        list-style: none;

        li {
          a {
            display: block;
            padding: 12px 48px;
            padding-right: 24px;
            line-height: 18px;
            transition: .3s;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            color: #666;
            font-weight: 500;

            &:hover {
              background: #f5f5f5;
              color: #202124;
              text-decoration: none;
            }
          }

          > ul {
            li {
              a {
                padding-right: 48px;
                padding-right: 48px;
              }

              > ul {
                a {
                  padding-right: 86px;
                }
              }
            }

            display: none;
          }

          position: relative;
        }

        span.toggle {
          position: absolute;
          left: 0;
          top: 0;
          display: flex;
          align-items: center;
          justify-content: center;
          cursor: pointer;
          transition: all .2s, height 0s;
          font-size: 20px;
          color: #999;

          &:hover {
            background: rgba(0, 0, 0, 0.1);
          }

          i {
            transition: .2s;
          }
        }

        span.toggle.active {
          i {
            transform: rotate(180deg);
            -webkit-transform: rotate(180deg);
          }
        }
      }
    }
  }

  .menu-popup.to-right {
    margin-right: 50px;
    right: auto;
    left: 0;
    transform: translateX(-100%);
    -webkit-transform: translateX(-100%);
  }

  .menu-popup.show {
    transform: translateX(0);
    -webkit-transform: translateX(0);
    margin-right: 0;

    + {
      .overlay {
        opacity: 1;
        visibility: visible;
        z-index: 9999;
      }
    }
  }

  .overlay {
    background-color: rgba(0, 0, 0, .5);
    bottom: 0;
    left: 0;
    opacity: 0;
    position: fixed;
    right: 0;
    top: 0;
    transform: translateZ(0);
    transition: opacity .2s linear;
    visibility: hidden;
    z-index: 4;
  }
}