/*
 * Sidebar sản phẩm/blog (task GD-12; làm lại theo mẫu Canva ở feedback lần 2,
 * 30/09/2026): khối xanh "Danh mục sản phẩm" (cây danh mục), hộp "Liên hệ tư
 * vấn" + 2 nút tròn Zalo/Gọi, tool tính barem (chi tiết sp + blog), "Bài viết
 * mới" (blog). Bên phải nội dung, dính khi cuộn ở máy tính — KHÔNG có thanh cuộn
 * riêng: sidebar cao hơn màn hình thì trôi theo trang rồi mới dính (thp-sidebar.js
 * đặt --thp-sb-top). Điện thoại/tablet dọc: xếp dưới nội dung, không dính.
 */
.thp-sb > * + * {
	margin-top: 16px;
}

/* 1. Danh mục sản phẩm — khối xanh, cây 2 cấp mở sẵn. */
.thp-sb-cats {
	background: #233179;
	color: #fff;
}
.thp-sb-cats__title {
	margin: 0;
	padding: 11px 14px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	color: #fff;
	background: #1a2560;
}
.thp-sb-cats__title .fa {
	margin-right: 6px;
}
.thp-sb .thp-sb-cats__list,
.thp-sb .thp-sb-cats__sub {
	margin: 0;
	/* !important: cskh.css có ".page ul{list-style:disc inside !important}" áp cho MỌI ul trên
	   trang kiểu Page (vd /lien-he) — không có !important thì chấm tròn bullet lại hiện ra. */
	list-style: none !important;
}
.thp-sb .thp-sb-cats__list {
	padding: 6px 0 8px;
}
.thp-sb-cats__parent {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 5px 14px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
	color: #fff !important;
	text-decoration: none;
}
.thp-sb .thp-sb-cats__sub {
	padding: 0 0 4px 28px;
}
.thp-sb-cats__sub a {
	display: block;
	padding: 2px 14px 2px 0;
	font-size: 13px;
	line-height: 1.35;
	color: #d6dcff !important;
	text-decoration: none;
}
.thp-sb-cats a:hover,
.thp-sb-cats a:focus {
	color: #ffc933 !important;
	text-decoration: none;
}

/* 2. Hộp "Liên hệ tư vấn": tiêu đề viền xanh + 2 nút tròn. Số điện thoại/Zalo lấy từ Cài đặt → Thép Hưng Phát. */
.thp-sb-contact__title {
	margin: 0 0 12px;
	padding: 9px 10px;
	background: #fff;
	border: 1px solid #233179;
	color: #233179;
	font-size: 14px;
	font-weight: 700;
	text-align: center;
	text-transform: none;
}
.thp-sb-contact__icons {
	display: flex;
	justify-content: center;
	gap: 28px;
}
.thp-sb-contact__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	text-decoration: none;
	transition: transform .15s, background-color .15s, color .15s;
}
.thp-sb-contact__btn:hover,
.thp-sb-contact__btn:focus {
	transform: scale(1.08);
	text-decoration: none;
}
.thp-sb-contact__btn--zalo img {
	width: 46px;
	height: 46px;
	border-radius: 50%;
}
.thp-sb-contact__btn--phone {
	border: 2px solid #d91d1b;
	background: #fff;
	color: #d91d1b !important;
	font-size: 22px;
}
.thp-sb-contact__btn--phone:hover,
.thp-sb-contact__btn--phone:focus {
	background: #d91d1b;
	color: #fff !important;
}

/* 3. Tool tính barem gọn lại cho vừa sidebar. */
.thp-sb .calculator {
	margin: 0;
	padding: 14px 16px;
	border: 1px solid #e5e7eb;
	border-radius: 0;
	box-shadow: none;
}
.thp-sb .calculator h2,
.thp-sb .calculator p {
	margin-bottom: 10px;
	font-size: 16px;
}
.thp-sb .calculator .row {
	margin-bottom: 8px;
}
.thp-sb .calculator select,
.thp-sb .calculator input[type=number] {
	height: 36px;
}
.thp-sb .calculator .range-box {
	padding: 6px 10px;
}
.thp-sb .calculator .result {
	margin-top: 10px;
	padding: 10px;
	font-size: 16px;
}
.thp-sb .calculator .note {
	margin-top: 6px;
	font-size: 12px;
}

/* Khung mô tả + sidebar của trang chi tiết: sidebar chỉ dính trong phần mô tả, không đè "Sản phẩm liên quan". */
.thp-prod-body {
	clear: both;
	display: flow-root;
}

/* Dính khi cuộn: danh mục từ 768px (2 cột), chi tiết sp/blog từ 992px (sidebar cạnh nội dung). */
.thp-sb-col {
	--thp-sb-base: 78px; /* thanh menu dính 58px + 20px */
}
body.admin-bar .thp-sb-col {
	--thp-sb-base: 110px;
}
@media (min-width: 768px) {
	.thp-sb-col {
		position: sticky;
		top: var(--thp-sb-top, var(--thp-sb-base));
	}
}
/* Dưới 992px sidebar chi tiết sp/blog xếp dưới phần nội dung. */
@media (max-width: 991px) {
	#secondary.thp-sb-col {
		clear: both;
	}
}
@media (min-width: 768px) and (max-width: 991px) {
	#secondary.thp-sb-col {
		position: static;
	}
}

/* Tiêu đề trang danh mục và /san-pham (h1) cách khối sản phẩm ra một chút, màu xanh đậm như tên sản phẩm. */
.collection .cat-img-title {
	margin-bottom: 16px;
}
.collection .cat-img-title .cat-heading {
	color: #233179;
}

/* =====================================================================
 * Phản hồi lần 3 (04/10/2026, ô I20 mục 2, I21 mục 5–6):
 * - Menu: bố cục bo góc như thepxuyena.com.vn, màu như hungphatsteel.com — tiêu đề "Danh mục sản phẩm"
 *   đậm chữ trắng trên nền xanh đậm (bo 2 góc trên), các mục chữ xanh đậm nền trắng, kẻ ngăn nhạt;
 *   nhóm thu gọn, mũi tên xoay khi mở.
 * - Hộp "Liên hệ tư vấn": chữ to hơn, khung bo góc như mẫu Canva; 2 nút tròn cách tool barem rõ ràng.
 * - Tool barem: thẻ có đệm + bo góc + bóng nhẹ như web cũ (thepmanhhungphat.com.vn/thep-hinh-h),
 *   sidebar rộng 4/12 (≈360px như web cũ) nên không còn bị ép.
 * ===================================================================== */
.thp-sb-cats {
	background: #fff;
	color: #233179;
	border: 1px solid #dfe3ef;
	border-radius: 10px;
	overflow: hidden;
}
.thp-sb-cats__title {
	background: #233179;
	color: #fff;
	font-size: 17px;
	padding: 13px 16px;
	border-radius: 10px 10px 0 0;
}
.thp-sb .thp-sb-cats__list { padding: 0; }
.thp-sb-cats__item + .thp-sb-cats__item { border-top: 1px solid #edf0f6; }
.thp-sb-cats__row { display: flex; align-items: stretch; }
.thp-sb-cats__parent {
	flex: 1 1 auto;
	padding: 11px 16px;
	font-size: 15px;
	color: #233179 !important;
	cursor: pointer;
}
span.thp-sb-cats__parent { display: flex; align-items: center; font-weight: 700; }
.thp-sb-cats__parent::before {
	content: "\f0da"; /* fa-caret-right */
	font-family: FontAwesome;
	font-weight: normal;
	margin-right: 8px;
	color: #233179;
}
.thp-sb-cats__toggle {
	flex: none;
	width: 44px;
	border: 0;
	border-left: 1px solid #edf0f6;
	background: transparent;
	color: #233179;
	font-size: 18px;
	cursor: pointer;
}
.thp-sb-cats__toggle .fa { transition: transform .2s; }
.thp-sb-cats__item.is-open .thp-sb-cats__toggle .fa { transform: rotate(180deg); }
.thp-sb-cats__toggle:hover, .thp-sb-cats__toggle:focus { background: #f2f4fa; }
.thp-sb .thp-sb-cats__sub { padding: 0 0 8px 34px; background: #fff; }
.thp-sb .thp-sb-cats__sub[hidden] { display: none; }
.thp-sb-cats__sub a {
	padding: 6px 14px 6px 0;
	font-size: 14px;
	color: #233179 !important;
}
.thp-sb-cats__sub a[aria-current="page"] { font-weight: 700; color: #d91d1b !important; }
.thp-sb-cats a:hover, .thp-sb-cats a:focus { color: #d91d1b !important; }

.thp-sb-contact {
	border: 1px solid #dfe3ef;
	border-radius: 10px;
	padding: 14px 14px 16px;
	background: #fff;
}
.thp-sb-contact__title {
	border: 1px solid #233179;
	border-radius: 8px;
	font-size: 17px;
	padding: 10px;
	margin-bottom: 14px;
}
.thp-sb-contact__icons { gap: 36px; }

.thp-sb > * + * { margin-top: 20px; }
.thp-sb .calculator {
	padding: 18px 18px 16px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, .08);
	background: #fff;
}
.thp-sb .calculator h2, .thp-sb .calculator p:first-child { font-size: 18px; text-align: center; }
.thp-sb-cats .thp-sb-cats__parent { display: flex; justify-content: flex-start; gap: 0; text-align: left; }
.thp-sb-contact__btn--phone .fa { font-size: 22px; }

/* CSS bổ sung (DB) đặt ".thp-sb .calculator{padding:15px 35px}" — đệm ngang 35px làm tool barem bị ép (ô I21-II.6).
   Ghi đè bằng selector cụ thể hơn, không sửa dữ liệu trên site thật. */
.thp-sb-col .thp-sb .calculator { padding: 18px 18px 16px; }
@media (max-width: 1199px) { .thp-sb-col .thp-sb .calculator { padding: 16px 14px; } }
/* .row trong tool barem là class Bootstrap (margin -15px 2 bên) → nội dung lòi sát viền thẻ dù có đệm. */
.thp-sb .calculator .row { margin-left: 0; margin-right: 0; }
.thp-sb .calculator select { width: 100%; }

/* Khoảng cách đều 20px giữa các khối sidebar (danh mục / liên hệ / tool barem / bài viết mới). Rule ".thp-sb .calculator{margin:0}"
   cũ đè mất margin-top → hộp "Liên hệ tư vấn" dính sát tool barem (user báo 05/10). Selector cụ thể hơn để thắng cả CSS bổ sung trong DB. */
.thp-sb-col .thp-sb > * + * { margin-top: 20px !important; }
