/* Nhóm B 2026 – Giỏ hàng, Thanh toán, Cảm ơn, Đăng nhập/Đăng ký, Quên mật khẩu, popup #registerModal.
   Figma "Website – Giỏ hàng & Đăng nhập". Mọi class mới có tiền tố cb-; class cũ (minus/plus/value-quanity/eye-absulute/
   footer-cart-mobile...) chỉ được giữ làm móc JS và bị ghi đè kiểu ở đây trong phạm vi .cb / .cb-regmodal. */
.cb, .cb-regmodal, .cb-swal {
    --cb-indigo: #2D3682;
    --cb-indigo-700: #232a6b;
    --cb-indigo-50: #eef0fa;
    --cb-amber: #F59E0B;
    --cb-amber-50: #fff7e6;
    --cb-red: #dc2626;
    --cb-red-50: #fef2f2;
    --cb-green: #16a34a;
    --cb-green-50: #e8f6ee;
    --cb-ink: #111827;
    --cb-ink-2: #374151;
    --cb-muted: #6b7280;
    --cb-line: #e5e7eb;
    --cb-field: #d1d5db;
    --cb-bg: #f6f7fb;
    --cb-radius: 14px;
    font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--cb-ink);
}
.cb { background: var(--cb-bg); padding: 24px 0 64px; }
.cb *, .cb *::before, .cb *::after, .cb-regmodal *, .cb-regmodal *::before, .cb-regmodal *::after { box-sizing: border-box; }
.cb a, .cb-regmodal a { text-decoration: none; }
.cb h1, .cb h2, .cb h3, .cb p, .cb dl, .cb dd, .cb ul, .cb ol,
.cb-regmodal h2, .cb-regmodal h3, .cb-regmodal p, .cb-regmodal fieldset { margin: 0; }
.cb ul, .cb ol { padding: 0; list-style: none; }
.cb-i { flex: none; pointer-events: none; }
.cb-m-only { display: none !important; }
.cb-hidden { display: none !important; }

/* breadcrumb + tiêu đề */
.cb-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--cb-muted); margin-bottom: 12px; }
.cb-crumb a { color: var(--cb-muted); }
.cb-crumb a:hover { color: var(--cb-indigo); }
.cb-crumb span { color: var(--cb-ink); font-weight: 500; }
.cb-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 20px; }
.cb-title { font-size: 28px; font-weight: 700; line-height: 1.25; color: var(--cb-ink); }
.cb-sub { margin-top: 6px !important; font-size: 14px; color: var(--cb-muted); }
.cb-alerts:empty { display: none; }
.cb-alerts .alert { border-radius: 10px; margin-bottom: 16px; }

/* thanh tiến trình */
.cb-steps { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.cb-steps__item { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--cb-muted); white-space: nowrap; }
.cb-steps__item + .cb-steps__item::before { content: ""; width: 40px; height: 2px; background: var(--cb-line); margin: 0 12px; border-radius: 2px; }
.cb-steps__item.is-done + .cb-steps__item::before { background: var(--cb-green); }
.cb-steps__dot { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--cb-field); background: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.cb-steps__item.is-current { color: var(--cb-ink); font-weight: 500; }
.cb-steps__item.is-current .cb-steps__dot { background: var(--cb-indigo); border-color: var(--cb-indigo); color: #fff; }
.cb-steps__item.is-done .cb-steps__dot { background: var(--cb-green); border-color: var(--cb-green); color: #fff; }

/* thẻ, nút, ô nhập */
.cb-card { background: #fff; border: 1px solid var(--cb-line); border-radius: var(--cb-radius); }
.cb-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; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s; }
.cb-btn:focus-visible { outline: 3px solid rgba(45, 54, 130, .3); outline-offset: 2px; }
.cb-btn--primary { background: var(--cb-indigo); color: #fff !important; }
.cb-btn--primary:hover { background: var(--cb-indigo-700); }
.cb-btn--outline { background: #fff; border-color: var(--cb-indigo); color: var(--cb-indigo) !important; }
.cb-btn--outline:hover { background: var(--cb-indigo-50); }
.cb-btn--amber { background: var(--cb-amber); color: #1f1300 !important; }
.cb-btn--amber:hover { background: #e08e00; }
.cb-btn--block { display: flex; width: 100%; }
.cb-btn--lg { height: 48px; }
.cb-link { color: var(--cb-indigo) !important; font-weight: 600; font-size: 14px; }
.cb-link:hover { text-decoration: underline; }

.cb-form { display: flex; flex-direction: column; gap: 16px; }
.cb-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cb-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.cb-field--full { grid-column: 1 / -1; }
.cb-field--state { display: contents; }
.cb-label { display: block; margin: 0; padding: 0; font-size: 14px; font-weight: 500; color: var(--cb-ink); float: none; width: auto; line-height: 1.4; }
.cb .cb-input, .cb-regmodal .cb-input { height: 46px; padding: 0 14px; border: 1px solid var(--cb-field); border-radius: 10px; background-color: #fff; font-size: 15px; color: var(--cb-ink); box-shadow: none; margin: 0; width: 100%; }
.cb .cb-input::placeholder, .cb-regmodal .cb-input::placeholder { color: #9ca3af; }
.cb .cb-input:focus, .cb-regmodal .cb-input:focus { border-color: var(--cb-indigo); box-shadow: 0 0 0 3px rgba(45, 54, 130, .12); outline: 0; }
.cb .form-select.cb-input, .cb-regmodal .form-select.cb-input { padding-right: 40px; background-position: right 14px center; }
.cb .cb-input.is-invalid, .cb-regmodal .cb-input.is-invalid { border-color: var(--cb-red); }
.cb input.cb-input.is-invalid, .cb-regmodal input.cb-input.is-invalid { background-image: none; padding-right: 14px; }
.cb .cb-input.is-invalid:focus, .cb-regmodal .cb-input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
.cb .cb-textarea, .cb-regmodal .cb-textarea { height: auto; min-height: 104px; padding: 12px 14px; resize: vertical; }
.cb-err { font-size: 12.5px; color: var(--cb-red); }
.cb-hint { display: block; margin-top: 6px !important; font-size: 12.5px; color: var(--cb-muted); }
.cb-mt { margin-top: 16px; }
.cb-check { display: inline-flex; align-items: center; gap: 10px; margin: 0; cursor: pointer; font-size: 14px; color: var(--cb-ink-2); }
.cb-check .form-check-input { width: 20px; height: 20px; margin: 0; flex: none; border-color: var(--cb-field); border-radius: 5px; cursor: pointer; float: none; }
.cb-check .form-check-input:checked { background-color: var(--cb-indigo); border-color: var(--cb-indigo); }
.cb-check .form-check-input:focus { box-shadow: 0 0 0 3px rgba(45, 54, 130, .15); }

/* ô mật khẩu + mắt */
.cb-pw { position: relative; }
.cb-pw .cb-input { padding-right: 46px !important; }
.cb .cb-eye, .cb-regmodal .cb-eye { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; color: var(--cb-muted); cursor: pointer; }
.cb .cb-eye:hover, .cb-regmodal .cb-eye:hover { color: var(--cb-indigo); background: var(--cb-indigo-50); }
.cb-eye .cb-eye__on { display: none; }
.cb-pw:has(input[type="text"]) .cb-eye__on { display: block; }
.cb-pw:has(input[type="text"]) .cb-eye__off { display: none; }

/* hộp thông báo nhỏ */
.cb-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; border: 1px solid; font-size: 14px; line-height: 1.5; }
.cb-note > .cb-i { margin-top: 1px; }
.cb-note--ok { background: var(--cb-green-50); border-color: #a7dbbb; color: #14532d; }
.cb-note--ok > .cb-i { color: var(--cb-green); }
.cb-note--err { background: var(--cb-red-50); border-color: #fca5a5; color: #7f1d1d; }
.cb-note--err > .cb-i { color: var(--cb-red); }
.cb-note--info { background: var(--cb-indigo-50); border-color: #c7cbe8; color: var(--cb-ink-2); }
.cb-note--info > .cb-i { color: var(--cb-indigo); }
.cb-note--amber { background: var(--cb-amber-50); border-color: #fde3a7; color: var(--cb-ink-2); font-size: 13px; }
.cb-note--amber > .cb-i { color: var(--cb-indigo); }
.cb-note a { color: var(--cb-indigo); font-weight: 600; }

/* ===================== GIỎ HÀNG ===================== */
.cb-cart__grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.cb-cart__list { --cb-cols: 64px minmax(0, 1fr) 112px 132px 78px 104px 36px; overflow: hidden; }
.cb-cart__thead { display: grid; grid-template-columns: var(--cb-cols); column-gap: 14px; padding: 14px 20px; background: #fafbfd; border-bottom: 1px solid var(--cb-line); font-size: 13px; color: var(--cb-muted); }
.cb-cart__thead .cb-col-prod { grid-column: span 2; }
.cb-cart__thead .cb-col-sub { text-align: right; }
.cb-line { display: grid; grid-template-columns: var(--cb-cols); grid-template-areas: "img info price qty date sub rm"; column-gap: 14px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--cb-line); }
.cb-line__img { grid-area: img; width: 64px; height: 64px; border: 1px solid var(--cb-line); border-radius: 10px; background: #fff; overflow: hidden; display: grid; place-items: center; }
.cb-line__img img { width: 100%; height: 100%; object-fit: contain; }
.cb-line__info { grid-area: info; min-width: 0; }
.cb-line__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; font-weight: 500; line-height: 1.4; color: var(--cb-ink) !important; }
.cb-line__name:hover { color: var(--cb-indigo) !important; }
.cb-line__meta { display: block; margin-top: 3px; font-size: 13px; color: var(--cb-muted); }
.cb-line__meta > span + span::before { content: " · "; }
.cb-line__price { grid-area: price; display: flex; flex-direction: column; line-height: 1.35; }
.cb-line__price b { font-size: 15px; font-weight: 700; color: var(--cb-ink); }
.cb-line__price s { font-size: 12.5px; color: #9ca3af; }
.cb .cb-line__qty { grid-area: qty; width: auto; }
.cb-qty { display: inline-flex; align-items: stretch; height: 36px; border: 1px solid var(--cb-field); border-radius: 8px; overflow: hidden; background: #fff; }
.cb-qty .minus, .cb-qty .plus { width: 36px; display: grid; place-items: center; cursor: pointer; user-select: none; transition: background-color .2s; }
.cb-qty .minus { background: #f3f4f6; color: var(--cb-ink-2); border-right: 1px solid var(--cb-field); }
.cb-qty .minus:hover { background: #e5e7eb; }
.cb-qty .plus { background: var(--cb-indigo); color: #fff; }
.cb-qty .plus:hover { background: var(--cb-indigo-700); }
.cb-qty .minus:focus-visible, .cb-qty .plus:focus-visible { outline: 2px solid var(--cb-amber); outline-offset: -2px; }
.cb .cb-qty .value-quanity { width: 54px; height: auto; border: 0; padding: 0; margin: 0; text-align: center; font-size: 15px; font-weight: 500; color: var(--cb-ink); background: #fff; outline: 0; -moz-appearance: textfield; appearance: textfield; }
.cb .cb-qty .value-quanity::-webkit-outer-spin-button, .cb .cb-qty .value-quanity::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cb-line__date { grid-area: date; font-size: 14px; color: var(--cb-muted); }
.cb-line__sub { grid-area: sub; text-align: right; font-size: 15px; font-weight: 700; color: var(--cb-indigo); white-space: nowrap; }
.cb .cb-line__rm { grid-area: rm; width: auto; justify-self: end; }
.cb .cb-line__rm > a { width: 34px; height: 34px; padding: 0; border-radius: 8px; display: grid; place-items: center; color: var(--cb-muted); background: #f5f6f8; }
.cb .cb-line__rm > a:hover { background: var(--cb-red-50); color: var(--cb-red); }
.cb .cb-line__rm > a:hover svg { color: var(--cb-red); }
.cb-cart__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 20px; }
.cb-cart__hint { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--cb-muted); }

.cb-cart__side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 104px; }
.cb-sum { padding: 20px; }
.cb-sum__title { font-size: 18px; font-weight: 600; margin-bottom: 10px !important; }
.cb-sum__row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; color: #4b5563; }
.cb-sum__row b { color: var(--cb-ink); font-weight: 600; white-space: nowrap; }
.cb-sum__total { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; padding: 14px 0 16px; border-top: 1px solid var(--cb-line); font-size: 16px; font-weight: 600; }
.cb-sum__total .price-total-main { font-size: 24px; font-weight: 700; color: var(--cb-indigo); white-space: nowrap; }
.cb-sum .cb-label { margin-bottom: 6px; }
.cb-sum__order { margin-top: 14px; height: 48px; }
.cb-sum__note { margin-top: 10px !important; font-size: 12px; line-height: 1.5; color: var(--cb-muted); text-align: center; }
.cb-perks { padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.cb-perk { display: flex; align-items: center; gap: 12px; }
.cb-perk__ico { width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--cb-amber-50); color: var(--cb-indigo); display: grid; place-items: center; }
.cb-perk b { display: block; font-size: 14px; font-weight: 600; }
.cb-perk div > span { display: block; font-size: 12.5px; color: var(--cb-muted); }

.cb .footer-cart-mobile.cb-mbar { display: none; }

.cb-empty { max-width: 560px; margin: 8px auto 0; padding: 40px 24px; text-align: center; }
.cb-empty__ico { width: 96px; height: 96px; margin: 0 auto 20px; border-radius: 50%; background: var(--cb-indigo-50); color: var(--cb-indigo); display: grid; place-items: center; }
.cb-empty h2 { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.cb-empty p { font-size: 15px; line-height: 1.55; color: var(--cb-muted); margin-bottom: 22px; }
.cb-empty__actions { display: flex; flex-direction: column; gap: 12px; max-width: 360px; margin: 0 auto; }

/* hộp xác nhận đặt hàng (SweetAlert do main.js mở) */
.swal2-popup.cb-swal { width: 440px; max-width: calc(100% - 32px); padding: 28px 28px 24px; border-radius: 20px; }
.cb-swal .swal2-icon.swal2-success { transform: scale(.8); margin: 4px auto 0; }
.cb-swal .swal2-title { font: 700 22px/1.3 Roboto, system-ui, sans-serif; color: var(--cb-ink); padding-top: 8px; }
.cb-swal .swal2-html-container { font: 400 15px/1.55 Roboto, system-ui, sans-serif; color: #4b5563; margin-top: 10px; }
.cb-swal .swal2-actions { width: 100%; gap: 12px; flex-wrap: nowrap; margin-top: 22px; }
.cb-swal .swal2-styled { flex: 1; margin: 0; height: 46px; border-radius: 10px; font: 600 15px Roboto, system-ui, sans-serif; box-shadow: none !important; }
.cb-swal .swal2-styled.cb-swal__cancel { color: var(--cb-indigo) !important; border: 1.5px solid var(--cb-indigo) !important; }
.cb-swal .swal2-styled.cb-swal__ok { background: var(--cb-indigo) !important; }

/* ===================== THANH TOÁN ===================== */
.cb-co__grid { display: grid; grid-template-columns: minmax(0, 1fr) 376px; gap: 24px; align-items: start; }
.cb-co__main, .cb-co__side, .cb-ty__main, .cb-ty__side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cb-co__side { position: sticky; top: 104px; }
.cb-panel { padding: 22px 24px; }
.cb-panel__head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.cb-panel__head h2 { flex: 1; font-size: 18px; font-weight: 600; color: var(--cb-ink); }
.cb-panel__ico { width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--cb-indigo-50); color: var(--cb-indigo); display: grid; place-items: center; }
.cb-panel__link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 500; color: var(--cb-indigo) !important; white-space: nowrap; }
.cb-panel__link:hover { text-decoration: underline; }
.cb-co .select2-container .select2-selection--single { height: 46px; border: 1px solid var(--cb-field); border-radius: 10px; }
.cb-co .select2-container .select2-selection--single .select2-selection__rendered { line-height: 44px; padding-left: 14px; color: var(--cb-ink); font-size: 15px; }
.cb-co .select2-container .select2-selection--single .select2-selection__arrow { height: 44px; right: 8px; }
.cb-co .cb-field--state select { margin-top: 0; }

.cb-mini { display: flex; flex-direction: column; gap: 12px; padding-bottom: 14px !important; margin-bottom: 8px !important; border-bottom: 1px solid var(--cb-line); }
.cb-co .cb-mini { max-height: 420px; overflow-y: auto; }
.cb-mini__item { display: flex; align-items: center; gap: 12px; }
.cb-mini__img { width: 48px; height: 48px; flex: none; border: 1px solid var(--cb-line); border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: #fff; }
.cb-mini__img img { width: 100%; height: 100%; object-fit: contain; }
.cb-mini__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cb-mini__info b { font-size: 14px; font-weight: 500; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cb-mini__info small { font-size: 12px; color: var(--cb-muted); }
.cb-mini__sub { font-size: 14px; font-weight: 600; white-space: nowrap; }

.cb-pay { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.cb-pay__opt { display: block; padding: 14px 16px; border: 1.5px solid var(--cb-line); border-radius: 12px; cursor: pointer; background: #fff; transition: border-color .2s, background-color .2s; }
.cb-pay__opt, .cb-pay__row { display: flex; gap: 12px; align-items: flex-start; margin: 0; }
.cb-pay__opt--stack { flex-direction: column; gap: 0; }
.cb-pay__row { cursor: pointer; width: 100%; }
.cb-pay__opt .form-check-input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; float: none; border-color: var(--cb-field); }
.cb-pay__opt .form-check-input:checked { background-color: var(--cb-indigo); border-color: var(--cb-indigo); }
.cb-pay__opt:has(input[name="payment_method"]:checked) { border-color: var(--cb-indigo); background: var(--cb-indigo-50); }
.cb-pay__opt.is-disabled { background: #f9fafb; cursor: not-allowed; }
.cb-pay__opt.is-disabled .cb-pay__row { cursor: not-allowed; }
.cb-pay__opt.is-disabled b { color: #9ca3af; }
.cb-pay__txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cb-pay__txt b { font-size: 15px; font-weight: 600; color: var(--cb-ink); }
.cb-pay__txt small { font-size: 13px; line-height: 1.45; color: var(--cb-muted); }
.cb-pay__txt .icon-payment-transfer { height: 22px; width: auto; margin-top: 4px; }
.cb-pay__cards { display: flex; gap: 6px; flex-wrap: wrap; }
.cb-pay__cardform { padding: 12px 0 0 32px; font-size: 14px; }
.cb-co .cb-sum__note { display: flex; justify-content: center; align-items: center; gap: 6px; }

/* ===================== CẢM ƠN ===================== */
.cb-d-flex { display: flex; }
.cb-ty__hero { display: flex; align-items: center; gap: 24px; padding: 28px 32px; margin-bottom: 20px; border: 1.5px solid #86d3a4; }
.cb-ty__hero--info { border-color: #9fb3e6; }
.cb-ty__hero--warn { border-color: #fcd34d; }
.cb-ty__badge { width: 72px; height: 72px; flex: none; border-radius: 50%; background: var(--cb-green-50); color: var(--cb-green); display: grid; place-items: center; }
.cb-ty__hero--info .cb-ty__badge { background: var(--cb-indigo-50); color: var(--cb-indigo); }
.cb-ty__hero--warn .cb-ty__badge { background: var(--cb-amber-50); color: #b45309; }
.cb-ty__msg { flex: 1; min-width: 0; }
.cb-ty__msg h2 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.cb-ty__msg p { font-size: 15px; color: #4b5563; line-height: 1.55; }
.cb-ty__msg p a { color: var(--cb-indigo); font-weight: 600; text-decoration: underline; }
.cb-ty__code { display: inline-block; margin-top: 10px; padding: 4px 12px; border-radius: 999px; background: var(--cb-indigo-50); font-size: 13px; color: var(--cb-muted); }
.cb-ty__code b { color: var(--cb-indigo); margin-left: 4px; }
.cb-ty__actions { width: 240px; flex: none; display: flex; flex-direction: column; gap: 10px; }
.cb-ty__grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 24px; align-items: start; }
.cb-dl > div { display: grid; grid-template-columns: 186px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--cb-line); }
.cb-dl > div:first-child { padding-top: 4px; }
.cb-dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.cb-dl dt { font-weight: 400; font-size: 14px; color: var(--cb-muted); }
.cb-dl dd { font-size: 14.5px; font-weight: 500; color: var(--cb-ink); word-break: break-word; }
.cb-help { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: var(--cb-radius); background: var(--cb-amber-50); border: 1px solid #fde3a7; }
.cb-help__ico { width: 38px; height: 38px; flex: none; border-radius: 50%; background: #fff; color: var(--cb-indigo); display: grid; place-items: center; }
.cb-help b { display: block; font-size: 14px; font-weight: 600; }
.cb-help div > span { display: block; font-size: 13px; color: #4b5563; }
.cb-help a { color: var(--cb-indigo); font-weight: 600; }

/* ===================== ĐĂNG NHẬP / ĐĂNG KÝ / MẬT KHẨU ===================== */
.cb-auth__wrap { max-width: 1040px !important; }
.cb-auth--reg .cb-auth__wrap { max-width: 1100px !important; }
.cb-auth__card { display: grid; grid-template-columns: 440px minmax(0, 1fr); background: #fff; border: 1px solid var(--cb-line); border-radius: 20px; overflow: hidden; box-shadow: 0 10px 30px rgba(17, 24, 39, .06); }
.cb-auth--reg .cb-auth__card { grid-template-columns: 420px minmax(0, 1fr); }
.cb-auth__promo { order: -1; display: flex; flex-direction: column; gap: 20px; padding: 40px; background: var(--cb-indigo); color: #fff; }
.cb-auth__form { padding: 48px 56px; min-width: 0; }
.cb-auth__title { font-size: 28px; font-weight: 700; color: var(--cb-ink); margin-bottom: 8px !important; }
.cb-auth__lead { font-size: 14.5px; color: var(--cb-muted); line-height: 1.55; margin-bottom: 20px !important; }
.cb-auth__form .cb-alerts .alert, .cb-auth__form .cb-note { margin-bottom: 16px; }
.cb-auth__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.cb-divider { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--cb-muted); }
.cb-divider::before, .cb-divider::after { content: ""; flex: 1; height: 1px; background: var(--cb-line); }
.cb-pill { align-self: flex-start; display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--cb-amber); color: #1f1300; font-size: 12.5px; font-weight: 600; }
.cb-auth__promo h2 { font-size: 26px; font-weight: 700; line-height: 1.3; color: #fff; }
.cb-promo { display: flex; flex-direction: column; gap: 18px; }
.cb-promo li { display: flex; gap: 14px; align-items: flex-start; }
.cb-promo__ico { width: 40px; height: 40px; flex: none; border-radius: 50%; background: rgba(255, 255, 255, .12); color: var(--cb-amber); display: grid; place-items: center; }
.cb-promo b { display: block; font-size: 15px; font-weight: 600; }
.cb-promo li > div > span { display: block; font-size: 13px; color: rgba(255, 255, 255, .75); line-height: 1.45; }
.cb-promo__note { margin-top: auto; padding: 16px; border-radius: 12px; background: rgba(255, 255, 255, .1); }
.cb-promo__note b { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--cb-amber); }
.cb-promo__note p { font-size: 13px; line-height: 1.55; color: rgba(255, 255, 255, .85); margin-top: 6px !important; }
.cb-promo__help { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 12px; background: rgba(255, 255, 255, .12); color: #fff !important; }
.cb-promo__help:hover { background: rgba(255, 255, 255, .18); }
.cb-promo__help .cb-i { color: var(--cb-amber); }
.cb-promo__help small { display: block; font-size: 12px; color: rgba(255, 255, 255, .75); }
.cb-promo__help b { font-size: 17px; font-weight: 700; }
.cb-auth:not(.cb-auth--reg) .cb-promo__help { margin-top: auto; }
.cb-auth__after { display: none; }
.cb-reg__login { text-align: center; font-size: 14px; color: var(--cb-muted); }

.cb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cb-chip { position: relative; margin: 0; cursor: pointer; }
.cb-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.cb-chip span { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border: 1px solid var(--cb-field); border-radius: 10px; background: #fff; font-size: 14px; color: var(--cb-ink-2); transition: border-color .2s, background-color .2s; user-select: none; }
.cb-chip span .cb-i { display: none; }
.cb-chip:hover span { border-color: var(--cb-indigo); }
.cb-chip input:checked + span { border: 1.5px solid var(--cb-indigo); background: var(--cb-indigo-50); color: var(--cb-indigo); font-weight: 600; }
.cb-chip input:checked + span .cb-i { display: block; }
.cb-chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(45, 54, 130, .2); }
.cb-chips.is-invalid .cb-chip span { border-color: var(--cb-red); }

.cb-reg-ok { text-align: center; padding: 8px 0; }
.cb-reg-ok__ico { width: 80px; height: 80px; margin: 0 auto 18px; border-radius: 50%; background: var(--cb-green-50); color: var(--cb-green); display: grid; place-items: center; }
.cb-reg-ok h3 { font-size: 22px; font-weight: 700; margin-bottom: 10px; color: var(--cb-ink); }
.cb-reg-ok p { font-size: 15px; color: #4b5563; }
.cb-reg-ok__state { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 8px 14px; border: 1px solid var(--cb-line); border-radius: 10px; background: #f9fafb; font-size: 13.5px; color: var(--cb-ink-2); }
.cb-reg-ok__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }

.cb-auth--pw .cb-auth__wrap { max-width: 528px !important; }
.cb-pwcard { padding: 36px; display: flex; flex-direction: column; }
.cb-pwcard__ico { width: 56px; height: 56px; border-radius: 50%; background: var(--cb-indigo-50); color: var(--cb-indigo); display: grid; place-items: center; margin-bottom: 20px; }
.cb-pwcard .cb-auth__lead { margin-bottom: 18px !important; }
.cb-pwcard .cb-alerts .alert { margin-bottom: 16px; }
.cb-pwcard .cb-note--amber { margin-top: 20px; }
.cb-back { display: inline-flex; align-self: center; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--cb-indigo) !important; }
.cb-back:hover { text-decoration: underline; }

/* popup đăng ký (#registerModal) */
.cb-regmodal .modal-dialog { max-width: 560px; padding: 0 8px; }
.cb-regmodal .modal-content { border: 0; border-radius: 20px; padding: 28px 32px 26px; box-shadow: 0 24px 60px rgba(17, 24, 39, .25); }
.cb-regmodal.modal .modal-dialog-scrollable .modal-content { overflow: hidden; }
.cb-regmodal__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0 -8px; padding: 2px 8px; }
.cb-regmodal__close { position: absolute; top: 18px; right: 18px; z-index: 2; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #f3f4f6; color: var(--cb-ink-2); cursor: pointer; }
.cb-regmodal__close:hover { background: #e5e7eb; }
.cb-regmodal__head { display: flex; gap: 14px; align-items: flex-start; padding-right: 44px; margin-bottom: 20px; }
.cb-regmodal__ico { width: 48px; height: 48px; flex: none; border-radius: 50%; background: var(--cb-indigo-50); color: var(--cb-indigo); display: grid; place-items: center; }
.cb-regmodal__title { font-size: 20px; font-weight: 700; color: var(--cb-ink); margin-bottom: 4px !important; }
.cb-regmodal__head p { font-size: 13.5px; color: var(--cb-muted); line-height: 1.45; }
.cb-regmodal .cb-fields { gap: 14px 12px; }
.cb-regmodal .cb-note--err { margin-bottom: 14px; }
.cb-regmodal .cb-reg-ok { padding: 28px 0 4px; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1199px) {
    .cb-cart__grid { grid-template-columns: minmax(0, 1fr) 320px; }
    .cb-cart__list { --cb-cols: 56px minmax(0, 1fr) 96px 124px 96px 34px; }
    .cb-line { grid-template-areas: "img info price qty sub rm"; }
    .cb-cart__thead .cb-col-date { display: none; }
    .cb-line__date { display: none; }
    .cb-line__meta .cb-m-only { display: inline !important; }
    .cb-line__img { width: 56px; height: 56px; }
    .cb-co__grid { grid-template-columns: minmax(0, 1fr) 340px; }
    .cb-ty__grid { grid-template-columns: minmax(0, 1fr) 360px; }
    .cb-auth__card, .cb-auth--reg .cb-auth__card { grid-template-columns: 380px minmax(0, 1fr); }
    .cb-auth__form { padding: 40px; }
}

@media (max-width: 991px) {
    .cb { padding: 16px 0 40px; }
    .cb-m-only { display: block !important; }
    span.cb-m-only { display: inline !important; }
    .cb-d-only, .cb-d-flex { display: none !important; }
    .cb-title { font-size: 22px; }
    .cb-head { margin-bottom: 16px; }
    .cb-steps { display: none; }

    /* giỏ hàng dạng thẻ */
    .cb-cart__grid { grid-template-columns: 1fr; gap: 16px; }
    .cb-cart__side { position: static; }
    .cb-cart__list { background: transparent; border: 0; border-radius: 0; overflow: visible; }
    .cb-cart__thead { display: none; }
    .cb-line { grid-template-columns: 72px minmax(0, 1fr) auto; grid-template-areas: "img info rm" "img price price" ". qty sub"; column-gap: 12px; row-gap: 6px; align-items: center; margin-bottom: 12px; padding: 14px; background: #fff; border: 1px solid var(--cb-line); border-radius: var(--cb-radius); }
    .cb-line__img { width: 72px; height: 72px; align-self: start; }
    .cb-line__info { align-self: start; }
    .cb-line__rm { align-self: start; }
    .cb-line__meta .cb-m-only { display: inline !important; }
    .cb-line__price { flex-direction: row; align-items: baseline; gap: 8px; }
    .cb-line__sub { align-self: center; font-size: 16px; }
    .cb-cart__foot { padding: 0; }
    .cb-cart__foot .cb-btn { width: 100%; }
    .cb-cart__hint { display: none; }
    .cb-sum__order { display: none; }
    .cb-perks { display: none; }
    .cb .footer-cart-mobile.cb-mbar { display: flex; flex-wrap: nowrap; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1025; height: auto; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); justify-content: space-between; align-items: center; gap: 12px; background: #fff; box-shadow: 0 -6px 20px rgba(17, 24, 39, .08); text-align: left; }
    .cb-mbar__info { min-width: 0; }
    .cb-mbar__info p { margin: 0; font-size: 12.5px; color: var(--cb-muted); }
    .cb-mbar .cb-mbar__total { font-size: 15px; font-weight: 700; color: var(--cb-ink); }
    .cb-mbar .cart-total { font-size: inherit; color: inherit; }
    .cb-mbar .cb-btn { flex: none; height: 46px; padding: 0 18px; }

    /* thanh toán / cảm ơn: 1 cột */
    .cb-co__grid, .cb-ty__grid { grid-template-columns: 1fr; gap: 16px; }
    .cb-co__side { position: static; }
    .cb-panel { padding: 18px; }
    .cb-ty__hero { flex-direction: column; text-align: center; gap: 14px; padding: 24px 18px; }
    .cb-ty__actions { width: 100%; }
    .cb-ty__badge { width: 64px; height: 64px; }
    .cb-ty__msg h2 { font-size: 22px; }

    /* đăng nhập / đăng ký */
    .cb-auth__card, .cb-auth--reg .cb-auth__card { display: flex; flex-direction: column; gap: 16px; background: transparent; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
    .cb-auth__form { padding: 20px; background: #fff; border: 1px solid var(--cb-line); border-radius: var(--cb-radius); }
    .cb-auth__promo { order: 0; padding: 24px 20px; border-radius: var(--cb-radius); gap: 18px; }
    .cb-auth__promo h2 { font-size: 21px; }
    .cb-auth__mhead { margin-bottom: 14px; }
    .cb-auth__after { display: flex; margin-top: 16px; }
    .cb-auth--reg .cb-auth__promo { display: none; }
    .cb-pwcard { padding: 24px 20px; }
}

@media (max-width: 575px) {
    .cb-fields { grid-template-columns: 1fr; }
    .cb-dl > div { grid-template-columns: 1fr; gap: 2px; padding: 12px 0; }
    .cb-regmodal .modal-content { padding: 22px 18px 20px; border-radius: 16px; }
    .cb-reg-ok__actions { grid-template-columns: 1fr; }
    .cb-mbar .cb-btn { padding: 0 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .cb *, .cb-regmodal * { transition: none !important; }
}
