/* Web cho khách (luồng 8): danh mục, chi tiết, tài khoản, tra đơn. Lớp .bhw-*, mobile-first.
   Màu theo cài đặt giao_dien (biến --bhw-c / --bhw-a do PHP gắn trên khối .bhw); khoảng cách, bo góc, cỡ chữ lấy token
   của theme vtg-core (--vc-*) khi có, không có thì dùng số dự phòng cùng giá trị. Không sửa theme. */

.bhw {
  /* Màu thương hiệu theo mẫu màu của cửa hàng: Page::open() in thẳng --bhw-c / -c-d / -c-l / -on-c / -a / -on-a / -focus /
     -t-bg / -t-soft / -t-line inline trên khối .bhw (cùng bảng Site\Frame::vars() in lên :root), thắng các dòng dưới đây.
     Các dòng var(--bh-*, …) chỉ là dự phòng khi khối .bhw không có style inline; số dự phòng = mẫu mặc định. */
  --bhw-c: var(--bh-primary, #1d5fbf);
  --bhw-c-d: var(--bh-primary-d, color-mix(in srgb, var(--bhw-c) 88%, #000));
  --bhw-on-c: var(--bh-on-primary, #fff);
  --bhw-a: var(--bh-accent, #ffab2e);
  --bhw-on-a: var(--bh-on-accent, #1b2420);
  --bhw-focus: var(--bh-focus, color-mix(in srgb, var(--bhw-c) 50%, transparent));
  --bhw-ink: var(--vc-text, #1b2420);
  --bhw-muted: var(--vc-muted, #5b6661);
  --bhw-line: var(--bhw-t-line, var(--vc-line, #dfe4e1));
  --bhw-bg: var(--vc-bg, #fff);
  --bhw-soft: color-mix(in srgb, var(--bhw-c) 7%, #fff);
  /* Nền xám nhạt của ô ảnh, đầu bảng, nhãn trạng thái: nhuốm theo nền của mẫu màu. */
  --bhw-panel: var(--bhw-t-soft, #f4f6f5);
  --bhw-panel-2: var(--bhw-t-bg, #eef1ef);
  --bhw-r: var(--vc-r, 12px);
  --bhw-r-sm: var(--vc-r-sm, 8px);
  --bhw-r-lg: var(--vc-r-lg, 16px);
  --bhw-s1: var(--vc-s-1, 4px);
  --bhw-s2: var(--vc-s-2, 8px);
  --bhw-s3: var(--vc-s-3, 12px);
  --bhw-s4: var(--vc-s-4, 16px);
  --bhw-s5: var(--vc-s-5, 24px);
  --bhw-s6: var(--vc-s-6, 32px);
  --bhw-s7: var(--vc-s-7, 48px);
  /* Màu trạng thái giữ cố định (không theo mẫu màu) để xanh = được, đỏ = lỗi luôn đọc đúng. */
  --bhw-ok: #1d7a3e;
  --bhw-ok-l: #e8f5ec;
  --bhw-warn: #b4232a;
  --bhw-warn-l: #fdecec;
  --bhw-info: #1f4f96;
  --bhw-info-l: #e8f0fb;
  color: var(--bhw-ink);
  font-size: var(--vc-step-0, 16px);
  line-height: 1.5;
  padding-block: var(--bhw-s5) var(--bhw-s7);
}

.bhw *,
.bhw *::before,
.bhw *::after {
  box-sizing: border-box;
}

.bhw--narrow {
  max-width: var(--vc-content, 760px);
  margin-inline: auto;
}

/* Nút, ô icon, chip, "Xem tất cả" tự đặt màu (web-site.css); :where giữ độ ưu tiên cũ của luật này (0,1,1). */
.bhw a:where(:not(.bhw-btn, .bhw-tile, .bhw-chip, .bhw-sec-more)) {
  color: var(--bhw-c);
}

.bhw img {
  max-width: 100%;
  height: auto;
}

/* ---------- Icon của bộ chung (Core\Icons::svg, cỡ in sẵn ở width/height; lớp dưới đổi cỡ) ---------- */

.bhw-i {
  flex: none;
  display: inline-block;
  vertical-align: middle;
  overflow: visible;
}

.bhw-i--sm {
  width: 14px;
  height: 14px;
}

.bhw-i--lg {
  width: 24px;
  height: 24px;
}

.bhw-i--xl {
  width: 40px;
  height: 40px;
}

.bhw-crumbs .bhw-i {
  margin-right: var(--bhw-s1);
}

.bhw-crumbs-sep {
  color: var(--bhw-muted);
  opacity: 0.6;
}

.bhw-crumbs a {
  display: inline-flex;
  align-items: center;
}

.bhw-empty > .bhw-i {
  display: block;
  margin: 0 auto var(--bhw-s3);
  color: color-mix(in srgb, var(--bhw-c) 55%, var(--bhw-muted));
}

/* ---------- Đường dẫn vị trí, tiêu đề ---------- */

.bhw-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--bhw-s1) var(--bhw-s2);
  margin: 0 0 var(--bhw-s4);
  padding: 0;
  list-style: none;
  font-size: var(--vc-step--1, 14px);
  color: var(--bhw-muted);
}

.bhw-crumbs li {
  display: inline-flex;
  align-items: center;
}

.bhw-crumbs a {
  color: var(--bhw-muted);
  text-decoration: none;
}

.bhw-crumbs a:hover {
  color: var(--bhw-c);
}

/* Màn cảm ứng: vùng bấm của liên kết đường dẫn vị trí ≥ 40px, đệm dọc bù bằng lề âm nên hàng không cao thêm. */
@media (max-width: 1023px) {
  .bhw-crumbs a {
    padding-block: 10px;
    margin-block: -10px;
  }
}

.bhw-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--bhw-s2) var(--bhw-s4);
  margin-bottom: var(--bhw-s4);
}

.bhw-title {
  margin: 0 0 var(--bhw-s3);
  font-size: var(--vc-step-2, 28px);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.bhw-head .bhw-title {
  margin: 0;
}

.bhw-count {
  margin: 0;
  color: var(--bhw-muted);
  font-size: var(--vc-step--1, 14px);
}

.bhw-h2 {
  margin: 0 0 var(--bhw-s4);
  font-size: var(--vc-step-1, 20px);
  line-height: 1.4;
  font-weight: 600;
}

.bhw-section {
  margin-top: var(--bhw-s7);
}

/* ---------- Nút, ô nhập ---------- */
/* Nút .bhw-btn và mọi biến thể nằm ở web-site.css (bộ lớp dùng chung, 0.7.0) — file này phụ thuộc file đó. */

.bhw a:focus-visible,
.bhw-thumb:focus-visible {
  outline: 2px solid var(--bhw-focus);
  outline-offset: 2px;
}

.bhw-field {
  display: grid;
  gap: var(--bhw-s1);
  margin: 0 0 var(--bhw-s3);
  border: 0;
  padding: 0;
  min-width: 0;
}

.bhw-field > span,
.bhw-field > legend {
  font-size: var(--vc-step--1, 14px);
  color: var(--bhw-muted);
  padding: 0;
}

.bhw-field input,
.bhw-field select {
  width: 100%;
  min-height: 44px;
  padding: 0 var(--bhw-s3);
  border: 1px solid var(--bhw-line);
  border-radius: var(--bhw-r);
  background: var(--bhw-bg);
  color: var(--bhw-ink);
  font: inherit;
}

.bhw-field input:focus,
.bhw-field select:focus {
  border-color: var(--bhw-c);
  outline: 2px solid color-mix(in srgb, var(--bhw-c) 25%, transparent);
  outline-offset: 0;
}

.bhw-field--inline {
  display: flex;
  align-items: center;
  gap: var(--bhw-s2);
  margin: 0;
}

.bhw-field--inline select {
  width: auto;
}

.bhw-check {
  display: flex;
  align-items: center;
  gap: var(--bhw-s2);
  margin-bottom: var(--bhw-s3);
  font-size: var(--vc-step--1, 14px);
}

.bhw-row {
  display: grid;
  gap: 0 var(--bhw-s3);
}

/* Ô bẫy chống máy đăng ký: người thật không thấy. */
.bhw-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.bhw-msg {
  margin: 0 0 var(--bhw-s3);
  padding: var(--bhw-s2) var(--bhw-s3);
  border-radius: var(--bhw-r-sm);
  font-size: var(--vc-step--1, 14px);
  background: var(--bhw-soft);
}

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

.bhw-msg.is-error {
  background: var(--bhw-warn-l);
  color: var(--bhw-warn);
}

.bhw-msg.is-ok {
  background: var(--bhw-ok-l);
  color: var(--bhw-ok);
}

.bhw-hint,
.bhw-note {
  margin: var(--bhw-s3) 0 0;
  font-size: var(--vc-step--1, 14px);
  color: var(--bhw-muted);
}

.bhw-panel {
  position: relative;
  padding: var(--bhw-s5);
  border: 1px solid var(--bhw-line);
  border-radius: var(--bhw-r-lg);
  background: var(--bhw-bg);
}

/* ---------- Tìm kiếm có gợi ý ---------- */

.bhw-search {
  position: relative;
  display: flex;
  gap: var(--bhw-s2);
  max-width: 760px;
  margin-bottom: var(--bhw-s5);
}

.bhw-search-ic {
  position: absolute;
  left: 14px;
  top: 50%;
  display: grid;
  transform: translateY(-50%);
  color: var(--bhw-muted);
  pointer-events: none;
}

.bhw-search input[type="search"] {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 var(--bhw-s3) 0 44px;
  border: 1px solid var(--bhw-line);
  border-radius: var(--bhw-r);
  background: var(--bhw-bg);
  color: var(--bhw-ink);
  font: inherit;
}

.bhw-search input[type="search"]:focus {
  border-color: var(--bhw-c);
  outline: 2px solid color-mix(in srgb, var(--bhw-c) 25%, transparent);
}

.bhw-search .bhw-btn {
  min-height: 48px;
  min-width: 72px;
}

.bhw-suggest {
  position: absolute;
  z-index: 50;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: var(--bhw-s1);
  list-style: none;
  border: 1px solid var(--bhw-line);
  border-radius: var(--bhw-r);
  background: var(--bhw-bg);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.12);
  max-height: 420px;
  overflow-y: auto;
}

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

.bhw-suggest-item,
.bhw-suggest-all {
  display: flex;
  align-items: center;
  gap: var(--bhw-s3);
  padding: var(--bhw-s2);
  border-radius: var(--bhw-r-sm);
  color: var(--bhw-ink) !important;
  text-decoration: none;
}

.bhw-suggest-item img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--bhw-r-sm);
}

.bhw-suggest-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bhw-suggest-price {
  color: var(--bhw-c);
  font-weight: 600;
  white-space: nowrap;
}

.bhw-suggest-all {
  justify-content: center;
  color: var(--bhw-c) !important;
  font-size: var(--vc-step--1, 14px);
}

.bhw-suggest a:hover,
.bhw-suggest a.is-active {
  background: var(--bhw-soft);
}

/* ---------- Danh sách: bố cục, bộ lọc ---------- */

/* Đầu trang nhóm: dải nhuốm màu chính, ô ảnh nhóm (hoặc icon nhóm), tên, số hàng, mô tả. */
.bhw-cat-head {
  display: flex;
  align-items: center;
  gap: var(--bhw-s4);
  margin-bottom: var(--bhw-s4);
  padding: var(--bhw-s4);
  border-radius: var(--bhw-r-lg);
  background: linear-gradient(120deg, color-mix(in srgb, var(--bhw-c) 11%, var(--bhw-bg)), color-mix(in srgb, var(--bhw-c) 3%, var(--bhw-bg)));
}

.bhw-cat-head--plain {
  padding: 0;
  background: none;
}

.bhw-cat-head-media {
  flex: none;
  width: 64px;
  height: 64px;
}

.bhw-cat-head-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: var(--bhw-bg);
}

.bhw-cat-head-ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--bhw-bg);
  color: var(--bhw-c);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--bhw-c) 18%, transparent);
}

.bhw-cat-head-ph > svg {
  width: 50%;
  height: 50%;
}

.bhw-cat-head-text {
  min-width: 0;
}

.bhw-cat-head .bhw-title {
  margin: 0;
}

.bhw-cat-head .bhw-count {
  margin-top: 2px;
}

.bhw-cat-desc {
  margin: var(--bhw-s1) 0 0;
  max-width: 72ch;
  color: var(--bhw-muted);
  font-size: var(--vc-step--1, 14px);
}

/* Hàng chip nhóm (con / anh em) và chip điều kiện đang lọc: một hàng cuộn ngang trên điện thoại. */
.bhw-cat-chips {
  margin: 0 0 var(--bhw-s4);
}

.bhw-cat-chips .bhw-chips,
.bhw-chips.bhw-active {
  display: flex;
  gap: var(--bhw-s2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.bhw-cat-chips .bhw-chips {
  flex-wrap: nowrap;
  overflow-x: auto;
  margin-inline: calc(-1 * var(--bhw-gutter, 16px));
  padding: 2px var(--bhw-gutter, 16px);
  scroll-padding-inline: var(--bhw-gutter, 16px);
  scrollbar-width: none;
}

.bhw-cat-chips .bhw-chips::-webkit-scrollbar {
  display: none;
}

.bhw-cat-chips li,
.bhw-active li {
  flex: none;
}

.bhw-cat-chips a.bhw-chip,
.bhw-active a.bhw-chip {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--bhw-bg);
  white-space: nowrap;
  font-size: var(--vc-step--1, 14px);
}

.bhw-cat-chips a.bhw-chip small {
  min-width: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--bhw-panel);
  font-size: 12px;
  text-align: center;
}

.bhw-cat-chips a.bhw-chip.is-active {
  border-color: var(--bhw-c);
  background: var(--bhw-c);
  color: var(--bhw-on-c);
  font-weight: 600;
}

.bhw-cat-chips a.bhw-chip.is-active small {
  background: color-mix(in srgb, var(--bhw-on-c) 22%, transparent);
  color: inherit;
}

.bhw-chips.bhw-active {
  flex-wrap: wrap;
  overflow: visible;
  margin: 0 0 var(--bhw-s4);
  padding: 0;
}

.bhw-active a.bhw-chip {
  border-color: transparent;
  background: var(--bhw-soft);
  color: var(--bhw-c);
}

.bhw-active a.bhw-chip:hover {
  border-color: var(--bhw-c);
}

.bhw-layout {
  display: grid;
  gap: var(--bhw-s5);
}

.bhw-side {
  display: grid;
  gap: var(--bhw-s4);
  align-content: start;
}

.bhw-filter {
  padding: var(--bhw-s4);
  border: 1px solid var(--bhw-line);
  border-radius: var(--bhw-r-lg);
  background: var(--bhw-bg);
}

.bhw-filter > summary {
  font-weight: 600;
  cursor: pointer;
}

.bhw-cats {
  margin: var(--bhw-s3) 0 0;
  padding: 0;
  list-style: none;
}

.bhw-cats a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--bhw-s2);
  min-height: 44px;
  padding: 6px var(--bhw-s2);
  border-radius: var(--bhw-r-sm);
  color: var(--bhw-ink);
  text-decoration: none;
  line-height: 1.35;
}

.bhw-cats a:hover {
  background: var(--bhw-soft);
}

.bhw-cats a.is-active {
  background: var(--bhw-soft);
  color: var(--bhw-c);
  font-weight: 600;
}

.bhw-cats-n {
  flex: none;
  color: var(--bhw-muted);
  font-size: 12px;
  font-weight: 400;
}

.bhw-cats-d1 a {
  padding-left: var(--bhw-s5);
}

.bhw-cats-d2 a {
  padding-left: var(--bhw-s6);
  font-size: var(--vc-step--1, 14px);
}

.bhw-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: var(--bhw-s2);
}

.bhw-range legend {
  grid-column: 1 / -1;
  margin-bottom: var(--bhw-s1);
}

.bhw-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--bhw-s2);
}

.bhw-filter-actions .bhw-btn {
  flex: 1 1 auto;
}

.bhw-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--bhw-s2) var(--bhw-s3);
  margin-bottom: var(--bhw-s4);
}

.bhw-toolbar-filter {
  flex: none;
}

.bhw-toolbar-n {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--bhw-c);
  color: var(--bhw-on-c);
  font-size: 12px;
  line-height: 1;
}

.bhw-sortform {
  margin-left: auto;
  min-width: 0;
}

.bhw-sortform .bhw-field--inline > span {
  color: var(--bhw-muted);
}

.bhw-sortform-label {
  display: none;
}

.bhw-sortform select {
  max-width: 100%;
  min-height: 44px;
}

/* Ngăn trượt lọc: dưới 1024px nằm ngoài màn hình bên trái, nút "Lọc" mở (web.js). Từ 1024px là cột lọc thường. */
.bhw-drawer {
  position: fixed;
  inset: 0;
  z-index: var(--bhw-z-drawer, 9975);
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear 0.25s;
}

.bhw-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.bhw-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(15 20 18 / 0.45);
  opacity: 0;
  transition: opacity 0.25s;
}

.bhw-drawer.is-open .bhw-drawer-backdrop {
  opacity: 1;
}

.bhw-drawer-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: min(360px, 88vw);
  background: var(--bhw-bg);
  box-shadow: 8px 0 32px rgb(0 0 0 / 0.18);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  outline: none;
}

.bhw-drawer.is-open .bhw-drawer-panel {
  transform: none;
}

.bhw-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--bhw-s3);
  padding: var(--bhw-s2) var(--bhw-s2) var(--bhw-s2) var(--bhw-s4);
  border-bottom: 1px solid var(--bhw-line);
}

.bhw-drawer-title {
  display: inline-flex;
  align-items: center;
  gap: var(--bhw-s2);
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.bhw-drawer-x {
  width: 44px;
  padding: 0;
  border-color: transparent;
}

.bhw-drawer-panel .bhw-side {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--bhw-s4) var(--bhw-s4) calc(var(--bhw-s4) + env(safe-area-inset-bottom, 0px));
}

html.bhw-lock,
html.bhw-lock body {
  overflow: hidden;
}

/* Bong bóng chat (lớp 9980+) nằm trên ngăn (9975) và che góc nút "Áp dụng": ẩn trong lúc ngăn mở, không sửa web-chat.css. */
html.bhw-lock .bhw-chat {
  visibility: hidden;
}

/* Nút "Lọc" in sẵn [hidden], web.js mở khi ngăn trượt đã sẵn sàng. */
.bhw-toolbar-filter[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .bhw-drawer,
  .bhw-drawer-backdrop,
  .bhw-drawer-panel {
    transition: none;
  }
}

/* ---------- Lưới hàng, thẻ hàng ---------- */

/* Lưới: 2 cột < 600px, 3 cột 600–1023px, 4 cột từ 1024px (5 khi ≥ 1440px và không có cột lọc). */
.bhw-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--bhw-s3);
}

/* Hàng trượt (trang chủ trên điện thoại): một hàng thẻ vuốt ngang, mép thẻ kế tiếp ló ra báo còn nữa. */
.bhw-grid--rail {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 44%);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  margin-inline: calc(-1 * var(--bhw-gutter, 16px));
  padding: 2px var(--bhw-gutter, 16px) var(--bhw-s2);
  scroll-padding-inline: var(--bhw-gutter, 16px);
  scrollbar-width: none;
}

.bhw-grid--rail::-webkit-scrollbar {
  display: none;
}

.bhw-grid--rail > * {
  scroll-snap-align: start;
}

.bhw-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--bhw-line);
  border-radius: var(--bhw-r-lg);
  overflow: hidden;
  background: var(--bhw-bg);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.bhw-card:hover {
  border-color: color-mix(in srgb, var(--bhw-c) 35%, var(--bhw-line));
  box-shadow: 0 8px 24px rgb(16 24 40 / 0.08);
}

.bhw-card:has(.bhw-card-link:focus-visible) {
  outline: 2px solid var(--bhw-focus);
  outline-offset: 2px;
}

.bhw-card-img {
  position: relative;
  display: block;
  aspect-ratio: var(--vc-ratio-product, 1 / 1);
  overflow: hidden;
  background: #fff;
  border-bottom: 1px solid color-mix(in srgb, var(--bhw-line) 60%, transparent);
}

.bhw-card-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Không ảnh: nền nhuốm màu chính + icon nhóm (Card::placeholder). Đặt đủ ở đây để thẻ vẫn đẹp dù .bhw-ph chung đổi cỡ. */
.bhw-card-ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
}

.bhw-card-ph > svg {
  width: 36%;
  max-width: 96px;
  height: auto;
  aspect-ratio: 1;
  transition: transform 0.25s ease;
}

.bhw-card:hover .bhw-card-ph > svg {
  transform: scale(1.06);
}

.bhw-card.is-out .bhw-card-img img,
.bhw-card.is-out .bhw-card-ph {
  opacity: 0.55;
  filter: grayscale(1);
}

/* Nhãn góc (tối đa 2): kiểu chữ, màu của .bhw-badge ở web-site.css; ở đây chỉ vị trí và cỡ. */
.bhw-card-badges {
  position: absolute;
  top: var(--bhw-s2);
  left: var(--bhw-s2);
  right: var(--bhw-s2);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--bhw-s1);
  pointer-events: none;
}

.bhw-card-badges .bhw-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
}

.bhw-card-badges .bhw-badge > svg {
  width: 13px;
  height: 13px;
}

.bhw-card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  padding: var(--bhw-s3);
}

.bhw-card-meta {
  overflow: hidden;
  color: var(--bhw-muted);
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bhw-card-meta[hidden] {
  display: none;
}

.bhw-card-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
  margin: 0;
  font-size: var(--vc-step--1, 14px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
}

.bhw .bhw-card-link {
  color: var(--bhw-ink);
  text-decoration: none;
}

.bhw-card-link:focus-visible {
  outline: none;
}

/* Cả thẻ bấm được: lớp phủ của liên kết tên trải hết thẻ; chân thẻ (nút) nằm trên lớp phủ. */
.bhw-card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.bhw-card:hover .bhw-card-link {
  color: var(--bhw-c);
}

.bhw-card-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 4px;
  margin: auto 0 0;
  padding-top: var(--bhw-s2);
  line-height: 1.3;
}

.bhw-card-amount {
  color: var(--bhw-c);
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.bhw-card-unit {
  color: var(--bhw-muted);
  font-size: 13px;
}

.bhw-card-unit[hidden] {
  display: none;
}

.bhw-card-price.is-contact .bhw-card-amount {
  color: var(--bhw-c-d, var(--bhw-c));
  font-weight: 600;
}

.bhw-card-foot {
  position: relative;
  z-index: 2;
  display: grid;
  gap: var(--bhw-s2);
  padding: 0 var(--bhw-s3) var(--bhw-s3);
}

.bhw-card-foot .bhw-card-actions {
  padding: 0;
}

/* Điện thoại: vùng bấm 44px; từ 600px (con trỏ chuột, thẻ rộng) hạ còn 40px cho thẻ gọn. */
.bhw-card-foot .bhw-btn {
  min-height: 44px;
  padding-inline: var(--bhw-s2);
  gap: 6px;
  font-size: 14px;
  white-space: nowrap;
}

/* Ô nút giỏ của luồng 9 dưới thẻ (điểm cắm cũ, chỉ có khi luồng 9 cắm hook). */
.bhw-card-cart {
  margin-top: 0;
}

/* Ô ảnh trống cũ (đơn hàng, giỏ, gợi ý tìm): giữ cho mẫu của luồng khác. */
.bhw-noimg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 80px;
  background: var(--bhw-panel);
  color: color-mix(in srgb, var(--bhw-muted) 55%, #fff);
}

.bhw-noimg--sm {
  width: 56px;
  height: 56px;
  min-height: 0;
  border-radius: var(--bhw-r-sm);
  flex: none;
}

.bhw-noimg--xs {
  width: 40px;
  height: 40px;
  min-height: 0;
  border-radius: var(--bhw-r-sm);
  flex: none;
}

.bhw-empty {
  padding: var(--bhw-s7) var(--bhw-s4);
  border: 1px dashed var(--bhw-line);
  border-radius: var(--bhw-r-lg);
  text-align: center;
  color: var(--bhw-muted);
}

.bhw-empty p {
  margin: 0 0 var(--bhw-s4);
}

.bhw-empty-ic {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: var(--bhw-s3);
  border-radius: 50%;
  background: var(--bhw-soft);
  color: var(--bhw-c);
}

.bhw-empty-ic > svg {
  width: 32px;
  height: 32px;
}

.bhw-empty-title {
  margin: 0 0 var(--bhw-s2);
  color: var(--bhw-ink);
  font-size: var(--vc-step-1, 20px);
  font-weight: 600;
  line-height: 1.35;
}

.bhw-empty .bhw-empty-title + p {
  max-width: 46ch;
  margin-inline: auto;
}

.bhw-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--bhw-s2);
}

/* ---------- Phân trang ---------- */

.bhw-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--bhw-s2);
  margin-top: var(--bhw-s6);
}

.bhw-pager-num,
.bhw-pager-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 var(--bhw-s3);
  border: 1px solid var(--bhw-line);
  border-radius: var(--bhw-r);
  background: var(--bhw-bg);
  color: var(--bhw-ink) !important;
  text-decoration: none;
}

.bhw-pager a:hover {
  border-color: var(--bhw-c);
  color: var(--bhw-c) !important;
}

.bhw-pager-num.is-active {
  background: var(--bhw-c);
  border-color: var(--bhw-c);
  color: var(--bhw-on-c) !important;
  font-weight: 600;
}

.bhw-pager-gap {
  color: var(--bhw-muted);
}

/* ---------- Danh sách, lưới, thẻ: màn rộng ---------- */

@media (min-width: 600px) {
  .bhw-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--bhw-s4);
  }

  .bhw-grid--rail {
    grid-template-columns: none;
    grid-auto-columns: minmax(180px, 30%);
  }

  .bhw-card-foot .bhw-btn {
    min-height: 40px;
  }

  .bhw-sortform-label {
    display: inline;
  }

  .bhw-cat-head-media {
    width: 88px;
    height: 88px;
  }

  .bhw-card-body {
    padding: var(--bhw-s3) var(--bhw-s4) var(--bhw-s4);
  }

  .bhw-card-foot {
    padding: 0 var(--bhw-s4) var(--bhw-s4);
  }

  .bhw-card-name {
    font-size: 15px;
  }

  .bhw-card-amount {
    font-size: 17px;
  }
}

@media (min-width: 1024px) {
  .bhw-layout {
    grid-template-columns: 248px minmax(0, 1fr);
    gap: var(--bhw-s6);
    align-items: start;
  }

  .bhw-layout--full {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Cột lọc: ngăn trượt trở thành cột thường. */
  .bhw-drawer {
    position: static;
    display: contents;
    visibility: visible;
    pointer-events: auto;
    transition: none;
  }

  .bhw-drawer-backdrop,
  .bhw-drawer-head,
  .bhw-toolbar-filter {
    display: none;
  }

  .bhw-drawer-panel {
    position: static;
    display: block;
    align-self: stretch;
    width: auto;
    background: none;
    box-shadow: none;
    transform: none;
    transition: none;
  }

  .bhw-drawer-panel .bhw-side {
    position: sticky;
    top: calc(var(--vc-header-h, 64px) + var(--bhw-s4));
    padding: 0;
    overflow: visible;
  }

  .bhw-cat-head {
    padding: var(--bhw-s5);
    gap: var(--bhw-s5);
  }

  .bhw-cat-head--plain {
    padding: 0;
  }

  .bhw-cat-head-media {
    width: 104px;
    height: 104px;
  }

  .bhw-cat-chips .bhw-chips {
    flex-wrap: wrap;
    margin-inline: 0;
    padding-inline: 0;
    overflow: visible;
  }

  .bhw-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--bhw-s5);
  }

  .bhw-grid--rail {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    overflow: visible;
    scroll-snap-type: none;
    margin-inline: 0;
    padding: 0;
  }

  .bhw-card:hover {
    transform: translateY(-2px);
  }
}

@media (min-width: 1440px) {
  .bhw-layout--full .bhw-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .bhw-card,
  .bhw-card-ph > svg {
    transition: none;
  }

  .bhw-card:hover {
    transform: none;
  }
}

/* ---------- Chi tiết hàng ---------- */

.bhw-product {
  display: grid;
  gap: var(--bhw-s5);
}

.bhw-gallery-main {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--bhw-line);
  border-radius: var(--bhw-r-lg);
  overflow: hidden;
  background: var(--bhw-panel);
}

.bhw-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bhw-thumbs {
  display: flex;
  gap: var(--bhw-s2);
  margin-top: var(--bhw-s2);
  overflow-x: auto;
}

.bhw-thumb {
  flex: none;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--bhw-r-sm);
  overflow: hidden;
  background: var(--bhw-panel);
  cursor: pointer;
}

.bhw-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bhw-thumb.is-active {
  border-color: var(--bhw-c);
}

.bhw-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--bhw-s1) var(--bhw-s4);
  margin: 0 0 var(--bhw-s4);
  font-size: var(--vc-step--1, 14px);
  color: var(--bhw-muted);
}

.bhw-meta div {
  display: flex;
  gap: var(--bhw-s1);
}

.bhw-meta dt::after {
  content: ":";
}

.bhw-meta dd {
  margin: 0;
  color: var(--bhw-ink);
}

.bhw-price {
  margin: 0 0 var(--bhw-s2);
  color: var(--bhw-c);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.bhw-price small {
  color: var(--bhw-muted);
  font-size: 16px;
  font-weight: 400;
}

.bhw-price.is-contact {
  color: var(--bhw-a);
}

.bhw-stock {
  display: inline-flex;
  align-items: center;
  gap: var(--bhw-s2);
  margin: 0 0 var(--bhw-s4);
  font-weight: 600;
}

.bhw-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}

.bhw-stock--con {
  color: var(--bhw-ok);
}

.bhw-stock--het {
  color: var(--bhw-warn);
}

.bhw-stock--lien_he {
  color: var(--bhw-a);
}

.bhw-units {
  display: flex;
  flex-wrap: wrap;
  gap: var(--bhw-s2);
  margin: 0 0 var(--bhw-s4);
  padding: 0;
  border: 0;
}

.bhw-units legend,
.bhw-label {
  width: 100%;
  margin: 0 0 var(--bhw-s2);
  padding: 0;
  font-size: var(--vc-step--1, 14px);
  color: var(--bhw-muted);
}

.bhw-chip {
  position: relative;
  display: inline-flex;
}

.bhw-units .bhw-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Ô chọn đơn vị / loại hàng của trang chi tiết: ô chữ nhật hai dòng (tên + giá). Chỉ trong .bhw-units / .bhw-variants — chip
   chung (viên thuốc một hàng) định nghĩa ở web-site.css. */
.bhw-units .bhw-chip > span,
.bhw-variants a.bhw-chip,
.bhw-variants span.bhw-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 40px;
  justify-content: center;
  padding: var(--bhw-s1) var(--bhw-s3);
  border: 1px solid var(--bhw-line);
  border-radius: var(--bhw-r);
  color: var(--bhw-ink);
  text-decoration: none;
  cursor: pointer;
  line-height: 1.3;
  white-space: normal;
}

.bhw-units .bhw-chip input:checked + span,
.bhw-variants span.bhw-chip.is-active {
  border-color: var(--bhw-c);
  background: var(--bhw-soft);
  color: var(--bhw-c);
  font-weight: 600;
}

.bhw-units .bhw-chip input:focus-visible + span {
  outline: 2px solid var(--bhw-focus);
  outline-offset: 2px;
}

.bhw-variants a.bhw-chip:hover {
  border-color: var(--bhw-c);
}

.bhw-variants a.bhw-chip.is-out {
  color: var(--bhw-muted);
  text-decoration: line-through;
}

.bhw-variants {
  margin-bottom: var(--bhw-s4);
}

.bhw-variants ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--bhw-s2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.bhw-short {
  margin: 0 0 var(--bhw-s4);
  color: var(--bhw-muted);
  text-wrap: pretty;
}

.bhw-buy {
  display: flex;
  flex-wrap: wrap;
  gap: var(--bhw-s2);
  padding-top: var(--bhw-s4);
  border-top: 1px solid var(--bhw-line);
}

.bhw-buy .bhw-btn {
  flex: 1 1 180px;
}

.bhw-entry {
  max-width: var(--vc-content, 760px);
  line-height: 1.7;
  text-wrap: pretty;
}

.bhw-entry img {
  border-radius: var(--bhw-r);
}

.bhw-grid--row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ---------- Tài khoản, đơn hàng ---------- */

.bhw-auth {
  display: grid;
  gap: var(--bhw-s5);
  margin-top: var(--bhw-s5);
}

.bhw-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--bhw-s3);
}

.bhw-stat {
  display: grid;
  gap: var(--bhw-s1);
  padding: var(--bhw-s4);
  border-radius: var(--bhw-r-lg);
  background: var(--bhw-soft);
}

.bhw-stat span {
  font-size: var(--vc-step--1, 14px);
  color: var(--bhw-muted);
}

.bhw-stat strong {
  font-size: 20px;
}

.bhw-stat.is-warn strong {
  color: var(--bhw-warn);
}

.bhw-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--bhw-line);
  border-radius: var(--bhw-r-lg);
}

.bhw-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--vc-step--1, 14px);
}

.bhw-table th,
.bhw-table td {
  padding: var(--bhw-s3);
  border-bottom: 1px solid var(--bhw-line);
  text-align: left;
  white-space: nowrap;
}

.bhw-table th {
  background: var(--bhw-panel);
  font-weight: 600;
}

.bhw-table tr:last-child td {
  border-bottom: 0;
}

.bhw-table .is-num {
  text-align: right;
}

.bhw-status {
  display: inline-block;
  padding: 2px var(--bhw-s2);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--bhw-panel-2);
  color: var(--bhw-ink);
}

.bhw-status--confirmed,
.bhw-status--shipping {
  background: var(--bhw-info-l);
  color: var(--bhw-info);
}

.bhw-status--done {
  background: var(--bhw-ok-l);
  color: var(--bhw-ok);
}

.bhw-status--cancelled {
  background: var(--bhw-warn-l);
  color: var(--bhw-warn);
}

.bhw-order {
  padding: var(--bhw-s5);
  border: 1px solid var(--bhw-line);
  border-radius: var(--bhw-r-lg);
}

.bhw-order-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--bhw-s2);
  margin-bottom: var(--bhw-s4);
}

.bhw-order-head .bhw-h2 {
  margin: 0;
}

.bhw-steps {
  display: grid;
  gap: var(--bhw-s2);
  margin: 0 0 var(--bhw-s5);
  padding: 0;
  list-style: none;
  counter-reset: bhw-step;
}

.bhw-steps li {
  position: relative;
  display: grid;
  padding-left: 36px;
  color: var(--bhw-muted);
  counter-increment: bhw-step;
}

.bhw-steps li::before {
  content: counter(bhw-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  border: 2px solid var(--bhw-line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  background: var(--bhw-bg);
}

.bhw-steps li.is-done {
  color: var(--bhw-ink);
}

.bhw-steps li.is-done::before {
  content: "";
  border-color: var(--bhw-c);
  background: var(--bhw-c);
  color: var(--bhw-on-c);
}

.bhw-steps-label {
  font-weight: 600;
}

.bhw-steps time {
  font-size: 13px;
  color: var(--bhw-muted);
}

.bhw-lines {
  margin: 0 0 var(--bhw-s4);
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--bhw-line);
}

.bhw-lines li {
  display: flex;
  align-items: center;
  gap: var(--bhw-s3);
  padding: var(--bhw-s3) 0;
  border-bottom: 1px solid var(--bhw-line);
}

.bhw-lines img {
  flex: none;
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--bhw-r-sm);
}

.bhw-lines-name {
  display: grid;
  flex: 1;
  min-width: 0;
}

.bhw-lines-name small {
  color: var(--bhw-muted);
  font-size: 13px;
}

.bhw-lines-total {
  font-weight: 600;
  white-space: nowrap;
}

.bhw-sum {
  display: grid;
  gap: var(--bhw-s2);
  margin: 0;
}

.bhw-sum div {
  display: flex;
  justify-content: space-between;
  gap: var(--bhw-s4);
}

.bhw-sum dt {
  color: var(--bhw-muted);
}

.bhw-sum dd {
  margin: 0;
  text-align: right;
}

.bhw-sum strong {
  color: var(--bhw-c);
  font-size: 18px;
}

/* ---------- Thanh trên (khung chung Page::start), điểm cắm nút trên thẻ ---------- */

.bhw-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--bhw-s2) var(--bhw-s4);
  margin-bottom: var(--bhw-s4);
  padding-bottom: var(--bhw-s3);
  border-bottom: 1px solid var(--bhw-line);
}

.bhw-bar-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--bhw-s1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.bhw-bar-links a {
  display: inline-block;
  padding: var(--bhw-s1) var(--bhw-s3);
  border-radius: 999px;
  color: var(--bhw-ink);
  font-size: var(--vc-step--1, 14px);
  text-decoration: none;
}

.bhw-bar-links a:hover {
  background: var(--bhw-soft);
}

.bhw-bar-links a.is-active {
  background: var(--bhw-soft);
  color: var(--bhw-c);
  font-weight: 600;
}

.bhw-bar-actions {
  display: flex;
  align-items: center;
  gap: var(--bhw-s2);
  margin-left: auto;
}

.bhw-card-actions {
  padding: 0 var(--bhw-s3) var(--bhw-s3);
}

/* ---------- Mục tài khoản, sổ điểm, sổ nợ, quên mật khẩu ---------- */

a.bhw-stat {
  color: inherit;
  text-decoration: none;
}

a.bhw-stat:hover {
  outline: 2px solid color-mix(in srgb, var(--bhw-c) 30%, transparent);
}

.bhw-tabs {
  display: flex;
  gap: var(--bhw-s1);
  margin: var(--bhw-s5) 0 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--bhw-line);
  scrollbar-width: none;
}

.bhw-tabs a {
  flex: 0 0 auto;
  padding: var(--bhw-s2) var(--bhw-s3);
  border-bottom: 2px solid transparent;
  color: var(--bhw-muted);
  text-decoration: none;
  white-space: nowrap;
}

.bhw-tabs a:hover {
  color: var(--bhw-ink);
}

.bhw-tabs a.is-active {
  border-bottom-color: var(--bhw-c);
  color: var(--bhw-c);
  font-weight: 600;
}

.bhw-table tfoot th {
  border-top: 1px solid var(--bhw-line);
  border-bottom: 0;
}

.bhw-table .is-plus {
  color: var(--bhw-ok);
}

.bhw-table .is-minus {
  color: var(--bhw-warn);
}

.bhw-forgot {
  margin-top: var(--bhw-s4);
  padding-top: var(--bhw-s3);
  border-top: 1px solid var(--bhw-line);
}

.bhw-forgot > summary {
  cursor: pointer;
  color: var(--bhw-c);
  font-size: var(--vc-step--1, 14px);
}

.bhw-forgot form {
  margin-top: var(--bhw-s3);
}

.bhw-forgot .bhw-hint:first-child {
  margin: 0 0 var(--bhw-s3);
}

/* Điện thoại: bảng sổ điểm / sổ nợ thành từng thẻ, nhãn cột lấy ở data-label. */
@media (max-width: 599px) {
  .bhw-table--log thead {
    display: none;
  }

  .bhw-table--log,
  .bhw-table--log tbody,
  .bhw-table--log tfoot,
  .bhw-table--log tr,
  .bhw-table--log td {
    display: block;
    width: 100%;
  }

  .bhw-table--log tr {
    padding: var(--bhw-s2) var(--bhw-s3);
    border-bottom: 1px solid var(--bhw-line);
  }

  .bhw-table--log td {
    display: flex;
    justify-content: space-between;
    gap: var(--bhw-s3);
    padding: 2px 0;
    border: 0;
    white-space: normal;
    text-align: right;
  }

  .bhw-table--log td::before {
    content: attr(data-label);
    color: var(--bhw-muted);
    text-align: left;
  }

  .bhw-table--log tfoot tr {
    display: flex;
    justify-content: space-between;
  }

  .bhw-table--log tfoot th {
    border: 0;
  }
}

/* ---------- Màn rộng ---------- */

@media (min-width: 600px) {
  .bhw-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 768px) {
  .bhw-auth {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .bhw-steps {
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
  }
}

@media (min-width: 1024px) {
  .bhw-product {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: var(--bhw-s7);
    align-items: start;
  }

  .bhw-gallery {
    position: sticky;
    top: calc(var(--vc-header-h, 64px) + var(--bhw-s4));
  }

  .bhw-title {
    font-size: var(--vc-step-2, 32px);
  }

  .bhw-price {
    font-size: 32px;
  }
}

/* ---------- Icon đứng cạnh chữ (đặt cuối file để thắng display của từng khối ở trên) ---------- */

.bhw-bar-links a,
.bhw-field--inline > span,
.bhw-stat span,
.bhw-tabs a,
.bhw-badge,
.bhw-back,
.bhw-pager-step,
.bhw-h2:has(> .bhw-i) {
  display: inline-flex;
  align-items: center;
  gap: var(--bhw-s2);
}

.bhw-pager-step {
  gap: var(--bhw-s1);
}

.bhw-badge {
  gap: var(--bhw-s1);
}

/* summary giữ display mặc định để còn dấu mở / gập. */
.bhw-filter > summary > .bhw-i {
  margin-right: var(--bhw-s2);
  vertical-align: -4px;
}

/* Ô thông báo, ghi chú có icon: icon đầu dòng, chữ xuống dòng thẳng hàng sau icon. */
.bhw-msg:not([hidden]):has(> .bhw-i),
.bhw-hint--i {
  display: flex;
  align-items: flex-start;
  gap: var(--bhw-s2);
}

.bhw-msg > .bhw-i,
.bhw-hint--i > .bhw-i {
  margin-top: 1px;
}

/* Ô ảnh trống: icon ảnh ở giữa thay cho gạch chéo (display: grid đặt ở đây để không đụng display: block của nơi khác). */
.bhw-noimg:has(> .bhw-i) {
  display: grid;
  place-items: center;
}

.bhw-noimg > .bhw-i {
  width: 40%;
  max-width: 64px;
  height: auto;
  aspect-ratio: 1;
}

/* Bước đơn đã xong: dấu tích của bộ icon nằm giữa vòng tròn (vòng do ::before vẽ). */
.bhw-steps-mark {
  position: absolute;
  left: 5px;
  top: 5px;
  z-index: 1;
  width: 16px;
  height: 16px;
  color: var(--bhw-on-c);
}

/* Lưới hàng 6 cột trên màn rộng (chốt 19/11/2026); trang danh mục có cột lọc bên trái vẫn đủ ~180px mỗi thẻ ở 1920. */
@media (min-width: 1280px) {
  .bhw-grid,
  .bhw-layout--full .bhw-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--bhw-s4);
  }
}

/* W11: hàng gợi ý dưới trạng thái rỗng (danh mục rỗng, tìm không ra). */
.bhw-suggest-block {
    margin-top: 24px;
}
.bhw-suggest-title {
    margin: 0 0 12px;
    font-size: 1.125rem;
}

/* ---------- HOC-THU52 (0.12.x): yêu thích, chọn mua nhanh, giá khuyến mãi, lọc thuộc tính ---------- */

.bhw-fav {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.92);
  color: var(--bhw-muted);
  box-shadow: 0 1px 4px rgb(16 24 40 / 0.15);
  cursor: pointer;
}

.bhw-fav:hover { color: var(--bhw-warn); }
.bhw-fav:focus-visible { outline: 2px solid var(--bhw-focus); outline-offset: 2px; }
.bhw-fav.is-on { color: var(--bhw-warn); }
.bhw-fav.is-on svg { fill: currentColor; }

/* Thẻ không có id (bản mẫu rỗng cho JS "Đã xem") không cần nút thích. */
.bhw-fav[data-bhw-fav="0"] { display: none; }

.bhw-card-was {
  color: var(--bhw-muted);
  font-size: 0.85em;
}

.bhw-card-pct {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bhw-warn);
  color: #fff;
  font-size: 0.78em;
  font-weight: 700;
}

.bhw-card-price.is-deal .bhw-card-amount { color: var(--bhw-warn); }

/* Có hộp chọn mua nhanh (JS chạy được): bỏ nút giỏ một món của luồng 9 trên thẻ để chân thẻ chỉ còn một nút. */
.bhw-js-quick .bhw-card.has-quick .bhw-card-actions .bhw-addcart { display: none; }
html:not(.bhw-js-quick) .bhw-card-quick { display: none; }
.bhw-card-foot { position: relative; z-index: 2; }

.bhw-quick {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 16px;
  border: 0;
  border-radius: var(--bhw-r-lg);
  background: var(--bhw-bg);
  color: var(--bhw-ink);
  box-shadow: 0 16px 48px rgb(16 24 40 / 0.25);
}

.bhw-quick::backdrop { background: rgb(16 24 40 / 0.45); }

.bhw-quick-head {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: start;
}

.bhw-quick-head img,
.bhw-quick-ph {
  width: 72px;
  height: 72px;
  border-radius: var(--bhw-r-sm);
  object-fit: cover;
  background: var(--bhw-panel);
  display: grid;
  place-items: center;
}

.bhw-quick-title { margin: 0 0 4px; font-size: 1rem; line-height: 1.35; }
.bhw-quick-title a { color: inherit; text-decoration: none; }
.bhw-quick-price { color: var(--bhw-c); font-size: 1.1rem; }
.bhw-quick-body { display: grid; gap: 12px; margin-top: 14px; }
.bhw-quick-body .bhw-field { display: grid; gap: 6px; }
.bhw-quick-units { display: flex; flex-wrap: wrap; gap: 6px; }
.bhw-quick-buy { display: grid; gap: 10px; }
.bhw-quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bhw-quick-wait { margin: 8px 0; color: var(--bhw-muted); }

@media (max-width: 599px) {
  /* Điện thoại: hộp nằm sát đáy như tấm trượt. */
  .bhw-quick {
    width: 100vw;
    max-width: 100vw;
    margin: auto 0 0;
    border-radius: var(--bhw-r-lg) var(--bhw-r-lg) 0 0;
  }
}

.bhw-facet-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.bhw-active-clear {
  color: var(--bhw-warn);
  border-color: color-mix(in srgb, var(--bhw-warn) 40%, var(--bhw-line));
}

.bhw-toolbar-link[hidden] { display: none; }

.bhw-special-head .bhw-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bhw-special-head.is-sale .bhw-title svg { color: var(--bhw-warn); }

.bhw-countdown {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bhw-warn-l);
  color: var(--bhw-warn);
}

.bhw-countdown strong { font-variant-numeric: tabular-nums; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bhw-fav { background: rgb(30 34 40 / 0.9); }
}

/* ---------- 0.14 (học BHX): giá quy chuẩn, suất khuyến mại, mua kèm, kệ nhóm con, chip ảnh, đoạn SEO ---------- */
.bhw-card-uprice,
.bhw-pd-uprice { margin: 2px 0 0; font-size: .8125rem; color: var(--bhw-muted); }
.bhw-card-offer { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0; }
.bhw-offer { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: .75rem; font-weight: 600; line-height: 1.5;
    background: color-mix(in srgb, var(--bhw-c) 10%, transparent); color: var(--bhw-c); }
.bhw-offer--tier { background: color-mix(in srgb, #ffab2e 22%, transparent); color: #8a4b00; }
.bhw-offer--low,
.bhw-offer--gone { background: #fde8e8; color: #b42318; }
.bhw-offer--max { background: transparent; color: var(--bhw-muted); padding-inline: 0; font-weight: 500; }
.bhw-home-card { position: relative; }
.bhw-home-fav { position: absolute; top: 6px; right: 6px; z-index: 2; }

.bhw-pd-notes { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; font-size: .875rem; color: var(--bhw-muted); }
.bhw-pd-notes li { display: flex; gap: 6px; align-items: flex-start; }
.bhw-pd-notes svg { flex: none; margin-top: 2px; }

.bhw-with { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.bhw-with-item { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--bhw-line); border-radius: 8px; background: var(--bhw-bg); }
.bhw-with-img { flex: none; width: 64px; height: 64px; border-radius: 6px; overflow: hidden; display: grid; place-items: center; }
.bhw-with-img img { width: 100%; height: 100%; object-fit: cover; }
.bhw-with-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.bhw-with-name { color: var(--bhw-ink); text-decoration: none; font-size: .875rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bhw-with-price { font-weight: 700; font-size: .875rem; }
.bhw-with-price small { font-weight: 400; color: var(--bhw-muted); }
.bhw-with-add { flex: none; border-radius: 50%; }
.bhw-with-out { flex: none; font-size: .75rem; color: var(--bhw-muted); }

.bhw-cat-chips.is-sticky { position: sticky; top: var(--bhw-sticky-top, 0px); z-index: 20; background: var(--bhw-bg); padding-block: 6px; }
.admin-bar .bhw-cat-chips.is-sticky { top: calc(var(--bhw-sticky-top, 0px) + 32px); }
.bhw-cat-chips.has-img a.bhw-chip { display: inline-flex; align-items: center; gap: 6px; padding-block: 4px; }
.bhw-chip-img { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; flex: none;
    background: color-mix(in srgb, var(--bhw-c) 8%, transparent); color: var(--bhw-c); }
.bhw-chip-img img { width: 100%; height: 100%; object-fit: cover; }

.bhw-shelf { margin: 0 0 24px; }
.bhw-shelf .bhw-sec-title a { color: inherit; text-decoration: none; }
.bhw-shelf-more { margin-top: 10px; }

.bhw-special-tabs { display: flex; gap: 8px; margin: 0 0 16px; border-bottom: 1px solid var(--bhw-line); }
.bhw-special-tabs .bhw-tab { padding: 8px 14px; color: var(--bhw-muted); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.bhw-special-tabs .bhw-tab.is-active { color: var(--bhw-c); border-bottom-color: var(--bhw-c); }

.bhw-cat-seo { margin: 32px 0 8px; padding-top: 20px; border-top: 1px solid var(--bhw-line); }
.bhw-cat-seo-text { line-height: 1.65; }
.bhw-cat-seo-text.is-clamped { max-height: 200px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.bhw-seo-more { margin: 8px 0 16px; }
.bhw-faq { display: grid; gap: 8px; }
.bhw-faq-item { border: 1px solid var(--bhw-line); border-radius: 8px; padding: 10px 14px; }
.bhw-faq-item summary { cursor: pointer; font-weight: 600; }
.bhw-faq-a { margin-top: 8px; color: var(--bhw-ink); }

/* ---------- Đợt chính sách (SOAT-CHINH-SACH-BCT): ô tích đồng ý, điều khoản đã xem, khách tự hủy đơn ---------- */
.bhw-consent { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 4px; font-size: 14px; line-height: 1.5; color: var(--bhw-ink); cursor: pointer; }
.bhw-consent input[type="checkbox"] { flex: 0 0 18px; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--bhw-c); cursor: pointer; }
.bhw-consent a { color: var(--bhw-c); text-decoration: underline; text-underline-offset: 2px; }
.bhw-consent input:focus-visible { outline: 2px solid var(--bhw-focus); outline-offset: 2px; }
.bhw-consent.is-error, .bhw-consent:has(input:user-invalid) { color: var(--bhw-warn); }
.bhw-consent.is-error input, .bhw-consent input:user-invalid { outline: 2px solid var(--bhw-warn); outline-offset: 1px; }
form.is-submitted .bhw-consent:has(input:invalid) { color: var(--bhw-warn); }

.bhw-terms-seen { margin: 12px 0; padding: 0; font-size: 14px; }
.bhw-terms-seen > summary { padding: 10px 14px; cursor: pointer; color: var(--bhw-muted); list-style-position: inside; }
.bhw-terms-seen[open] > summary { border-bottom: 1px solid var(--bhw-line); }
.bhw-terms-seen > :not(summary) { padding: 10px 14px; margin: 0; }

.bhw-cancel { margin: 16px 0; }
.bhw-cancel > summary { list-style: none; display: inline-flex; border: 1px solid color-mix(in srgb, var(--bhw-warn) 45%, transparent); color: var(--bhw-warn); background: var(--bhw-bg); }
.bhw-cancel > summary::-webkit-details-marker { display: none; }
.bhw-cancel > summary:hover, .bhw-cancel[open] > summary { background: var(--bhw-warn-l); }
.bhw-cancel > form { display: grid; gap: 12px; margin-top: 10px; padding: 16px; border: 1px solid color-mix(in srgb, var(--bhw-warn) 25%, var(--bhw-line)); border-radius: var(--bhw-r); max-width: 560px; }
.bhw-cancel .bhw-field { display: grid; gap: 6px; font-size: 14px; }
.bhw-cancel select, .bhw-cancel input[type="text"], .bhw-cancel textarea { width: 100%; min-height: 44px; box-sizing: border-box; font-size: 16px; }
.bhw-cancel input[type="radio"] { width: 18px; height: 18px; accent-color: var(--bhw-warn); }
.bhw-cancel button[type="submit"] { justify-self: start; background: var(--bhw-warn); border-color: var(--bhw-warn); color: #fff; }
@media (max-width: 480px) { .bhw-cancel > form { padding: 12px; max-width: none; } .bhw-cancel button[type="submit"] { justify-self: stretch; width: 100%; } }
