/*!
 * MacPlanet – Hướng dẫn mua hàng (Buyer's Guide)
 */
.bg { --bg-buy: #1a9e4b; --bg-neutral: #0071e3; --bg-caution: #e07b00; --bg-wait: #d63a2f; --bg-discontinued: #6e6e73; color: var(--mp-text); }
.bg *, .bg *::before, .bg *::after { box-sizing: border-box; }
.bg a { text-decoration: none; }
.bg-wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ---------- Status colours ---------- */
.bg-s--buy { --s: var(--bg-buy); }
.bg-s--neutral { --s: var(--bg-neutral); }
.bg-s--caution { --s: var(--bg-caution); }
.bg-s--wait { --s: var(--bg-wait); }
.bg-s--discontinued { --s: var(--bg-discontinued); }
.bg-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: .01em; color: var(--s); background: color-mix(in srgb, var(--s) 12%, transparent); white-space: nowrap; }
.bg-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--s); box-shadow: 0 0 0 3px color-mix(in srgb, var(--s) 22%, transparent); }
.bg-badge--lg { font-size: 15px; padding: 8px 16px 8px 13px; }
.bg-badge--lg::before { width: 10px; height: 10px; }

/* ---------- Hero ---------- */
.bg-hero { background: radial-gradient(1200px 400px at 85% -10%, color-mix(in srgb, var(--mp-accent) 14%, transparent), transparent 60%), linear-gradient(180deg, var(--mp-surface-2), var(--mp-bg)); border-bottom: 1px solid var(--mp-line); padding: 26px 0 30px; }
.bg-crumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13.5px; color: var(--mp-muted); margin-bottom: 18px; }
.bg-crumb a { color: var(--mp-muted); }
.bg-crumb a:hover { color: var(--mp-accent); }
.bg-crumb span[aria-hidden] { opacity: .5; }
.bg-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mp-accent); margin: 0 0 10px; }
.bg-h1 { font-family: var(--mp-font-display); font-size: clamp(30px, 4.4vw, 52px); line-height: 1.06; font-weight: 800; letter-spacing: -.025em; margin: 0 0 14px; max-width: 900px; }
.bg-lead { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.55; color: var(--mp-text-2); max-width: 760px; margin: 0 0 8px; }
.bg-updated { font-size: 13.5px; color: var(--mp-muted); display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; }
.bg-updated::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--bg-buy); animation: bgPulse 2s infinite; }
@keyframes bgPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(26, 158, 75, .5); } 50% { box-shadow: 0 0 0 6px rgba(26, 158, 75, 0); } }

/* Legend / filters */
.bg-legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 24px; }
.bg-legend__item { position: relative; text-align: left; border: 1px solid var(--mp-line); background: var(--mp-bg); border-radius: 16px; padding: 14px 16px 14px 18px; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s; color: var(--mp-text); font: inherit; overflow: hidden; }
.bg-legend__item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--s); }
.bg-legend__item:hover { box-shadow: var(--mp-shadow); transform: translateY(-1px); }
.bg-legend__item.is-active { border-color: var(--s); box-shadow: 0 0 0 3px color-mix(in srgb, var(--s) 18%, transparent); }
.bg-legend__count { font-family: var(--mp-font-display); font-size: 28px; font-weight: 800; line-height: 1; color: var(--s); }
.bg-legend__label { display: block; font-weight: 700; font-size: 15px; margin-top: 6px; }
.bg-legend__sub { display: block; font-size: 12.5px; color: var(--mp-muted); margin-top: 2px; }

/* ---------- Sticky toolbar ---------- */
.bg-toolbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--mp-bg) 88%, transparent); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--mp-line); }
@media (min-width: 992px) { .bg-toolbar { top: var(--bg-sticky-top, 64px); } }
.bg-toolbar__in { display: flex; align-items: center; gap: 14px; padding: 10px 0; }
.bg-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; -webkit-overflow-scrolling: touch; }
.bg-tabs::-webkit-scrollbar { display: none; }
.bg-tab { flex: 0 0 auto; border: 0; background: transparent; color: var(--mp-text-2); font: inherit; font-size: 14.5px; font-weight: 600; padding: 8px 14px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s; white-space: nowrap; }
.bg-tab:hover { background: var(--mp-surface); color: var(--mp-text); }
.bg-tab.is-active { background: var(--mp-text); color: var(--mp-bg); }
.bg-search { flex: 0 0 230px; position: relative; }
.bg-search input { width: 100%; border: 1px solid var(--mp-line); background: var(--mp-surface); color: var(--mp-text); border-radius: 999px; padding: 8px 14px 8px 36px; font: inherit; font-size: 14px; outline: none; transition: border-color .2s, background .2s; }
.bg-search input:focus { border-color: var(--mp-accent); background: var(--mp-bg); }
.bg-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--mp-muted); }

/* ---------- Sections & cards ---------- */
.bg-main { padding: 26px 0 40px; }
.bg-section { margin: 0 0 40px; scroll-margin-top: 140px; }
.bg-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.bg-h2 { font-family: var(--mp-font-display); font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; letter-spacing: -.02em; margin: 0; }
.bg-section__meta { font-size: 13.5px; color: var(--mp-muted); }
.bg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.bg-card { position: relative; display: flex; flex-direction: column; background: var(--mp-bg); border: 1px solid var(--mp-line); border-radius: 22px; padding: 18px; transition: box-shadow .25s, transform .25s, border-color .25s; color: var(--mp-text); }
.bg-card:hover { box-shadow: var(--mp-shadow); transform: translateY(-2px); border-color: var(--mp-line-strong); }
.bg-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.bg-card__cat { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mp-muted); }
.bg-card__media { position: relative; border-radius: 16px; overflow: hidden; background: var(--mp-surface); margin-bottom: 14px; -webkit-mask-image: -webkit-radial-gradient(white, black); }
.bg-card__media::before { content: ""; display: block; padding-top: 50%; }
.bg-card__media img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover; border-radius: 0 !important; }
.bg-card__glyph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: color-mix(in srgb, var(--mp-text) 30%, transparent); }
.bg-card__glyph svg { width: 54px; height: 54px; }
.bg-card__name { font-family: var(--mp-font-display); font-size: 21px; font-weight: 800; letter-spacing: -.015em; margin: 0 0 6px; line-height: 1.2; }
.bg-card__name a { color: inherit; }
.bg-card__name a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.bg-card__tag { font-size: 14px; line-height: 1.5; color: var(--mp-text-2); margin: 0 0 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; }
.bg-metric { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.bg-metric__days { font-family: var(--mp-font-display); font-size: 40px; font-weight: 800; line-height: .95; letter-spacing: -.03em; color: var(--s); }
.bg-metric__days small { display: block; font-family: var(--mp-font); font-size: 12.5px; font-weight: 600; letter-spacing: 0; color: var(--mp-muted); margin-top: 6px; }
.bg-metric__avg { text-align: right; font-size: 12.5px; color: var(--mp-muted); line-height: 1.35; }
.bg-metric__avg b { display: block; font-size: 17px; color: var(--mp-text); font-weight: 700; }
/* cycle bar */
.bg-cycle { margin: 6px 0 14px; }
.bg-cycle__track { position: relative; height: 8px; border-radius: 999px; background: var(--mp-surface); overflow: hidden; }
.bg-cycle__fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--s) 55%, transparent), var(--s)); }
.bg-cycle__labels { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--mp-muted); margin-top: 6px; }
.bg-facts { list-style: none; margin: 0 0 12px; padding: 12px 0 0; border-top: 1px solid var(--mp-line); display: grid; gap: 7px; }
.bg-facts li { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.bg-facts li span { color: var(--mp-muted); }
.bg-facts li b { font-weight: 700; text-align: right; }
.bg-facts .is-muted { color: var(--mp-muted); font-weight: 600; }
.bg-card__reason { font-size: 13.5px; line-height: 1.5; color: var(--mp-text-2); background: var(--mp-surface); border-radius: 12px; padding: 10px 12px; margin: auto 0 0; }
.bg-card__more { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--mp-accent); margin-top: 12px; }
.bg-empty { display: none; text-align: center; color: var(--mp-muted); padding: 50px 0; }

/* ---------- Info blocks ---------- */
.bg-method { background: var(--mp-surface); border-radius: 26px; padding: 28px; margin: 10px 0 34px; }
.bg-method__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 18px; }
.bg-method__item h3 { font-size: 16px; font-weight: 700; margin: 0 0 6px; display: flex; gap: 10px; align-items: center; }
.bg-method__item h3 i { font-style: normal; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--mp-bg); color: var(--mp-accent); font-weight: 800; font-size: 14px; }
.bg-method__item p { font-size: 14.5px; line-height: 1.6; color: var(--mp-text-2); margin: 0; }
.bg-method__scale { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.bg-note { font-size: 13px; color: var(--mp-muted); line-height: 1.6; margin-top: 16px; }
.bg-faq { margin: 0 0 20px; }
.bg-faq details { border-bottom: 1px solid var(--mp-line); padding: 14px 0; }
.bg-faq summary { cursor: pointer; font-weight: 700; font-size: 16.5px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.bg-faq summary::-webkit-details-marker { display: none; }
.bg-faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--mp-muted); transition: transform .2s; }
.bg-faq details[open] summary::after { transform: rotate(45deg); }
.bg-faq details p { margin: 10px 0 0; color: var(--mp-text-2); line-height: 1.65; font-size: 15px; }

/* ---------- Product page ---------- */
.bg-p-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 34px; align-items: center; }
.bg-p-hero__media { position: relative; border-radius: 26px; overflow: hidden; background: var(--mp-surface); -webkit-mask-image: -webkit-radial-gradient(white, black); }
.bg-p-hero__media::before { content: ""; display: block; padding-top: 66%; }
.bg-p-hero__media img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover; border-radius: 0 !important; }
.bg-p-hero__media .bg-card__glyph svg { width: 90px; height: 90px; }
.bg-p-reason { font-size: 17px; line-height: 1.6; color: var(--mp-text-2); margin: 14px 0 20px; max-width: 640px; }
.bg-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.bg-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: 15px; border: 1px solid transparent; transition: filter .2s, background .2s; }
.bg-btn--primary { background: var(--mp-accent); color: #fff !important; }
.bg-btn--primary:hover { filter: brightness(1.08); }
.bg-btn--ghost { background: var(--mp-surface); color: var(--mp-text) !important; border-color: var(--mp-line); }
.bg-btn--ghost:hover { background: var(--mp-bg); }
.bg-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 28px 0; }
.bg-stat { background: var(--mp-bg); border: 1px solid var(--mp-line); border-radius: 20px; padding: 18px; }
.bg-stat__label { font-size: 13px; color: var(--mp-muted); font-weight: 600; }
.bg-stat__value { font-family: var(--mp-font-display); font-size: 32px; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; margin-top: 6px; }
.bg-stat__value small { font-size: 15px; font-weight: 700; letter-spacing: 0; color: var(--mp-muted); }
.bg-stat__sub { font-size: 13px; color: var(--mp-muted); margin-top: 4px; }
.bg-stat--accent .bg-stat__value { color: var(--s); }
.bg-panel { background: var(--mp-bg); border: 1px solid var(--mp-line); border-radius: 22px; padding: 22px; }
.bg-panel h2 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.bg-panel h2 .bg-flag { font-size: 18px; }
.bg-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 28px; }
.bg-kv { list-style: none; margin: 0; padding: 0; }
.bg-kv li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--mp-line); font-size: 15px; }
.bg-kv li:last-child { border-bottom: 0; }
.bg-kv span { color: var(--mp-muted); }
.bg-kv b { text-align: right; }
.bg-price { font-family: var(--mp-font-display); font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 4px; }
.bg-advice { font-size: 15.5px; line-height: 1.7; color: var(--mp-text-2); }
.bg-advice p { margin: 0 0 10px; }
.bg-timeline { position: relative; margin: 12px 0 6px; }
.bg-timeline__track { height: 12px; border-radius: 999px; background: var(--mp-surface); position: relative; overflow: visible; }
.bg-timeline__fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, color-mix(in srgb, var(--s) 50%, transparent), var(--s)); }
.bg-timeline__now { position: absolute; top: -30px; transform: translateX(-50%); font-size: 11.5px; font-weight: 700; color: var(--s); white-space: nowrap; }
.bg-timeline__now::after { content: ""; position: absolute; left: 50%; top: 20px; width: 2px; height: 22px; background: var(--s); transform: translateX(-50%); }
.bg-timeline__zones { display: grid; grid-template-columns: 30fr 35fr 20fr 15fr; margin-top: 8px; font-size: 11.5px; color: var(--mp-muted); }
.bg-timeline__zones span { border-left: 1px dashed var(--mp-line-strong); padding-left: 6px; }
.bg-timeline__ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--mp-text-2); margin-top: 10px; font-weight: 600; }
.bg-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.bg-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--mp-muted); font-weight: 700; padding: 10px 10px 10px 0; border-bottom: 1px solid var(--mp-line-strong); }
.bg-table td { padding: 12px 10px 12px 0; border-bottom: 1px solid var(--mp-line); vertical-align: middle; }
.bg-table tr.is-current td { font-weight: 700; }
.bg-table .bg-life { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.bg-table .bg-life i { display: block; height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--mp-accent) 55%, transparent); }
.bg-table .bg-life em { font-style: normal; color: var(--mp-text-2); font-size: 13.5px; white-space: nowrap; }
.bg-tag-new { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: var(--mp-accent); border-radius: 6px; padding: 2px 6px; margin-left: 6px; vertical-align: 2px; }
.bg-est { color: var(--bg-caution); font-size: 12px; margin-left: 4px; }
.bg-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bg-post { display: flex; gap: 12px; align-items: flex-start; color: var(--mp-text); }
.bg-post__img { flex: 0 0 96px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--mp-surface); }
.bg-post__img img { width: 100% !important; height: 100% !important; object-fit: cover; border-radius: 0 !important; }
.bg-post__t { font-size: 14.5px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bg-post:hover .bg-post__t { color: var(--mp-accent); }
.bg-post__d { font-size: 12.5px; color: var(--mp-muted); margin-top: 4px; }
.bg-mini-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bg-mini { position: relative; border: 1px solid var(--mp-line); border-radius: 16px; padding: 14px; color: var(--mp-text); transition: box-shadow .2s; }
.bg-mini:hover { box-shadow: var(--mp-shadow); }
.bg-mini b { display: block; font-size: 15.5px; margin: 8px 0 2px; }
.bg-mini span.bg-mini__d { font-size: 12.5px; color: var(--mp-muted); }
.bg-block { margin: 0 0 30px; }
.bg-block > h2 { font-family: var(--mp-font-display); font-size: 24px; font-weight: 800; letter-spacing: -.015em; margin: 0 0 14px; }

/* Products without a photo: tinted panel with a line icon, shorter */
.bg-card__media.is-glyph { background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--s) 14%, var(--mp-surface)) 0%, var(--mp-surface) 60%); }
.bg-card__media.is-glyph::before { padding-top: 34%; }
.bg-card__media.is-glyph .bg-card__glyph { color: color-mix(in srgb, var(--s) 55%, var(--mp-muted)); }
.bg-card__media.is-glyph .bg-card__glyph svg { width: 46px; height: 46px; }
.bg-p-hero__media.is-glyph { background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--s) 16%, var(--mp-surface)) 0%, var(--mp-surface) 65%); }
.bg-p-hero__media.is-glyph::before { padding-top: 52%; }
.bg-p-hero__media.is-glyph .bg-card__glyph { color: color-mix(in srgb, var(--s) 60%, var(--mp-muted)); }

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) {
    .bg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bg-mini-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
    .bg-legend { grid-template-columns: repeat(2, 1fr); }
    .bg-p-hero { grid-template-columns: 1fr; gap: 22px; }
    .bg-p-hero__media { order: -1; }
    .bg-stats { grid-template-columns: repeat(2, 1fr); }
    .bg-cols { grid-template-columns: 1fr; }
    .bg-method__grid { grid-template-columns: 1fr; }
    .bg-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bg-search { flex-basis: 180px; }
}
@media (max-width: 767.98px) {
    .bg-wrap { padding: 0 16px; }
    .bg-grid { grid-template-columns: 1fr; }
    .bg-toolbar { position: static; }
    .bg-toolbar__in { flex-direction: column; align-items: stretch; gap: 8px; }
    .bg-search { flex-basis: auto; }
    .bg-posts { grid-template-columns: 1fr; }
    .bg-mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bg-table th:nth-child(3), .bg-table td:nth-child(3) { display: none; }
    .bg-stat__value { font-size: 26px; }
    .bg-method { padding: 20px; border-radius: 20px; }
    .bg-legend__count { font-size: 24px; }
}
