/*
 * tmbp-design.css - Design system v2 thienmonbophoi.vn (bản build v1, 27/10/2026)
 * Nguồn: 05. UX-UI/tmbp-design-system-v2.md
 * Nạp sau CSS Rehub, Elementor, theme con (snippet [TMBP] Design system).
 * Chỗ có !important là để đè !important sẵn có trong style.css theme con
 * và CSS tùy chỉnh của template Elementor 2767.
 */

/* ===== 1. Token ===== */
:root {
	--tmbp-green: #0A7A37;
	--tmbp-green-h: #075C29;
	--tmbp-head: #0A7A37;
	--tmbp-text: #333333;
	--tmbp-muted: #4A5A4F;
	--tmbp-subtle: #5B6B60;
	--tmbp-border: #E2EBE4;
	--tmbp-soft: #F4F8F4;
	--tmbp-sale: #E53935;
	--tmbp-font: Roboto, -apple-system, "Segoe UI", Arial, sans-serif;

	--tmbp-h1: 36px;
	--tmbp-h2: 30px;
	--tmbp-h3: 22px;
	--tmbp-h4: 18px;
	--tmbp-h2-t: 32px;
	--tmbp-h2-b: 12px;
	--tmbp-h3-t: 24px;
	--tmbp-h3-b: 8px;
	--tmbp-h4-t: 20px;
	--tmbp-h4-b: 8px;
	--tmbp-hh: 12px;

	/* Token cũ của theme con: trỏ về giá trị design system */
	--color-primary: #0A7A37;
	--color-secondary: #0A7A37;
	--color-accent: #075C29;
	--color-accent-2: #075C29;
	--color-text: #333333;
	--color-text-weak: #4A5A4F;
	--color-border: #E2EBE4;
	--color-heading: #0A7A37;
	--h1-d: 36px; --h1-t: 30px; --h1-m: 26px;
	--h2-d: 30px; --h2-t: 26px; --h2-m: 24px;
	--h3-d: 22px; --h3-t: 20px; --h3-m: 18px;
	--h4-d: 18px; --h4-t: 17px; --h4-m: 16px;
	--lh-h: 1.3; --lh-h2: 1.4;
	--ls-tight: 0; --ls-0: 0;
	--ws-strong: normal; --ws-weak: normal;
}
@media (max-width: 1024px) {
	:root { --tmbp-h1: 30px; --tmbp-h2: 26px; --tmbp-h3: 20px; --tmbp-h4: 17px; }
}
@media (max-width: 767px) {
	:root {
		--tmbp-h1: 26px; --tmbp-h2: 24px; --tmbp-h3: 18px; --tmbp-h4: 16px;
		--tmbp-h2-t: 28px; --tmbp-h2-b: 10px; --tmbp-h3-t: 20px; --tmbp-h4-t: 16px; --tmbp-hh: 10px;
	}
}

/* Màu toàn cục Elementor (Kit): bỏ xanh phụ #0FA523 và cam #FF8A00 */
body[class*="elementor-kit-"] {
	--e-global-color-primary: #0A7A37;
	--e-global-color-secondary: #0A7A37;
	--e-global-color-accent: #075C29;
	--e-global-color-text: #333333;
}

/* ===== 2. Font và tiêu đề toàn site ===== */
body[class] :is(h1, h2, h3, h4, h5, h6) {
	font-family: var(--tmbp-font);
	font-weight: 700;
	letter-spacing: 0;
	word-spacing: normal;
}
::selection { background: var(--tmbp-green); color: #fff; }

/* ===== 3. H1 tiêu đề trang ===== */
body .title_single_area h1,
body .rh_post_layout_outside .title_single_area h1,
body.page article.post .title h1.entry-title,
body.single-product h1.product_title,
body.home .elementor-widget-heading h1.elementor-heading-title {
	font-size: var(--tmbp-h1) !important;
	line-height: 1.25 !important;
	letter-spacing: 0 !important;
	word-spacing: normal !important;
	font-weight: 700 !important;
}

/* Trang chủ Elementor: H2 theo thang chữ */
body.home .elementor-widget-heading h2.elementor-heading-title {
	font-size: var(--tmbp-h2) !important;
	line-height: 1.3 !important;
	letter-spacing: 0 !important;
	word-spacing: normal !important;
}

/* ===== 4-6. Thân nội dung: bài viết, trang chính sách, mô tả sản phẩm =====
 * Chỉ áp cho con trực tiếp của khung nội dung, để hộp riêng
 * (Tóm tắt, FAQ, mục lục, tác giả) giữ thiết kế của chúng.
 */
:is(#ftwp-postcontent, article.post-inner, body.page .main-side article.post, #section-description .rh-360-content-area, .tmbp-pt-body) > p {
	font-size: 16px;
	line-height: 28px;
	color: var(--tmbp-text);
	margin: 0 0 16px;
}

:is(#ftwp-postcontent, article.post-inner, body.page .main-side article.post, #section-description .rh-360-content-area, .tmbp-pt-body) > h2 {
	font-size: var(--tmbp-h2);
	line-height: 1.3;
	color: var(--tmbp-head);
	margin: var(--tmbp-h2-t) 0 var(--tmbp-h2-b) !important;
	padding: 0;
	border: 0;
	background: none;
}
:is(#ftwp-postcontent, article.post-inner, body.page .main-side article.post, #section-description .rh-360-content-area, .tmbp-pt-body) > h3 {
	font-size: var(--tmbp-h3);
	line-height: 1.4;
	color: var(--tmbp-head);
	margin: var(--tmbp-h3-t) 0 var(--tmbp-h3-b) !important;
}
:is(#ftwp-postcontent, article.post-inner, body.page .main-side article.post, #section-description .rh-360-content-area, .tmbp-pt-body) > h4 {
	font-size: var(--tmbp-h4);
	line-height: 1.4;
	color: var(--tmbp-head);
	margin: var(--tmbp-h4-t) 0 var(--tmbp-h4-b) !important;
}
:is(#ftwp-postcontent, article.post-inner, body.page .main-side article.post, #section-description .rh-360-content-area, .tmbp-pt-body) > :is(h2, h3) + :is(h3, h4) {
	margin-top: var(--tmbp-hh) !important;
}
:is(#ftwp-postcontent, article.post-inner, body.page .main-side article.post, #section-description .rh-360-content-area, .tmbp-pt-body) > :is(h2, h3, h4):first-child {
	margin-top: 0 !important;
}

/* Danh sách */
:is(#ftwp-postcontent, article.post-inner, body.page .main-side article.post, #section-description .rh-360-content-area, .tmbp-pt-body) > :is(ul, ol):is(:not([class]), .wp-block-list) {
	font-size: 16px !important;
	line-height: 28px !important;
	color: var(--tmbp-text);
	padding-left: 24px !important;
	margin: 12px 0 16px !important;
	list-style-position: outside;
}
:is(#ftwp-postcontent, article.post-inner, body.page .main-side article.post, #section-description .rh-360-content-area, .tmbp-pt-body) > ul:is(:not([class]), .wp-block-list) { list-style-type: disc; }
:is(#ftwp-postcontent, article.post-inner, body.page .main-side article.post, #section-description .rh-360-content-area, .tmbp-pt-body) > ol:is(:not([class]), .wp-block-list) { list-style-type: decimal; }
:is(#ftwp-postcontent, article.post-inner, body.page .main-side article.post, #section-description .rh-360-content-area, .tmbp-pt-body) > :is(ul, ol):is(:not([class]), .wp-block-list) li {
	margin: 0 0 4px !important;
	padding-left: 0;
	font-size: inherit !important;
	line-height: inherit;
}
:is(#ftwp-postcontent, article.post-inner, body.page .main-side article.post, #section-description .rh-360-content-area, .tmbp-pt-body) > ul:is(:not([class]), .wp-block-list) li { list-style-type: disc; }
:is(#ftwp-postcontent, article.post-inner, body.page .main-side article.post, #section-description .rh-360-content-area, .tmbp-pt-body) > ol:is(:not([class]), .wp-block-list) > li { list-style-type: decimal; }
:is(#ftwp-postcontent, article.post-inner, body.page .main-side article.post, #section-description .rh-360-content-area, .tmbp-pt-body) > :is(ul, ol):is(:not([class]), .wp-block-list) li::marker {
	color: var(--tmbp-green);
}
:is(#ftwp-postcontent, article.post-inner, body.page .main-side article.post, #section-description .rh-360-content-area, .tmbp-pt-body) > ol:is(:not([class]), .wp-block-list) > li::marker {
	font-weight: 700;
}
:is(#ftwp-postcontent, article.post-inner, body.page .main-side article.post, #section-description .rh-360-content-area, .tmbp-pt-body) > :is(ul, ol):is(:not([class]), .wp-block-list) li > :is(ul, ol) {
	margin: 8px 0 0 !important;
	padding-left: 24px !important;
}
:is(#ftwp-postcontent, article.post-inner, body.page .main-side article.post, #section-description .rh-360-content-area, .tmbp-pt-body) > :is(ul, ol):is(:not([class]), .wp-block-list) li > p {
	margin: 0;
}
/* Danh sách chấm đứng ngay sau danh sách số: thụt như mục con */
:is(#ftwp-postcontent, article.post-inner, body.page .main-side article.post, #section-description .rh-360-content-area, .tmbp-pt-body) > ol + ul:not([class]) {
	padding-left: 48px !important;
	margin-top: 0 !important;
}

/* Link trong bài */
:is(#ftwp-postcontent, article.post-inner, body.page .main-side article.post, #section-description .rh-360-content-area, .tmbp-pt-body) > :is(p, ul, ol) a:not([class*="btn"]):not(.button) {
	color: var(--tmbp-green);
	font-weight: inherit;
	text-decoration: none;
}
:is(#ftwp-postcontent, article.post-inner, body.page .main-side article.post, #section-description .rh-360-content-area, .tmbp-pt-body) > :is(p, ul, ol) a:not([class*="btn"]):not(.button):hover {
	color: var(--tmbp-green-h);
	text-decoration: underline;
}

/* ===== 8. Ảnh, bảng, khối chèn ===== */
:is(#ftwp-postcontent, article.post-inner, body.page .main-side article.post, #section-description .rh-360-content-area, .tmbp-pt-body) > :is(.wp-caption, figure, table, .wpsm-table, blockquote) {
	margin-top: 24px;
	margin-bottom: 24px;
}
:is(#ftwp-postcontent, article.post-inner, body.page .main-side article.post, #section-description .rh-360-content-area, .tmbp-pt-body) > :is(.wp-caption, figure) {
	max-width: 100%;
	margin-left: auto;
	margin-right: auto;
}
:is(#ftwp-postcontent, article.post-inner, body.page .main-side article.post, #section-description .rh-360-content-area, .tmbp-pt-body) :is(.wp-caption, figure, p) > img {
	border-radius: 8px;
	max-width: 100%;
	height: auto;
}
:is(#ftwp-postcontent, article.post-inner, body.page .main-side article.post, #section-description .rh-360-content-area, .tmbp-pt-body) :is(.wp-caption-text, figcaption) {
	font-size: 14px;
	line-height: 1.5;
	color: var(--tmbp-subtle);
	text-align: center;
	margin: 8px 0 0;
	font-style: normal;
}

/* ===== 7. Nút và form ===== */
/* Nút chính (nút giỏ hàng trang sản phẩm giữ kiểu riêng trong brand-woo.css) */
body .woocommerce button.button.alt,
body .woocommerce a.button.alt,
body #respond input[type="submit"],
body #respond .submit,
body .comment-form input[type="submit"],
body .wpcf7 input[type="submit"],
body .woocommerce-cart .checkout-button,
body #place_order {
	background: var(--tmbp-green) !important;
	border: 2px solid var(--tmbp-green) !important;
	color: #fff !important;
	min-height: 44px;
	padding: 10px 24px !important;
	border-radius: 8px !important;
	font-family: var(--tmbp-font);
	font-size: 16px !important;
	font-weight: 700 !important;
	text-transform: none !important;
	line-height: 1.4 !important;
	box-shadow: none !important;
}
body .woocommerce button.button.alt:hover,
body .woocommerce a.button.alt:hover,
body #respond input[type="submit"]:hover,
body #respond .submit:hover,
body .comment-form input[type="submit"]:hover,
body .wpcf7 input[type="submit"]:hover,
body .woocommerce-cart .checkout-button:hover,
body #place_order:hover {
	background: var(--tmbp-green-h) !important;
	border-color: var(--tmbp-green-h) !important;
}
/* Nút tìm kiếm ở header */
body .head_search .btnsearch {
	background: var(--tmbp-green);
}
body .head_search .btnsearch:hover {
	background: var(--tmbp-green-h);
}

/* Ô nhập trong form nội dung (bình luận, đánh giá, liên hệ) */
body #respond :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], textarea),
body .comment-form :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], textarea),
body .wpcf7 :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], textarea, select) {
	min-height: 44px;
	border: 1px solid var(--tmbp-border) !important;
	border-radius: 8px !important;
	font-size: 16px !important;
	font-family: var(--tmbp-font);
	color: var(--tmbp-text);
	box-shadow: none;
}
body #respond textarea,
body .comment-form textarea,
body .wpcf7 textarea {
	min-height: 120px;
}
body #respond :is(input, textarea):focus,
body .comment-form :is(input, textarea):focus,
body .wpcf7 :is(input, textarea, select):focus {
	border-color: var(--tmbp-green) !important;
	outline: 2px solid rgba(10, 122, 55, .15);
	outline-offset: 0;
}

/* ===== Màu còn sót ===== */
body .orangecolor { color: var(--tmbp-green) !important; }
/* Lớp .tmbp-prose: nội dung trong khối custom (Nội dung chính, câu trả lời FAQ) - chuyển từ snippet #23, 28/10/2026 */
.tmbp-prose p{margin:0 0 16px}.tmbp-prose p:has(+ :is(ul,ol)){margin-bottom:8px}.tmbp-prose :is(ul,ol){margin:0 0 16px!important;padding:0 0 0 24px!important}.tmbp-prose ul{list-style:disc outside!important}.tmbp-prose ol{list-style:decimal outside!important}.tmbp-prose li{display:list-item!important;list-style:inherit!important;margin:0!important;padding:0!important}.tmbp-prose li+li{margin-top:4px!important}.tmbp-prose li::marker{color:#0A7A37}.tmbp-prose ol>li::marker{font-weight:700}.tmbp-prose li::before{content:none!important;display:none!important}.tmbp-prose :is(b,strong){font-weight:700}.tmbp-prose a{color:#0A7A37;text-decoration:none}.tmbp-prose a:hover{text-decoration:underline}.tmbp-prose>:last-child{margin-bottom:0!important}

/* Danh sach ngay sau doan van: cach doan dan 8px (thay 16px) de doan dan va danh sach thanh 1 khoi. Them .tmbp-pt-body (noi dung tab san pham, snippet #31) vao nhom noi dung. 30/10/2026 */
:is(#ftwp-postcontent, article.post-inner, body.page .main-side article.post, #section-description .rh-360-content-area, .tmbp-pt-body) > p:has(+ :is(ul, ol):is(:not([class]), .wp-block-list)) { margin-bottom: 8px; }
:is(#ftwp-postcontent, article.post-inner, body.page .main-side article.post, #section-description .rh-360-content-area, .tmbp-pt-body) > p + :is(ul, ol):is(:not([class]), .wp-block-list) { margin-top: 0 !important; }

/* Nhip danh sach: dong 28px nhu doan van, giua 2 y 4px, y cuoi khong cong them (het danh sach cach khoi sau 16px). 30/10/2026 */
:is(#ftwp-postcontent, article.post-inner, body.page .main-side article.post, #section-description .rh-360-content-area, .tmbp-pt-body) > :is(ul, ol):is(:not([class]), .wp-block-list) > li:last-child { margin-bottom: 0 !important; }
