/*
 * Trang /san-pham theo nhóm (task GD-09, sheet "Giao diện" dòng 20): mỗi
 * danh mục cấp 1 là 1 khối, "Thép hình" tách thêm theo H/I/U/V (đúng văn bản
 * đề bài — các nhóm khác dù có danh mục con vẫn gộp 1 hàng sản phẩm chung).
 * Mockup đã duyệt: docs/mockup/gd-09/. Feedback lần 2 (mẫu Canva): 3 thẻ/khung vì sidebar bên phải, tự trượt 2s, ảnh không gắn link.
 */
.thp-pg-group {
	margin-bottom: 26px;
}
.thp-pg-group__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	background: #233179;
	padding: 10px 16px;
	margin-bottom: 14px;
}
.thp-pg-group__head h2 {
	color: #fff;
	font-size: 18px;
	margin: 0;
	text-transform: uppercase;
	letter-spacing: .3px;
}
.thp-pg-sub {
	margin-bottom: 18px;
}
.thp-pg-sub__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	border-bottom: 2px solid #eee;
	padding-bottom: 6px;
	margin-bottom: 10px;
}
.thp-pg-sub__head h3 {
	color: #233179;
	font-size: 16px;
	margin: 0;
	border-left: 4px solid #d91d1b;
	padding-left: 8px;
}
.thp-pg-more {
	color: #e18f00;
	font-weight: 600;
	font-size: 13px;
	white-space: nowrap;
}
.thp-pg-more--head {
	color: #fff;
	text-decoration: none;
}
.thp-pg-more--head:hover {
	color: #ffc933;
}
.thp-pg-slider-wrap {
	display: flex;
	align-items: center;
	gap: 6px;
}
.thp-pg-slider {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	flex: 1;
	scroll-behavior: smooth;
	scrollbar-width: none;
	padding-bottom: 2px;
	cursor: grab;
}
.thp-pg-slider::-webkit-scrollbar {
	display: none;
}
/* Đang kéo bằng chuột (thp-product-groups.js): tắt scroll-behavior mượt của
   trình duyệt (đổi bằng tay theo vị trí chuột, để 2 chuyển động không đè
   nhau), khoá chọn chữ và ảnh không bị "kéo ra ngoài" kiểu thẻ <img> mặc định. */
.thp-pg-slider.is-dragging {
	scroll-behavior: auto;
	cursor: grabbing;
	user-select: none;
}
.thp-pg-slider img {
	-webkit-user-drag: none;
	user-drag: none;
}
.thp-pg-slide {
	flex: 0 0 calc((100% - 28px) / 3); /* 3 thẻ/khung (2 khe 14px) — mẫu Canva */
	min-width: 0;
}
.thp-pg-nav {
	flex: none;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 1px solid #ddd;
	background: #fff;
	color: #233179;
	cursor: pointer;
}
.thp-pg-nav:hover {
	background: #233179;
	color: #fff;
}
/* Luôn chừa chỗ cho 2 nút (thay vì display:none khi không cuộn được) để bề
   rộng dải sản phẩm KHÔNG đổi giữa các hàng — trước đây hàng ẩn cả 2 nút có
   dải rộng hơn hàng chỉ ẩn 1 nút, khiến thẻ sản phẩm to/nhỏ khác nhau giữa
   các hàng dù cùng "4 thẻ/khung". */
.thp-pg-nav--hidden {
	visibility: hidden;
	pointer-events: none;
}
@media (max-width: 991px) {
	.thp-pg-slide {
		flex-basis: calc(50% - 7px);
	}
}
@media (max-width: 480px) {
	.thp-pg-slide {
		flex-basis: 78%;
	}
	.thp-pg-group__head h2 {
		font-size: 16px;
	}
}

/* Phản hồi lần 3 (I20.1): thanh tên nhóm — tên bên trái, "Xem thêm" bên phải, bo góc như mẫu Canva,
   cả 2 căn GIỮA theo chiều dọc (trước: lệch lên trên / sát lề dưới). */
.thp-pg-group__head {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between;
	min-height: 46px;
	padding: 0 16px !important;
	border-radius: 8px;
}
.thp-pg-group__head h2 { margin: 0 !important; padding: 0 !important; line-height: 1.2 !important; }
.thp-pg-group__head .thp-pg-more { margin: 0 !important; line-height: 1.2; align-self: center; }
