/* =====================
   CƠ BẢN
===================== */
.hsb-container {
  position: relative;
  z-index: 9999;
}

.hsb-hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  transition: transform 0.2s ease;
}
.hsb-hamburger:hover {
  transform: scale(1.1);
}

/* =====================
   SIDEBAR & OVERLAY
===================== */
#hsb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9998;
}
#hsb-overlay.active {
  opacity: 1;
  visibility: visible;
}

.hsb-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 20%;
  height: 100%;
  background: #fff;
  transform: translateX(-100%);
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.3, 1);
  box-shadow: 3px 0 10px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 25px;
}

.hsb-sidebar.open {
  transform: translateX(0);
}

/* =====================
   HEADER & SEARCH
===================== */
.hsb-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  margin-top: 25px;
}
#hsb-close {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
}
.hsb-logo {
  max-height: 120px;
  width: auto;
}
.hsb-search {
  margin-bottom: 25px;
}

/* =====================
   MENU ANIMATION
===================== */
.hsb-menu-wrapper ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hsb-menu-wrapper li {
  border-bottom: 1px solid #eee;
  opacity: 0;
  transform: translateX(-15px);
  animation: hsbFadeSlide 0.5s ease forwards;
}

.hsb-sidebar.open .hsb-menu-wrapper li {
  animation-delay: calc(var(--i) * 0.07s);
}

@keyframes hsbFadeSlide {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hsb-menu-wrapper li a {
  display: block;
  padding: 12px 0;
  color: #313435;
  text-decoration: none;
  font-weight: 700;
  FONT-FAMILY: 'ROBOTO FLEX';
  font-size: 24px;
  transition: color 0.2s ease;
}
.hsb-menu-wrapper li a:hover {
  color: #c00;
}

/* =====================
   LINKS DƯỚI
===================== */
.hsb-links {
  padding-top: 15px;
  border-top: 1px solid #ddd;
}
.hsb-extra-link {
  display: block;
  margin-top: 10px;
  color: #181a1b;
  text-decoration: none;
  font-size: 16px;
  FONT-FAMILY: 'ROBOTO FLEX';
  transition: color 0.2s ease;
}
.hsb-extra-link:hover {
  color: #c00;
}

/* =====================
   NO SCROLL KHI MỞ
===================== */
body.hsb-no-scroll {
  overflow: hidden;
}


/* --- Khi form mở thì logo và nút X biến mất mềm --- */
/* --- ẨN LOGO VÀ DẤU X KHI TÌM KIẾM MỞ --- */

/* Khi hsb-topbar có class 'search-active' (được thêm bởi JS), ẩn logo và nút X */
.hsb-topbar.search-active .hsb-logo-box,
.hsb-topbar.search-active #hsb-close {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: all 0.3s ease;
}

/* Đảm bảo Form Tìm kiếm ở trên cùng (nếu cần) */
.tsb-wrapper.form-open {
    z-index: 1000 !important;
}
