:root {
  --nhs-primary-color: #007bff;
  --nhs-primary-hover: #0056b3;
  --nhs-bg-color: #333;
  --nhs-text-color: #fff;
  --nhs-border-color: #e0e0e0;
  --nhs-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  
  /* CẤU HÌNH VỊ TRÍ (Đổi số ở đây để chỉnh khoảng cách) */
  --nhs-bottom: 2px; /* Khoảng cách so với đáy màn hình */
}

/* Khung bọc menu - Cố định & Căn giữa màn hình */
.nhs-floating-menu-wrapper {
  position: fixed;
  bottom: var(--nhs-bottom);  /* Khoảng cách so với mép dưới màn hình */
  left: 50%;                  /* Đẩy góc trái menu ra giữa màn hình */
  transform: translateX(-50%);/* Kéo menu lùi lại 50% độ rộng để nằm CHUẨN GIỮA */
  z-index: 9999;              /* Đảm bảo menu luôn đè lên trên các thành phần khác */
  font-family: Arial, sans-serif;
  width: auto;
  max-width: 95vw;            /* Giới hạn tối đa không tràn màn hình */
  box-sizing: border-box;
}

/* Thanh nút bấm chính */
.nhs-menu-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--nhs-primary-color);
  color: #fff;
  border-radius: 11px;
  padding: 10px 36px;
  box-shadow: var(--nhs-shadow);
  gap: 16px;
  white-space: nowrap;        /* Giữ các icon không rớt dòng */
}

/* Biểu tượng các Nút (Home, Cart, Zalo, Msg, Phone) */
.nhs-menu-icon-home,
.nhs-menu-cart-btn,
.nhs-menu-zalo-btn,
.nhs-menu-msg-btn,
.nhs-menu-phone-btn {
  color: #fff;
  font-size: 18px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

/* Vùng chữ "DANH MỤC" */
.nhs-menu-content {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  font-weight: bold;
  font-size: 18px;
  white-space: nowrap;
}

.nhs-arrow-icon {
  font-size: 12px;
  transition: transform 0.2s ease;
}

/* Mũi tên xoay khi mở popup */
.nhs-floating-menu-wrapper.active .nhs-arrow-icon {
  transform: rotate(180deg);
}

/* =========================================
   HIỆU ỨNG NHẢY ICON KHI DI CHUỘT (HOVER)
   ========================================= */
.nhs-menu-button a i, 
.nhs-menu-button .nhs-menu-content i {
  display: inline-block;
  transition: transform 0.25s ease;
}

.nhs-menu-button a:hover i,
.nhs-menu-button .nhs-menu-content:hover i {
  transform: translateY(-4px); /* Icon nhảy lên 4px khi rê chuột */
}

/* =========================================
   POPUP DANH SÁCH MỤC (Căn giữa theo menu)
   ========================================= */
.nhs-menu-popup {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;                  /* Đẩy ra giữa so với thanh menu */
  transform: translateX(-50%);/* Căn giữa chuẩn popup */
  margin-bottom: 8px;
  width: 220px;
  max-width: 90vw;            /* Giới hạn độ rộng trên mobile */
  background-color: var(--nhs-bg-color);
  border-radius: 8px;
  box-shadow: var(--nhs-shadow);
  border: 1px solid var(--nhs-border-color);
  overflow: hidden;
}  

.nhs-floating-menu-wrapper.active .nhs-menu-popup {
  display: block;
}

.nhs-menu-popup ul {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}

.nhs-menu-popup ul li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  color: var(--nhs-text-color);
  text-decoration: none;
  font-size: 16px;
}

.nhs-menu-popup ul li a i {
  width: 16px;
  text-align: center;
  color: var(--nhs-primary-color);
}

.nhs-menu-popup ul li a:hover {
  background-color: var(--nhs-primary-hover);
  color: #fff;
}

/* Đường gạch dọc phân cách */
.nhs-divider {
  width: 1px;
  height: 16px;                               /* Chiều cao gạch dọc */
  background-color: rgba(255, 255, 255, 0.4); /* Màu trắng mờ */
  display: inline-block;
  flex-shrink: 0;
}


/* =========================================
   OPTIMIZE TƯƠNG THÍCH CHO MOBILE (Mobile Responsive)
   ========================================= */
@media (max-width: 576px) {
  .nhs-floating-menu-wrapper {
    bottom: 1px;             /* Giảm nhẹ khoảng cách đáy trên điện thoại */
    /* Giữ nguyên left: 50% để không bị vỡ căn giữa trên Mobile */
  }

  .nhs-menu-button {
    padding: 8px 12px;        /* Thu gọn lề trong nút */
    gap: 8px;                 /* Giảm khoảng cách giữa các phần tử */
  }

  .nhs-menu-content {
    font-size: 18px;          /* Thu nhỏ chữ DANH MỤC */
    gap: 6px;
  }

  .nhs-menu-icon-home,
  .nhs-menu-cart-btn,
  .nhs-menu-zalo-btn,
  .nhs-menu-msg-btn,
  .nhs-menu-phone-btn {
    font-size: 16px;          /* Thu nhỏ icon một chút để đủ chỗ trên mobile */
    padding: 2px;
  }

  .nhs-divider {
    height: 18px;             /* Thu ngắn thanh gạch dọc */
  }
}