/* =========================================================================
 * X3SALES DV Commit — element vhm_thm_commit
 * Khối "Cam kết của chúng tôi": tiêu đề + gạch trang trí, bên dưới là hàng các
 * mục cam kết (icon + tiêu đề + mô tả).
 * Bản gốc dựng absolute px cố định → ở đây chuyển sang CSS Grid responsive.
 * Màu/bố cục đổ qua --thm-cmt-* trên thẻ gốc. Scope dưới .thm-commit.
 * ========================================================================= */

@font-face {
	font-family: "THM Megante";
	src: url("https://w.ladicdn.com/5dadc2a03bf9ab4ea2cc8ccb/svn-megante-20231018093528-hgdbo.otf");
	font-display: swap;
}

.thm-commit,
.thm-commit * {
	box-sizing: border-box;
}

.thm-commit {
	position: relative;
	width: 100%;
	padding: 34px 15px 50px;
	background-color: var(--thm-cmt-bg, #f1f3f4);
}

.thm-commit__inner {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
}

/* -------- Tiêu đề -------- */
.thm-commit__head {
	position: relative;
	margin-bottom: 40px;
	text-align: center;
}

.thm-commit__title {
	margin: 0;
	font-family: "THM Megante", Arial, sans-serif;
	font-weight: bold;
	font-size: 30px;
	line-height: 1.6;
	color: var(--thm-cmt-accent, #264b9c);
	text-transform: uppercase;
	animation: thmFadeInDown 1s ease 0s 1;
}

.thm-commit__bracket {
	display: block;
	width: 121px;
	height: 2px;
	margin: 6px auto 0;
	background-color: var(--thm-cmt-accent, #264b9c);
}

/* -------- Lưới các mục -------- */
.thm-commit__grid {
	display: grid;
	grid-template-columns: repeat(var(--thm-cmt-cols, 4), 1fr);
	gap: 24px 19px;
}

.thm-commit__item {
	text-align: center;
}

.thm-commit__item-top {
	margin-bottom: 14px;
}

.thm-commit__item-icon {
	width: 50px;
	height: 50px;
	margin: 0 auto 12px;
	color: var(--thm-cmt-icon, #a3854e);
}

.thm-commit__item-icon svg {
	display: block;
	width: 100%;
	height: 100%;
	fill: currentColor;
}

.thm-commit__item-icon img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.thm-commit__item-title {
	margin: 0;
	font-size: 16px;
	font-weight: bold;
	line-height: 1.6;
	color: var(--thm-cmt-title, #000);
}

.thm-commit__item-desc {
	margin: 0;
	font-size: 16px;
	line-height: 1.6;
	color: var(--thm-cmt-text, #000);
	text-align: justify;
	word-break: break-word;
}

@keyframes thmFadeInDown {
	0% { opacity: 0; transform: translateY(-20px); }
	100% { opacity: 1; transform: translateY(0); }
}

/* -------- Tablet (< 992px): 2 cột -------- */
@media (max-width: 991px) {
	.thm-commit__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* -------- Mobile (< 768px): theo --thm-cmt-cols-mobile -------- */
@media (max-width: 767px) {
	.thm-commit__title {
		font-size: 25px;
	}

	.thm-commit__bracket {
		width: 63px;
	}

	.thm-commit__grid {
		grid-template-columns: repeat(var(--thm-cmt-cols-mobile, 2), 1fr);
		gap: 28px 15px;
	}

	.thm-commit__item-desc {
		text-align: center;
	}
}

/* -------------------------------------------------------------------------
 * Chế độ UX Builder ("chip viền builder"): các mục cam kết hiện thành chip CÓ
 * VIỀN để người dùng dễ nhìn/kéo-thả/sửa. Frontend giữ hàng cam kết thật.
 * ---------------------------------------------------------------------- */
.thm-commit__builder-note {
	margin: 0 0 12px;
	color: #555;
	font-size: 13px;
	font-style: italic;
	text-align: center;
}

.thm-commit__builder-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
}

.thm-commit__b-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border: 1px dashed rgba(0, 0, 0, 0.3);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.6);
}

.thm-commit__b-icon {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	color: var(--thm-cmt-icon, #a3854e);
}

.thm-commit__b-icon svg,
.thm-commit__b-icon img {
	display: block;
	width: 100%;
	height: 100%;
	fill: currentColor;
	object-fit: contain;
}

.thm-commit__b-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.thm-commit__b-tag {
	align-self: flex-start;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--fs-color-primary, #264b9c);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
}

.thm-commit__b-title {
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	color: #111;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
