/* Website bán hàng 0.7.0 — điều hướng (luồng W2b, docs/THIET-KE-WEBSITE.md §4): menu nhóm hàng trong đầu trang của theme,
   ô tìm hàng có gợi ý, cụm nút Tài khoản + Giỏ, thanh nút cố định trên điện thoại (dock).
   Nạp khi Site\Frame::on() (và ở trang chủ của plugin cho ô tìm lớn). Phụ thuộc vtg-bh-web-site (biến :root --bhw-*).
   Không nằm trong @layer: thắng luật có layer của theme. Chỉ chạm lớp của theme qua selector có tiền tố body.bhw-site / .bhw-.
   Màu chỉ qua biến. Điểm gãy đầu trang điện thoại của theme: ≤ 1023px. */

/* ---------- Menu chính (máy tính) ---------- */

body.bhw-site .vc-header__in {
  position: relative;
}

.bhw-nav .bhw-i {
  fill: none;
}

.bhw-nav .bhw-nav-n {
  flex: none;
  min-width: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--bhw-panel-2, #eef1ef);
  color: var(--bhw-muted, #5b6661);
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
}

.bhw-nav .bhw-nav-glink {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--bhw-s2, 8px);
}

.bhw-nav .bhw-nav-name {
  min-width: 0;
}

.bhw-nav .bhw-nav-all > .vc-menu__link {
  display: inline-flex;
  align-items: center;
  gap: var(--bhw-s1, 4px);
  color: var(--bhw-c);
  font-weight: 600;
}

@media (min-width: 1024px) {
  /* Mũi tên nhỏ sau mục có menu con: người dùng chuột biết mục này xổ ra. */
  .vc-header__desktop .bhw-nav-cats > .vc-menu__link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
  }

  .vc-header__desktop .bhw-nav-cats > .vc-menu__link::after {
    content: "";
    width: 0;
    height: 0;
    margin-left: 4px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.6;
    transition: transform 0.18s;
  }

  .vc-header__desktop .bhw-nav-cats:hover > .vc-menu__link::after,
  .vc-header__desktop .bhw-nav-cats:focus-within > .vc-menu__link::after {
    transform: rotate(180deg);
  }

  /* Menu xổ một cột (ít nhóm): rộng hơn mặc định của theme để tên nhóm và số không xuống dòng. */
  .vc-header__desktop .bhw-nav-cats > .bhw-nav-sub {
    min-width: 260px;
    padding: var(--bhw-s2, 8px);
  }

  .vc-header__desktop .bhw-nav-sub > .bhw-nav-all {
    margin-top: var(--bhw-s1, 4px);
    padding-top: var(--bhw-s1, 4px);
    border-top: 1px solid var(--bhw-line, #dfe4e1);
  }

  /* Bảng nhiều cột (nhiều nhóm hoặc có nhóm con): neo theo cả hàng đầu trang, căn giữa, không tràn mép màn hình. */
  .vc-header__desktop .vc-menu__item.bhw-nav-mega {
    position: static;
  }

  .vc-header__desktop .bhw-nav-mega > .bhw-nav-sub {
    top: 100%;
    left: 50%;
    width: min(100%, calc(var(--bhw-nav-cols, 3) * 250px + 2 * var(--bhw-s5, 24px)));
    max-height: calc(100dvh - var(--bhw-header-h, 64px) - 40px);
    overflow-y: auto;
    transform: translateX(-50%);
    padding: var(--bhw-s5, 24px);
    border-radius: 0 0 var(--bhw-r-lg, 16px) var(--bhw-r-lg, 16px);
    box-shadow: var(--bhw-shadow-lg, 0 16px 40px rgb(16 24 40 / 0.12));
    grid-template-columns: repeat(var(--bhw-nav-cols, 3), minmax(0, 1fr));
    gap: var(--bhw-s2, 8px) var(--bhw-s5, 24px);
    align-items: start;
  }

  /* Cầu nối vô hình dưới chữ menu (bảng neo theo đáy hàng đầu trang, cách chữ một khoảng): rê chuột xuống không bị đóng.
     Đặt trên liên kết chứ không trên bảng vì bảng có overflow (cuộn) sẽ cắt mất phần tử nhô ra ngoài. */
  .vc-header__desktop .bhw-nav-mega > .vc-menu__link {
    position: relative;
  }

  .vc-header__desktop .bhw-nav-mega > .vc-menu__link::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 24px;
  }

  .vc-header__desktop .vc-menu__item.bhw-nav-mega:hover > .bhw-nav-sub,
  .vc-header__desktop .vc-menu__item.bhw-nav-mega:focus-within > .bhw-nav-sub,
  .vc-header__desktop .vc-menu__item.bhw-nav-mega.is-open > .bhw-nav-sub {
    display: grid;
  }

  /* Esc trong menu (site.js đặt .is-shut): đóng dù chuột / tiêu điểm còn ở trong mục. */
  .vc-header__desktop .vc-menu__item.bhw-nav-cats.is-shut > .bhw-nav-sub {
    display: none;
  }

  .vc-header__desktop .bhw-nav-mega .bhw-nav-group {
    min-width: 0;
  }

  .vc-header__desktop .bhw-nav-mega .bhw-nav-group > .bhw-nav-glink {
    padding: var(--bhw-s2, 8px) var(--bhw-s3, 12px);
    font-weight: 600;
    color: var(--bhw-ink, #1b2420);
  }

  .vc-header__desktop .bhw-nav-mega .bhw-nav-group.vc-menu__item--parent > .bhw-nav-glink {
    border-bottom: 1px solid var(--bhw-line, #dfe4e1);
    border-radius: var(--bhw-r-sm, 8px) var(--bhw-r-sm, 8px) 0 0;
  }

  /* Nhóm con trong bảng luôn hiện (không xổ tầng thứ ba sang phải như menu thường của theme). */
  .vc-header__desktop .bhw-nav-mega .bhw-nav-sub2 {
    position: static;
    display: block;
    min-width: 0;
    margin: var(--bhw-s1, 4px) 0 var(--bhw-s2, 8px);
    padding: 0;
    border: 0;
    box-shadow: none;
    background: none;
  }

  .vc-header__desktop .bhw-nav-mega .bhw-nav-sub2 .vc-menu__link {
    padding: 6px var(--bhw-s3, 12px);
    color: var(--bhw-muted, #5b6661);
    font-weight: 400;
  }

  .vc-header__desktop .bhw-nav-mega .bhw-nav-sub2 .vc-menu__link:hover {
    color: var(--bhw-c);
  }

  .vc-header__desktop .bhw-nav-mega .bhw-nav-group > .vc-menu__toggle {
    display: none;
  }

  .vc-header__desktop .bhw-nav-mega > .bhw-nav-sub > .bhw-nav-all {
    grid-column: 1 / -1;
    margin-top: var(--bhw-s2, 8px);
    padding-top: var(--bhw-s3, 12px);
    border-top: 1px solid var(--bhw-line, #dfe4e1);
  }
}

/* ---------- Ô tìm hàng trong đầu trang ---------- */

.bhw-hsearch {
  position: relative;
}

.vc-header__desktop .bhw-hsearch {
  width: clamp(200px, 20vw, 320px);
}

.vc-header__desktop .bhw-hsearch .search-field {
  min-width: 0;
}

.bhw-hsearch .search-field::-webkit-search-cancel-button {
  cursor: pointer;
}

/* Danh sách gợi ý (site.js dựng bằng createElement). */
.bhw-hs-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  min-width: 300px;
  max-height: min(70vh, 480px);
  margin: 0;
  padding: var(--bhw-s1, 4px);
  overflow-y: auto;
  list-style: none;
  background: var(--bhw-paper, #fff);
  color: var(--bhw-ink, #1b2420);
  border: 1px solid var(--bhw-line, #dfe4e1);
  border-radius: var(--bhw-r, 12px);
  box-shadow: var(--bhw-shadow-lg, 0 16px 40px rgb(16 24 40 / 0.12));
  text-align: left;
}

.bhw-hs-list[hidden] {
  display: none;
}

.vc-header__desktop .bhw-hs-list {
  left: auto;
  width: max(100%, 380px);
}

.bhw-hs-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: var(--bhw-s3, 12px);
  min-height: 52px;
  padding: var(--bhw-s1, 4px) var(--bhw-s2, 8px);
  border-radius: var(--bhw-r-sm, 8px);
  color: inherit;
  text-decoration: none;
}

.bhw-hs-item:hover,
.bhw-hs-item.is-active {
  background: var(--bhw-soft, #f1f5fb);
}

.bhw-hs-item img,
.bhw-hs-item .bhw-hs-ph {
  width: 44px;
  height: 44px;
  border-radius: var(--bhw-r-sm, 8px);
  object-fit: contain;
  background: var(--bhw-paper, #fff);
  border: 1px solid var(--bhw-line, #dfe4e1);
}

.bhw-hs-item .bhw-hs-ph {
  display: grid;
  place-items: center;
  border: 0;
  background: color-mix(in srgb, var(--bhw-c) 8%, var(--bhw-paper, #fff));
  color: var(--bhw-c);
}

.bhw-hs-ph .bhw-i {
  width: 22px;
  height: 22px;
}

.bhw-hs-text {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.bhw-hs-name {
  overflow: hidden;
  font-size: var(--vc-step--1, 14px);
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.bhw-hs-price {
  color: var(--bhw-c);
  font-size: var(--vc-step--1, 14px);
  font-weight: 700;
}

.bhw-hs-price small {
  color: var(--bhw-muted, #5b6661);
  font-weight: 400;
}

.bhw-hs-all,
.bhw-hs-empty {
  display: flex;
  align-items: center;
  gap: var(--bhw-s2, 8px);
  min-height: 44px;
  padding: var(--bhw-s2, 8px) var(--bhw-s3, 12px);
  border-radius: var(--bhw-r-sm, 8px);
  font-size: var(--vc-step--1, 14px);
}

.bhw-hs-all {
  margin-top: var(--bhw-s1, 4px);
  border-top: 1px solid var(--bhw-line, #dfe4e1);
  border-radius: 0 0 var(--bhw-r-sm, 8px) var(--bhw-r-sm, 8px);
  color: var(--bhw-c);
  font-weight: 600;
  text-decoration: none;
}

.bhw-hs-all:hover,
.bhw-hs-all.is-active {
  background: var(--bhw-soft, #f1f5fb);
}

.bhw-hs-empty {
  color: var(--bhw-muted, #5b6661);
}

/* Tấm tìm của theme trên điện thoại: danh sách nằm trong dòng chảy (tấm đã có thanh cuộn riêng). */
/* Ô có viền bo tròn như ô tìm trong trang, chữ 16px (iOS không phóng), nút "Tìm" màu chính bên phải; ghi đè cỡ chữ 1.55rem,
   gạch chân của theme (main.css .vc-panel__search input[type=search]). */
.vc-panel__search .bhw-hsearch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin-right: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}

.vc-panel__search .bhw-hsearch .search-field {
  flex: 1 1 0;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--bhw-line, #dfe4e1);
  border-right: 0;
  border-radius: 999px 0 0 999px;
  background: var(--bhw-paper, #fff);
  color: var(--bhw-ink, #1b2420);
  font-size: 16px;
  line-height: 1.3;
}

.vc-panel__search .bhw-hsearch .search-field:focus {
  border-color: var(--bhw-c);
  outline: none;
}

.vc-panel__search .bhw-hsearch .vc-field__go {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 46px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0 999px 999px 0;
  background: var(--bhw-c);
  color: var(--bhw-on-c, #fff);
}

.vc-panel__search .bhw-hsearch .vc-field__go .bhw-i,
.vc-panel__search .bhw-hsearch .vc-field__go svg {
  width: 20px;
  height: 20px;
}

/* Chip "Tìm nhanh" do site.js chép từ nhóm hàng ở chân trang. */
.bhw-ps-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--bhw-s2, 8px);
  margin-top: var(--bhw-s4, 16px);
}

.bhw-ps-title {
  flex: 1 0 100%;
  margin: 0;
  color: var(--bhw-muted, #5b6661);
  font-size: 13px;
  font-weight: 600;
}

.bhw-ps-chips a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--bhw-line, #dfe4e1);
  border-radius: 999px;
  background: var(--bhw-paper, #fff);
  color: var(--bhw-ink, #1b2420);
  font-size: 14px;
  text-decoration: none;
}

.vc-panel__search .bhw-hs-list {
  position: static;
  flex: 1 0 100%;
  min-width: 0;
  max-height: none;
  margin-top: var(--bhw-s3, 12px);
  box-shadow: none;
}

/* Ô tìm lớn ở trang chủ (Site\Nav::searchForm('hero')): nền trắng trên dải màu, nút có chữ. */
.bhw-hsearch--hero {
  width: 100%;
  max-width: 640px;
  min-height: 56px;
  padding: 6px 6px 6px var(--bhw-s4, 16px);
  gap: var(--bhw-s2, 8px);
  border: 1px solid transparent;
  background: var(--bhw-paper, #fff);
  color: var(--bhw-ink, #1b2420);
  box-shadow: var(--bhw-shadow-lg, 0 16px 40px rgb(16 24 40 / 0.12));
}

.bhw-hsearch--hero:focus-within {
  border-color: var(--bhw-c);
  outline: 3px solid color-mix(in srgb, var(--bhw-paper, #fff) 55%, transparent);
}

.bhw-hsearch--hero .bhw-hsearch-ic {
  display: grid;
  color: var(--bhw-muted, #5b6661);
}

.bhw-hsearch--hero .search-field {
  min-width: 0;
  font-size: var(--vc-step-0, 16px);
  color: inherit;
}

.bhw-hsearch--hero .search-field::placeholder {
  color: var(--bhw-muted, #5b6661);
}

.bhw-hsearch--hero .bhw-hsearch-go {
  width: auto;
  height: 44px;
  padding: 0 var(--bhw-s5, 24px);
  border-radius: 999px;
  background: var(--bhw-c);
  color: var(--bhw-on-c, #fff);
  font: inherit;
  font-weight: 600;
}

.bhw-hsearch--hero .bhw-hsearch-go:hover {
  background: var(--bhw-c-d, var(--bhw-c));
  color: var(--bhw-on-c, #fff);
}

.bhw-hsearch--hero .bhw-hs-list {
  top: calc(100% + 8px);
  min-width: 0;
}

/* ---------- Cụm nút Tài khoản + Giỏ ---------- */

.bhw-hact {
  display: flex;
  align-items: center;
  gap: var(--bhw-s1, 4px);
}

.bhw-hact .bhw-hact-btn,
.bhw-hact a.bhw-cartlink {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 var(--bhw-s2, 8px);
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--bhw-ink, #1b2420);
  font-size: var(--vc-step--1, 14px);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.bhw-hact .bhw-hact-btn:hover,
.bhw-hact a.bhw-cartlink:hover,
.bhw-hact .bhw-hact-btn[aria-current] {
  background: var(--bhw-soft, #f1f5fb);
  color: var(--bhw-c);
}

.bhw-hact .bhw-hact-btn:focus-visible,
.bhw-hact a.bhw-cartlink:focus-visible {
  outline: 2px solid var(--bhw-focus, var(--bhw-c));
  outline-offset: 2px;
}

.bhw-hact .bhw-i {
  width: 22px;
  height: 22px;
}

/* Giỏ nổi bật hơn Tài khoản: viền màu chính. */
.bhw-hact a.bhw-cartlink {
  padding-inline: var(--bhw-s3, 12px);
  box-shadow: inset 0 0 0 1px var(--bhw-line, #dfe4e1);
}

.bhw-hact a.bhw-cartlink:hover {
  box-shadow: inset 0 0 0 1px var(--bhw-c);
}

/* Số trên giỏ: chấm tròn góc trên icon (luồng 9 in .bhw-cartlink-n[data-bhw-cart-count], JS tô). */
.bhw-hact .bhw-cartlink-n {
  position: absolute;
  top: 2px;
  left: 26px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--bhw-a);
  color: var(--bhw-on-a, #1b2420);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bhw-paper, #fff);
}

.bhw-hact [data-bhw-cart-count][hidden] {
  display: none;
}

/* Chữ của nút: ẩn khỏi mắt dưới 1280px (vẫn là tên cho trình đọc màn hình). */
@media (max-width: 1279px) {
  .bhw-hact .bhw-hact-label,
  .bhw-hact a.bhw-cartlink > span:not([data-bhw-cart-count]) {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .bhw-hact a.bhw-cartlink {
    padding-inline: var(--bhw-s2, 8px);
  }
}

/* Thanh trên của điện thoại khi không có dock: chỉ icon. */
.vc-header__mobile .bhw-hact {
  gap: 0;
}

.vc-header__mobile .bhw-hact a.bhw-cartlink {
  box-shadow: none;
}

/* ---------- Thanh nút cố định trên điện thoại (dock) ---------- */

.bhw-dock {
  display: none;
}

@media (max-width: 1023px) {
  body.bhw-has-dock {
    --bhw-dock-h: 56px;
    /* --bhw-stick-bottom của :root đã tính với dock 0: tính lại ở đây cho thanh mua cố định của trang chi tiết. */
    --bhw-stick-bottom: calc(var(--bhw-dock-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: calc(var(--bhw-dock-h) + env(safe-area-inset-bottom, 0px));
  }

  /* Thông báo nổi của giỏ (web-cart.css) nằm trên dock, không đè hàng nút. Thanh mua đang hiện thì web-product.css nâng thêm. */
  body.bhw-has-dock .bhw-toast {
    bottom: calc(var(--bhw-stick-bottom) + var(--bhw-s3, 12px));
  }

  .bhw-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--bhw-z-dock, 9970);
    display: grid;
    grid-template-columns: repeat(var(--bhw-dock-n, 5), minmax(0, 1fr));
    height: calc(var(--bhw-dock-h, 56px) + env(safe-area-inset-bottom, 0px));
    padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    background: var(--bhw-paper, #fff);
    border-top: 1px solid var(--bhw-line, #dfe4e1);
    box-shadow: 0 -4px 16px rgb(16 24 40 / 0.06);
  }

  .bhw-dock-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    height: var(--bhw-dock-h, 56px);
    margin: 0;
    padding: 4px 2px;
    border: 0;
    background: none;
    color: var(--bhw-muted, #5b6661);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .bhw-dock-btn:hover,
  .bhw-dock-btn:active {
    color: var(--bhw-c);
  }

  .bhw-dock-btn:focus-visible {
    outline: 2px solid var(--bhw-focus, var(--bhw-c));
    outline-offset: -4px;
    border-radius: var(--bhw-r-sm, 8px);
  }

  .bhw-dock-btn.is-current,
  .bhw-dock-btn[aria-expanded="true"] {
    color: var(--bhw-c);
  }

  .bhw-dock-btn.is-current .bhw-dock-label {
    font-weight: 700;
  }

  /* Vạch nhỏ trên mục đang ở. */
  .bhw-dock-btn.is-current .bhw-dock-ic::before {
    content: "";
    position: absolute;
    top: -9px;
    left: 50%;
    width: 24px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--bhw-c);
    transform: translateX(-50%);
  }

  .bhw-dock-ic {
    position: relative;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
  }

  .bhw-dock-ic .bhw-i {
    width: 22px;
    height: 22px;
  }

  .bhw-dock-label {
    max-width: 100%;
    overflow: hidden;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .bhw-dock-n {
    position: absolute;
    top: -4px;
    left: 15px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--bhw-a);
    color: var(--bhw-on-a, #1b2420);
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--bhw-paper, #fff);
  }

  .bhw-dock-n[hidden] {
    display: none;
  }

  /* Tấm phủ của theme (menu, tìm) cuộn tới đáy không bị dock che. */
  body.bhw-has-dock .vc-panel__in {
    padding-bottom: calc(34px + var(--bhw-dock-h) + env(safe-area-inset-bottom, 0px));
  }

  /* Dock có nút Chat (lớp bhw-dock-chat do Nav::bodyClass đặt): giấu bong bóng chat; khung chat khi mở vẫn hiện.
     Dock không có nút Chat (Gọi / Zalo) thì bong bóng giữ nguyên, chat.js đã nâng nó lên trên dock. */
  body.bhw-has-dock.bhw-dock-chat #bhw-chat .bhw-chat-bubble {
    display: none;
  }

  /* Tấm menu điện thoại: số hàng của nhóm nhỏ gọn, "Xem tất cả" nổi rõ. */
  .vc-panel__menu .bhw-nav .bhw-nav-glink {
    padding-right: var(--bhw-s2, 8px);
  }

  .vc-panel__menu .bhw-nav .bhw-nav-sub {
    padding-bottom: var(--bhw-s3, 12px);
  }

  .vc-panel__menu .bhw-nav .bhw-nav-sub .vc-menu__link {
    font-size: var(--vc-step-0, 16px);
    font-weight: 500;
  }

  .vc-panel__menu .bhw-nav .bhw-nav-sub2 {
    border-left: 2px solid var(--bhw-line, #dfe4e1);
    margin-left: 2px;
  }
}

@media (max-width: 1023px) and (prefers-reduced-motion: no-preference) {
  .bhw-dock-btn .bhw-dock-ic {
    transition: transform 0.15s;
  }

  .bhw-dock-btn:active .bhw-dock-ic {
    transform: scale(0.92);
  }
}

@media print {
  .bhw-dock,
  .bhw-hs-list {
    display: none !important;
  }
}

/* ---------- Hotline trên thanh menu dính, nút nổi Gọi + Zalo (Site\Locate::floats) ---------- */

.bhw-hact .bhw-hact-tel {
  color: var(--bhw-c, #1d5fbf);
  font-weight: 700;
  white-space: nowrap;
}

/* Xếp cột trên bong bóng chat (56px, cách đáy 16px): không chồng khung chat của src/Chat. */
.bhw-float {
  position: fixed;
  right: 20px;
  bottom: calc(16px + 56px + 12px + env(safe-area-inset-bottom, 0px));
  z-index: 9979;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bhw-float-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--vc-bg, #fff);
  color: var(--bhw-c, #1d5fbf);
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.18);
  text-decoration: none;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
}

.bhw-float-btn--call {
  background: var(--bhw-c, #1d5fbf);
  color: var(--bhw-on-c, #fff);
}

.bhw-float-btn:hover,
.bhw-float-btn:focus-visible {
  transform: translateY(-1px);
  color: inherit;
}

.bhw-float-label {
  margin-top: 1px;
}

/* Khung chat đang mở: ẩn nút nổi để không đè lên khung. */
body:has(#bhw-chat-panel:not([hidden])) .bhw-float {
  display: none;
}

@media (max-width: 1023px) {
  /* Thanh dưới đã có nút Gọi / Zalo / Chat; trang chi tiết có thanh mua dính: không thêm nút nổi. */
  body.bhw-has-dock .bhw-float {
    display: none;
  }

  .bhw-float {
    right: 16px;
  }

  .bhw-float-btn {
    width: 44px;
    height: 44px;
  }
}

/* Menu chính: giữ mỗi mục trên một dòng ("Trang chủ", "Sản phẩm"…), thu khoảng đệm cho đủ chỗ. */
@media (min-width: 1025px) {
  .bhw-nav .vc-menu__link {
    white-space: nowrap;
    padding-inline: 10px;
  }
}
