/* TM Category Sidebar */
.tm-catbar {
	display: grid;
	gap: 20px;
}

.tm-catbar__box {
	padding: 22px;
	border: 1px solid var(--tm-line);
	border-radius: var(--tm-radius);
	background: var(--tm-white);
	box-shadow: var(--tm-shadow-sm);
}

.tm-catbar__title,
.tm-catbar__help-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 16px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--tm-line);
	color: var(--tm-carbon);
	font-family: var(--tm-font-serif);
	font-size: 18px;
	font-weight: 700;
}

.tm-catbar__title .tm-icon,
.tm-catbar__help-title .tm-icon {
	width: 18px;
	height: 18px;
	color: var(--tm-red);
}

.tm-catbar__list {
	display: grid;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tm-catbar__list a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 9px 12px;
	border-radius: var(--tm-radius-sm);
	color: var(--tm-slate);
	font-family: var(--tm-font-cond);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color .2s, color .2s, padding .2s;
}

.tm-catbar__list a .tm-icon {
	width: 14px;
	height: 14px;
	opacity: .45;
}

.tm-catbar__list a:hover {
	padding-left: 16px;
	background: var(--tm-mist);
	color: var(--tm-carbon);
}

.tm-catbar__list a.is-active {
	background: var(--tm-red);
	color: var(--tm-white);
}

.tm-catbar__list a.is-active .tm-icon {
	opacity: 1;
}

.tm-catbar__help {
	background: var(--tm-mist);
}

.tm-catbar__help-title {
	margin-bottom: 10px;
	padding-bottom: 0;
	border-bottom: 0;
	font-size: 16px;
}

.tm-catbar__help p {
	margin: 0 0 16px;
	color: var(--tm-steel);
	font-size: 13px;
	line-height: 1.6;
}

.tm-catbar__btn {
	width: 100%;
	min-height: 42px;
	padding: 10px 16px;
}

/* Dưới lg (bản mẫu): sidebar ẩn, thay bằng hàng pill danh mục ở đầu nội dung (mb-8) */
@media (max-width: 1023.98px) {
	.e-con:has(> .e-con.tm-sticky-col .tm-catbar) > .tm-sticky-col {
		order: -1;
	}

	.tm-catbar {
		margin-bottom: -8px; /* gap hàng (40) - 8 = mb-8 của bản mẫu */
	}

	.tm-catbar__box {
		padding: 0;
		border: 0;
		background: none;
		box-shadow: none;
	}

	.tm-catbar__title {
		display: flex;
		align-items: center;
		gap: 8px;
		margin: 0 0 12px;
		color: #64748B;
		font-family: var(--tm-font-cond);
		font-size: 12px;
		font-weight: 700;
		letter-spacing: .05em;
		text-transform: uppercase;
	}

	.tm-catbar__title .tm-icon {
		width: 14px;
		height: 14px;
		color: var(--tm-red);
	}

	.tm-catbar__list {
		display: flex;
		flex-wrap: wrap;
		gap: 6px;
	}

	.tm-catbar__list li {
		border: 0;
	}

	html body .elementor .tm-catbar .tm-catbar__list a:not([class*="tm-"]),
	.tm-catbar__list a {
		display: inline-flex;
		padding: 6px 12px;
		border: 1px solid #E2E8F0;
		border-radius: 8px;
		background: #F1F5F9;
		color: #334155;
		font-family: var(--tm-font-cond);
		font-size: 11px;
		font-weight: 700;
		line-height: 1.5;
		letter-spacing: .05em;
		text-transform: uppercase;
	}

	html body .elementor .tm-catbar .tm-catbar__list a.is-active,
	.tm-catbar__list a.is-active {
		border-color: var(--tm-red);
		background: var(--tm-red);
		color: var(--tm-white);
	}

	.tm-catbar__list a .tm-icon,
	.tm-catbar__help,
	.tm-catbar .tm-btn {
		display: none;
	}
}
