@charset "UTF-8";

/**
 * @copyright     2022 beikeshop.com - All Rights Reserved.
 * @link          https://beikeshop.com
 * @Author        guangda <service@guangda.work>
 * @Date          2022-09-03 22:32:29
 * @LastEditTime  2022-09-16 20:55:12
 */

header {
  background: #fff;

  .top-wrap {
    height: 36px;
    background: #F7F8FA;
    display: flex;
    border-bottom: 1px solid #ddd;

    > .container, .container-fluid {
      @media (max-width:768px) {
        padding: 0 10px;
      }
    }

    .dropdown {
      &:hover {
        background-color: #fff;

        .dropdown-menu {
          display: block;
          border: none;
          box-shadow: 0 0 15px rgb(0, 0, 0, .1);

          &.dropdown-menu-end {
            right: 0;
          }
        }
      }
    }
  }

  .header-content {
    .nav-item {
      &:hover {
        > a {
          color: $primary;
        }
      }
    }

    .dropdown {
      .dropdown-menu {
        max-height: 80vh;
        overflow-y: auto;
        border: none;
        left: 50%;
        visibility: hidden;
        opacity: 0;
        display: block;
        transform-origin: top center;
        transition: all .2s ease-in-out;
        transform: translate(-50%, 0.5rem);
        box-shadow: 0 0 15px rgb(0, 0, 0, .1);
      }

      &:hover {
        .dropdown-menu {
          opacity: 1;
          visibility: visible;
          transform: translate(-50%);
        }
      }
    }
  }

  .header-content {
    position: relative;
    background-color: #fff;
    padding: 1rem 0;
    transition: all .2s ease-in-out;
    border-bottom: 1px solid #eee;

    // body:not(.page-home) & {
    //   box-shadow: 0 6px 12px 0 rgba(0, 0, 0, .04);
    // }

    &.fixed {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 999;
      padding: .4rem 0;
      border-color: transparent;
      box-shadow: 0 6px 12px 0 rgba(0, 0, 0, .06);
    }

    > .container, .container-fluid {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .menu-wrap {
      .container {
        max-width: 1140px;
      }

      > .navbar-nav {
        > .nav-item {
          background-color: transparent;
          &:hover {
            > .nav-link {
              > svg {
                transform: rotate(180deg);
              }
            }
          }

          > .nav-link {
            font-size: 15px;
            padding: 1rem;
            position: relative;
            @media (max-width: 1200px) {
              padding: 1rem .5rem;
            }

            > svg {
              margin-left: -3px;
              transition: all .2s ease-in-out;
            }

            &.dropdown-toggle::after {
              counter: '';
              display: none;
            }

            .badge {
              position: absolute;
              bottom: 80%;
              padding: 2px 4px;
              font-weight: 400;
              left: calc(50% - 0px);
              margin-left: 0px;

              &::before {
                content: "";
                position: absolute;
                top: 100%;
                left: 10px;
                border: 4px solid;
                border-color: inherit;
                border-right-color: #0000!important;
                border-bottom-color: #0000!important;
                border-right-width: 7px;
                border-left-width: 0;
              }
            }
          }
        }

        .group-name {
          font-size: 15px;
        }

        .ul-children {
          a {
            color: #7a7a7a;
            &:hover {
              color: $primary;
            }
          }
        }
      }
    }

    .logo {
      img {
        max-width: 200px;
        max-height: 50px;
        @media (max-width: 1200px) {
          max-width: 160px;
        }
      }
    }

    .right-btn {
      .nav-link {
        color: #333;
        padding-right: 0.7rem;
        padding-left: 0.7rem;
        position: relative;
        @media (max-width: 1200px) {
          padding-right: 0.3rem;
          padding-left: 0.3rem;
        }

        i {
          font-size: 1.1rem;
        }

        img {
          width: 24px;
        }
      }
    }
  }

  .cart-badge-quantity {
    position: absolute;
    left: 21px;
    top: -3px;
    text-align: center;
    font-size: 12px;
    display: none;
    width: 23px;
    zoom: 0.9;
    height: 23px;
    line-height: 24px;
    background-color: #fd560f;
    color: #fff;
    border-radius: 50%;
  }

  .header-mobile {
    border-bottom: 1px solid #eee;

    &.fixed {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 999;
      box-shadow: 0 8px 14px 0 rgba(0, 0, 0, .1);
      background: #fff;
      border-color: transparent;
    }

    .mobile-content {
      padding: 10px;
      display: flex;
      align-items: center;
      justify-content: space-between;

      > div {
        width: 33.33%;

        &.center a {
          display: flex;
          align-items: center;
          justify-content: center;
          height: 30px;

          img {
            max-height: 100%;
          }
        }
      }

      .left {
        display: flex;
        align-items: center;

        > div {
          cursor: pointer;
          > i {
            font-size: 1.5rem;
            line-height: 1;
          }
        }

        .mobile-open-search {
          margin-left: 12px;

          > i {
            font-size: 1.1rem;
          }
        }
      }

      .right {
        display: flex;
        justify-content: flex-end;

        .m-cart {
          .cart-badge-quantity {
            left: 11px;
            top: -9px;
            width: 20px;
            height: 20px;
            line-height: 20px;
          }
        }

        .mb-account-icon {
          span {
            margin-right: -2px;
            display: inline-block;
            vertical-align: 0.255em;
            border-top: 0.3em solid;
            border-right: 0.3em solid transparent;
            border-bottom: 0;
            border-left: 0.3em solid transparent;
          }
        }

        .nav-link {
          padding: 0;
          i {
            font-size: 1.2rem;
          }

          // margin-left: 14px;
        }
      }
    }
  }
}

#offcanvas-search-top {
  height: 100px;
  justify-content: center;

  .offcanvas-header {
    width: 100%;
  }

  input {
    &:focus {
      box-shadow: none;
    }
  }

  .btn-close {
    padding: 1rem;
    opacity: 1;

    &:hover {
      background-color: #eee;
    }
  }
}

#offcanvas-right-cart {
  .select-wrap {
    margin-right: 10px;
    cursor: pointer;

    i {
      font-size: 20px;
      color: #aaa;
      &.bi-check-circle-fill {
        color: $primary;
      }
    }
  }

  .offcanvas-right-products {
    .product-list {
      padding: 1rem 0;
      border-top: 1px solid #eee;

      .left {
        width: 80px;
        flex: 0 0 80px;
        height: 80px;
        border: 1px solid #eee;
        margin-right: 10px;

        img {
          max-height: 80px;
        }
      }

      .right {
        .name {
          word-break: break-all;
        }

        .price {
          input {
            margin-left: 10px;
            width: 50px;
            height: 24px;
          }
        }

        .offcanvas-products-delete {
          cursor: pointer;
          color: #999;
        }
      }
    }
  }

  .offcanvas-footer {

  }
}

#offcanvas-mobile-menu {
  width: 80%;

  .offcanvas-header {
    padding: 10px 20px 10px 10px;
  }

  .mobile-menu-wrap {
    padding: 0;

    #menu-accordion {
      border-top: 1px solid #e5e5e5;

      .accordion-item {
        border-bottom: 1px solid #e5e5e5;

        .nav-item-text {
          display: flex;
          align-items: center;
          justify-content: space-between;

          > a {
            flex: 1;
            height: 44px;
            padding-left: 10px;
            display: flex;
            align-items: center;

            .badge {
              position: relative;
              margin-left: 13px;
              // padding: 2px 4px;
              font-weight: 400;

              &::before {
                content: "";
                position: absolute;
                top: 50%;
                right: 100%;
                transform: translate(0, -50%);
                border: 4px solid;
                border-right-width: 7px;
                border: 5px solid #0000;
                border-right-color: inherit;
              }
            }
          }

          > span {
            width: 44px;
            height: 44px;
            display: flex;
            border-left: 1px solid #e5e5e5;
            align-items: center;
            justify-content: center;
            &:active {
              background-color: #eee;
            }

            &[aria-expanded="true"] {
              background-color: #eee;
              i {
                transform:rotate(180deg);
              }
            }
          }
        }

        > .accordion-collapse {
          padding: 0 10px;
          border-top: 1px solid #e5e5e5;

          .children-group {
            .children-title {
              height: 44px;
              span {
                margin-right: -10px;
                width: 44px;
                height: 42px;
                display: flex;
                align-items: center;
                justify-content: center;
                &:active {
                  background-color: #eee;
                }

                &[aria-expanded="true"] {
                  i::before {
                    content: "\F63B";
                  }
                }
              }
            }

            .nav {
              a {
                color: #777;
              }
            }
          }
        }
      }
    }
  }
}