/* ============================================
   TRANG BẢNG GIÁ (/bang-gia/) — page-bang-gia.php
   Vào thẳng bảng giá từng kiểu bói: mỗi dạng bói một khối, hai cột gói.
   Trên điện thoại mỗi kiểu bói tách thành thẻ để khỏi vuốt ngang.
   ============================================ */

/* Ẩn dải tiêu đề/breadcrumb của theme gốc (có lớp phủ tối — ở nền sáng thành khối
   xám, chữ không đọc được). Trang đã có hero riêng; đồng bộ với Lenormand, Bài Tây,
   Thông điệp hôm nay. */
body.page-template-page-bang-gia .page-header,
body.page-template-page-bang-gia .nevo-breadcrumb,
body.page-template-page-bang-gia .rank-math-breadcrumb,
body.page-template-page-bang-gia .breadcrumb { display: none !important; }

/* Khung trang: .tarot-page-wrapper đã tự tràn 100vw (main.css) — KHÔNG ép max-width
   lên nó, nếu không phần margin âm -50vw sẽ đẩy cả trang lệch sang trái. Chỉ thêm
   khoảng đệm dọc; bề rộng nội dung do .bg-wrap (var(--site-w)) quyết định. */
.bg-page { padding: 2.5rem 0 5rem; }
.bg-wrap { max-width: var(--site-w); width: 100%; margin: 0 auto; padding-inline: 1.5rem; display: grid; gap: 3rem; }
.bg-page h2 { font-size: clamp(1.3rem, 2.3vw, 1.7rem); font-weight: 700; margin: 0; color: var(--theme-text-primary); }
.bg-sub { margin: 0.5rem 0 0; color: var(--theme-text-body); font-size: 0.97rem; line-height: 1.65; }
.bg-note { margin: 1rem 0 0; font-size: 0.87rem; line-height: 1.65; color: var(--theme-text-muted); }
.bg-note strong { color: var(--theme-text-primary); }

/* ---------- Mở đầu ---------- */
.bg-hero { text-align: center; padding: 1rem 0 0; }
.bg-title { margin: 0; font-size: clamp(1.7rem, 4vw, 2.7rem); line-height: 1.22; font-weight: 700; text-wrap: balance; color: var(--theme-text-primary); }
.bg-lead { margin: 1rem auto 0; max-width: 90ch; color: var(--theme-text-body); line-height: 1.75; }
.bg-promo { margin: 1.2rem auto 0; max-width: 70ch; padding: 0.6rem 1.1rem; border-radius: 12px; border: 1px solid var(--theme-border-strong); background: var(--theme-bg-elevated); font-size: 0.92rem; color: var(--theme-text-body); }
.bg-promo strong { color: var(--theme-gold-text); }
.bg-promises { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.4rem; font-size: 0.88rem; color: var(--theme-text-muted); }
.bg-promises li { position: relative; padding-left: 1.1rem; }
.bg-promises li::before { content: "✓"; position: absolute; left: 0; color: var(--theme-gold-text); font-weight: 700; }

/* ---------- Bảng giá chi tiết: mỗi dạng bói một khối, lưới 3 cột ---------- */
.bg-card { margin-top: 0.9rem; border-radius: 18px; border: 1px solid var(--theme-border); background: var(--theme-bg-elevated); overflow: hidden; }
.bg-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.6rem; padding: 0.95rem 1.2rem; border-bottom: 1px solid var(--theme-border); background: var(--theme-surface-1); }
.bg-card-head h3 { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--theme-text-primary); }
.bg-card-head a { font-size: 0.87rem; font-weight: 700; color: var(--theme-gold-text); text-decoration: none; white-space: nowrap; }
.bg-card-head a:hover { text-decoration: underline; }

.bg-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(calc(var(--cols) - 1), minmax(0, 1fr)); margin-bottom: -1px; }
.bg-gh { padding: 0.7rem 1.2rem; font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; color: var(--theme-text-muted); border-bottom: 1px solid var(--theme-border); }
.bg-gh small { display: block; margin-top: 0.1rem; font-size: 0.7rem; letter-spacing: 0; text-transform: none; font-weight: 500; color: var(--theme-text-faint); }
.bg-gn { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; padding: 0.85rem 1.2rem; font-size: 0.94rem; color: var(--theme-text-primary); border-bottom: 1px solid var(--theme-border); }
.bg-gn em { display: inline-block; padding: 0.05rem 0.5rem; border-radius: 999px; font-style: normal; font-size: 0.68rem; font-weight: 700; background: var(--gk-total-bg, rgba(212,165,116,0.22)); color: var(--gk-total-ink, #8a5a2c); border: 1px solid var(--gk-total-line, rgba(212,165,116,0.5)); white-space: nowrap; }
.bg-gp { display: flex; flex-direction: column; justify-content: center; padding: 0.85rem 1.2rem; border-bottom: 1px solid var(--theme-border); }
.bg-gp b { font-size: 1.08rem; font-weight: 800; color: var(--theme-gold-text); font-variant-numeric: tabular-nums; }
.bg-gp > span { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.15rem; }
.bg-gp s { font-size: 0.8rem; color: var(--theme-text-faint); }
.bg-gp i { display: inline-block; padding: 0.02rem 0.45rem; border-radius: 999px; font-style: normal; font-size: 0.7rem; font-weight: 700; color: #fff; background: #b2392c; }
.bg-gp .bg-dash { color: var(--theme-text-faint); font-weight: 500; }
.bg-ga { display: flex; align-items: center; justify-content: flex-end; padding: 0.85rem 1.2rem; border-bottom: 1px solid var(--theme-border); }
.bg-go { display: inline-block; padding: 0.4rem 1rem; border-radius: 999px; border: 1.5px solid var(--theme-border-strong); font-size: 0.85rem; font-weight: 700; color: var(--theme-gold-text); text-decoration: none; white-space: nowrap; }
.bg-go:hover { background: var(--gk-soft, var(--theme-surface-1)); }
.bg-gn.is-pop, .bg-gp.is-pop, .bg-ga.is-pop { background: var(--gk-soft, rgba(212,165,116,0.06)); }

/* ---------- Ví ---------- */
/* 4 mốc nạp: 4 cột trên máy tính, 2×2 từ máy tính bảng trở xuống (3 cột thì thẻ thứ 4 lẻ loi). */
.bg-wallet-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; margin-top: 1.3rem; }
@media (max-width: 1000px) { .bg-wallet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bg-wallet-card { display: grid; gap: 0.2rem; padding: 1rem 1.1rem; border-radius: 16px; border: 1px solid var(--theme-border); background: var(--theme-bg-elevated); }
.bg-wallet-card.is-best { border-color: var(--theme-border-strong); background: var(--gk-soft, var(--theme-surface-1)); }
.bg-wallet-pay { font-size: 0.88rem; color: var(--theme-text-muted); }
.bg-wallet-pay strong { color: var(--theme-text-primary); font-size: 0.95rem; }
.bg-wallet-get { font-size: 0.88rem; color: var(--theme-text-muted); }
.bg-wallet-get strong { display: block; font-size: 1.35rem; font-weight: 800; color: var(--theme-gold-text); font-variant-numeric: tabular-nums; }
.bg-wallet-plus { justify-self: start; white-space: nowrap; margin-top: 0.3rem; padding: 0.05rem 0.55rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: var(--gk-bonus-bg); color: var(--gk-bonus-ink); border: 1px solid var(--gk-bonus-line); }

/* ---------- Hạng ---------- */
/* 4 hạng: 4 cột trên máy tính, 2×2 trên máy tính bảng, 1 cột trên điện thoại (thẻ cần
   ~240px cho khung 46px + tên + mức giảm — ép 2 cột hẹp là chữ và "giảm %" bị dồn). */
.bg-ranks { list-style: none; margin: 1.3rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; }
@media (max-width: 1080px) { .bg-ranks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .bg-ranks { grid-template-columns: 1fr; } }
.bg-ranks li { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 0.5rem; align-items: center; padding: 0.75rem 0.95rem; border-radius: 14px; border: 1px solid var(--theme-border); background: var(--theme-bg-elevated); }
.bg-ranks li .tk-avatar { grid-row: 1 / 3; }
.bg-ranks b { font-size: 0.95rem; color: var(--theme-text-primary); }
.bg-ranks small { grid-column: 2; font-size: 0.76rem; color: var(--theme-text-faint); }
.bg-ranks em { grid-column: 3; grid-row: 1 / 3; font-style: normal; font-weight: 700; font-size: 0.85rem; color: var(--theme-gold-text); white-space: nowrap; }

/* ---------- Câu hỏi hay gặp ---------- */

.bg-faq details { padding: 0.9rem 1.15rem; border-radius: 14px; border: 1px solid var(--theme-border); background: var(--theme-bg-elevated); margin-top: 0.6rem; }
/* Dấu ▸ tự vẽ để câu hỏi dài xuống dòng vẫn thẳng hàng (dấu mặc định làm dòng 2 thụt ra lề). */
.bg-faq summary { position: relative; padding-left: 1.3rem; list-style: none; cursor: pointer; font-weight: 600; color: var(--theme-text-primary); }
.bg-faq summary::-webkit-details-marker { display: none; }
.bg-faq summary::before { content: "▸"; position: absolute; left: 0; top: 0; color: var(--theme-gold-text); transition: transform 0.2s ease; }
.bg-faq details[open] > summary::before { transform: rotate(90deg); }
.bg-faq p { margin: 0.65rem 0 0; color: var(--theme-text-body); line-height: 1.7; }

/* ---------- Kết ---------- */
.bg-cta { max-width: 78ch; margin-inline: auto; text-align: center; padding: 2rem 1.4rem; border-radius: 22px; border: 1px solid var(--theme-border-strong); background: var(--gk-soft, var(--theme-surface-1)); }
.bg-cta p { margin: 0.6rem 0 1.3rem; color: var(--theme-text-body); }
.bg-cta-row { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; align-items: center; }
.bg-cta-alt { font-size: 0.92rem; font-weight: 700; color: var(--theme-gold-text); text-decoration: none; }
.bg-cta-alt:hover { text-decoration: underline; }

/* Điện thoại nhỏ (iPhone SE, Android 360): 2 thẻ nạp ví cạnh nhau quá hẹp, chữ gãy dòng. */
@media (max-width: 380px) {
    .bg-wallet-grid { grid-template-columns: 1fr; }
}

@media (max-width: 782px) {
    .bg-page { padding: 1.5rem 0 3rem; }
    .bg-wrap { padding-inline: 1rem; }
}

@media (max-width: 720px) {
    .bg-wrap { gap: 2.2rem; }
    /* Bảng chi tiết: bỏ lưới, mỗi kiểu bói là một thẻ, hai gói xếp dọc */
    .bg-grid { display: block; }
    .bg-gh { display: none; }
    .bg-gn { padding: 0.9rem 1.1rem 0.4rem; font-weight: 600; border-bottom: 0; }
    .bg-gp { display: flex; flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.2rem 0.8rem; padding: 0.4rem 1.1rem; border-bottom: 0; }
    .bg-gp > span { width: 100%; margin-top: 0; justify-content: flex-end; }
    .bg-gp::before { content: attr(data-label); font-size: 0.82rem; color: var(--theme-text-muted); }
    .bg-gp b { display: inline-block; font-size: 1rem; }
    .bg-gp s, .bg-gp i { font-size: 0.72rem; }
    .bg-gp:last-child { padding-bottom: 0.4rem; border-bottom: 0; }
    .bg-ga { justify-content: flex-start; padding: 0.55rem 1.1rem 0.95rem; border-bottom: 0; }
    .bg-go { padding: 0.45rem 1.1rem; }
    .bg-card > .bg-grid > .bg-gp:last-child { border-bottom: 0; }
}
