/* CATEGORY LANDING (inc/category-landing.php) — layout of the landing modules; the filter component itself (bar, popovers, sheet,
   applied chips) is the shared one from search-results.css. Order on the page:
   banner → title + line/brand chips → needs → sale → "Chọn theo tiêu chí" → "Sắp xếp theo" → "Tất cả sản phẩm" → grid → Load More → content. */

.vnt39-catl-sec {
	margin: 0 0 26px;
}
.vnt39-catl-h {
	margin: 0 0 14px;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.3;
	color: var( --vnt39-text, #17191f );
}
.vnt39-catl-h--inline {
	margin: 0;
}

/* ---- title + chips ---- */
.vnt39-catl-head {
	margin: 4px 0 24px;
}
.vnt39-catl-title {
	margin: 0 0 14px;
	font-size: 28px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	color: var( --vnt39-text, #17191f );
}
.vnt39-catl-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.vnt39-catl-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 8px 18px;
	border: 1px solid #dfe3e8;
	border-radius: 10px;
	background: #fff;
	color: var( --vnt39-text, #17191f );
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.vnt39-catl-chip:hover {
	border-color: var( --vnt39-brand, #a30d1b );
	color: var( --vnt39-brand, #a30d1b );
}
.vnt39-catl-chip.is-active {
	border-color: var( --vnt39-brand, #a30d1b );
	background: #fdf2f3;
	color: var( --vnt39-brand, #a30d1b );
}
.vnt39-catl-chip--logo {
	min-width: 104px;
	padding: 6px 14px;
}
.vnt39-catl-chip__logo {
	display: block;
	width: auto;
	max-width: 88px;
	max-height: 28px;
	object-fit: contain;
}

/* ---- "Chọn theo nhu cầu" ---- */
.vnt39-catl-needs__row {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	padding-bottom: 4px;
	scrollbar-width: none;
}
.vnt39-catl-needs__row::-webkit-scrollbar {
	display: none;
}
.vnt39-catl-need {
	flex: 0 0 132px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 12px 8px 12px;
	border: 1px solid transparent;
	border-radius: 14px;
	background: #f4f5f7;
	color: var( --vnt39-text, #17191f );
	text-align: center;
	text-decoration: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.vnt39-catl-need:hover,
.vnt39-catl-need.is-active {
	border-color: var( --vnt39-brand, #a30d1b );
	box-shadow: 0 3px 10px rgba( 163, 13, 27, 0.12 );
}
.vnt39-catl-need__img {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 74px;
}
.vnt39-catl-need__img img {
	max-width: 100%;
	max-height: 74px;
	width: auto;
	height: auto;
	object-fit: contain;
}
.vnt39-catl-need__ph {
	display: flex;
	color: #9aa1ab;
}
.vnt39-catl-need__ph svg {
	width: 44px;
	height: 44px;
}
.vnt39-catl-need__name {
	font-size: 14px;
	font-weight: 700;
	line-height: 1.25;
}

/* ---- "Đang giảm giá" ---- */
.vnt39-catl-sale {
	padding: 16px 16px 6px;
	border: 1px solid #f3c7cc;
	border-radius: 16px;
	background: linear-gradient( 180deg, #fdeeef 0%, #fff 62% );
}
.vnt39-catl-sale__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 12px;
}
.vnt39-catl-sale__title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 21px;
	font-weight: 800;
	line-height: 1.2;
	color: var( --vnt39-brand, #a30d1b );
}
.vnt39-catl-sale__title .vnt39-catl-ico {
	width: 22px;
	height: 22px;
	fill: currentColor;
	stroke: none;
}
.vnt39-catl-sale__n {
	font-size: 13px;
	color: var( --vnt39-muted, #6b7280 );
}
.vnt39-catl-sale__all {
	margin-left: auto;
	font-size: 14px;
	font-weight: 700;
	color: var( --vnt39-brand, #a30d1b );
	text-decoration: none;
}
.vnt39-catl-sale .row {
	margin-left: -7px;
	margin-right: -7px;
}

/* ---- "Chọn theo tiêu chí": groups wrap onto rows on desktop (no hidden horizontal scroll) ---- */
.vnt39-catl-criteria .vnt39-search-filters {
	margin: 0;
}
a.vnt39-catl-quick {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}
a.vnt39-catl-quick.is-active {
	border-color: var( --vnt39-brand, #a30d1b );
	background: #fdf2f3;
	color: var( --vnt39-brand, #a30d1b );
}
.vnt39-catl-n {
	font-style: normal;
	font-size: 11px;
	opacity: 0.6;
	margin-left: 2px;
}
.vnt39-search-filters__chip.is-empty {
	opacity: 0.4;
	cursor: not-allowed;
	pointer-events: none;
}
.vnt39-catl-sheet-applied {
	display: none;
}

/* ---- price slider (two handles) ---- */
.vnt39-catl-range {
	position: relative;
	height: 26px;
	margin: 10px 4px 4px;
}
.vnt39-catl-range__track,
.vnt39-catl-range__fill {
	position: absolute;
	top: 11px;
	height: 4px;
	border-radius: 2px;
}
.vnt39-catl-range__track {
	left: 0;
	right: 0;
	background: #e3e6ea;
}
.vnt39-catl-range__fill {
	background: var( --vnt39-brand, #a30d1b );
}
.vnt39-catl-range input[type="range"] {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 26px;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	box-shadow: none;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
}
.vnt39-catl-range input[type="range"]::-webkit-slider-runnable-track {
	background: none;
	height: 26px;
}
.vnt39-catl-range input[type="range"]::-moz-range-track {
	background: none;
}
.vnt39-catl-range input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	pointer-events: auto;
	width: 20px;
	height: 20px;
	margin-top: 3px;
	border: 2px solid var( --vnt39-brand, #a30d1b );
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.25 );
	cursor: pointer;
}
.vnt39-catl-range input[type="range"]::-moz-range-thumb {
	pointer-events: auto;
	width: 16px;
	height: 16px;
	border: 2px solid var( --vnt39-brand, #a30d1b );
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.25 );
	cursor: pointer;
}

/* ---- "Sắp xếp theo" ---- */
.vnt39-catl-sortsec {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px 16px;
}
.vnt39-catl-sort {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.vnt39-catl-sortbtn {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 8px 18px;
	border: 1px solid #d9dde3;
	border-radius: 999px;
	background: #fff;
	color: var( --vnt39-text, #17191f );
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: border-color 0.15s ease, color 0.15s ease;
}
.vnt39-catl-sortbtn:hover {
	border-color: var( --vnt39-brand, #a30d1b );
	color: var( --vnt39-brand, #a30d1b );
}
.vnt39-catl-sortbtn.is-active {
	border-color: var( --vnt39-brand, #a30d1b );
	background: #fdf2f3;
	color: var( --vnt39-brand, #a30d1b );
}

/* ---- "Tất cả sản phẩm" ---- */
.vnt39-catl-allhead {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin: 6px 0 16px;
	padding-top: 6px;
	border-top: 1px solid #eceef1;
}
.vnt39-catl-allhead .vnt39-catl-h {
	padding-top: 16px;
}
.vnt39-catl-count {
	font-size: 13px;
	color: var( --vnt39-muted, #6b7280 );
}
.vnt39-catl-noresult {
	margin: 14px 0 0;
}

/* ---- mobile sticky action bar (phones only) ---- */
.vnt39-catl-mbar {
	display: none;
}
.vnt39-catl-wrap {
	scroll-margin-top: 110px;
}
#vnt39-catl {
	scroll-margin-top: 110px;
}

@media ( min-width: 768px ) {
	.vnt39-catl-filters .vnt39-search-filters__bar {
		flex-wrap: wrap;
		overflow: visible;
		row-gap: 10px;
	}
	.vnt39-catl-sec.vnt39-catl-criteria {
		margin-bottom: 18px;
	}
}

@media ( max-width: 767px ) {
	.vnt39-catl-head {
		margin-bottom: 18px;
	}
	.vnt39-catl-title {
		font-size: 23px;
	}
	.vnt39-catl-chips {
		flex-wrap: nowrap;
		overflow-x: auto;
		margin-right: -12px;
		padding-right: 12px;
		padding-bottom: 4px;
		scrollbar-width: none;
	}
	.vnt39-catl-chips::-webkit-scrollbar {
		display: none;
	}
	.vnt39-catl-chip {
		flex: 0 0 auto;
	}
	.vnt39-catl-sec {
		margin-bottom: 20px;
	}
	.vnt39-catl-h {
		font-size: 17px;
		margin-bottom: 10px;
	}
	.vnt39-catl-need {
		flex-basis: 108px;
	}
	.vnt39-catl-sale {
		padding: 12px 10px 2px;
	}
	.vnt39-catl-sale__title {
		font-size: 18px;
	}
	/* chips of the bar scroll sideways and open the sheet; the sheet's own "Bộ lọc" lives in the sticky bar below */
	.vnt39-catl-filters .vnt39-search-filters__dropdown:not( .vnt39-search-filters__dropdown--main ) {
		display: block;
		flex: 0 0 auto;
	}
	.vnt39-catl-filters .vnt39-search-filters__dropdown--main {
		display: none;
	}
	.vnt39-catl-filters .vnt39-search-filters__bar {
		padding-bottom: 6px;
	}
	.vnt39-catl-sheet-applied {
		display: block;
	}
	.vnt39-catl-sheet-applied .vnt39-search-filters__applied {
		margin: 0 0 14px;
	}
	.vnt39-catl-sortsec {
		display: none;
	}
	.vnt39-catl-mbar {
		position: sticky;
		top: 0;
		z-index: 70;
		display: flex;
		align-items: stretch;
		margin: 0 0 12px;
		background: #fff;
		border-top: 1px solid #e5e7eb;
		border-bottom: 1px solid #e5e7eb;
		box-shadow: 0 2px 6px rgba( 20, 24, 40, 0.06 );
	}
	.vnt39-catl-mbar__tab,
	.vnt39-catl-mbar__filter {
		flex: 1 1 0;
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 4px;
		min-height: 46px;
		padding: 0 4px;
		border: 0;
		border-bottom: 2px solid transparent;
		background: none;
		color: #4b5563;
		font-size: 13.5px;
		font-weight: 600;
		line-height: 1.1;
		text-align: center;
		text-decoration: none;
		white-space: nowrap;
	}
	.vnt39-catl-mbar__tab + .vnt39-catl-mbar__tab,
	.vnt39-catl-mbar__tab + .vnt39-catl-mbar__filter {
		border-left: 1px solid #eceef1;
	}
	.vnt39-catl-mbar__tab.is-active {
		border-bottom-color: var( --vnt39-brand, #a30d1b );
		color: var( --vnt39-brand, #a30d1b );
	}
	.vnt39-catl-mbar__arrows {
		font-size: 12px;
		opacity: 0.8;
	}
	.vnt39-catl-mbar__filter {
		color: var( --vnt39-text, #17191f );
	}
	.vnt39-catl-mbar__filter .vnt39-catl-ico {
		width: 16px;
		height: 16px;
		fill: currentColor;
		stroke: none;
	}
	.vnt39-catl-mbar__badge {
		min-width: 18px;
		height: 18px;
		padding: 0 5px;
		border-radius: 9px;
		background: var( --vnt39-brand, #a30d1b );
		color: #fff;
		font-size: 11px;
		line-height: 18px;
		text-align: center;
	}
	.vnt39-catl-mbar__badge[hidden] {
		display: none;
	}
	.vnt39-catl-allhead {
		margin-top: 0;
		border-top: 0;
	}
	.vnt39-catl-allhead .vnt39-catl-h {
		padding-top: 0;
	}
}
@media ( min-width: 600px ) and ( max-width: 767px ) {
	body.admin-bar .vnt39-catl-mbar {
		top: 46px;
	}
}

.vnt39-catl-sale__n,
.vnt39-catl-sale__all {
	flex: 0 0 auto;
	white-space: nowrap;
}
.vnt39-catl-sale__title {
	flex: 1 1 auto;
}
.vnt39-catl-sale__all {
	margin-left: 0;
}

.vnt39-catl-count {
	flex: 0 0 auto;
	white-space: nowrap;
}
.vnt39-catl-sortsec .vnt39-catl-h {
	flex: 0 0 auto;
	white-space: nowrap;
}
@media ( min-width: 768px ) {
	.vnt39-catl-sortsec {
		flex-wrap: nowrap;
	}
}

.vnt39-catl-sortsec .vnt39-catl-h,
.vnt39-catl-allhead .vnt39-catl-h {
	width: auto;
	max-width: none;
}

@media ( max-width: 767px ) {
	.vnt39-catl-mbar__filter {
		margin: 0;
		letter-spacing: 0;
		text-transform: none;
		font-family: inherit;
		box-shadow: none;
		border-radius: 0;
		line-height: 1.1;
	}
	.vnt39-catl-mbar__tab {
		letter-spacing: 0;
		text-transform: none;
	}
}

@media ( min-width: 768px ) {
	.vnt39-catl-filters .vnt39-search-filters__dd-popover[data-vnt39-dd-popover="vprice"] {
		min-width: 400px;
	}
	.vnt39-catl-filters .vnt39-search-filters__dd-popover[data-vnt39-dd-popover="vprice"] .vnt39-search-filters__price {
		flex-wrap: nowrap;
	}
}

/* ---- "Danh mục trong …" (child categories as real links, under the grid — SEO pass 2026-10-18) ---- */
.vnt39-catl-subcats { margin-top: 28px; }
.vnt39-catl-subcats .vnt39-catl-chips { flex-wrap: wrap; overflow: visible; margin-right: 0; padding-right: 0; } /* all child categories visible at every width (the head chips scroll sideways < 768px) */
.vnt39-catl-subcat { gap: 8px; }
.vnt39-catl-subcat__n { min-width: 22px; padding: 1px 6px; border-radius: 999px; background: #f1f3f5; color: #5b6470; font-size: 12px; font-weight: 600; text-align: center; }
@media ( max-width: 549px ) {
	.vnt39-catl-subcats .vnt39-catl-chips { gap: 8px; }
	.vnt39-catl-subcat { min-height: 38px; padding: 6px 12px; font-size: 13px; }
}

/* 2026-10-19 — the head chip strip bleeds to the screen edge with -12px, but at <= 549px the page gutter is only 5px
 * (Customizer mobile `.col{padding:0 5px}`), so the strip stuck out 7px. Bleed exactly the gutter. */
@media ( max-width: 549px ) {
	.vnt39-catl-chips { margin-right: -5px; padding-right: 5px; }
	.vnt39-catl-subcats .vnt39-catl-chips { margin-right: 0; padding-right: 0; }
}
