/*
 * Kiểu nền cho các khối dùng chung (themes/default/views/blocks/*) – hệ thống TỰ chèn vào đầu <head> của MỌI theme,
 * trước CSS của theme. Nhờ vậy theme mới không viết lại khối nào (vd trang sản phẩm) vẫn không vỡ bố cục:
 * ảnh thu nhỏ của bộ ảnh, ô chọn phiên bản, hộp giá, bài mô tả có ảnh/video…
 * Theme muốn đổi kiểu → viết lại cùng class trong theme.css (nạp sau nên luôn thắng).
 * Chỉ dùng class riêng của khối + class .xh-* của chức năng lõi; KHÔNG đụng .product-card/.product-grid/header/footer (theme tự lo).
 */

/* Bộ ảnh sản phẩm */
.gallery .carousel-item img { aspect-ratio: 1; object-fit: contain; background: #fff; }
.gallery .thumb { flex: 0 0 auto; width: 60px; height: 60px; max-width: 60px; object-fit: contain; border: 1px solid #e5e7eb; border-radius: 6px; cursor: pointer; background: #fff; }
.gallery .thumb:hover { border-color: var(--brand, #d70018); }

/* Chọn phiên bản & giá */
.variant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; }
.variant-option { display: block; border: 1px solid #e5e7eb; border-radius: 8px; padding: .5rem; text-decoration: none; color: #222; background: #fff; }
.variant-option.selected { border: 2px solid var(--brand, #d70018); background: #fff1f2; }
.variant-option.out { opacity: .55; }
.price-box { background: #fff; border-radius: var(--radius, 10px); padding: 1rem; }
.price-box .price { color: var(--brand, #d70018); font-size: 1.8rem; font-weight: 800; }
.price-box .list-price { color: #999; text-decoration: line-through; }
.unit-card { background: #fff; border: 1px solid #e5e7eb; border-radius: var(--radius, 10px); padding: .75rem; height: 100%; }
.spec-group-title { font-weight: 700; font-size: .82rem; text-transform: uppercase; color: #555; background: #f6f7f9; padding: .35rem .5rem; margin-top: .75rem; border-radius: 6px; }

/* Bài mô tả / bài viết soạn trực quan */
.description img, .description video, .description iframe { max-width: 100%; height: auto; }
.description video { display: block; margin: .75rem auto; border-radius: 8px; background: #000; }
.description iframe[src*="youtube"] { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; }
.description figure.image { display: table; margin: 1rem auto; }
.description figure.image figcaption { text-align: center; color: #666; font-size: .9em; }
.description table { width: 100%; display: block; overflow-x: auto; }

/* Danh mục, bộ lọc */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .6rem; }
.cat-tile { background: #fff; border-radius: var(--radius, 10px); padding: .9rem .5rem; text-align: center; text-decoration: none; color: #222; display: flex; flex-direction: column; align-items: center; gap: .3rem; font-size: .85rem; }
.cat-tile i { font-size: 1.8rem; color: var(--brand, #d70018); }
.chip { display: inline-block; border: 1px solid #e5e7eb; background: #fff; border-radius: 999px; padding: .2rem .75rem; font-size: .82rem; color: #333; text-decoration: none; }
.chip-active { border-color: var(--brand, #d70018); color: var(--brand, #d70018); background: #fff1f2; }
.brand-chip { border: 1px solid #e5e7eb; border-radius: 8px; padding: .4rem .9rem; text-decoration: none; color: #333; background: #fff; display: flex; align-items: center; height: 44px; }
.brand-chip img { max-height: 26px; max-width: 90px; }
.filter-bar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.filter-dropdown { min-width: 280px; max-width: min(480px, 92vw); }
.filter-option { border: 1px solid #e5e7eb; border-radius: 8px; padding: .3rem .7rem; font-size: .85rem; cursor: pointer; background: #fff; user-select: none; }
.filter-option.selected { border-color: var(--brand, #d70018); color: var(--brand, #d70018); background: #fff1f2; }
.compare-table td, .compare-table th { vertical-align: top; }

/* Banner */
.site-banner { position: relative; display: block; color: #fff; text-decoration: none; }
.site-banner img { display: block; width: 100%; height: auto; }
.site-banner-text { position: absolute; left: 0; bottom: 0; right: 0; padding: 1rem 1.25rem; background: linear-gradient(transparent, rgba(0,0,0,.6)); }

/* Khối kéo-thả */
.xh-block-notice { border: 2px dashed #cbd5e1; border-radius: 8px; padding: .9rem; color: #64748b; font-size: .85rem; text-align: center; background: #f8fafc; }
.product-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: .6rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .4rem; }
.product-scroll > * { scroll-snap-align: start; }
@media (min-width: 768px) { .product-scroll { grid-auto-columns: calc((100% - 1.2rem) / 3); } }
@media (min-width: 992px) { .product-scroll { grid-auto-columns: calc((100% - 1.8rem) / 4); } }
.chip-scroll { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .3rem; scrollbar-width: none; }
.chip-scroll .chip { white-space: nowrap; }
.banner-grid { display: grid; gap: .6rem; }
@media (min-width: 768px) { .banner-grid { grid-template-columns: 1fr 1fr; } }
.usp-grid { display: grid; gap: .6rem; grid-template-columns: 1fr 1fr; }
@media (min-width: 768px) { .usp-cols-3 { grid-template-columns: repeat(3, 1fr); } .usp-cols-4 { grid-template-columns: repeat(4, 1fr); } }
.usp-item { background: #fff; border-radius: var(--radius, 10px); padding: .75rem; display: flex; gap: .6rem; align-items: flex-start; color: #222; }
.usp-item > i { font-size: 1.6rem; color: var(--brand, #d70018); line-height: 1; }
.cta-box { border-radius: var(--radius, 10px); padding: 1.25rem; display: flex; flex-direction: column; gap: .75rem; }
@media (min-width: 768px) { .cta-box { flex-direction: row; align-items: center; } }
.cta-image { max-width: 100%; max-height: 180px; object-fit: contain; }
.post-grid { display: grid; gap: .6rem; grid-template-columns: 1fr 1fr; }
@media (min-width: 992px) { .post-grid { grid-template-columns: repeat(4, 1fr); } }
.post-card { background: #fff; border: 1px solid #eef0f3; border-radius: var(--radius, 10px); overflow: hidden; display: block; }
.post-card img, .post-card-noimg { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: flex; align-items: center; justify-content: center; background: #f3f4f6; color: #9ca3af; font-size: 2rem; }
.testimonial { background: #fff; border-radius: var(--radius, 10px); padding: 1rem; height: 100%; }
.testimonial .stars { color: #f59e0b; }
.xh-spacer-sm { height: .5rem; } .xh-spacer-md { height: 1.5rem; } .xh-spacer-lg { height: 3rem; }
.xh-spacer { display: flex; align-items: center; }
.xh-spacer hr { width: 100%; }

/* ================= Chức năng lõi (public/js/shop-core.js) – theme đổi kiểu bằng cùng class ================= */
:root { --xh-core: var(--brand, #d70018); --xh-buybar-h: 64px; }

/* Thanh mua nổi ở đáy màn hình (khối product_main) */
.xh-buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035; background: #fff; box-shadow: 0 -4px 18px rgba(0,0,0,.12); padding: .5rem 0 calc(.5rem + env(safe-area-inset-bottom)); animation: xh-up .2s ease-out; }
.xh-buybar[hidden] { display: none; }
.xh-buybar-inner { display: flex; align-items: center; gap: .6rem; }
.xh-buybar-img { width: 46px; height: 46px; object-fit: contain; border-radius: 6px; border: 1px solid #eee; background: #fff; flex: 0 0 auto; }
.xh-buybar-info { min-width: 0; flex: 1; line-height: 1.25; }
.xh-buybar-name { font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xh-buybar-name span { font-weight: 400; color: #555; }
.xh-buybar-price { color: var(--xh-core); font-weight: 800; }
.xh-buybar-price del { color: #999; font-weight: 400; font-size: .8rem; margin-left: .25rem; }
.xh-buybar-actions { display: flex; gap: .4rem; margin: 0; flex: 0 0 auto; }
.xh-buybar-cart, .xh-buybar-buy { border-radius: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: .3rem; text-decoration: none; white-space: nowrap; height: 46px; padding: 0 1rem; }
.xh-buybar-cart { border: 1.5px solid var(--xh-core); color: var(--xh-core); background: #fff; }
.xh-buybar-cart i { font-size: 1.25rem; }
.xh-buybar-buy { border: 0; background: var(--xh-core); color: #fff; min-width: 120px; }
.xh-buybar-buy:hover { color: #fff; filter: brightness(.95); }
@media (max-width: 575px) {
    .xh-buybar-img { display: none; }
    .xh-buybar-name { font-size: .78rem; }
    .xh-buybar-cart { width: 46px; padding: 0; }
    .xh-buybar-cart span { display: none; }
    .xh-buybar-buy { min-width: 0; padding: 0 .9rem; }
}
body.xh-buybar-on { padding-bottom: var(--xh-buybar-h); }
body.xh-buybar-on .contact-float, body.xh-buybar-on #xh-chat .xhc-launcher { transform: translateY(calc(-1 * var(--xh-buybar-h))); }
@keyframes xh-up { from { transform: translateY(100%); } to { transform: none; } }

/* Khay So sánh nổi (góc trái dưới) */
.xh-compare-tray { position: fixed; left: 12px; bottom: 16px; z-index: 1036; transition: bottom .2s; }
.xh-compare-tray[hidden], .xh-compare-panel[hidden] { display: none; }
body.xh-buybar-on .xh-compare-tray { bottom: calc(var(--xh-buybar-h) + 12px); }
.xh-compare-toggle { border: 0; border-radius: 999px; background: #1f2937; color: #fff; padding: .55rem 1rem; font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.xh-compare-toggle b { background: var(--xh-core); border-radius: 999px; padding: 0 .45rem; margin-left: .2rem; }
.xh-compare-panel { position: absolute; left: 0; bottom: calc(100% + 8px); width: min(360px, calc(100vw - 100px)); background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.2); padding: .6rem; }
.xh-compare-items { display: grid; gap: .4rem; }
.xh-compare-item { display: flex; align-items: center; gap: .4rem; border: 1px solid #eee; border-radius: 8px; padding: .3rem .4rem; }
.xh-compare-item a { display: flex; align-items: center; gap: .5rem; min-width: 0; flex: 1; color: #222; text-decoration: none; font-size: .82rem; }
.xh-compare-item img { width: 38px; height: 38px; object-fit: contain; flex: 0 0 auto; }
.xh-compare-item span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.xh-compare-item small { color: #666; }
.xh-compare-item button { border: 0; background: none; color: #999; font-size: 1.2rem; line-height: 1; }
.xh-compare-actions { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .5rem; font-size: .8rem; color: #777; }
.xh-compare-go { background: var(--xh-core); color: #fff !important; border-radius: 8px; padding: .45rem .9rem; font-weight: 700; text-decoration: none; }

/* Thông báo nhỏ */
.xh-toast { position: fixed; left: 50%; top: 72px; z-index: 2147483100; transform: translate(-50%, -20px); opacity: 0; pointer-events: none; transition: .2s; background: #111827; color: #fff; border-radius: 10px; padding: .6rem 1rem; font-size: .9rem; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: calc(100vw - 24px); width: max-content; }
.xh-toast.is-show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.xh-toast.is-error { background: #b91c1c; }
.xh-toast a { color: #fbbf24; font-weight: 600; margin-left: .35rem; }
.xh-toast .bi-check-circle-fill { color: #4ade80; }

/* Gợi ý tìm kiếm */
.xh-suggest { position: fixed; z-index: 2147483050; background: #fff; color: #222; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.2); overflow: hidden auto; max-height: min(70vh, 460px); text-align: left; }
.xh-suggest[hidden] { display: none; }
.xh-suggest-item { display: flex; align-items: center; gap: .6rem; padding: .45rem .7rem; color: #222; text-decoration: none; border-bottom: 1px solid #f1f1f1; }
.xh-suggest-item:hover, .xh-suggest-item.is-active { background: #f5f7fb; color: #222; }
.xh-suggest-item img { width: 44px; height: 44px; object-fit: contain; flex: 0 0 auto; }
.xh-suggest-item > i { font-size: 1.3rem; color: #9ca3af; }
.xh-suggest-item span { display: flex; flex-direction: column; min-width: 0; flex: 1; font-size: .85rem; line-height: 1.3; }
.xh-suggest-item b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xh-suggest-item em { font-style: normal; color: var(--xh-core); font-weight: 700; }
.xh-suggest-item .bi-plus-circle { color: var(--xh-core); font-size: 1.2rem; }
.xh-suggest-all, .xh-suggest-empty { display: block; padding: .55rem .7rem; font-size: .85rem; text-align: center; }
.xh-suggest-all { color: var(--xh-core); font-weight: 600; text-decoration: none; }
.xh-suggest-empty { color: #777; }

/* "Xem thêm" bài dài */
.xh-collapse.is-collapsed { max-height: var(--xh-collapse-h, 560px); overflow: hidden; position: relative; }
.xh-collapse.is-collapsed::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 110px; background: linear-gradient(rgba(255,255,255,0), #fff); }
.xh-collapse-btn { display: block; margin: .5rem auto 0; border: 1px solid #e5e7eb; background: #fff; border-radius: 999px; padding: .4rem 1.2rem; font-weight: 600; color: var(--xh-core); }

/* Đếm ngược flash sale */
.xh-countdown { display: inline-flex; align-items: center; gap: .2rem; font-size: .85rem; color: #444; }
.xh-countdown b { background: var(--xh-core); color: #fff; border-radius: 5px; padding: .05rem .35rem; font-variant-numeric: tabular-nums; }

/* Lên đầu trang */
.xh-to-top { position: fixed; right: 18px; bottom: 150px; z-index: 1034; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(17,24,39,.75); color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.2); transition: bottom .2s; }
.xh-to-top[hidden] { display: none; }
body.xh-buybar-on .xh-to-top { bottom: calc(150px + var(--xh-buybar-h)); }

/* Trang So sánh: cột tên thông số dính bên trái khi vuốt ngang, hàng khác nhau tô nhẹ */
.compare-table .xh-compare-label { position: sticky; left: 0; z-index: 1; background: #fff; min-width: 120px; max-width: 160px; }
.compare-table .xh-compare-col { min-width: 180px; vertical-align: top; }
.compare-table tr.xh-diff td:not(.xh-compare-label) { background: #fffbeb; font-weight: 600; }
.compare-table .xh-compare-group { position: sticky; left: 0; }
.xh-compare-img { height: 100px; max-width: 100%; object-fit: contain; display: block; margin: 0 auto; }
.xh-compare-add { border: 2px dashed #d1d5db; border-radius: 10px; padding: 1rem .6rem; text-align: center; color: #6b7280; font-weight: 400; }
.xh-compare-add > i { font-size: 1.8rem; display: block; margin-bottom: .25rem; }

/* Khuyến mãi đi kèm */
.xh-offers { border: 1px solid #fecaca; border-radius: var(--radius, 10px); overflow: hidden; background: #fff; }
.xh-offers-head { background: #fef2f2; color: var(--xh-core); font-weight: 700; padding: .5rem .75rem; }
.xh-offers-list { margin: 0; padding: .5rem .75rem .5rem 2rem; font-size: .88rem; }
.xh-offers-list li { padding: .2rem 0; }
.xh-offers-list li::marker { color: var(--xh-core); font-weight: 700; }

/* Ưu đãi hạng thành viên */
.xh-member { background: #fff; border-radius: var(--radius, 10px); border: 1px solid #e5e7eb; padding: .6rem .75rem; font-size: .88rem; }
.xh-member-head { display: flex; align-items: center; gap: .4rem; font-weight: 700; margin-bottom: .35rem; }
.xh-member-head .bi-gem, .xh-member-mine .bi-gem { color: var(--tier, #7c3aed); }
.xh-member-tiers { display: grid; gap: .3rem; }
.xh-member-tier { display: flex; gap: .5rem; align-items: baseline; border-left: 4px solid var(--tier, #6b7280); padding-left: .5rem; }
.xh-member-tier b { color: var(--tier, #374151); white-space: nowrap; }
.xh-member-tier span { color: #555; }
.xh-member-mine { border-left: 4px solid var(--tier, #7c3aed); padding-left: .5rem; }
.xh-member-price { color: var(--xh-core); font-size: 1.1rem; }

/* Nút trả góp */
.xh-installment-btn { line-height: 1.15; }
.xh-installment-btn .small { font-size: .75rem; opacity: .9; }
.xh-buybar-inst { border: 0; border-radius: 10px; height: 46px; padding: 0 .8rem; background: #2563eb; color: #fff; font-weight: 700; white-space: nowrap; }
@media (max-width: 575px) { .xh-buybar-inst { padding: 0 .55rem; font-size: .8rem; } }
.tag-installment { background: #dbeafe; color: #1d4ed8; }

/* Hộp thoại (trả góp) */
body.xh-modal-open { overflow: hidden; }
.xh-modal { position: fixed; inset: 0; z-index: 2147483200; background: rgba(15,23,42,.55); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.xh-modal-box { background: #fff; color: #222; border-radius: 14px; width: min(560px, 100%); max-height: calc(100vh - 2rem); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.xh-modal-head { display: flex; align-items: flex-start; gap: .75rem; padding: .8rem 1rem; border-bottom: 1px solid #eee; }
.xh-modal-head > div { flex: 1; min-width: 0; }
.xh-modal-close { border: 0; background: none; font-size: 1.8rem; line-height: 1; color: #888; padding: 0 .25rem; }
.xh-modal-body { padding: .8rem 1rem 1rem; overflow-y: auto; }
@media (max-width: 575px) {
    .xh-modal { padding: 0; align-items: flex-end; }
    .xh-modal-box { border-radius: 16px 16px 0 0; max-height: 92vh; }
}
.xh-inst-label { font-size: .8rem; font-weight: 700; color: #555; margin: .5rem 0 .3rem; }
.xh-inst-plans { display: grid; gap: .4rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.xh-inst-plan { display: flex; flex-direction: column; text-align: left; gap: .1rem; border: 1.5px solid #e5e7eb; border-radius: 10px; padding: .45rem .6rem; background: #fff; font-size: .82rem; }
.xh-inst-plan span { color: #666; }
.xh-inst-plan em { font-style: normal; color: var(--xh-core); font-weight: 700; }
.xh-inst-plan.is-active { border-color: var(--xh-core); background: #fff5f5; }
.xh-inst-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.xh-inst-chips button { border: 1.5px solid #e5e7eb; background: #fff; border-radius: 999px; padding: .3rem .8rem; font-size: .85rem; }
.xh-inst-chips button.is-active { border-color: var(--xh-core); color: var(--xh-core); font-weight: 700; background: #fff5f5; }
.xh-inst-result { margin: .75rem 0 .5rem; border-radius: 10px; background: #f8fafc; padding: .4rem .75rem; }
.xh-inst-result > div { display: flex; justify-content: space-between; gap: .5rem; padding: .25rem 0; font-size: .88rem; border-bottom: 1px dashed #e5e7eb; }
.xh-inst-result > div:last-child { border-bottom: 0; }
.xh-inst-result .is-main b { color: var(--xh-core); font-size: 1.2rem; }
.xh-inst-form { display: grid; gap: .45rem; }
.xh-inst-form input:not([type=hidden]) { border: 1px solid #d1d5db; border-radius: 8px; padding: .5rem .65rem; font-size: .9rem; width: 100%; }
.xh-inst-fields { display: grid; gap: .45rem; grid-template-columns: 1fr 1fr; }
.xh-inst-submit { border: 0; border-radius: 10px; background: var(--xh-core); color: #fff; font-weight: 700; padding: .65rem; }

/* Cửa hàng gần khách */
.xh-branch-tools { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .4rem; }
.xh-branch-tools .form-select { width: auto; flex: 1 1 160px; max-width: 260px; }
.xh-branch-status { margin-bottom: .4rem; }
.xh-branch-status .bi-geo-alt-fill { color: var(--xh-core); }
.xh-distance { color: #2563eb; font-weight: 600; font-size: .85em; white-space: nowrap; }
[data-xh-branch].is-nearest { background: #f0f7ff; border-radius: 6px; }
[data-xh-branch][hidden] { display: none !important; }

/* Menu lớn (thanh danh mục) */
.dropdown-menu-hover.xh-mega { display: none; gap: 1.5rem; padding: .9rem 1.1rem; min-width: 0; width: max-content; max-width: min(820px, 92vw); }
.category-nav .dropdown:hover .dropdown-menu-hover.xh-mega { display: flex; }
.xh-mega-col { min-width: 150px; }
.dropdown-menu-hover.xh-mega .xh-mega-col > a { display: block; padding: .25rem 0; color: #222; text-decoration: none; font-size: .88rem; }
.dropdown-menu-hover.xh-mega .xh-mega-col > a:hover { color: var(--xh-core); background: none; }
.xh-mega-title { font-weight: 700; font-size: .8rem; text-transform: uppercase; color: #6b7280; margin-bottom: .35rem; }
.xh-mega-brands { display: grid; grid-template-columns: repeat(3, 96px); gap: .4rem; }
.xh-mega-brands a { display: flex; align-items: center; justify-content: center; height: 40px; border: 1px solid #eee; border-radius: 8px; padding: .2rem .4rem; color: #333; text-decoration: none; font-size: .8rem; font-weight: 600; text-align: center; }
.xh-mega-brands a:hover { border-color: var(--xh-core); }
.xh-mega-brands img { max-width: 100%; max-height: 26px; object-fit: contain; }

/* Hỏi đáp */
.xh-qa-form { background: #f8fafc; border-radius: 10px; padding: .6rem; }
.xh-qa-item { border-top: 1px solid #f1f1f1; padding: .7rem 0; }
.xh-qa-q, .xh-qa-a { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; }
.xh-qa-a { margin: .5rem 0 0 2.6rem; background: #f8fafc; border-radius: 10px; padding: .5rem .6rem; }
.xh-qa-avatar { flex: 0 0 auto; width: 2rem; height: 2rem; border-radius: 50%; background: #e5e7eb; color: #374151; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.xh-qa-avatar.is-staff { background: var(--xh-core); color: #fff; }

/* Đánh giá cửa hàng & nhân viên (khối review_cta, chân trang) – nền sáng riêng để hợp mọi màu chân trang */
.xh-review-cta { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; background: #fff; color: #1f2937; border-radius: 14px; padding: 1rem 1.25rem; margin: 1rem 0; box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.xh-review-main { flex: 1 1 300px; min-width: 0; }
.xh-review-title { font-weight: 800; font-size: 1.05rem; color: #111827; }
.xh-review-title .bi { color: #f59e0b; }
.xh-review-score { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin: .2rem 0; color: #4b5563; }
.xh-review-score b { font-size: 1.6rem; color: #111827; line-height: 1; }
.xh-review-stars { position: relative; display: inline-block; font-size: 1.05rem; line-height: 1; letter-spacing: 2px; color: #d1d5db; }
.xh-review-stars::before { content: "★★★★★"; }
.xh-review-stars::after { content: "★★★★★"; position: absolute; left: 0; top: 0; width: var(--rate, 0%); overflow: hidden; color: #f59e0b; white-space: nowrap; }
.xh-review-text { margin: .3rem 0 .6rem; font-size: .9rem; color: #4b5563; }
.xh-review-btn { display: inline-flex; align-items: center; gap: .4rem; background: var(--xh-core); color: #fff !important; text-decoration: none !important; font-weight: 700; border-radius: 10px; padding: .55rem 1.1rem; }
.xh-review-btn:hover { filter: brightness(.95); }
.xh-review-staff { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .7rem; color: #4b5563; }
.xh-review-staff a { display: inline-flex; align-items: center; gap: .3rem; border: 1px solid #e5e7eb; border-radius: 999px; padding: .15rem .6rem .15rem .2rem; font-size: .82rem; color: #1f2937 !important; text-decoration: none !important; background: #fff; }
.xh-review-staff a:hover { border-color: var(--xh-core); }
.xh-review-ava { width: 22px; height: 22px; border-radius: 50%; background: #fee2e2; color: var(--xh-core); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .72rem; }
.xh-review-comments { flex: 2 1 380px; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.xh-review-comment { margin: 0; background: #f9fafb; border-radius: 10px; padding: .55rem .7rem; font-size: .85rem; }
.xh-review-cstars { color: #f59e0b; letter-spacing: 1px; }
.xh-review-cstars span { color: #d1d5db; }
.xh-review-comment blockquote { margin: .2rem 0; color: #374151; }
.xh-review-comment figcaption { color: #6b7280; font-size: .78rem; }
.xh-review-qr { flex: 0 0 auto; text-align: center; color: #6b7280; }
.xh-review-qr [data-qr] { width: 104px; height: 104px; background: #fff; }
.xh-review-qr svg { width: 100%; height: 100%; }

/* QR chuyển khoản (partials/bank-qr) */
.xh-bankqr { border: 1px solid #c7d7fe; border-radius: var(--radius, 10px); background: #f5f8ff; overflow: hidden; text-align: left; }
.xh-bankqr-head { background: #e7efff; color: #1d4ed8; font-weight: 700; padding: .5rem .75rem; }
.xh-bankqr-body { display: flex; flex-wrap: wrap; gap: .75rem; padding: .75rem; align-items: center; }
.xh-bankqr-form { flex: 1 1 240px; min-width: 0; }
.xh-bankqr-info { margin-top: .5rem; font-size: .88rem; }
.xh-bankqr-info > div { display: flex; align-items: center; gap: .35rem; padding: .2rem 0; border-bottom: 1px dashed #dbe4ff; }
.xh-bankqr-info span { color: #6b7280; min-width: 98px; }
.xh-bankqr-img { flex: 0 0 auto; margin: 0 auto; text-align: center; }
.xh-bankqr-img[hidden] { display: none; }
.xh-bankqr-img img { width: 210px; max-width: 70vw; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 8px; }
.xh-copy { border: 0; background: none; color: #2563eb; padding: 0 .2rem; }
