/* ==========================================================================
   Trang chi tiết bài viết Zhongxing (inc/zx-post.php)
   ========================================================================== */
.single-post .zx-pi { width: 20px; height: 20px; flex: 0 0 auto; }
.single-post .blog-wrapper { padding-top: 26px; }
.single-post .article-inner { padding: 0; }

/* thanh tiến độ đọc */
.zx-read-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 1001; background: linear-gradient(90deg, #d4372f, #a12a2a); box-shadow: 0 0 8px rgba(212, 55, 47, .5); transition: width .1s linear; }

/* ---------- Đầu bài ---------- */
.zx-post-head { text-align: left; margin-bottom: 22px; }
.zx-post-bc { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.zx-post-bc a { color: #6b7280; }
.zx-post-bc a:last-child { color: #1f2937; }
.zx-post-bc a:hover { color: #a12a2a; }
.zx-bc-home img { width: 22px; height: 22px; border-radius: 6px; display: block; }
.zx-bc-sep { width: 4px; height: 4px; border-radius: 50%; background: #c4c4c4; }
.single-post h1.zx-post-title { font-size: 30px; line-height: 1.35; font-weight: 800; color: #111827; margin: 0 0 14px; text-transform: none; letter-spacing: 0; }
.zx-post-meta { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid #eee; }
.zx-pm-avatar { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #f3dada; padding: 2px; background: #fff; }
.zx-post-meta strong { display: block; font-size: 14px; color: #a12a2a; text-transform: uppercase; letter-spacing: .02em; }
.zx-post-meta span { font-size: 13px; color: #6b7280; }
.zx-post-thumb { border-radius: 14px; overflow: hidden; box-shadow: 0 10px 28px rgba(17, 24, 39, .08); }
.zx-post-thumb img { width: 100%; display: block; }
/* ẩn phần đầu mặc định Flatsome nếu còn */
.single-post .entry-header .entry-divider, .single-post .entry-header-text-top { display: none; }

/* ---------- Nội dung ---------- */
.single-post .entry-content { font-size: 16.5px; line-height: 1.8; color: #2b2f36; padding-top: 0; }
.single-post .entry-content p { margin-bottom: 1.1em; }
.single-post .entry-content h2 { position: relative; font-size: 24px; line-height: 1.35; font-weight: 800; color: #111827; margin: 1.8em 0 .7em; padding-left: 16px; scroll-margin-top: 110px; }
.single-post .entry-content h2::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 5px; border-radius: 4px; background: linear-gradient(180deg, #d4372f, #8e2024); }
.single-post .entry-content h3 { font-size: 19.5px; font-weight: 700; color: #1f2937; margin: 1.4em 0 .6em; scroll-margin-top: 110px; }
.single-post .entry-content ul, .single-post .entry-content ol { margin-left: 0; padding-left: 0; }
.single-post .entry-content ul > li { list-style: none; position: relative; padding-left: 26px; margin-bottom: .55em; }
.single-post .entry-content ul > li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2.5px solid #a12a2a; }
.single-post .entry-content a { color: #a12a2a; font-weight: 600; text-decoration: underline; text-decoration-color: rgba(161, 42, 42, .3); text-underline-offset: 3px; }
.single-post .entry-content a:hover { text-decoration-color: #a12a2a; }
.single-post .entry-content strong { color: #111827; }
.single-post .entry-content img { border-radius: 12px; }
.single-post .entry-content figcaption, .single-post .entry-content .wp-caption-text { text-align: center; font-size: 13.5px; font-style: italic; color: #6b7280; margin-top: 6px; }
/* bảng */
.single-post .entry-content table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid #ececec; border-radius: 12px; overflow: hidden; margin: 1em 0 1.6em; font-size: 15px; }
.single-post .entry-content thead th { background: #a12a2a; color: #fff; font-weight: 700; text-transform: none; letter-spacing: 0; padding: 12px 14px; border: 0; }
.single-post .entry-content td { padding: 11px 14px; border: 0; border-top: 1px solid #f0f0f0; }
.single-post .entry-content tbody tr:nth-child(even) td { background: #fbf8f8; }
.single-post .entry-content tbody tr:hover td { background: #fbefef; }

/* đoạn mở đầu */
.zx-sapo { border-left: 4px solid #d4372f; background: linear-gradient(90deg, #fdf4f3, rgba(253, 244, 243, 0)); padding: 14px 18px; border-radius: 0 12px 12px 0; margin-bottom: 20px; }
.zx-sapo p { margin: 0 !important; font-style: italic; color: #374151; }

/* xem thêm */
.zx-seealso { background: #f4f7fd; border: 1px solid #e3eaf8; border-radius: 12px; padding: 16px 20px; margin: 0 0 22px; }
.zx-seealso-title { font-weight: 800; margin: 0 0 8px !important; color: #111827; }
.zx-seealso ul { margin: 0; }
.single-post .entry-content .zx-seealso li { margin-bottom: .3em; padding-left: 20px; }
.single-post .entry-content .zx-seealso li::before { width: 6px; height: 6px; border: 0; background: #2563eb; top: .75em; left: 4px; }
.single-post .entry-content .zx-seealso a { color: #1d4ed8; font-weight: 500; text-decoration: none; }
.single-post .entry-content .zx-seealso a:hover { text-decoration: underline; }

/* mục lục */
.zx-toc { border: 1px solid #ececec; border-radius: 12px; background: #fff; margin: 0 0 26px; box-shadow: 0 4px 16px rgba(17, 24, 39, .05); overflow: hidden; max-width: 560px; }
.zx-toc-head { width: 100%; margin: 0; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #fafafa; border: 0; border-bottom: 1px solid #eee; font-size: 15px; font-weight: 800; color: #111827; text-transform: none; letter-spacing: 0; cursor: pointer; min-height: 0; line-height: 1.4; }
.zx-toc-head span { display: inline-flex; align-items: center; gap: 8px; }
.zx-toc-head span .zx-pi { color: #a12a2a; }
.zx-toc-head > .zx-pi { transition: transform .3s; color: #6b7280; }
.zx-toc.is-closed .zx-toc-head > .zx-pi { transform: rotate(-90deg); }
.zx-toc.is-closed .zx-toc-head { border-bottom-color: transparent; }
.single-post .entry-content .zx-toc-list { counter-reset: toc; margin: 0; padding: 10px 16px 12px; list-style: none; transition: max-height .35s ease; overflow: hidden; }
.zx-toc.is-closed .zx-toc-list { max-height: 0 !important; padding-top: 0; padding-bottom: 0; }
.single-post .entry-content .zx-toc-list li { list-style: none; counter-increment: toc; margin: 0; padding: 0; font-size: 15px; line-height: 1.5; }
.single-post .entry-content .zx-toc-list li::before { content: none; }
.single-post .entry-content .zx-toc-list li a { display: flex; gap: 8px; padding: 6px 8px; border-radius: 8px; color: #374151; font-weight: 500; text-decoration: none; transition: background .2s, color .2s; }
.single-post .entry-content .zx-toc-list li > a::before { content: counter(toc) "."; color: #a12a2a; font-weight: 800; min-width: 18px; }
.single-post .entry-content .zx-toc-list li.zx-toc-sub { counter-increment: none; padding-left: 26px; font-size: 14px; }
.single-post .entry-content .zx-toc-list li.zx-toc-sub > a::before { content: "–"; color: #9ca3af; }
.single-post .entry-content .zx-toc-list a:hover { background: #fbf1f1; color: #a12a2a; }
.single-post .entry-content .zx-toc-list a.is-active { background: #a12a2a; color: #fff; }
.single-post .entry-content .zx-toc-list a.is-active::before { color: #fff; }

/* sản phẩm gợi ý */
.zx-post-products { margin: 2em 0 1.4em; padding: 18px 16px 4px; border: 1px solid #f1e1e1; border-radius: 14px; background: linear-gradient(180deg, #fdf6f5, #fff 40%); }
.zx-pp-title { font-weight: 800; color: #111827; margin: 0 0 6px !important; font-size: 17px; }
.single-post .entry-content .zx-pp-title a { font-weight: 700; text-decoration: none; font-size: 15px; }
.zx-post-products .product-small .box-text { font-size: 14px; line-height: 1.5; }
.single-post .entry-content .zx-post-products a { text-decoration: none; font-weight: 600; }
.single-post .entry-content .zx-post-products ul > li { padding-left: 0; }
.single-post .entry-content .zx-post-products ul > li::before { content: none; }

/* hộp liên hệ */
.zx-cta-box { margin: 1.6em 0; padding: 20px 22px; border-radius: 14px; color: #fff; background: radial-gradient(120% 140% at 0% 0%, #d4372f 0%, #a12a2a 55%, #7d1d21 100%); box-shadow: 0 14px 30px rgba(161, 42, 42, .25); }
.single-post .entry-content .zx-cta-box p { margin: 0 0 14px; color: #fff; }
.single-post .entry-content .zx-cta-box strong { color: #fff; }
.single-post .entry-content .zx-cta-box a { color: #fff; text-decoration-color: rgba(255, 255, 255, .5); }
.zx-cta-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.single-post .entry-content .zx-cta-btns a { display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border-radius: 99px; font-weight: 700; font-size: 15px; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.single-post .entry-content .zx-cta-btns a:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0, 0, 0, .18); }
.single-post .entry-content .zx-cta-quote { background: #fff; color: #a12a2a; }
.single-post .entry-content .zx-cta-zalo { background: #0068ff; color: #fff; }
.single-post .entry-content .zx-cta-call { background: rgba(255, 255, 255, .14); border: 1.5px solid rgba(255, 255, 255, .6); color: #fff; }

/* chia sẻ */
.zx-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 16px 0; margin-top: 10px; border-top: 1px solid #eee; border-bottom: 1px solid #eee; font-size: 14px; }
.zx-share > span { font-weight: 700; color: #374151; margin-right: 4px; }
.single-post .entry-content .zx-share a, .zx-share button { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; margin: 0; border-radius: 99px; border: 1px solid #e5e5e5; background: #fff; color: #374151; font-size: 13.5px; font-weight: 600; text-decoration: none; text-transform: none; letter-spacing: 0; min-height: 0; line-height: 1; cursor: pointer; transition: all .2s; }
.single-post .entry-content .zx-share .zx-sh-fb:hover { background: #1877f2; border-color: #1877f2; color: #fff; }
.single-post .entry-content .zx-share .zx-sh-mail:hover, .zx-share button:hover { background: #a12a2a; border-color: #a12a2a; color: #fff; }
.zx-share button.is-done { background: #1c7c3a; border-color: #1c7c3a; color: #fff; }

/* bài viết liên quan */
.zx-related { margin-top: 26px; }
.single-post .entry-content h2.zx-related-title { font-size: 17px; text-transform: uppercase; letter-spacing: .03em; margin-top: 0; }
.zx-related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.single-post .entry-content .zx-rel { display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: center; gap: 12px; border: 1px solid #ececec; border-radius: 10px; overflow: hidden; background: #fff; color: #111827; font-weight: 700; text-decoration: none; transition: box-shadow .25s, transform .25s, border-color .25s; }
.single-post .entry-content .zx-rel:hover { box-shadow: 0 10px 22px rgba(17, 24, 39, .08); transform: translateY(-2px); border-color: transparent; color: #a12a2a; }
.zx-rel-img { display: block; aspect-ratio: 1200 / 630; overflow: hidden; }
.single-post .entry-content .zx-rel-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; display: block; }
.zx-rel-t { font-size: 14.5px; line-height: 1.45; padding-right: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Thanh bên ---------- */
.single-post .post-sidebar { padding-top: 6px; }
@media (min-width: 850px) {
	.single-post .post-sidebar > .sidebar-inner, .single-post .post-sidebar #secondary { position: sticky; top: 96px; }
}
.single-post .post-sidebar .widget { margin-bottom: 26px; }
.zx-side-title { position: relative; font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: #111827; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid #eee; }
.zx-side-title::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 44px; height: 3px; border-radius: 3px; background: #a12a2a; }
.zx-side-posts, .zx-side-cats { list-style: none; margin: 0; padding: 0; }
.zx-side-posts li { margin: 0 0 12px; list-style: none; }
.zx-side-posts a { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: center; color: #1f2937; }
.zx-sp-img { display: block; aspect-ratio: 1200 / 630; border-radius: 8px; overflow: hidden; background: #f6f2f2; }
.zx-sp-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.zx-side-posts a:hover img { transform: scale(1.06); }
.zx-sp-t { font-size: 13.5px; line-height: 1.45; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.zx-side-posts a:hover .zx-sp-t { color: #a12a2a; }
.zx-side-cats li { margin: 0; list-style: none; border-bottom: 1px dashed #eee; }
.zx-side-cats a { display: flex; align-items: center; gap: 8px; padding: 9px 2px; font-size: 13.5px; font-weight: 600; text-transform: uppercase; color: #374151; }
.zx-side-cats a::before { content: "›"; color: #a12a2a; font-weight: 800; transition: transform .2s; }
.zx-side-cats a:hover { color: #a12a2a; }
.zx-side-cats a:hover::before { transform: translateX(3px); }
.zx-side-cats em { margin-left: auto; font-style: normal; font-size: 12px; color: #9ca3af; background: #f4f4f5; border-radius: 99px; padding: 1px 8px; }
.zx-side-cta { position: relative; overflow: hidden; border-radius: 14px; padding: 20px 18px; color: #fff; text-align: center; background: radial-gradient(130% 120% at 100% 0%, #d4372f, #8e2024 70%); box-shadow: 0 12px 26px rgba(161, 42, 42, .25); }
.zx-side-cta::after { content: ""; position: absolute; width: 160px; height: 160px; border-radius: 50%; right: -60px; bottom: -70px; background: rgba(255, 255, 255, .08); }
.zx-sc-k { margin: 0 0 4px; font-size: 13px; opacity: .85; }
.zx-sc-t { margin: 0 0 14px; font-size: 20px; line-height: 1.3; font-weight: 800; }
.zx-sc-btn { display: block; position: relative; z-index: 1; padding: 11px 10px; border-radius: 99px; background: #fff; color: #a12a2a !important; font-weight: 800; font-size: 14px; }
.zx-sc-hot { display: block; position: relative; z-index: 1; margin-top: 10px; color: #fff !important; font-weight: 700; font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 849px) {
	.single-post h1.zx-post-title { font-size: 23px; }
	.single-post .entry-content { font-size: 16px; }
	.single-post .entry-content h2 { font-size: 20.5px; }
}
@media (max-width: 549px) {
	.zx-related-grid { grid-template-columns: 1fr; }
	.single-post .entry-content .zx-rel { grid-template-columns: 112px minmax(0, 1fr); }
	.zx-cta-btns a { flex: 1 1 100%; justify-content: center; }
}
.single-post .entry-content .zx-cta-box .zx-cta-quote { color: #a12a2a; text-decoration: none; }

/* sản phẩm liên quan ở thanh bên (thay hộp báo giá) */
.zx-side-prods { list-style: none; margin: 0 0 12px; padding: 0; }
.zx-side-prods li { margin: 0 0 10px; list-style: none; }
.zx-side-prods a { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px; border: 1px solid #f0f0f0; border-radius: 10px; color: #1f2937; transition: border-color .2s, box-shadow .2s; }
.zx-side-prods a:hover { border-color: #ecd0d0; box-shadow: 0 6px 14px rgba(17, 24, 39, .06); }
.zx-spp-img img { width: 64px; height: 64px; object-fit: contain; display: block; }
.zx-spp-t strong { font-size: 13.5px; line-height: 1.4; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.zx-spp-t small { display: block; margin-top: 2px; font-size: 13px; font-weight: 800; color: #a12a2a; }
.zx-spp-more { display: block; text-align: center; padding: 9px; border-radius: 99px; border: 1.5px solid #a12a2a; color: #a12a2a !important; font-weight: 800; font-size: 13.5px; }
.zx-spp-more:hover { background: #a12a2a; color: #fff !important; }

/* Mobile / iPad dọc: ẩn thanh bên (nội dung đã có bài liên quan + sản phẩm gợi ý ngay trong bài) */
@media (max-width: 849px) {
	.single-post .post-sidebar { display: none !important; }
	.single-post .large-9 { flex-basis: 100% !important; max-width: 100% !important; }
}
