/* ==========================================================================
   Trang chi tiết sản phẩm Zhongxing (inc/zx-product.php)
   ========================================================================== */
.single-product .zx-pi { width: 22px; height: 22px; flex: 0 0 auto; }

/* ---------- Ảnh: nhãn + khung ---------- */
.single-product .product-gallery { position: relative; }
.zx-ribbon { position: absolute; z-index: 5; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px 5px 8px; border-radius: 99px; background: linear-gradient(135deg, #d4372f, #8e2024); color: #fff; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; box-shadow: 0 6px 14px rgba(161, 42, 42, .3); }
.zx-ribbon .zx-pi { width: 16px; height: 16px; }
.single-product .product-gallery .woocommerce-product-gallery__image,
.single-product .product-gallery .product-images { border-radius: 16px; overflow: hidden; }
.single-product .product-gallery .product-images { background: #fff; border: 1px solid #f0eded; }
.single-product .product-gallery img { transition: transform .5s ease; }
.single-product .product-gallery .woocommerce-product-gallery__image:hover img { transform: scale(1.06); }

/* ---------- Tên + chip ---------- */
.single-product .product-info .product-title { font-size: 28px; font-weight: 700; line-height: 1.3; color: var(--zx-ink, #1f2937); margin-bottom: 8px; }
.single-product .product-info .is-divider { display: none; }
.zx-pbadges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.zx-pb { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 99px; background: #f4f4f5; color: #4b5563; font-size: 13px; line-height: 1.5; }
a.zx-pb:hover { background: #f8e8e8; color: #a12a2a; }
.zx-pb-ok { background: #ecf8ef; color: #1c7c3a; font-weight: 600; }
.zx-pb-ok .zx-pi { width: 15px; height: 15px; stroke-width: 2.6; }

/* tóm tắt dạng bảng nhỏ */
.single-product .product-short-description ul { list-style: none; margin: 0 0 16px; padding: 0; border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.single-product .product-short-description li { margin: 0; padding: 9px 14px; font-size: 14.5px; border-bottom: 1px solid #f1f1f1; display: flex; gap: 8px; }
.single-product .product-short-description li:nth-child(odd) { background: #fafafa; }
.single-product .product-short-description li:last-child { border-bottom: 0; }
.single-product .product-short-description li strong { min-width: 92px; color: #6b7280; font-weight: 600; }

/* ---------- Khối báo giá ---------- */
.zx-buy { margin: 4px 0 16px; }
.zx-buy-main { display: block; text-align: center; padding: 11px 16px 10px; border-radius: 12px; color: #fff !important; background: linear-gradient(180deg, #d4372f, #a12a2a); box-shadow: 0 10px 22px rgba(161, 42, 42, .28); position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.zx-buy-main::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg); animation: zx-shine 3.2s ease-in-out infinite; }
@keyframes zx-shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.zx-buy-main:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(161, 42, 42, .34); }
.zx-buy-main strong { display: block; font-size: 18px; letter-spacing: .03em; }
.zx-buy-main span { display: block; font-size: 13px; opacity: .9; }
.zx-buy-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.zx-buy-row a { display: flex; align-items: center; justify-content: center; gap: 7px; height: 46px; border-radius: 10px; font-weight: 700; font-size: 15px; transition: filter .2s, transform .2s; }
.zx-buy-row a:hover { filter: brightness(1.06); transform: translateY(-1px); }
.zx-buy-zalo { background: #0068ff; color: #fff !important; }
.zx-buy-zalo b { background: #fff; color: #0068ff; border-radius: 6px; padding: 0 6px; font-size: 12px; line-height: 20px; }
.zx-buy-call { background: #fff; color: #a12a2a !important; border: 1.5px solid #a12a2a; }
.zx-buy-call .zx-pi { width: 19px; height: 19px; }
.zx-buy-cb { display: flex; gap: 8px; margin: 14px 0 6px; }
.zx-buy-cb input[type=tel] { flex: 1 1 auto; margin: 0; height: 44px; border-radius: 10px; border: 1.5px solid #e5e5e5; box-shadow: none; padding: 0 14px; font-size: 15px; }
.zx-buy-cb input[type=tel]:focus { border-color: #a12a2a; box-shadow: 0 0 0 3px rgba(161, 42, 42, .12); }
.zx-buy-cb button { margin: 0; height: 44px; border-radius: 10px; padding: 0 16px; background: #1f2937; color: #fff; font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.zx-buy-cb button:hover { background: #a12a2a; }
.zx-buy .zx-buy-note { font-size: 12.5px; color: #6b7280; margin: 0 0 14px; }

.zx-perks { list-style: none; margin: 0 0 14px; padding: 12px 6px; display: grid !important; grid-template-columns: repeat(4, 1fr); border: 1px solid #eee; border-radius: 12px; }
.zx-perks li { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 12.5px; line-height: 1.35; color: #374151; padding: 2px 4px; }
.zx-perks li + li { border-left: 1px dashed #e5e5e5; }
.zx-perks .zx-pi { width: 30px; height: 30px; color: #a12a2a; transition: transform .3s; }
.zx-perks li:hover .zx-pi { transform: translateY(-3px) scale(1.08); }

.zx-store { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.zx-store-title { margin: 0; padding: 9px 14px; background: #faf6f6; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #7d1d21; display: flex; align-items: center; gap: 8px; }
.zx-store-title .zx-pi { width: 18px; height: 18px; }
.zx-store ul { list-style: none; margin: 0; padding: 4px 14px; }
.zx-store li { margin: 0; padding: 7px 0; display: flex; gap: 9px; font-size: 13.5px; line-height: 1.5; color: #374151; border-bottom: 1px dashed #eee; }
.zx-store li:last-child { border-bottom: 0; }
.zx-store li .zx-pi { width: 17px; height: 17px; color: #a12a2a; margin-top: 2px; }
.zx-store a { color: #a12a2a; font-weight: 600; }

/* chia sẻ gọn */
.single-product .product-info .social-icons { margin-top: 6px; }

/* ---------- Phần dưới ---------- */
.zx-psec { padding-top: 10px; }
.zx-ph { position: relative; font-size: 17px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: #1f2937; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.zx-ph::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 56px; height: 3px; border-radius: 3px; background: #a12a2a; }

.zx-brand { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: center; padding: 18px 22px; margin-bottom: 34px; border-radius: 16px; background: linear-gradient(120deg, #fbf1f1, #fff7f2); border: 1px solid #f3e1e1; }
.zx-brand-logo { background: #fff; border-radius: 12px; padding: 14px 16px; text-align: center; box-shadow: 0 4px 14px rgba(161, 42, 42, .08); }
.zx-brand-logo small { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6b7280; margin-bottom: 6px; }
.zx-brand-logo img { max-height: 46px; width: auto; }
.zx-brand-text p { margin: 0 0 6px; font-size: 14.5px; line-height: 1.65; color: #374151; }
.zx-brand-links { display: flex; flex-wrap: wrap; gap: 18px; }
.zx-brand-links a { color: #a12a2a; font-weight: 700; font-size: 14px; }

.zx-spec-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 30px; align-items: start; margin-bottom: 34px; }
.zx-spec-col table.zx-spec { margin: 0; border: 0; width: 100%; }
.zx-spec-col table.zx-spec th, .zx-spec-col table.zx-spec td { border: 0; border-bottom: 1px solid #f0f0f0; padding: 11px 6px; font-size: 14.5px; vertical-align: top; }
.zx-spec-col table.zx-spec th { width: 42%; color: #374151; font-weight: 700; text-transform: uppercase; font-size: 12.5px; letter-spacing: .03em; background: none; }
.zx-spec-col table.zx-spec td { text-align: right; color: #4b5563; }
.zx-spec-col table.zx-spec tr:hover td, .zx-spec-col table.zx-spec tr:hover th { background: #fcf7f7; }
.zx-pcommits { list-style: none; margin: 0; padding: 0; display: grid !important; grid-template-columns: 1fr 1fr; border: 1px solid #eee; border-radius: 14px; overflow: hidden; }
.zx-pcommits li { margin: 0 !important; width: auto !important; list-style: none; padding: 22px 10px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; font-size: 14px; color: #4b5563; border-bottom: 1px solid #eee; transition: background .25s; }
.zx-pcommits li:nth-child(odd) { border-right: 1px solid #eee; }
.zx-pcommits li:nth-last-child(-n+2) { border-bottom: 0; }
.zx-pcommits li:hover { background: #fcf5f5; }
.zx-pcommits .zx-pi { width: 38px; height: 38px; color: #a12a2a; stroke-width: 1.5; transition: transform .3s; }
.zx-pcommits li:hover .zx-pi { transform: rotate(-6deg) scale(1.1); }
.zx-pcommits b { color: #1f2937; }

.zx-desc { margin-bottom: 34px; }
.zx-desc h3 { font-size: 18px; margin-top: 10px; }
.zx-desc ul li { margin-bottom: 6px; }

/* thu gọn + "Xem thêm" */
.zx-collapse { position: relative; overflow: hidden; transition: max-height .45s ease; }
.zx-collapse.is-cut::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; background: linear-gradient(rgba(255, 255, 255, 0), #fff 85%); pointer-events: none; transition: opacity .3s; }
.zx-collapse.is-open::after { opacity: 0; }
.zx-more { display: flex; align-items: center; gap: 4px; margin: 10px auto 0; padding: 6px 18px; border: 1px solid #ead2d2; border-radius: 99px; background: #fff; color: #a12a2a; font-size: 13.5px; font-weight: 700; cursor: pointer; text-transform: uppercase; letter-spacing: .03em; }
.zx-more:hover { background: #fbf1f1; }
.zx-more .zx-pi { width: 16px; height: 16px; transition: transform .3s; }
.zx-more.is-open .zx-pi { transform: rotate(180deg); }

/* hỏi đáp */
.zx-qa { margin-bottom: 34px; }
.zx-qa-item { margin: 0 0 10px; border: 1px solid #eee; border-radius: 12px; background: #fafafa; overflow: hidden; }
.zx-qa-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 13px 16px; font-weight: 600; font-size: 15px; color: #1f2937; }
.zx-qa-item summary::-webkit-details-marker { display: none; }
.zx-qa-item summary .zx-pi { margin-left: auto; width: 18px; height: 18px; color: #9ca3af; transition: transform .3s; }
.zx-qa-item[open] summary .zx-pi { transform: rotate(180deg); color: #a12a2a; }
.zx-qa-q { flex: 0 0 auto; font-size: 11.5px; font-weight: 800; text-transform: uppercase; color: #fff; background: #a12a2a; border-radius: 6px; padding: 2px 7px; }
.zx-qa-a { margin: 0 16px 14px; padding: 12px 14px; border: 1px dashed #c9b26b; border-radius: 10px; background: #fffdf0; font-size: 14.5px; line-height: 1.65; color: #374151; }
.zx-qa-tag { display: block; font-size: 12px; font-weight: 700; color: #1c7c3a; margin-bottom: 2px; }
.zx-qa-more { font-size: 14px; color: #6b7280; }
.zx-qa-more a { color: #a12a2a; font-weight: 700; }

/* sản phẩm liên quan */
.single-product .related .product-section-title { font-size: 17px; font-weight: 800; letter-spacing: .03em; }

/* ---------- Thanh báo giá dính ---------- */
.zx-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 990; background: rgba(255, 255, 255, .97); backdrop-filter: blur(8px); box-shadow: 0 -8px 24px rgba(0, 0, 0, .1); transform: translateY(110%); transition: transform .35s ease; }
.zx-sticky.is-on { transform: none; }
.zx-sticky-in { display: flex; align-items: center; gap: 14px; padding-top: 8px; padding-bottom: 8px; }
.zx-sticky-img { width: 52px; height: 52px; object-fit: contain; border: 1px solid #eee; border-radius: 10px; background: #fff; }
.zx-sticky-name { flex: 1 1 auto; min-width: 0; line-height: 1.35; }
.zx-sticky-name strong { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zx-sticky-name span { font-size: 13px; color: #6b7280; }
.zx-sticky a { flex: 0 0 auto; height: 44px; display: inline-flex; align-items: center; padding: 0 20px; border-radius: 10px; font-weight: 700; font-size: 14.5px; }
.zx-sticky-zalo { background: #0068ff; color: #fff !important; }
.zx-sticky-cta { background: linear-gradient(180deg, #d4372f, #a12a2a); color: #fff !important; box-shadow: 0 6px 16px rgba(161, 42, 42, .25); }

/* ---------- Responsive ---------- */
@media (max-width: 849px) {
	.zx-spec-wrap { grid-template-columns: 1fr; }
	.zx-brand { grid-template-columns: 1fr; text-align: center; }
	.zx-brand-links { justify-content: center; }
	.zx-band ul { grid-template-columns: 1fr 1fr; }
	.zx-sticky { display: none; } /* di động đã có thanh .zx-mbar */
	.single-product .product-info .product-title { font-size: 22px; }
}
@media (max-width: 549px) {
	.zx-perks { grid-template-columns: 1fr 1fr; row-gap: 12px; }
	.zx-perks li:nth-child(3) { border-left: 0; }
	.zx-buy-cb { flex-direction: column; }
	.zx-band li { flex-direction: column; text-align: center; font-size: 12px; padding: 14px 6px; }
}
@media (prefers-reduced-motion: reduce) {
	.zx-buy-main::after { animation: none; }
}

/* lưới: bỏ pseudo clearfix của Flatsome (sinh ô thừa trong grid) */
.zx-pcommits::before, .zx-pcommits::after, .zx-perks::before, .zx-perks::after, .zx-band ul::before, .zx-band ul::after { display: none !important; }
.zx-buy-cb input[type=tel] { min-width: 0; }
.zx-buy-cb button { flex: 0 0 auto; }
.zx-desc ul { list-style: disc; padding-left: 20px; margin-left: 0; }
.zx-desc ul li { list-style: disc; }

/* nút "Yêu cầu báo giá sỉ" (thay hotline) + thanh dính */
.zx-buy-call .zx-pi { width: 19px; height: 19px; }
.zx-sticky-quote { background: #fff; color: #a12a2a !important; border: 1.5px solid #a12a2a; }

/* ---------- Popup "Mua ngay" ---------- */
.zx-mn { background: #fff; border-radius: 16px; overflow: hidden; }
.zx-mn-head { display: flex; align-items: center; gap: 14px; padding: 18px 22px; background: linear-gradient(120deg, #a12a2a, #d4372f); color: #fff; }
.zx-mn-head img { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 10px; padding: 4px; flex: 0 0 auto; }
.zx-mn-head span { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.zx-mn-head strong { display: block; font-size: 18px; line-height: 1.3; }
.zx-mn-head em { font-style: normal; font-size: 13px; opacity: .9; }
.zx-mn-body { padding: 16px 22px 8px; }
.zx-mn-note { font-size: 14px; color: #4b5563; margin-bottom: 12px; }
.zx-mn .zx-form p { margin-bottom: 10px; }
.zx-mn .zx-form label { font-size: 13.5px; font-weight: 600; color: #374151; }
.zx-mn .zx-form input, .zx-mn .zx-form textarea { border-radius: 10px; margin-top: 4px; margin-bottom: 0; }
.zx-mn .zx-form textarea { min-height: 80px; height: 80px; }
.zx-mn .wpcf7-submit { width: 100%; border-radius: 10px; background: linear-gradient(180deg, #d4372f, #a12a2a) !important; }
@media (min-width: 550px) {
	.zx-mn .zx-form { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
	.zx-mn .zx-form > p:nth-last-child(-n+3) { grid-column: 1 / -1; }
}
#zx-mua-ngay { border-radius: 16px; overflow: hidden; }

/* ---------- Giãn khoảng cách khối thông tin (góp ý khách: đang sát quá) ---------- */
.single-product .product-info .breadcrumbs, .single-product .product-info .woocommerce-breadcrumb { margin-bottom: 12px; }
.single-product .product-info .product-title { margin-bottom: 14px; }
.zx-pbadges { margin-bottom: 20px; gap: 10px; }
.single-product .product-info .price-wrapper { margin-bottom: 20px; }
.single-product .product-short-description ul { margin-bottom: 26px; }
.single-product .product-short-description li { padding: 12px 18px; }
.zx-buy { margin-top: 0; }
.zx-buy-main { padding: 14px 16px 13px; }
.zx-buy-main span { margin-top: 2px; }
.zx-buy-row { margin-top: 14px; gap: 14px; }
.zx-buy-row a { height: 50px; }
.zx-buy-cb { margin: 22px 0 8px; gap: 10px; }
.zx-buy-cb input[type=tel], .zx-buy-cb button { height: 48px; }
.zx-buy .zx-buy-note { margin-bottom: 22px; }
.zx-perks { margin-bottom: 20px; padding: 16px 6px; }
.zx-store li { padding: 9px 0; }

/* nút "Thêm vào giỏ hàng" (thay nút Zalo) */
.zx-buy-cart { background: #1f2937; color: #fff !important; position: relative; }
.zx-buy-cart:hover { background: #111827; }
.zx-buy-cart .zx-pi { width: 20px; height: 20px; }
.zx-buy-cart.loading { opacity: .7; pointer-events: none; }
.zx-buy-cart.loading::after { content: ""; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: zx-spin .7s linear infinite; }
.zx-buy-cart.added { background: #1c7c3a; }
@keyframes zx-spin { to { transform: rotate(360deg); } }
.zx-buy-row .added_to_cart { grid-column: 1 / -1; height: auto !important; justify-content: center; font-size: 14px !important; font-weight: 700; color: #1c7c3a !important; text-decoration: underline; padding: 2px 0; }
.zx-buy-row .added_to_cart::before { content: "✓ Đã thêm – "; text-decoration: none; display: inline-block; margin-right: 4px; }
.zx-buy-row .zx-buy-cart.added { display: flex !important; }
.zx-buy-cart.added::after { content: none; }

/* Mobile: nút trong khối mua gọn hơn */
@media (max-width: 549px) {
	.zx-buy-row a { font-size: 14px; height: 48px; gap: 6px; }
	.zx-buy-row .zx-pi { width: 18px; height: 18px; }
	.single-product .product-info .price-wrapper .price, .single-product .product-info .price-wrapper .amount { font-size: 26px; }
}

/* Khối báo giá: Zalo + Gọi (thay Thêm vào giỏ / Báo giá sỉ) */
.zx-buy-row .zx-buy-zalo { background: #0068ff; color: #fff !important; }
.zx-buy-row .zx-buy-zalo b { background: #fff; color: #0068ff; border-radius: 6px; padding: 0 6px; font-size: 12px; line-height: 20px; }
.zx-buy-row .zx-buy-call { font-size: 16px; letter-spacing: .02em; }
.zx-sticky-quote { white-space: nowrap; }
