@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}
header {
  z-index: 1000;
  position: relative;
}

.head-top {
  z-index: 1001;
  height: 72px;
  transition: all 0.3s ease;
}
header.sticky,
.head-top.sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  animation: slideDown 0.3s ease;
}
header.mobile-sticky {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}
.sticky-placeholder {
  display: none;
  height: 72px;
}
.sticky-placeholder.active {
  display: block;
}
.head-top a,
.head-top-mobile a {
  color: #fff;
}
.head-nav {
  justify-content: center;
  margin: auto;
  width: max-content;
}
.head-nav > li {
  margin: 0;
  padding: 0 30px;
}
.head-nav a {
  font-size: 20px;
  line-height: 72px;
}
.head-nav a:hover {
  color: #ff6f80;
}
.head-bottom-wrap {
  justify-content: space-between;
  align-items: center;
  width: 1300px;
  margin: auto;
  padding: 20px;
}
.head-logo {
  width: 15%;
}
.head-logo a {
  display: block;
  width: 100%;
}
.head-logo a img {
  display: block;
  width: 100%;
}

.head-search {
  position: relative;
  width: 60%;
}
.head-search > input {
  display: inline-block;
  outline: none;
  border: none;
  line-height: 62px;
  text-indent: 2em;
  border-radius: 31px;
}
.head-search button {
  right: 6px;
  top: 0;
  bottom: 0;
  margin: auto;
}
.icon-cart {
  font-size: 24px;
  padding-right: 10px;
}
.products-num {
  font-size: 18px;
}

/* Back to top button styles */
.back-to-top {
  z-index: 1000;
  position: fixed;
  bottom: 20%;
  right: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  font-size: 20px;
  background: #007cba;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #005a8a;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 124, 186, 0.4);
}

.back-to-top:active {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 124, 186, 0.3);
}

.back-to-top::before {
  content: "↑";
  font-size: 24px;
  font-weight: bold;
}

/* menu mobile toggle*/
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    /* color: #fff; */
    font-size: 24px;
    cursor: pointer;
    padding: 10px 15px;
    position: absolute;
    right: 18%;
    top: 30%;
    transform: translateY(-50%);
    z-index: 1002;
}
.head-top-mobile {
  display: none;
}

@media (max-width: 1320px) {
    .head-bottom-wrap {
        width: 95%;
        padding: 15px 20px;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .mobile-menu-toggle {
      display: block;
  }
  .head-top-mobile {
    display: block;
  }

  .head-top {
    display: none;
      /* height: 60px; */
  }
  .head-bottom-wrap {
    flex-direction: column;
    width: 100%;
  }
  .head-search {
    width: 100%;
  }

  .sticky-placeholder.active {
      height: 60px;
  }

  .head-nav {
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      width: 100%;
      background-color: #262626;
      flex-direction: column;
      padding: 0;
      transform: translateY(-100%);
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s ease;
      z-index: 1000;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  }

  .head-nav.active {
      transform: translateY(0);
      opacity: 1;
      visibility: visible;
  }

  .head-nav > li {
      padding: 0;
      width: 100%;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .head-nav a {
      display: block;
      width: 100%;
      padding: 15px 20px;
      text-align: left;
      line-height: normal;
      font-size: 16px;
      transition: all 0.3s ease;
  }

  .head-nav a:hover {
      background-color: rgba(255, 255, 255, 0.1);
      padding-left: 30px;
  }
  .head-bottom-wrap {
      flex-direction: column;
      gap: 15px;
      align-items: stretch;
      padding: 15px;
  }

  .head-logo {
      width: 200px;
      /* margin: 0 auto; */
      order: 1;
  }

  .head-search {
      width: 100%;
      order: 3;
  }

  .head-search > input {
      line-height: 50px;
      font-size: 14px;
  }

  .head-search button {
      padding: 12px 18px;
      font-size: 14px;
  }

  .head-cart {
      order: 2;
      position: absolute;
      top: 20%;
      right: 15px;
  }

  .icon-cart {
      font-size: 20px;
  }

  .products-num {
      font-size: 14px;
      min-width: 20px;
      height: 20px;
  }
  .head-nav li {
      opacity: 0;
      transform: translateX(-20px);
      transition: all 0.3s ease;
  }

  .head-nav.active li {
      opacity: 1;
      transform: translateX(0);
  }

  .head-nav.active li:nth-child(1) { transition-delay: 0.1s; }
  .head-nav.active li:nth-child(2) { transition-delay: 0.15s; }
  .head-nav.active li:nth-child(3) { transition-delay: 0.2s; }
  .head-nav.active li:nth-child(4) { transition-delay: 0.25s; }
  .head-nav.active li:nth-child(5) { transition-delay: 0.3s; }
  .head-nav.active li:nth-child(6) { transition-delay: 0.35s; }
  .back-to-top {
    bottom: 20%;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 18px;
  }
}
@media (max-width: 480px) {
    .head-top {
        height: 55px;
    }
    .head-top-mobile {
      display: block;
    }


    .sticky-placeholder.active {
        height: 55px;
    }

    .mobile-menu-toggle {
        font-size: 20px;
        padding: 8px 12px;
    }

    .head-nav a {
        font-size: 15px;
        padding: 12px 15px;
    }

    .head-logo {
        width: 200px;
    }

    .head-search > input {
        line-height: 45px;
        font-size: 13px;
        text-indent: 1.5em;
    }

    .head-search button {
        padding: 10px 15px;
        font-size: 13px;
    }

    .head-cart {
        top: 20%;
        right: 12px;
    }
}
