/* ==================================================================
 * Trang danh mục / shop / tag / tìm kiếm
 * ================================================================== */

.shop-page-title.category-page-title {
	background: var(--cv-surface-alt);
	border-bottom: 1px solid var(--cv-border);
	margin-bottom: 0;
}

.shop-page-title .page-title-inner {
	min-height: 0;
	padding-top: 22px;
	padding-bottom: 22px;
}

.shop-page-title .breadcrumbs {
	font-size: 14px;
}

.shop-page-title .breadcrumbs > a,
.shop-page-title .breadcrumbs .divider {
	font-weight: 500;
}

/* trang hiện tại trong breadcrumb chính là tên danh mục -> làm nổi như tiêu đề */
.shop-page-title .breadcrumbs {
	font-family: var(--cv-font-heading);
	color: var(--cv-text);
}

.shop-page-title .breadcrumbs .divider + :not(a),
.shop-page-title .breadcrumbs {
	font-weight: 600;
}

.woocommerce-result-count {
	font-size: 13px;
	color: var(--cv-text-muted);
	margin-right: 14px !important;
}

.woocommerce-ordering select,
select.orderby {
	height: 40px;
	min-width: 190px;
	padding: 0 34px 0 14px;
	border-radius: var(--cv-radius-sm);
	background-color: #fff;
	font-size: 14px;
	font-weight: 500;
}

.category-page-row {
	padding-top: 28px;
}

/* ---- mô tả danh mục (giữ toàn văn cho SEO, chỉ thu gọn hiển thị) ---- */

.term-description {
	position: relative;
	max-width: 900px;
	margin-bottom: 8px;
	color: var(--cv-text-muted);
	font-size: 15px;
	line-height: 1.7;
}

.term-description h1,
.term-description h2,
.term-description h3 {
	margin-bottom: .4em;
	font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem);
	font-weight: 600;
	color: var(--cv-text);
}

.term-description p {
	margin-bottom: .6em;
}

.term-description.is-collapsible:not(.is-expanded) {
	max-height: 7.2em;
	overflow: hidden;
}

.term-description.is-collapsible:not(.is-expanded):after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3em;
	background: linear-gradient(rgba(255, 255, 255, 0), #fff);
	pointer-events: none;
}

.term-description__toggle {
	margin: 0 0 24px;
	padding: 0;
	min-height: 0;
	border: 0;
	background: none;
	color: var(--cv-primary);
	font-family: var(--cv-font-body);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
}

.term-description__toggle:hover {
	color: var(--cv-primary-dark);
	text-decoration: underline;
}

/* ---- danh mục con dạng ô (nếu có) ---- */

.product-category .box-text h5 {
	font-family: var(--cv-font-heading);
	text-transform: none;
	letter-spacing: 0;
}

/* ---- bộ lọc mobile ---- */

.category-filtering .filter-button {
	font-family: var(--cv-font-heading);
	text-transform: none;
}

.woocommerce-pagination {
	margin-top: 16px;
}

@media (max-width: 849px) {
	.shop-page-title .page-title-inner {
		padding-top: 14px;
		padding-bottom: 14px;
	}

	.woocommerce-ordering select,
	select.orderby {
		min-width: 0;
	}

	.category-page-row {
		padding-top: 18px;
	}
}
