/* Trang Hướng dẫn mua hàng (Figma "Website – Hướng dẫn mua hàng"). Tiền tố hg-. Dùng chung biến/breadcrumb/danh sách trang của content-v2.css (.cv) */
.hg {
    --hg-indigo: #012E16;
    --hg-indigo-700: #0B4425;
    --hg-soft: #EBF4EE;
    --hg-amber: #F9CC60;
    --hg-amber-soft: #fff4d6;
    --hg-amber-ink: #b45309;
    --hg-ink: #141a33;
    --hg-text: #5b6478;
    --hg-muted: #8c94a6;
    --hg-line: #e4e8f0;
    --hg-subtle: #f8fafc;
    --hg-green: #16a34a;
    --hg-top: 88px; /* chiều cao header dính – JS cập nhật theo .vh-main thực tế */
}
.hg p, .hg h1, .hg h2, .hg h3, .hg ul, .hg ol, .hg figure { margin: 0; }
.hg ul, .hg ol { list-style: none; padding: 0; }
.hg a { color: var(--hg-indigo); }
.hg-only-m { display: none; }

/* ===== Nút ===== */
.hg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 10px; border: 1.5px solid transparent; font: 500 15px/1 Roboto, system-ui, sans-serif; white-space: nowrap; transition: background .2s, transform .2s, border-color .2s; }
.hg-btn:hover { transform: translateY(-1px); }
.hg-btn--indigo { background: var(--hg-indigo); color: #fff !important; }
.hg-btn--indigo:hover { background: var(--hg-indigo-700); }
.hg-btn--amber { background: var(--hg-amber); color: #012E16 !important; }
.hg-btn--amber:hover { background: #F0B93A; }
.hg-btn--outline { background: #fff; border-color: var(--hg-indigo); color: var(--hg-indigo) !important; }
.hg-btn--outline:hover { background: var(--hg-soft); }

/* ===== Hero ===== */
.hg-hero { background: #fff; border-bottom: 1px solid var(--hg-line); padding: 28px 0 44px; }
.hg-hero__inner { display: flex; align-items: center; gap: 56px; }
.hg-hero__main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.hg-hero .cv-crumb ol { font-size: 13px; }
.hg-eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px; background: var(--hg-amber-soft); color: #c27803; font-size: 13px; font-weight: 600; }
.hg-hero h1 { font-size: 40px; line-height: 48px; font-weight: 700; color: var(--hg-ink); }
.hg-hero__lead { font-size: 17px; line-height: 27px; color: var(--hg-text); max-width: 720px; }
.hg-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hg-trust { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.hg-trust li { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--hg-text); }
.hg-trust a { color: inherit !important; }
.hg-trust__ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 14px; background: var(--hg-soft); color: var(--hg-indigo); flex: none; }

.hg-phases { flex: none; width: 440px; background: var(--hg-indigo); color: #fff; border-radius: 20px; padding: 28px; }
.hg-phases__title { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--hg-amber); margin-bottom: 18px !important; }
.hg-phases ol { display: flex; flex-direction: column; gap: 18px; }
.hg-phases li { display: flex; gap: 14px; align-items: flex-start; }
.hg-phases li:not(:last-child) { padding-bottom: 18px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.hg-phases li > div { flex: 1; min-width: 0; }
.hg-phases__ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .12); }
.hg-phases__name { display: flex; align-items: center; gap: 8px; }
.hg-phases__name b { flex: 1; font-size: 17px; font-weight: 600; }
.hg-phases__name span { flex: none; padding: 3px 8px; border-radius: 10px; background: rgba(255, 255, 255, .12); font-size: 11.5px; font-weight: 500; }
.hg-phases__desc { margin-top: 4px !important; font-size: 13.5px; line-height: 20px; opacity: .85; }

/* ===== Khung 2 cột ===== */
.hg-body { padding: 32px 0 64px; }
.hg-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: start; }
.hg-side { position: sticky; top: calc(var(--hg-top) + 24px); display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.hg-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

.hg-toc { background: #fff; border: 1px solid var(--hg-line); border-radius: 16px; padding: 16px 12px; }
.hg-toc__title { display: flex; align-items: center; gap: 8px; padding: 4px 8px 10px; font-size: 15px; font-weight: 700; color: var(--hg-ink); }
.hg-toc__title svg { color: var(--hg-indigo); }
.hg-toc ol { display: flex; flex-direction: column; gap: 2px; }
.hg-toc a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 14px; color: var(--hg-text) !important; transition: background .15s, color .15s; }
.hg-toc a:hover { background: #f6f7fb; color: var(--hg-ink) !important; }
.hg-toc__num { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 11px; border: 1px solid var(--hg-line); background: var(--hg-subtle); font-size: 11.5px; font-weight: 600; color: var(--hg-text); transition: background .15s, color .15s, border-color .15s; }
.hg-toc a.is-active { background: var(--hg-soft); color: var(--hg-indigo) !important; font-weight: 600; }
.hg-toc a.is-active .hg-toc__num { background: var(--hg-indigo); border-color: var(--hg-indigo); color: #fff; }
.hg-pages { padding: 12px; border-color: var(--hg-line); }
.hg-pages .cv-box__title { padding: 8px 12px 2px; color: var(--hg-ink); }

.hg-chips { display: none; }

/* ===== Section ===== */
.hg-sec { background: #fff; border: 1px solid var(--hg-line); border-radius: 20px; padding: 32px 32px 36px; scroll-margin-top: calc(var(--hg-top) + 24px); }
.hg-sec__head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.hg-kicker { font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #c27803; }
.hg-sec h2 { font-size: 26px; line-height: 34px; font-weight: 700; color: var(--hg-ink); }
.hg-sec__lead { font-size: 15px; line-height: 24px; color: var(--hg-text); }

/* Danh sách tick xanh */
.hg-check { display: flex; flex-direction: column; gap: 8px; }
.hg-check li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 21px; color: var(--hg-ink); }
.hg-check svg { color: var(--hg-green); margin-top: 2.5px; flex: none; }
.hg-check a, .hg-tip a { color: var(--hg-indigo) !important; font-weight: 500; white-space: nowrap; }

/* ===== Stepper ===== */
.hg-steps { display: flex; flex-direction: column; gap: 28px; }
.hg-step { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 20px; scroll-margin-top: calc(var(--hg-top) + 24px); }
.hg-step__num { position: relative; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 18px; background: var(--hg-indigo); color: #fff; font-size: 15px; font-weight: 700; }
.hg-step:not(.is-last)::before { content: ""; position: absolute; left: 17px; top: 44px; bottom: 0; width: 2px; border-radius: 1px; background: var(--hg-line); }
.hg-step__body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.hg-step__text { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; min-width: 0; }
.hg-step__kicker { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--hg-muted); }
.hg-step__ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--hg-soft); color: var(--hg-indigo); flex: none; }
.hg-step__title { font-size: 19px; line-height: 26px; font-weight: 600; color: var(--hg-ink); }
.hg-step__desc { font-size: 15px; line-height: 24px; color: var(--hg-text); }
.hg-tip { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--hg-line); border-radius: 10px; background: var(--hg-subtle); font-size: 13.5px; line-height: 20px; color: var(--hg-text); }
.hg-tip svg { color: var(--hg-indigo); margin-top: 2px; flex: none; }
.hg-step__shot { border-radius: 12px; box-shadow: 0 6px 20px rgba(20, 26, 51, .07); background: #fff; }
.hg-step__shot img { display: block; width: 100%; height: auto; border-radius: 12px; }

/* Fade-up lần đầu vào khung nhìn (chỉ khi JS bật .hg-anim) */
.hg-anim .hg-step { opacity: 0; transform: translateY(12px); transition: opacity .24s ease-out, transform .24s ease-out; }
.hg-anim .hg-step.is-in { opacity: 1; transform: none; }

/* ===== Hai cách chọn hàng ===== */
.hg-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.hg-way { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 24px; border: 1px solid var(--hg-line); border-radius: 16px; background: var(--hg-subtle); }
.hg-way.is-hot { background: var(--hg-amber-soft); border: 1.5px solid var(--hg-amber); }
.hg-way__badge { padding: 4px 10px; border-radius: 10px; background: var(--hg-amber); color: var(--hg-ink); font-size: 11.5px; font-weight: 600; }
.hg-way__head { display: flex; align-items: center; gap: 14px; width: 100%; }
.hg-way__ico { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--hg-indigo); color: #fff; }
.hg-way.is-hot .hg-way__ico { background: var(--hg-amber); color: var(--hg-ink); }
.hg-way h3 { font-size: 19px; font-weight: 700; color: var(--hg-ink); }
.hg-way__head p { margin-top: 3px !important; font-size: 13px; color: var(--hg-muted); }
.hg-way__label { font-size: 12.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--hg-muted); }
.hg-way__text { font-size: 14px; line-height: 21px; color: var(--hg-text); }
.hg-way .hg-btn { margin-top: auto; }

/* ===== 3 chính sách ===== */
.hg-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hg-card { display: flex; flex-direction: column; gap: 14px; padding: 22px; border: 1px solid var(--hg-line); border-radius: 16px; }
.hg-card__head { display: flex; flex-direction: column; gap: 14px; }
.hg-card__ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--hg-soft); color: var(--hg-indigo); }
.hg-card h3 { font-size: 17px; font-weight: 700; color: var(--hg-ink); }
.hg-card ul { display: flex; flex-direction: column; gap: 10px; }
.hg-card li { position: relative; padding-left: 14px; font-size: 14px; line-height: 21px; color: var(--hg-text); }
.hg-card li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--hg-amber); }
.hg-card__link { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--hg-indigo) !important; }
.hg-card__link:hover { text-decoration: underline !important; }

/* ===== FAQ ===== */
.hg-faq { border: 1px solid var(--hg-line); border-radius: 16px; overflow: hidden; }
.hg-faq__item + .hg-faq__item { border-top: 1px solid var(--hg-line); }
.hg-faq__item { background: #fff; transition: background .2s; }
.hg-faq__item[open] { background: var(--hg-subtle); }
.hg-faq summary { display: flex; align-items: center; gap: 14px; padding: 18px 22px; scroll-margin-top: calc(var(--hg-top) + 80px);cursor: pointer; list-style: none; font-size: 16px; line-height: 24px; font-weight: 600; color: var(--hg-ink); }
.hg-faq summary::-webkit-details-marker { display: none; }
.hg-faq summary > span:first-child { flex: 1; min-width: 0; }
.hg-faq summary:hover > span:first-child { color: var(--hg-indigo); }
.hg-faq summary:focus-visible { outline: 2px solid var(--hg-indigo); outline-offset: -2px; }
.hg-faq__item[open] summary { color: var(--hg-indigo); }
.hg-faq__ico { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 14px; background: var(--hg-soft); color: var(--hg-indigo); transition: background .2s, color .2s; }
.hg-faq__ico .hg-faq__v { transform-origin: 12px 12px; transition: transform .2s; }
.hg-faq__item[open] .hg-faq__ico { background: var(--hg-indigo); color: #fff; }
.hg-faq__item[open] .hg-faq__v { transform: rotate(90deg) scaleX(0); }
.hg-faq__a { overflow: hidden; }
.hg-faq__a p { padding: 0 22px 18px;font-size: 14.5px; line-height: 23px; color: var(--hg-text); }

/* ===== Hỗ trợ ===== */
.hg-help { display: grid; grid-template-columns: minmax(0, 1fr) 420px; grid-template-areas: "intro ch" "mail ch"; column-gap: 32px; row-gap: 10px; align-items: center; background: var(--hg-indigo); border: 0; padding: 32px; color: #fff; }
.hg-help__intro { grid-area: intro; align-self: end; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.hg-help__ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--hg-amber); color: var(--hg-ink); }
.hg-help h2 { color: #fff; font-size: 24px; line-height: 32px; }
.hg-help__intro p { font-size: 15px; line-height: 23px; opacity: .85; }
.hg-help__mail { grid-area: mail; align-self: start; font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, .85); }
.hg-help__mail a { color: inherit !important; }
.hg-help__channels { grid-area: ch; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hg-ch { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .1); color: #fff !important; transition: background .2s; }
.hg-ch:hover { background: rgba(255, 255, 255, .17); }
.hg-ch--wide { grid-column: 1 / -1; }
.hg-ch > img { flex: none; width: 40px; height: 40px; display: block; }
.hg-ch__ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 20px; background: rgba(255, 255, 255, .12); }
.hg-ch__ico--amber { background: var(--hg-amber); color: var(--hg-ink); }
.hg-ch__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hg-ch__txt small { font-size: 12.5px; opacity: .8; }
.hg-ch__txt b { font-size: 15px; line-height: 20px; font-weight: 700; }
.hg-ch__end { flex: none; color: var(--hg-amber); }

/* ===== Màn hình vừa ===== */
@media (max-width: 1399px) {
    .hg-phases { width: 400px; }
    .hg-hero__inner { gap: 40px; }
}
@media (max-width: 1199px) {
    .hg-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 24px; }
    .hg-step__body { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .hg-step__shot { max-width: 420px; }
    .hg-hero h1 { font-size: 34px; line-height: 42px; }
    .hg-phases { width: 360px; padding: 24px; }
    .hg-cards { grid-template-columns: minmax(0, 1fr); }
    .hg-help { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "ch" "mail"; row-gap: 16px; }
    .hg-help__intro { align-self: auto; }
}

/* ===== Mobile / tablet ===== */
@media (max-width: 991px) {
    .hg { --hg-top: 118px; }
    .hg-only-d { display: none !important; }
    .hg-only-m { display: inline; }
    p.hg-only-m { display: block; }
    .hg-hero { padding: 12px 0 24px; border-bottom: 0; }
    .hg-hero__inner { flex-direction: column; align-items: stretch; gap: 24px; }
    .hg-hero__main { gap: 14px; }
    .hg-hero h1 { font-size: 30px; line-height: 38px; }
    .hg-hero__lead { font-size: 15px; line-height: 24px; }
    .hg-hero__cta { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    .hg-hero__cta .hg-btn { height: 48px; padding: 0 12px; }
    .hg-trust { flex-direction: column; gap: 6px; }
    .hg-phases { width: auto; padding: 18px; border-radius: 16px; }
    .hg-phases__title { margin-bottom: 14px !important; }
    .hg-phases ol { gap: 14px; }
    .hg-phases li:not(:last-child) { padding-bottom: 14px; }
    .hg-phases__ico { width: 36px; height: 36px; border-radius: 10px; }
    .hg-phases__name b { font-size: 16px; }
    .hg-phases__desc { font-size: 13px; line-height: 19px; }

    /* Dải chip mục lục dính ngay dưới header */
    .hg-chips { display: block; position: sticky; top: var(--hg-top); z-index: 1020; background: #fff; border-top: 1px solid var(--hg-line); border-bottom: 1px solid var(--hg-line); }
    .hg-chips__track { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .hg-chips__track::-webkit-scrollbar { display: none; }
    .hg-chips__item { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--hg-line); background: var(--hg-subtle); color: var(--hg-text) !important; font-size: 13px; font-weight: 500; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
    .hg-chips__item span { font-weight: 600; color: var(--hg-muted); }
    .hg-chips__item.is-active { background: var(--hg-indigo); border-color: var(--hg-indigo); color: #fff !important; }
    .hg-chips__item.is-active span { color: var(--hg-amber); }

    .hg-body { padding: 16px 0 32px; }
    .hg-layout { display: block; }
    .hg-side { display: none; }
    .hg-main { gap: 16px; }
    .hg-sec, .hg-step { scroll-margin-top: calc(var(--hg-top) + 66px); }
    .hg-sec { padding: 24px 20px; }
    .hg-sec h2 { font-size: 22px; line-height: 30px; }
    .hg-sec__head { margin-bottom: 20px; }
    .hg-sec__lead { font-size: 14px; line-height: 21px; }

    /* Bước: số + "BƯỚC n" + tiêu đề cùng hàng, nội dung & ảnh xếp dọc */
    .hg-steps { gap: 24px; }
    .hg-step { display: block; }
    .hg-step::before { display: none; }
    .hg-step__num { position: absolute; left: 0; top: 2px; width: 32px; height: 32px; border-radius: 16px; font-size: 14px; }
    .hg-step__text { padding-top: 0; gap: 10px; }
    .hg-step__kicker { padding-left: 42px; font-size: 11px; line-height: 13px; margin-bottom: -8px; }
    .hg-step__ico { display: none; }
    .hg-step__title { padding-left: 42px; font-size: 18px; line-height: 24px; }
    .hg-step__desc { font-size: 14px; line-height: 22px; margin-top: 4px; }
    .hg-step__shot { max-width: 440px; width: 100%; }

    .hg-compare { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .hg-way { padding: 20px; gap: 14px; }
    .hg-way.is-hot { order: -1; }
    .hg-way .hg-btn { width: 100%; }
    .hg-faq summary { padding: 16px; font-size: 15px; line-height: 22px; }
    .hg-faq__a p { padding: 0 16px 16px; font-size: 14px; line-height: 22px; }
    .hg-card { padding: 18px; gap: 12px; }
    .hg-card__head { flex-direction: row; align-items: center; gap: 14px; }
    .hg-help { padding: 24px 20px; }
    .hg-help__channels { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
    /* Section tràn viền như bản vẽ mobile */
    .hg-main { gap: 8px; }
    .hg-body { padding-top: 8px; padding-bottom: 0; }
    .hg-body > .vh-wrap { padding: 0; }
    .hg-sec { border-radius: 0; border-left: 0; border-right: 0; padding: 24px 16px; }
    .hg-help { border-radius: 0; }
    .hg-hero .vh-wrap { padding: 0 16px; }
}
@media (max-width: 575px) {
    .hg-hero h1 { font-size: 28px; line-height: 36px; }
    .hg-hero__cta .hg-btn { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
    .hg *, .hg *::before, .hg *::after { transition: none !important; animation: none !important; }
    .hg-anim .hg-step { opacity: 1; transform: none; }
}
