/**
 * D166b — Menu xổ xuống dưới mục "Sản phẩm" (header).
 * Chỉ nạp khi Bộ lọc sản phẩm → "Bật menu xổ xuống" BẬT.
 * Máy tính: rê chuột / Tab vào mục → bảng xổ. Điện thoại (ngăn kéo): danh sách thụt vào dưới mục.
 */

/* ── Máy tính ── */
.nav__xo {
  position: relative;
  display: flex;
  align-items: center;
}
.nav__links .nav__xo > a {
  padding-right: 15px;
}
.nav__links .nav__xo > a::before {
  content: '';
  position: absolute;
  right: 1px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-75%) rotate(45deg);
  transition: transform 0.2s ease;
}
.nav__xo:hover > a,
.nav__xo:focus-within > a { color: var(--terracotta); }
.nav__xo:hover > a::before,
.nav__xo:focus-within > a::before { transform: translateY(-25%) rotate(-135deg); }

.nav__xo-bang {
  position: absolute;
  top: calc(100% + 14px);
  left: -20px;
  min-width: 240px;
  padding: 10px 0;
  background: #fff;
  border-top: 2px solid #c89d4f;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 14px 34px rgba(15, 22, 32, 0.16);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
  z-index: 120;
}
/* cầu nối vô hình: chuột đi từ chữ xuống bảng không bị tắt */
.nav__xo-bang::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: -18px;
  height: 18px;
}
.nav__xo:hover .nav__xo-bang,
.nav__xo:focus-within .nav__xo-bang {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s;
}
.nav__links .nav__xo-bang a {
  display: block;
  padding: 9px 22px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--navy);
  white-space: nowrap;
  position: static;
}
.nav__links .nav__xo-bang a::after { display: none; }
.nav__links .nav__xo-bang a:hover,
.nav__links .nav__xo-bang a:focus-visible {
  background: rgba(200, 157, 79, 0.12);
  color: var(--terracotta);
  outline: none;
}
.nav__links .nav__xo-bang a.is-phu-dau {
  margin-top: 6px;
  padding-top: 13px;
  border-top: 1px solid rgba(26, 35, 50, 0.08);
}

/* ── Điện thoại: trong ngăn kéo ── */
.nav__drawer-links a:has(+ .nav__drawer-xo) { border-bottom: 0; padding-bottom: 6px; }
.nav__drawer-xo {
  display: flex;
  flex-direction: column;
  margin: 0 0 4px;
  padding: 2px 0 10px 14px;
  border-left: 2px solid #c89d4f;
  border-bottom: 1px solid rgba(26, 35, 50, 0.06);
}
.nav__drawer-links .nav__drawer-xo a {
  padding: 8px 0;
  font-size: 14px;
  font-weight: 400;
  color: rgba(26, 35, 50, 0.82);
  border-bottom: 0;
}
.nav__drawer-links .nav__drawer-xo a:hover { color: var(--terracotta); }
.nav__drawer-links .nav__drawer-xo a.is-phu-dau { margin-top: 4px; font-weight: 500; color: var(--navy); }
