/*
 * Nhịp điệu sau khi tăng cỡ chữ 30% (2026-11).
 * Các file CSS khác đặt chiều cao cố định theo cỡ chữ cũ (11–14px) nên chữ mới
 * bị chật: file này nạp SAU cùng và chỉ chỉnh kích thước khung, không đổi màu.
 */

:root {
	--xl-nav-h: 54px;
}

/* Nút chung */
.xl-btn {
	height: 42px;
	padding: 0 18px;
}

/* Header: logo/khoảng cách ô tìm kiếm cao hơn theo cỡ chữ mới */
.xl-search-form .xl-search-input,
.xl-header .xl-search-form input[type="search"] {
	min-height: 42px;
}

/* Danh mục: ô lọc dạng pill + chip lọc + nút xoá */
.xl-listing .xl-fopt {
	min-height: 31px;
	padding-top: 4px;
	padding-bottom: 4px;
}
.xl-listing .xl-chip {
	min-height: 33px;
}
.xl-listing .xl-clear {
	height: 34px;
}
.xl-listing .xl-sort select,
.xl-listing .xl-toolbar select {
	min-height: 36px;
}
.xl-listing .xl-prod-name {
	/* 2 dòng × 19px × 1.4 */
	min-height: 49px;
}
.xl-listing .xl-card-p .xl-prod-name {
	min-height: 49px;
}

/* Thẻ sản phẩm ở trang chủ/search dùng chung .xl-prod-name */
.xl-card-p .xl-prod-name {
	min-height: 49px;
}

/* PDP: hàng nút mua + ô cam kết */
.xl-pdp .single_add_to_cart_button,
.xl-pdp .xl-buy-now {
	min-height: 45px;
	height: auto;
	padding-top: 12px;
	padding-bottom: 12px;
}

/* Mini-cart drawer */
.xl-cart-foot .xl-btn {
	min-height: 45px;
	height: 45px;
}

/* Gợi ý tìm kiếm: mỗi dòng cao hơn để không cắt tên */
.xl-sdrop-item {
	min-height: 42px;
}

/* ---------------------------------------------------------------------------
 * Font toàn site: Google Sans Flex.
 * Flatsome in inline CSS cho h1–h6 bằng Lato, còn body là font khác → trang chủ
 * bị trộn 2 font. Rule dưới dùng specificity cao hơn (html body + phần tử/lớp)
 * và file này nạp cuối nên thắng mọi khai báo của theme cha.
 * ------------------------------------------------------------------------- */
html body,
html body .xl-body,
html body h1,
html body h2,
html body h3,
html body h4,
html body h5,
html body h6,
html body .heading-font,
html body .xl-page-title,
html body .xl-hero-title,
html body .xl-banner-title,
html body .xl-railcard-title,
html body button,
html body input,
html body select,
html body textarea,
html body .cart,
html body .woocommerce,
html body .price,
html body .amount,
html body bdi {
	font-family: "Google Sans Flex", "Google Sans", Roboto, -apple-system, "Segoe UI", Arial, sans-serif;
}

/* Giữ nguyên font icon (Flatsome) và monospace cho mã/SKU kỹ thuật */
html body i[class*="icon-"],
html body .icon,
html body .fa,
html body .dashicons,
html body code,
html body pre,
html body kbd {
	font-family: revert;
}

/* ---------------------------------------------------------------------------
 * Chữ trên nền xanh phải là màu trắng.
 * Nhiều container khai báo `a { color: inherit }` (`.xl-listing a`, `.xl-cart-drawer a`,
 * sidebar…) với specificity 2 lớp, thắng `.xl-btn--blue`/`.xl-catnav__item--all` (1 lớp)
 * → nút thành chữ xám trên nền xanh (tương phản 2.67:1, gần như không đọc được).
 * Khai báo lại ở đây (file nạp cuối, 2 lớp) thay vì rải !important khắp nơi.
 * ------------------------------------------------------------------------- */
.xl-body a.xl-btn--blue,
.xl-body a.xl-btn--blue:visited,
.xl-body a.xl-btn--blue:hover,
.xl-body a.xl-btn--blue:focus,
.xl-body button.xl-btn--blue,
.xl-body .xl-btn--blue,
.xl-listing a.xl-catnav__item--all,
.xl-listing a.xl-catnav__item--all:visited,
.xl-listing a.xl-catnav__item--all:hover,
.xl-listing .xl-catnav__item--all .xl-catnav__count {
	color: #fff;
}

/* CTA "Mua ngay" trên hero: gradient cũ (#2b82d0) chỉ đạt 4.03:1 với chữ trắng. */
.xl-body a.xl-btn--cta,
.xl-body .xl-banner .xl-btn {
	background: linear-gradient(180deg, #1a6bb5 0%, #15588f 100%);
	border-color: #15588f;
	color: #fff;
}
.xl-body a.xl-btn--cta:hover,
.xl-body .xl-banner .xl-btn:hover {
	background: linear-gradient(180deg, #15588f 0%, #114a78 100%);
	border-color: #114a78;
	color: #fff;
}

/* ===========================================================================
 * Nền trắng dịu hơn (2.0.42) — #fff quá chói trên diện tích lớn.
 * Vùng nội dung dùng off-white rất nhẹ, thẻ/khối nhỏ vẫn trắng để còn phân tầng.
 * ========================================================================= */
/* Lưu ý: .xl-page KHÔNG phải khung trang — đó là nút phân trang, đừng tô nền theo. */
.xl-listing,
.xl-sr-main {
  background: var(--xl-white-soft, #f4f6f8);
}
/* Vùng nội dung chính là <div id="main" class="xl-main"> nên phải là selector có ID
   mới thắng `#main,#wrapper{background:#fff}` của theme cha. */
body #main.xl-main {
  background: var(--xl-white-soft, #f4f6f8);
}
.xl-header,
.xl-nav {
  background: var(--xl-white-soft-header, #fafbfc);
}

/* ===========================================================================
 * Nút "Thêm vào giỏ" / "Hết hàng" trên thẻ sản phẩm (2.0.43)
 * Lưới 4–6 cột ở màn 1024–1366 cho thẻ chỉ ~196–235px → chữ 16px sát mép/tràn.
 * Dùng cỡ chữ co theo bề ngang màn hình + nowrap, ellipsis để không bao giờ tràn.
 * ========================================================================= */
body .xl-add,
body .xl-listing .xl-card-p .xl-add,
body .xl-card-buy .xl-add,
body .xl-listing .xl-card-p .xl-card-buy .xl-add,
body .xl-sr-page a.xl-add,
body .xl-add.is-disabled {
  font-size: 15px;
  line-height: 1.15;
  letter-spacing: 0;
  padding-left: 8px;
  padding-right: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 1180px) {
  body .xl-add,
  body .xl-listing .xl-card-p .xl-add,
  body .xl-card-buy .xl-add,
  body .xl-listing .xl-card-p .xl-card-buy .xl-add,
  body .xl-sr-page a.xl-add { font-size: 14.5px; }
}
/* Nút mua trong bảng kết quả cùng cỡ cho đồng bộ */
body .xl-sr-page .xl-listing .xl-tb .xl-buy-wrap a.xl-buy-btn {
  font-size: 15px;
  padding-left: 8px;
  padding-right: 8px;
}
@media (max-width: 767px) {
  body .xl-add,
  body .xl-listing .xl-card-p .xl-add,
  body .xl-card-buy .xl-add {
    font-size: 14px;
  }
}

/* ===========================================================================
 * Dải danh mục 2 tầng (2.0.44)
 * Hàng 1 = breadcrumb chữ (Tất cả sản phẩm › Cha › Con) — KHÔNG dùng chip để không
 * tranh chấp với chip danh mục đang xem ở hàng 2.
 * Hàng 2 = chip cùng cấp (hoặc con), chip xanh đậm = đang xem.
 * =========================================================================== */
.xl-catnav--tree {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 10px;
  margin: 4px 0 18px;
  padding: 10px 12px 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}
.xl-catnav--tree .xl-catnav__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.xl-catnav--tree .xl-catnav__row--chain {
  gap: 7px;
  padding-bottom: 9px;
  border-bottom: 1px solid #e9edf2;
  font-size: 14.5px;
  line-height: 1.3;
}
.xl-catnav--tree .xl-catnav__row--siblings {
  /* Đúng 2 hàng chip: chip cao 33px + gap 8px = 74px. Không để lộ mép hàng thứ 3. */
  max-height: 76px; /* 2 hàng chip (33+8+33) + 2px dư; padding dọc = 0 để không cắt chip */
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: 0 2px;
}
.xl-catnav--tree .xl-catnav__row--siblings::-webkit-scrollbar { display: none; }
.xl-catnav--tree .xl-catnav__crumb {
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.xl-catnav--tree .xl-catnav__crumb:hover {
  color: var(--xl-blue, #1e73be);
  text-decoration: underline;
}
.xl-catnav--tree .xl-catnav__crumb--home { color: var(--xl-blue, #1e73be); font-weight: 600; }
.xl-catnav--tree .xl-catnav__crumb.is-current {
  color: #17202e;
  font-weight: 600;
  cursor: default;
  text-decoration: none;
}
.xl-catnav--tree .xl-catnav__sep {
  color: #cbd5e1;
  font-size: 15px;
  line-height: 1;
  user-select: none;
}
.xl-catnav--tree .xl-catnav__item {
  font-size: 15px;
  padding: 6px 11px;
  max-width: 100%;
  border-color: #d7dee8;
  background: #fff;
  color: #1f2937;
}
.xl-catnav--tree .xl-catnav__item:hover {
  border-color: var(--xl-blue, #1e73be);
  background: #f6faff;
  color: var(--xl-blue, #1e73be);
}
.xl-catnav--tree .xl-catnav__item--current,
.xl-catnav--tree .xl-catnav__item--current:hover {
  background: var(--xl-blue, #1e73be);
  border-color: var(--xl-blue, #1e73be);
  color: #fff;
  font-weight: 600;
  cursor: default;
}
/* Badge số: tăng tương phản so với bản cũ (#475569 trên #f1f5f9 quá nhạt) */
.xl-catnav--tree .xl-catnav__count {
  background: #e3ebf5;
  color: #1e293b;
  font-size: 13.5px;
  font-weight: 700;
}
.xl-catnav--tree .xl-catnav__item--current .xl-catnav__count {
  background: rgba(255, 255, 255, .3);
  color: #fff;
}

@media (max-width: 767px) {
  .xl-catnav--tree { padding: 8px 10px 10px; gap: 8px; margin-bottom: 14px; }
  .xl-catnav--tree .xl-catnav__row {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .xl-catnav--tree .xl-catnav__row::-webkit-scrollbar { display: none; }
  .xl-catnav--tree .xl-catnav__row--siblings { max-height: none; }
  .xl-catnav--tree .xl-catnav__crumb,
  .xl-catnav--tree .xl-catnav__item { flex: 0 0 auto; font-size: 14.5px; }
}

/* ===========================================================================
 * Tiêu đề danh mục: "(N sản phẩm)" KHÔNG được xuống dòng (2.0.45)
 * .xl-cat-head là flex; span count bị co lại theo h1 nên "(374 sản phẩm)" tách 2 dòng.
 * =========================================================================== */
.xl-listing .xl-cat-head,
.xl-cat-head {
  align-items: baseline;
}
.xl-listing .xl-cat-head h1,
.xl-cat-head h1 {
  min-width: 0;
  overflow-wrap: anywhere;
}
.xl-listing .xl-cat-head .xl-count,
.xl-cat-head .xl-count,
.xl-cat-head .xl-total {
  white-space: nowrap;
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

/* ===========================================================================
 * Toolbar trang kết quả search (2.0.46)
 * - .xl-view: <button> bị Flatsome chèn min-height/padding (2.4em) → nút cao 42,4px
 *   trong khung 34px, tràn ra ngoài và lệch so với 2 ô select.
 * - Số "(1–24 trong 113 sản phẩm)": b hoặc chữ dính nhau vì kế thừa font-size body.
 * =========================================================================== */
.xl-sr-page .xl-view,
.xl-sr-page .xl-listing .xl-view {
  height: 34px;
  align-items: stretch;
}
.xl-sr-page .xl-view button,
.xl-sr-page .xl-listing .xl-view button {
  box-sizing: border-box;
  height: 32px;
  min-height: 0;
  max-height: 32px;
  padding: 0;
  margin: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.xl-sr-page .xl-view button svg {
  width: 16px;
  height: 16px;
  display: block;
}
.xl-sr-page .xl-left,
.xl-sr-page .xl-sr-left {
  gap: 18px;
}
.xl-sr-page .xl-sr-range {
  font-size: 15px;
  line-height: 1.45;
  color: #64748b;
}
.xl-sr-page .xl-sr-range b {
  margin: 0 3px;
  color: #17202e;
  font-variant-numeric: tabular-nums;
}
.xl-sr-page .xl-sr-right {
  gap: 14px;
}

/* Fix gốc (2.0.46): Flatsome đặt min-height:2.5em cho MỌI <button> (17,5px → 42,4px) nên nút
   chuyển view cao hơn khung 34px và lệch. Selector (0,1,1) thắng `button` (0,0,1). */
.xl-view button {
  box-sizing: border-box;
  height: 32px;
  min-height: 0;
  max-height: 32px;
  padding: 0;
  margin: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.xl-sr-main .xl-view,
.xl-sr-page .xl-view {
  height: 34px;
  align-items: stretch;
}
.xl-sr-range {
  font-size: 15px;
  line-height: 1.45;
}
.xl-sr-range b {
  margin: 0 3px;
}

/* Nhãn "Hiển thị / Sắp xếp" kế thừa 17,5px của body làm cụm điều khiển rộng hơn khung
   → xuống 2 hàng, ô Sắp xếp lệch so với ô số lượng. Ép 15px + 1 hàng ở desktop. */
.xl-sr-main .xl-sr-toolbar,
.xl-sr-page .xl-sr-toolbar {
  flex-wrap: nowrap;
  align-items: center;
  gap: 16px;
}
.xl-sr-main .xl-sr-right,
.xl-sr-page .xl-sr-right {
  flex-wrap: nowrap;
  gap: 16px;
}
.xl-sr-main .xl-sr-sortwrap,
.xl-sr-page .xl-sr-sortwrap {
  font-size: 15px;
  color: #475569;
  gap: 8px;
}
.xl-sr-main .xl-sr-sortwrap > span,
.xl-sr-page .xl-sr-sortwrap > span {
  font-weight: 600;
  color: #17202e;
}
.xl-sr-main .xl-sr-sortwrap select,
.xl-sr-page .xl-sr-sortwrap select {
  height: 34px;
  min-height: 0;
  font-size: 15px;
  min-width: 140px;
}
.xl-sr-main .xl-sr-perpage select,
.xl-sr-page .xl-sr-perpage select {
  height: 34px;
  min-height: 0;
  font-size: 15px;
}
@media (max-width: 900px) {
  .xl-sr-main .xl-sr-toolbar,
  .xl-sr-page .xl-sr-toolbar,
  .xl-sr-main .xl-sr-right,
  .xl-sr-page .xl-sr-right {
    flex-wrap: wrap;
  }
}

/* Flatsome/WooCommerce đặt margin-bottom cho <select> → hàng điều khiển cao 49px và ô select
   lệch lên so với nút view. Ép margin 0 trong toolbar kết quả search. */
.xl-sr-main .xl-sr-sortwrap select,
.xl-sr-page .xl-sr-sortwrap select,
.xl-sr-main .xl-sr-perpage select,
.xl-sr-page .xl-sr-perpage select {
  margin: 0;
}
.xl-sr-main .xl-sr-sortwrap,
.xl-sr-page .xl-sr-sortwrap,
.xl-sr-main .xl-sr-perpage,
.xl-sr-page .xl-sr-perpage {
  margin: 0;
}

/* Nhãn "Hiển thị / Sắp xếp" bị bẻ 2 dòng khi khung hẹp → ép 1 dòng */
.xl-sr-main .xl-sr-sortwrap > span,
.xl-sr-page .xl-sr-sortwrap > span,
.xl-sr-main .xl-left > span,
.xl-sr-page .xl-left > span {
  white-space: nowrap;
}
.xl-sr-main .xl-sr-sortwrap,
.xl-sr-page .xl-sr-sortwrap {
  flex: 0 0 auto;
}
