/* =====================================================================
   MODERN CLIENT THEME
   - Lớp giao diện phủ lên template gốc, nạp SAU CÙNG trong header client.
   - Chỉ thay đổi trình bày (CSS), không phụ thuộc/không sửa logic PHP/JS.
   - Màu thương hiệu lấy từ --primary / --primary1 (cấu hình trong Admin).
   - Gỡ bỏ: xoá dòng <link ... modern.css> trong views/client/header.php.
   ===================================================================== */

/* Font chữ: dùng font cài trong Admin (Cài đặt → Font Family), file này không ép font riêng */

/* ---------------------------------------------------------------------
   1. DESIGN TOKENS
   --------------------------------------------------------------------- */
:root {

    --ui-brand: var(--primary, #4f46e5);
    --ui-brand-2: var(--primary1, var(--ui-brand));
    --ui-gradient: linear-gradient(135deg, var(--ui-brand) 0%, var(--ui-brand-2) 100%);
    --ui-brand-soft: color-mix(in srgb, var(--ui-brand) 15%, #ffffff);
    --ui-brand-softer: color-mix(in srgb, var(--ui-brand) 8%, #ffffff);
    --ui-brand-ring: color-mix(in srgb, var(--ui-brand) 28%, transparent);
    --ui-brand-shadow: color-mix(in srgb, var(--ui-brand) 55%, transparent);
    --ui-brand-deep: color-mix(in srgb, var(--ui-brand) 72%, #000000);
    --ui-brand-2-deep: color-mix(in srgb, var(--ui-brand-2) 72%, #000000);
    /* Màu thương hiệu dùng cho chữ / icon */
    --ui-brand-fg: var(--ui-brand);

    /* "Chất liệu" tối đồng bộ với khối thông báo trang chủ:
       nền xanh than + quầng sáng màu thương hiệu ở 2 góc + lưới chấm mờ */
    /* Xanh than ám theo Màu chủ đạo (Admin) → luôn đồng bộ với màu site */
    --ui-ink: color-mix(in srgb, var(--ui-brand) 22%, #070b14);
    --ui-ink-deep: color-mix(in srgb, var(--ui-brand) 15%, #04070d);
    --ui-glow-1: radial-gradient(560px 220px at 0% 0%, color-mix(in srgb, var(--ui-brand) 50%, transparent), transparent 70%);
    --ui-glow-2: radial-gradient(480px 220px at 100% 100%, color-mix(in srgb, var(--ui-brand-2) 40%, transparent), transparent 70%);
    --ui-dots: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
    --ui-ink-bg: var(--ui-dots) 0 0 / 18px 18px, var(--ui-glow-1), var(--ui-glow-2), var(--ui-ink);
    /* Bản không lưới chấm cho thanh mỏng (menu, tiêu đề) — lưới chấm trên thanh thấp trông như bụi */
    --ui-ink-bar: var(--ui-glow-1), var(--ui-glow-2), var(--ui-ink);

    /* Khối nhấn theo màu site: gradient Màu chủ đạo → Màu phụ + ánh sáng nhẹ */
    --ui-brand-bar: radial-gradient(640px 140px at 100% 0%, rgba(255, 255, 255, .18), transparent 70%), var(--ui-gradient);
    --ui-brand-bg: var(--ui-dots) 0 0 / 18px 18px, radial-gradient(420px 220px at 100% 0%, rgba(255, 255, 255, .2), transparent 70%), var(--ui-gradient);
    /* Chữ gradient sáng (dùng trên nền tối) */
    --ui-gradient-light: linear-gradient(90deg, color-mix(in srgb, var(--ui-brand) 55%, #ffffff), color-mix(in srgb, var(--ui-brand-2) 55%, #ffffff));

    /* Nền trang ám nhẹ màu thương hiệu → tổng thể đậm và có chủ đề màu hơn */
    --ui-bg: color-mix(in srgb, var(--ui-brand) 7%, #eef1f6);
    --ui-surface: #ffffff;
    --ui-surface-2: #f7f9fc;
    --ui-surface-3: color-mix(in srgb, var(--ui-brand) 5%, #f1f4f9);
    --ui-border: color-mix(in srgb, var(--ui-brand) 10%, #e2e6ee);
    --ui-border-strong: color-mix(in srgb, var(--ui-brand) 14%, #d3d9e3);

    --ui-text: #0f172a;
    --ui-text-2: #334155;
    --ui-muted: #64748b;
    --ui-faint: #94a3b8;

    --ui-success: #16a34a;
    --ui-danger: #dc2626;
    --ui-warning: #d97706;
    --ui-info: #0284c7;

    --ui-radius-xs: 6px;
    --ui-radius-sm: 8px;
    --ui-radius: 12px;
    --ui-radius-lg: 16px;
    --ui-radius-xl: 20px;
    --ui-radius-pill: 999px;

    --ui-shadow-xs: 0 1px 2px rgba(15, 23, 42, .05), 0 3px 10px -6px rgba(15, 23, 42, .1);
    --ui-shadow-sm: 0 2px 4px rgba(15, 23, 42, .05), 0 8px 20px -10px rgba(15, 23, 42, .16);
    --ui-shadow-md: 0 14px 30px -10px rgba(15, 23, 42, .2), 0 3px 8px rgba(15, 23, 42, .06);
    --ui-shadow-lg: 0 28px 56px -18px rgba(15, 23, 42, .28);

    --ui-ease: cubic-bezier(.4, 0, .2, 1);
    --ui-fast: .18s var(--ui-ease);
    --ui-normal: .26s var(--ui-ease);

    /* Ánh xạ lại token của template gốc để toàn bộ trang đồng bộ tông màu */
    --body: var(--ui-bg);
    --border: var(--ui-border);
    --heading: var(--ui-text);
    --sub-heading: var(--ui-text);
    --text: var(--ui-text-2);
    --gray: var(--ui-muted);
    --chalk: var(--ui-surface-3);
    --primary-bshadow: var(--ui-shadow-md);
    --primary-tshadow: none;
}

/* ---------------------------------------------------------------------
   2. NỀN TẢNG
   (Không đặt font-family: dùng font cài trong Admin → Font Family;
    Admin để trống thì dùng font gốc của template)
   --------------------------------------------------------------------- */
body {
    font-size: 15px;
    line-height: 1.6;
    color: var(--ui-text-2);
    background: var(--ui-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--ui-text);
    font-weight: 700;
    letter-spacing: -.01em;
}

a {
    transition: color var(--ui-fast), background-color var(--ui-fast), border-color var(--ui-fast), box-shadow var(--ui-fast), transform var(--ui-fast);
}

::selection {
    background: var(--ui-brand-soft);
    color: var(--ui-text);
}

:focus-visible {
    outline: 2px solid var(--ui-brand);
    outline-offset: 2px;
}

/* Thanh cuộn mảnh, hiện đại */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--ui-border-strong) transparent;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--ui-border-strong);
    border-radius: var(--ui-radius-pill);
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ui-faint);
    background-clip: content-box;
}

.text-primary {
    color: var(--ui-brand) !important;
}

.text-muted,
.text-secondary {
    color: var(--ui-muted) !important;
}

/* Cột Bootstrap luôn giữ đúng tỉ lệ: nội dung không xuống dòng (VD dòng định dạng
   "User|Pass|2FA|...") không được đẩy cột rộng ra → tránh cột số dư bị rớt xuống
   dưới và thẻ sản phẩm tràn ngang. Chữ dài sẽ tự cắt bằng dấu "..." */
.row > *,
.feature-card > *,
.feature-content {
    min-width: 0;
}

/* Khung trang rộng hơn trên màn lớn (Bootstrap mặc định chỉ 1320px) */
@media (min-width: 1400px) {
    .container {
        max-width: 1440px;
    }
}

@media (min-width: 1600px) {
    .container {
        max-width: 1560px;
    }
}

/* ---------------------------------------------------------------------
   3. THANH TOP (header-top)
   --------------------------------------------------------------------- */
/* Thanh thông tin trên cùng: tràn hết bề ngang, nền gradient màu thương hiệu */
.header-top {
    position: relative;
    padding: 0;
    background: linear-gradient(90deg, var(--ui-brand-deep) 0%, var(--ui-brand) 100%);
    color: rgba(255, 255, 255, .9);
    font-size: 12.5px;
    border-bottom: 0;
}

/* Ánh sáng nhẹ cho đỡ phẳng */
.header-top::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(600px 80px at 85% 0%, rgba(255, 255, 255, .14), transparent 70%);
}

.header-top > .container {
    position: relative;
    z-index: 1;
}

.header-top .row {
    align-items: center;
    min-height: 40px;
}

/* ≥992px: dồn bộ chọn ngôn ngữ/tiền tệ sang phải, sát các link */
@media (min-width: 992px) {
    .header-top .row > [class*="col"] {
        flex: 0 0 auto;
        width: auto;
    }

    .header-top .row > [class*="col"]:first-child {
        flex: 1 1 0%;
        min-width: 0;
    }

    .header-top .row > [class*="col"]:nth-child(2) {
        order: 2;
    }

    .header-top .row > [class*="col"]:last-child {
        order: 1;
    }

    .header-top-select {
        justify-content: flex-end;
        padding-left: 16px;
        margin-left: 16px;
        border-left: 1px solid rgba(255, 255, 255, .14);
    }
}

.header-top-welcome p {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: .01em;
    color: rgba(255, 255, 255, .88);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Chấm màu thương hiệu nhấp nháy nhẹ trước dòng thông báo */
.header-top-welcome p::before {
    content: "";
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ui-brand);
    animation: ui-top-pulse 2.4s ease-out infinite;
}

@keyframes ui-top-pulse {
    0% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--ui-brand) 50%, transparent);
    }

    100% {
        box-shadow: 0 0 0 7px color-mix(in srgb, var(--ui-brand) 0%, transparent);
    }
}

.header-top-list li {
    display: inline-flex;
    align-items: center;
    margin-left: 14px;
}

/* Chấm nhỏ ngăn cách giữa các link */
.header-top-list li + li::before {
    content: "";
    width: 3px;
    height: 3px;
    margin-right: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .35);
}

.header-top-list li a {
    font-size: 12.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, .82);
}

.header-top-list li a:hover {
    color: #ffffff;
}

/* Bộ chọn ngôn ngữ / tiền tệ: viên kính mờ trên nền tối */
.header-top-select {
    gap: 6px;
    margin-top: 0;
}

.header-select {
    width: auto;
    padding: 3px 11px;
    border: 0 !important;
    border-radius: var(--ui-radius-pill);
    background: rgba(255, 255, 255, .08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
    transition: background-color var(--ui-fast), box-shadow var(--ui-fast);
}

.header-select:hover {
    background: rgba(255, 255, 255, .14);
}

.header-select i {
    margin-right: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, .75);
}

/* <select> gốc (kể cả ô chọn của GTranslate): bỏ nền trắng, thêm mũi tên riêng */
.header-select select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: auto;
    max-width: 150px;
    height: auto;
    margin: 0;
    padding: 0 16px 0 0;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 20px;
    color: #ffffff;
    border: 0 !important;
    outline: 0;
    box-shadow: none;
    cursor: pointer;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 6l4 4 4-4'/%3E%3C/svg%3E") no-repeat right center / 11px 11px !important;
}

.header-select select option {
    color: #111827;
    background: #ffffff;
}

/* Chrome/Edge bản mới: tạo kiểu cả danh sách đổ xuống của <select> gốc
   (customizable select). Trình duyệt chưa hỗ trợ sẽ bỏ qua khối này và
   hiển thị danh sách mặc định như cũ — không ảnh hưởng chức năng GTranslate. */
@supports (appearance: base-select) {
    .header-select select,
    .header-select select::picker(select) {
        appearance: base-select;
    }

    .header-select select {
        display: inline-flex;
        align-items: center;
        min-height: 0;
    }

    /* Đã có mũi tên riêng bằng ảnh nền → ẩn mũi tên mặc định */
    .header-select select::picker-icon {
        display: none;
    }

    .header-select select::picker(select) {
        margin-top: 10px;
        min-width: 210px;
        max-height: 340px;
        padding: 6px;
        overflow-y: auto;
        border: 1px solid var(--ui-border);
        border-radius: var(--ui-radius-lg);
        background: #ffffff;
        box-shadow: var(--ui-shadow-lg);
        opacity: 1;
        transform: translateY(0);
        transition: opacity .18s var(--ui-ease), transform .18s var(--ui-ease), overlay .18s allow-discrete, display .18s allow-discrete;
    }

    .header-select select:not(:open)::picker(select) {
        opacity: 0;
        transform: translateY(-6px);
    }

    @starting-style {
        .header-select select:open::picker(select) {
            opacity: 0;
            transform: translateY(-6px);
        }
    }

    .header-select select option {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        border-radius: var(--ui-radius-sm);
        font-size: 13.5px;
        font-weight: 500;
        color: var(--ui-text-2);
        background: transparent;
        cursor: pointer;
        transition: background-color var(--ui-fast), color var(--ui-fast);
    }

    .header-select select option:hover,
    .header-select select option:focus-visible {
        outline: none;
        color: var(--ui-brand);
        background: var(--ui-brand-softer);
    }

    .header-select select option:checked {
        font-weight: 700;
        color: var(--ui-brand-deep);
        background: var(--ui-brand-soft);
    }

    /* Dấu ✓ của mục đang chọn nằm bên phải */
    .header-select select option::checkmark {
        order: 1;
        margin-left: auto;
        color: var(--ui-brand);
    }

    /* Ẩn dòng "Select Language" (giá trị rỗng) khỏi danh sách */
    .header-select select option[value=""] {
        display: none;
    }
}

/* Ô chọn đã được nice-select xử lý */
.header-select .nice-select {
    height: auto;
    padding: 0 16px 0 0;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 20px;
    border: 0;
    background: transparent;
}

.header-select .nice-select .current {
    color: #ffffff;
}

.header-select .nice-select::after {
    right: 2px;
    width: 6px;
    height: 6px;
    border-right-color: #cbd5e1;
    border-bottom-color: #cbd5e1;
}

.header-select .nice-select .list {
    left: auto;
    right: 0;
    margin-top: 10px;
    border-radius: var(--ui-radius);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-lg);
}

.header-select .nice-select .option {
    min-height: 34px;
    line-height: 34px;
    font-size: 13px;
    color: var(--ui-text);
}

/* ---------------------------------------------------------------------
   4. HEADER CHÍNH
   --------------------------------------------------------------------- */
.header-part {
    background: var(--ui-surface);
    border-bottom: 1px solid var(--ui-border);
}

.header-part.active {
    background: color-mix(in srgb, #ffffff 86%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom-color: transparent;
    box-shadow: 0 8px 24px -14px rgba(16, 24, 40, .25);
}

.header-content {
    padding: 18px 0;
}

.header-part.active .header-content {
    padding: 12px 0;
}

.header-logo img {
    height: 66px;
    object-fit: contain;
}

.header-part.active .header-logo img {
    height: 56px;
}

/* Ô tìm kiếm dạng viên thuốc, viền màu thương hiệu */
.header-form {
    border-radius: var(--ui-radius-pill);
    background: var(--ui-surface);
    border: 2px solid color-mix(in srgb, var(--ui-brand) 30%, #e2e6ee);
    overflow: hidden;
    transition: background-color var(--ui-fast), border-color var(--ui-fast), box-shadow var(--ui-fast);
}

.header-form:hover {
    border-color: color-mix(in srgb, var(--ui-brand) 55%, #e2e6ee);
}

.header-form:focus-within,
.header-part.active .header-form {
    background: var(--ui-surface);
    border-color: var(--ui-brand);
    box-shadow: 0 0 0 4px var(--ui-brand-ring);
}

.header-form input {
    height: 50px;
    font-size: 15px;
    padding-left: 22px;
    color: var(--ui-text);
    background: transparent;
    border: 0;
    outline: none;
}

.header-form input::placeholder {
    color: var(--ui-faint);
}

.header-form button {
    background: transparent;
    border: 0;
    padding: 0 4px 0 0;
}

.header-form button i {
    width: 42px;
    height: 42px;
    line-height: 42px;
    border-radius: var(--ui-radius-pill);
    color: #ffffff;
    background: var(--ui-gradient);
    box-shadow: 0 6px 14px -6px var(--ui-brand-shadow);
}

.header-form button i:hover {
    color: #ffffff;
    transform: scale(1.05);
}

/* Nhóm icon bên phải header */
.header-widget-group .header-widget {
    margin-left: 10px;
}

/* Icon đơn hàng / yêu thích: nền nhạt màu thương hiệu, rê chuột thì đổ gradient */
.header-widget i {
    width: 46px;
    height: 46px;
    line-height: 46px;
    font-size: 17px;
    border-radius: var(--ui-radius);
    color: var(--ui-brand);
    background: var(--ui-brand-softer);
    border: 1px solid color-mix(in srgb, var(--ui-brand) 16%, transparent);
    transition: all var(--ui-fast);
}

.header-widget:hover i,
.header-part.active .header-widget:hover i {
    color: #ffffff;
    background: var(--ui-gradient);
    border-color: transparent;
    box-shadow: 0 8px 16px -8px var(--ui-brand-shadow);
    transform: translateY(-1px);
}

.header-widget sup {
    top: -7px;
    left: auto;
    right: -7px;
    min-width: 20px;
    width: auto;
    height: 20px;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    border-radius: var(--ui-radius-pill);
    background: var(--ui-danger);
    border: 2px solid #ffffff;
}

.header-widget img {
    width: 46px;
    height: 46px;
    border-radius: var(--ui-radius);
    object-fit: cover;
    border: 2px solid var(--ui-surface);
    box-shadow: 0 0 0 1px var(--ui-border);
}

/* Khối tài khoản: tên + số dư */
.header-widget span {
    margin-left: 10px;
    line-height: 1.25;
}

.header-widget span p {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--ui-muted);
    letter-spacing: .02em;
}

.header-widget span p + p,
.header-widget span p[style] {
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--ui-brand) !important;
}

/* Nút "Nạp tiền" nổi bật dạng viên gradient */
.header-part .header-widget.header-cart {
    height: 46px;
    padding: 0 18px 0 6px;
    border: 0;
    border-radius: var(--ui-radius-pill);
    color: #ffffff;
    background: var(--ui-gradient);
    box-shadow: 0 8px 18px -8px var(--ui-brand-shadow);
    transition: transform var(--ui-fast), filter var(--ui-fast), box-shadow var(--ui-fast);
}

.header-part .header-widget.header-cart:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 12px 22px -10px var(--ui-brand-shadow);
}

.header-part .header-widget.header-cart i,
.header-part .header-widget.header-cart:hover i,
.header-part.active .header-widget.header-cart:hover i {
    width: 34px;
    height: 34px;
    line-height: 34px;
    font-size: 15px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, .2);
    transform: none;
}

.header-part .header-widget.header-cart .header-cart-label,
.header-part .header-widget.header-cart:hover .header-cart-label {
    margin-left: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

/* Khối tài khoản dạng chip: avatar + tên + số dư */
.header-widget-group .header-widget:last-child {
    padding: 4px 14px 4px 4px;
    border-radius: var(--ui-radius-pill);
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    transition: border-color var(--ui-fast), background-color var(--ui-fast);
}

.header-widget-group .header-widget:last-child:hover {
    border-color: var(--ui-brand-ring);
    background: var(--ui-brand-softer);
}

.header-widget-group .header-widget:last-child img {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    box-shadow: none;
}

/* 992–1199px: template ẩn chữ trong header-widget → bỏ phần đệm dành cho chữ */
@media (min-width: 992px) and (max-width: 1199px) {
    .header-part .header-widget.header-cart {
        padding: 0 5px;
    }

    .header-widget-group .header-widget:last-child {
        padding: 4px;
    }
}

/* Nút menu/tìm kiếm trên mobile */
.header-user i,
.header-src i {
    width: 42px;
    height: 42px;
    line-height: 42px;
    border-radius: var(--ui-radius);
    color: var(--ui-text-2);
    background: var(--ui-surface-3);
    border: 1px solid var(--ui-border);
}

.header-src i:hover,
.header-user i:hover {
    color: var(--ui-brand);
    background: var(--ui-brand-soft);
}

/* ---------------------------------------------------------------------
   5. THANH ĐIỀU HƯỚNG + DROPDOWN + MEGAMENU
   Định vị lại dropdown theo phần tử cha (thay vì toạ độ pixel cố định)
   để không bị lệch khi chiều cao header thay đổi.
   --------------------------------------------------------------------- */
/* Thanh menu: thẻ trắng bo tròn nổi trên nền trang (dưới hàng logo trắng) */
.navbar-part {
    position: relative;
    z-index: 2;
    padding: 14px 0 4px;
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
}

.navbar-part::before {
    display: none;
}

.navbar-content {
    padding: 0 8px 0 6px;
    border-radius: var(--ui-radius-lg);
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-sm);
}

/* Ẩn chip Hotline / Email nếu Admin để trống nội dung */
.navbar-info:has(p span:empty) {
    display: none;
}

/* Container nổi trên lớp ánh sáng; đồng thời là mốc định vị cho megamenu
   (canh giữa theo container, nằm sát mép dưới thanh menu) */
.navbar-part > .container {
    position: relative;
    z-index: 1;
}

.navbar-part > .container > .row,
.navbar-part > .container > .row > [class*="col"],
.navbar-content,
.navbar-list {
    position: static;
}

.navbar-content {
    border-top: 0;
}

.navbar-item {
    margin-right: 4px;
}

.navbar-item.dropdown {
    position: relative;
}

.navbar-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 15px;
    margin: 8px 0;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ui-text);
    border-radius: var(--ui-radius);
}

/* Rê chuột: viên gradient màu thương hiệu, chữ trắng */
.navbar-link:hover,
.navbar-item:hover > .navbar-link {
    color: #ffffff;
    background: var(--ui-gradient);
    box-shadow: 0 8px 18px -10px var(--ui-brand-shadow);
}

.navbar-link i {
    font-size: 13.5px;
    color: var(--ui-brand-fg);
    transition: color var(--ui-fast), transform var(--ui-fast);
}

.navbar-link:hover i,
.navbar-item:hover > .navbar-link i {
    color: #ffffff;
    transform: translateY(-1px);
}

/* Hotline / Email bên phải: thẻ nhỏ, icon trong ô gradient */
.navbar-info {
    margin: 6px 0 6px 8px;
    padding: 6px 16px 6px 6px;
    border-radius: var(--ui-radius);
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-xs);
}

.navbar-info i {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 14px;
    border-radius: 10px;
    color: #ffffff;
    background: var(--ui-gradient);
    box-shadow: 0 6px 14px -8px var(--ui-brand);
}

.navbar-info p {
    margin: 0;
    line-height: 1.25;
}

.navbar-info p small {
    font-size: 11px;
    font-weight: 600;
    color: var(--ui-muted);
}

.navbar-info p span {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ui-text);
}

/* Dropdown thường */
.dropdown-position-list {
    top: calc(100% + 14px);
    min-width: 230px;
    width: auto;
    padding: 8px;
    border-radius: var(--ui-radius-lg);
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-lg);
    transition: opacity var(--ui-normal), top var(--ui-normal), visibility var(--ui-normal);
}

.dropdown:hover .dropdown-position-list {
    top: 100%;
}

.dropdown-position-list::before {
    display: none;
}

.dropdown-position-list li {
    margin-left: 0;
}

.dropdown-position-list li a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    padding: 9px 12px;
    border-radius: var(--ui-radius-sm);
    color: var(--ui-text-2);
    background: transparent;
}

.dropdown-position-list li a:hover {
    color: var(--ui-brand);
    background: var(--ui-brand-softer);
    padding-left: 15px;
}

/* Megamenu */
.megamenu {
    top: calc(100% + 14px);
    width: min(1440px, calc(100vw - 32px));
    padding: 26px;
    border-radius: var(--ui-radius-xl);
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-lg);
    transition: opacity var(--ui-normal), top var(--ui-normal), visibility var(--ui-normal);
}

.dropdown-megamenu:hover .megamenu {
    top: 100%;
}

.megamenu-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ui-text);
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.megamenu-title::before {
    width: 32px;
    height: 3px;
    border-radius: var(--ui-radius-pill);
    background: var(--ui-gradient);
}

.megamenu-list {
    border-left: 0;
}

.megamenu-list li {
    margin-left: 0;
}

.megamenu-list li a {
    display: block;
    font-size: 14px;
    padding: 7px 10px;
    border-radius: var(--ui-radius-sm);
    color: var(--ui-text-2);
    overflow: hidden;
    text-overflow: ellipsis;
}

.megamenu-list li a:hover {
    color: var(--ui-brand);
    background: var(--ui-brand-softer);
}

/* ---------------------------------------------------------------------
   6. SIDEBAR OFF-CANVAS (mobile)
   --------------------------------------------------------------------- */
.nav-sidebar,
.category-sidebar,
.cart-sidebar {
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow-lg);
}

.nav-sidebar,
.category-sidebar {
    border-radius: 0 var(--ui-radius-xl) var(--ui-radius-xl) 0;
}

.cart-sidebar {
    border-radius: var(--ui-radius-xl) 0 0 var(--ui-radius-xl);
}

.nav-header,
.category-header,
.cart-header {
    border-bottom: 1px solid var(--ui-border);
}

.nav-link,
.category-link {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--ui-text-2);
    border-radius: var(--ui-radius-sm);
}

.nav-link:hover,
.category-link:hover {
    color: var(--ui-brand);
    background: var(--ui-brand-softer);
}

.nav-link i,
.category-link i {
    color: var(--ui-brand);
}

.category-link i {
    font-size: 20px;
}

.dropdown-list li a {
    font-size: 14px;
    border-radius: var(--ui-radius-sm);
    color: var(--ui-text-2);
}

.dropdown-list li a:hover {
    color: var(--ui-brand);
    background: var(--ui-brand-softer);
}

.backdrop {
    background: rgba(17, 24, 39, .45);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

/* ---------------------------------------------------------------------
   7. MENU ĐÁY TRÊN MOBILE
   --------------------------------------------------------------------- */
.mobile-menu {
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    border-radius: var(--ui-radius-xl) var(--ui-radius-xl) 0 0;
    background: color-mix(in srgb, #ffffff 92%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--ui-border);
    box-shadow: 0 -10px 30px -12px rgba(16, 24, 40, .2);
}

.mobile-menu a,
.mobile-menu button {
    border-radius: var(--ui-radius) !important;
    padding: 7px 0;
    background: transparent;
    border: 0;
}

.mobile-menu a i,
.mobile-menu button i {
    font-size: 18px;
    margin-bottom: 4px;
    color: var(--ui-muted);
    text-shadow: none;
}

.mobile-menu a span,
.mobile-menu button span {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--ui-muted);
}

.mobile-menu a:hover,
.mobile-menu button:hover {
    background: var(--ui-brand-softer);
}

.mobile-menu .mobile-menu-active,
.mobile-menu-active {
    background: var(--ui-brand-soft) !important;
    border-top: 0;
}

.mobile-menu .mobile-menu-active i,
.mobile-menu .mobile-menu-active span,
.mobile-menu a:hover i,
.mobile-menu a:hover span,
.mobile-menu button:hover i,
.mobile-menu button:hover span {
    color: var(--ui-brand);
}

/* ---------------------------------------------------------------------
   8. TIÊU ĐỀ KHU VỰC (home-heading)
   --------------------------------------------------------------------- */
.home-heading h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--ui-text);
    gap: 8px;
}

/* Tiêu đề theo màu site: gradient Màu chủ đạo → Màu phụ + ánh sáng nhẹ */
.home-heading h3:not(.no-bg) {
    position: relative;
    color: #ffffff;
    background: var(--ui-brand-bar) !important;
    padding: 12px 18px 12px 12px;
    border: 0;
    border-radius: var(--ui-radius-lg);
    box-shadow: 0 12px 24px -16px var(--ui-brand-shadow);
    overflow: hidden;
    isolation: isolate;
}

.home-heading h3 i {
    color: var(--ui-brand);
}

/* Icon trong ô kính mờ (đè class m-2 của Bootstrap) */
.home-heading h3:not(.no-bg) > i {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    margin: 0 6px 0 0 !important;
    font-size: 15px;
    color: #ffffff;
    border-radius: var(--ui-radius-sm);
    background: rgba(255, 255, 255, .18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}

.home-heading h3:not(.no-bg) img {
    background: #ffffff;
    padding: 3px;
}

/* Từ khoá tìm kiếm (inline color:red) → viên trắng mờ cho dễ đọc trên gradient */
.home-heading h3:not(.no-bg) strong[style] {
    margin-left: 4px;
    padding: 1px 8px;
    color: #ffffff !important;
    border-radius: var(--ui-radius-xs);
    background: rgba(255, 255, 255, .2);
}

.home-heading h3 img {
    height: 28px;
    border-radius: var(--ui-radius-xs);
}

/* ---------------------------------------------------------------------
   9. BỘ LỌC DANH MỤC TRANG CHỦ (chip)
   --------------------------------------------------------------------- */
ul.custom-button-list {
    gap: 8px;
    padding: 6px 0 14px;
}

ul.custom-button-list li {
    flex: 0 0 auto;
    margin-left: 0;
}

.btn-category-home {
    display: inline-flex;
    align-items: center;
    width: auto;
    padding: 9px 16px;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: var(--ui-radius-pill);
    color: var(--ui-text-2);
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-xs);
}

.btn-category-home:hover,
.btn-category-home:focus {
    color: var(--ui-brand);
    background: var(--ui-brand-softer);
    border-color: var(--ui-brand-ring);
}

.btn-category-home.active {
    color: #ffffff;
    background: var(--ui-gradient);
    border-color: transparent;
    box-shadow: 0 8px 18px -8px var(--ui-brand-shadow);
}

.btn-category-home img {
    border-radius: var(--ui-radius-xs);
}

.skeleton-category-btn {
    border-radius: var(--ui-radius-pill);
}

/* Mobile: danh mục thành 1 hàng vuốt ngang (kiểu app), mép phải mờ dần */
@media (max-width: 767px) {
    ul.custom-button-list {
        flex-wrap: nowrap;
        gap: 8px;
        margin: 0 -12px;
        padding: 4px 12px 14px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x proximity;
        scroll-padding-left: 12px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 82%, transparent 100%);
        mask-image: linear-gradient(90deg, #000 0%, #000 82%, transparent 100%);
    }

    ul.custom-button-list::-webkit-scrollbar {
        display: none;
    }

    ul.custom-button-list li {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .btn-category-home {
        gap: 7px;
        padding: 8px 14px 8px 8px;
        font-size: 13px;
        white-space: nowrap;
        box-shadow: none;
    }

    /* Icon danh mục / icon giỏ hàng nằm trong ô tròn */
    .btn-category-home img,
    .btn-category-home i {
        flex: 0 0 26px;
        width: 26px;
        height: 26px;
        margin: 0 !important;
        border-radius: 50%;
        object-fit: contain;
    }

    .btn-category-home img {
        padding: 3px;
        background: var(--ui-surface-3);
    }

    .btn-category-home i {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        background: rgba(255, 255, 255, .2);
    }

    .btn-category-home:not(.active) i {
        color: var(--ui-brand);
        background: var(--ui-brand-soft);
    }

    .btn-category-home.active img {
        background: #ffffff;
    }
}

/* ---------------------------------------------------------------------
   10. THẺ SẢN PHẨM (feature-card)
   --------------------------------------------------------------------- */
.feature-card {
    padding: 16px 18px;
    margin-bottom: 14px;
    border-radius: var(--ui-radius-lg);
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-xs);
    transition: transform var(--ui-normal), box-shadow var(--ui-normal), border-color var(--ui-normal);
}

.feature-card:hover {
    border: 1px solid var(--ui-brand-ring);
    box-shadow: var(--ui-shadow-md);
    transform: translateY(-2px);
}

.feature-content {
    padding-left: 0;
    margin-left: 0;
    border-left: none;
}

.feature-name {
    margin-bottom: 6px;
    font-size: 15.5px;
    line-height: 1.45;
}

.feature-name a {
    font-weight: 700;
    color: var(--ui-text);
}

.feature-name a:hover {
    color: var(--ui-brand);
}

.feature-desc {
    font-size: 13px;
    line-height: 1.5;
    color: var(--ui-muted);
}

.feature-desc i {
    color: var(--ui-brand);
    font-size: 11px;
    margin-right: 3px;
}

.feature-rating i {
    font-size: 13px;
    color: var(--ui-border-strong);
}

.feature-rating i.active {
    color: #f59e0b;
}

/* Nhãn kho / đã bán / giảm giá: dạng viên mềm */
.label-text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    padding: 4px 10px;
    margin: 0 4px 5px 0;
    border-radius: var(--ui-radius-pill);
}

.label-text.feat {
    color: color-mix(in srgb, var(--ui-brand) 85%, #000000);
    background: var(--ui-brand-soft);
}

.label-text.order {
    color: #0369a1;
    background: #e0f2fe;
}

.label-text.off {
    color: #b91c1c;
    background: #fee2e2;
}

.label-text.new {
    color: #15803d;
    background: #dcfce7;
}

.label-text.sale {
    color: #c2410c;
    background: #ffedd5;
}

.label-text.rate {
    color: #a16207;
    background: #fef9c3;
}

/* Mã sản phẩm (ID) */
.label-text.pid {
    color: #334155;
    background: #eef2f7;
    border: 1px solid #e2e8f0;
}

.label-text.pid b,
.label-text.pid strong {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 700;
    color: #0f172a;
}

/* Giá */
.feature-price {
    font-size: 17px;
}

.feature-price span {
    color: var(--ui-brand);
    font-weight: 800;
    letter-spacing: -.01em;
}

.feature-price del {
    color: var(--ui-faint);
    font-weight: 500;
    font-size: .85em;
}

.card-price-product-list {
    height: auto;
    min-height: 40px;
    padding: 6px 12px;
    margin-bottom: 10px;
    border-radius: var(--ui-radius);
    background: var(--ui-brand-soft);
    border: 1px solid color-mix(in srgb, var(--ui-brand) 20%, transparent);
}

.card-price-product-list .feature-price span {
    color: var(--ui-brand-deep);
}

/* Nút MUA NGAY / CHI TIẾT */
.btn-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 12px;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: .03em;
    border: 0;
    border-radius: var(--ui-radius);
    color: #ffffff;
    background: var(--ui-gradient) !important;
    box-shadow: 0 8px 18px -8px var(--ui-brand-shadow);
    transition: transform var(--ui-fast), box-shadow var(--ui-fast), filter var(--ui-fast);
}

.btn-buy:hover {
    color: #ffffff;
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow: 0 12px 22px -10px var(--ui-brand-shadow);
}

.btn-buy:active {
    transform: translateY(0);
}

.btn-more {
    gap: 6px;
    padding: 9px 12px;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: var(--ui-radius);
    color: var(--ui-text-2);
    background: var(--ui-surface-3);
    border: 1px solid var(--ui-border);
}

.btn-more:hover {
    color: var(--ui-brand);
    background: var(--ui-brand-softer);
    border-color: var(--ui-brand-ring);
    box-shadow: none;
    transform: translateY(-1px);
}

/* Ảnh sản phẩm */
.product-image-square,
.product-image-box6 {
    border-radius: var(--ui-radius);
    box-shadow: none;
    border: 1px solid var(--ui-border);
    background: var(--ui-surface-2);
}

/* Hết hàng: phủ mờ + nhãn góc phải */
.feature-card.product-disable {
    filter: saturate(.6);
}

.feature-card.product-disable:hover {
    transform: none;
}

.product-disable::after {
    border-radius: var(--ui-radius-lg);
    background: rgba(255, 255, 255, .55);
}

.feature-card.product-disable::before {
    top: 12px;
    left: auto;
    right: 12px;
    width: auto;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    border-radius: var(--ui-radius-pill);
    transform: none;
    -webkit-transform: none;
    color: #ffffff;
    background: rgba(17, 24, 39, .82);
    text-shadow: none;
}

/* Skeleton tải sản phẩm */
.skeleton-card {
    border-radius: var(--ui-radius-lg);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-xs);
}

.skeleton-image,
.skeleton-title,
.skeleton-text,
.skeleton-stock,
.skeleton-sales,
.skeleton-price,
.skeleton-button,
.skeleton-category-btn,
.skeleton-menu-item,
.skeleton-menu-title {
    background: linear-gradient(90deg, #eef1f6 25%, #e3e7ef 50%, #eef1f6 75%);
    background-size: 200% 100%;
}

.loading-dots span {
    background: var(--ui-gradient);
}

.loading-text {
    color: var(--ui-muted);
    font-size: 14px;
}

/* ---------------------------------------------------------------------
   11. CARD TÀI KHOẢN / KHỐI NỘI DUNG
   --------------------------------------------------------------------- */
.account-card {
    margin-bottom: 24px;
    padding: 4px 26px 26px;
    border-radius: var(--ui-radius-xl);
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-sm);
}

.account-title {
    padding: 18px 0 14px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--ui-border);
}

.account-title::before {
    bottom: -1px;
    width: 44px;
    height: 3px;
    border-radius: var(--ui-radius-pill);
    background: var(--ui-gradient);
}

.account-title h3,
.account-title h4,
.account-title h5 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--ui-text);
}

.account-title button,
.account-title a {
    font-size: 13.5px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: var(--ui-radius-sm);
    background: var(--ui-gradient);
    box-shadow: 0 6px 14px -8px var(--ui-brand-shadow);
}

.account-title a:hover,
.account-title button:hover {
    filter: brightness(1.06);
    background: var(--ui-gradient);
}

@media (max-width: 575px) {
    .account-card {
        padding: 2px 16px 18px;
        border-radius: var(--ui-radius-lg);
    }
}

/* Ví (trang chủ / hồ sơ) */
.my-wallet h3 {
    font-size: 30px;
    font-weight: 800;
    background: var(--ui-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.wallet-card-group {
    grid-gap: 12px;
}

.wallet-card {
    padding: 18px;
    border-radius: var(--ui-radius-lg);
    background: var(--ui-surface-2);
    border: 1px solid var(--ui-border);
}

.wallet-card:hover {
    background: var(--ui-gradient);
    border-color: transparent;
    box-shadow: 0 12px 24px -12px var(--ui-brand-shadow);
}

.wallet-card p {
    font-size: 13px;
    font-weight: 500;
    color: var(--ui-muted);
}

.wallet-card h3 {
    font-size: 20px;
    font-weight: 800;
}

/* Khối số dư cột phải trang chủ (col-xl-3): luôn vừa khít cột 25%.
   wallet.css đặt lưới tối thiểu 200px/ô + số tiền chữ lớn không ngắt được
   → cột bị phình và rớt xuống dưới danh sách sản phẩm. */
.account-card.card-wallet-home {
    padding: 14px !important;
    border-radius: var(--ui-radius-xl);
}

/* Thẻ số dư theo màu site: gradient Màu chủ đạo → Màu phụ, icon ví trong ô kính mờ */
.card-wallet-home .my-wallet {
    position: relative;
    margin-bottom: 14px;
    padding: 18px 18px 20px;
    border-radius: var(--ui-radius-lg);
    color: #ffffff;
    background: var(--ui-brand-bg);
    box-shadow: 0 14px 28px -16px var(--ui-brand-shadow);
    overflow: hidden;
    isolation: isolate;
}

.card-wallet-home .my-wallet::after {
    content: "\f555";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #ffffff;
    border-radius: var(--ui-radius);
    background: rgba(255, 255, 255, .18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}

.card-wallet-home .my-wallet p {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: rgba(255, 255, 255, .8);
}

.account-card.card-wallet-home .my-wallet h3 {
    margin: 0;
    padding-right: 44px;
    font-size: clamp(20px, 1.7vw, 28px);
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff;
    background: none;
    -webkit-text-fill-color: #ffffff;
    overflow-wrap: anywhere;
}

/* 3 dòng thống kê có icon màu riêng */
.card-wallet-home .wallet-card-group {
    grid-template-columns: minmax(0, 1fr);
    grid-gap: 8px;
}

.card-wallet-home .wallet-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    column-gap: 12px;
    align-items: center;
    padding: 11px 12px;
    border-radius: var(--ui-radius);
    background: var(--ui-surface-2);
    border: 1px solid var(--ui-border);
    transition: background-color var(--ui-fast), border-color var(--ui-fast), box-shadow var(--ui-fast), transform var(--ui-fast);
}

.card-wallet-home .wallet-card::before {
    grid-row: 1 / span 2;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 15px;
    border-radius: 11px;
}

.card-wallet-home .wallet-card:nth-child(1)::before {
    content: "\f51e";
    color: #15803d;
    background: #dcfce7;
}

.card-wallet-home .wallet-card:nth-child(2)::before {
    content: "\f07a";
    color: #c2410c;
    background: #ffedd5;
}

.card-wallet-home .wallet-card:nth-child(3)::before {
    content: "\f02b";
    color: var(--ui-brand);
    background: var(--ui-brand-soft);
}

.card-wallet-home .wallet-card p,
.card-wallet-home .wallet-card:hover p {
    grid-column: 2;
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--ui-muted);
}

.card-wallet-home .wallet-card h3,
.card-wallet-home .wallet-card:hover h3 {
    grid-column: 2;
    margin: 2px 0 0;
    font-size: clamp(14px, 1.05vw, 16.5px);
    font-weight: 800;
    line-height: 1.3;
    color: var(--ui-text);
    overflow-wrap: anywhere;
}

.card-wallet-home .wallet-card:hover {
    background: var(--ui-surface);
    border-color: var(--ui-brand-ring);
    box-shadow: var(--ui-shadow-xs);
    transform: translateX(2px);
}

/* Khối chưa đăng nhập: lời chào trên thẻ gradient + 2 nút Đăng nhập / Đăng ký */
.card-wallet-home .wallet-guest {
    position: relative;
    margin-bottom: 14px;
    padding: 22px 18px 20px;
    text-align: center;
    color: #ffffff;
    border-radius: var(--ui-radius-lg);
    background: var(--ui-brand-bg);
    box-shadow: 0 14px 28px -16px var(--ui-brand-shadow);
    overflow: hidden;
    isolation: isolate;
}

.card-wallet-home .wallet-guest-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    color: #ffffff;
    border-radius: var(--ui-radius-lg);
    background: rgba(255, 255, 255, .18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}

.card-wallet-home .wallet-guest-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
}

.card-wallet-home .wallet-guest-desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(255, 255, 255, .86);
}

.card-wallet-home .user-form-social {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.card-wallet-home .user-form-social li {
    margin: 0;
}

.card-wallet-home .user-form-social li a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 14px;
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: .04em;
    border-radius: var(--ui-radius);
    box-shadow: none;
    transition: transform var(--ui-fast), filter var(--ui-fast), background-color var(--ui-fast), box-shadow var(--ui-fast);
}

/* Đăng nhập: nền đặc tông đậm màu thương hiệu */
.card-wallet-home .user-form-social li a.facebook {
    color: #ffffff;
    background: var(--ui-brand-deep);
    border: 0;
    box-shadow: 0 10px 20px -12px var(--ui-brand-shadow);
}

.card-wallet-home .user-form-social li a.facebook:hover {
    color: #ffffff;
    filter: brightness(1.12);
    transform: translateY(-1px);
}

/* Đăng ký: nền nhạt, viền màu thương hiệu */
.card-wallet-home .user-form-social li a.google {
    color: var(--ui-brand-deep);
    background: var(--ui-brand-softer);
    border: 1px solid var(--ui-brand-ring);
}

.card-wallet-home .user-form-social li a.google:hover {
    color: var(--ui-brand-deep);
    background: var(--ui-brand-soft);
    transform: translateY(-1px);
}

/* Khoá bố cục 2 cột trang chủ (≥1200px): cột số dư cố định 25%, cột sản phẩm
   co giãn lấp phần còn lại (flex-basis 0) → hàng không thể bị tràn và xuống dòng,
   bất kể nội dung bên trong dài ngắn thế nào. */
@media (min-width: 1200px) {
    .row:has(> .col-xl-3 > .card-wallet-home) > .col-xl-9 {
        flex: 1 1 0% !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
    }

    .row:has(> .col-xl-3 > .card-wallet-home) > .col-xl-3 {
        flex: 0 0 25% !important;
        width: 25% !important;
        max-width: 25% !important;
        min-width: 0 !important;
    }
}

/* Thông tin ngân hàng / nạp tiền */
.bank-card {
    border-radius: var(--ui-radius-lg);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-xs);
    overflow: hidden;
}

.bank-info-row {
    border-radius: var(--ui-radius-sm);
}

.bank-info-label {
    color: var(--ui-muted);
    font-weight: 500;
}

.bank-info-value {
    color: var(--ui-text);
    font-weight: 700;
}

/* Trạng thái rỗng */
.empty-state {
    padding: 40px 20px;
    text-align: center;
    border-radius: var(--ui-radius-lg);
    background: var(--ui-surface);
    border: 1px dashed var(--ui-border-strong);
    color: var(--ui-muted);
}

/* Menu bên trái trang Hồ sơ (views/client/sidebar.php) */
.sidebar_profile {
    display: block;
    margin-bottom: 8px;
    padding: 11px 14px;
    border-radius: var(--ui-radius);
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-xs);
    transition: border-color var(--ui-fast), transform var(--ui-fast), background-color var(--ui-fast);
}

.sidebar_profile h6 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--ui-text-2);
}

.sidebar_profile h6 i {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: 10px;
    color: var(--ui-brand-fg);
    background: var(--ui-brand-softer);
}

.sidebar_profile:hover {
    border-color: var(--ui-brand-ring);
    transform: translateX(3px);
}

.sidebar_profile:hover h6 {
    color: var(--ui-brand-fg);
}

/* Mục đang mở (helper trả về class mobile-menu-active) */
.sidebar_profile.mobile-menu-active {
    background: var(--ui-brand-bar) !important;
    border-color: transparent;
    box-shadow: 0 12px 24px -16px var(--ui-brand-shadow);
}

.sidebar_profile.mobile-menu-active h6 {
    color: #ffffff;
}

.sidebar_profile.mobile-menu-active h6 i {
    color: #ffffff;
    background: rgba(255, 255, 255, .18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}

/* Thẻ trang Liên hệ */
.contact-card {
    border-radius: var(--ui-radius-xl);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-xs);
}

.contact-card:hover,
.contact-card.active {
    background: var(--ui-gradient);
    border-color: transparent;
    box-shadow: 0 14px 28px -16px var(--ui-brand-shadow);
}

/* ---------------------------------------------------------------------
   12. FORM
   --------------------------------------------------------------------- */
.form-control,
.form-select {
    height: 44px;
    font-size: 14.5px;
    padding: 0 14px;
    color: var(--ui-text);
    background-color: var(--ui-surface);
    border: 1px solid var(--ui-border-strong);
    border-radius: var(--ui-radius);
    box-shadow: var(--ui-shadow-xs);
    transition: border-color var(--ui-fast), box-shadow var(--ui-fast), background-color var(--ui-fast);
}

.form-select {
    padding-right: 36px;
}

textarea.form-control {
    height: auto;
    padding: 11px 14px;
    line-height: 1.55;
}

.form-control:focus,
.form-control:focus-within,
.form-select:focus {
    color: var(--ui-text);
    background-color: var(--ui-surface);
    border-color: var(--ui-brand);
    box-shadow: 0 0 0 4px var(--ui-brand-ring);
    outline: 0;
}

.form-control::placeholder {
    color: var(--ui-faint);
}

.form-control:disabled,
.form-control[readonly] {
    background-color: var(--ui-surface-3);
    color: var(--ui-text-2);
}

.form-label,
.col-form-label,
.filter-label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ui-text-2);
}

.input-group-text {
    font-size: 14px;
    color: var(--ui-muted);
    background: var(--ui-surface-3);
    border: 1px solid var(--ui-border-strong);
    border-radius: var(--ui-radius);
}

.input-group > .form-control,
.input-group > .form-select {
    box-shadow: none;
}

.form-check-input {
    border-color: var(--ui-border-strong);
}

.form-check-input:checked {
    background-color: var(--ui-brand);
    border-color: var(--ui-brand);
}

.form-check-input:focus {
    border-color: var(--ui-brand);
    box-shadow: 0 0 0 4px var(--ui-brand-ring);
}

.wallet-form input {
    border-radius: var(--ui-radius);
    background: var(--ui-surface);
    border: 1px solid var(--ui-border-strong);
}

.wallet-form input:focus-within {
    border-color: var(--ui-brand);
    box-shadow: 0 0 0 4px var(--ui-brand-ring);
}

/* ---------------------------------------------------------------------
   13. NÚT BẤM
   --------------------------------------------------------------------- */
.btn {
    font-weight: 600;
    border-radius: var(--ui-radius);
    transition: transform var(--ui-fast), box-shadow var(--ui-fast), filter var(--ui-fast), background-color var(--ui-fast), border-color var(--ui-fast), color var(--ui-fast);
}

.btn:not(.btn-sm):not(.btn-lg) {
    padding: 9px 18px;
}

.btn-sm {
    font-size: 12.5px;
    padding: 6px 12px;
    border-radius: var(--ui-radius-sm);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn:focus {
    box-shadow: 0 0 0 4px var(--ui-brand-ring);
}

.btn-primary,
.form-btn,
.form-button button,
.form-button .btn {
    color: #ffffff;
    background: var(--ui-gradient);
    border: 0;
    box-shadow: 0 8px 18px -10px var(--ui-brand-shadow);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.form-btn:hover,
.form-button button:hover {
    color: #ffffff;
    background: var(--ui-gradient);
    filter: brightness(1.07);
    box-shadow: 0 12px 22px -10px var(--ui-brand-shadow);
}

.form-btn,
.form-button button {
    height: 46px;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: .02em;
    border-radius: var(--ui-radius);
}

.btn-secondary {
    color: var(--ui-text-2);
    background: var(--ui-surface-3);
    border: 1px solid var(--ui-border-strong);
}

.btn-secondary:hover,
.btn-secondary:focus {
    color: var(--ui-text);
    background: #e7ebf2;
    border-color: var(--ui-border-strong);
}

.btn-danger {
    background: var(--ui-danger);
    border-color: var(--ui-danger);
}

.btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

.btn-success {
    background: var(--ui-success);
    border-color: var(--ui-success);
}

.btn-success:hover {
    background: #15803d;
    border-color: #15803d;
}

.btn-info {
    color: #ffffff;
    background: var(--ui-info);
    border-color: var(--ui-info);
}

.btn-info:hover {
    color: #ffffff;
    background: #0369a1;
    border-color: #0369a1;
}

.btn-warning {
    color: #ffffff;
    background: var(--ui-warning);
    border-color: var(--ui-warning);
}

.btn-warning:hover {
    color: #ffffff;
    background: #b45309;
    border-color: #b45309;
}

/* ---------------------------------------------------------------------
   14. BẢNG
   --------------------------------------------------------------------- */
.table-scroll {
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-lg);
    background: var(--ui-surface);
    overflow: auto;
}

.table {
    margin-bottom: 0;
    color: var(--ui-text-2);
    border-color: var(--ui-border);
}

thead tr,
.table thead tr {
    background: var(--ui-surface-2);
}

.table thead th,
thead tr th {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--ui-muted);
    background: var(--ui-surface-2);
    padding: 12px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--ui-border);
    white-space: nowrap;
}

thead tr th:first-child,
thead tr th:last-child {
    border-radius: 0;
}

.table > tbody > tr > td,
tbody tr td {
    padding: 12px 16px;
    font-size: 14px;
    vertical-align: middle;
    border-color: var(--ui-border);
}

tbody tr {
    border-bottom: 1px solid var(--ui-border);
}

tbody tr:last-child {
    border-bottom: 0;
}

.table-hover > tbody > tr:hover > * {
    --bs-table-accent-bg: var(--ui-brand-softer);
    color: var(--ui-text);
}

/* Ô ghi chú cá nhân trong bảng đơn hàng */
textarea.saveNote {
    width: 100%;
    min-width: 150px;
    min-height: 34px;
    padding: 6px 10px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--ui-text);
    border-radius: var(--ui-radius-sm);
    background: var(--ui-surface);
    border: 1px solid var(--ui-border-strong);
    resize: vertical;
    outline: none;
    transition: border-color var(--ui-fast), box-shadow var(--ui-fast);
}

textarea.saveNote:focus {
    border-color: var(--ui-brand);
    box-shadow: 0 0 0 3px var(--ui-brand-ring);
}

/* Thanh lọc + phân trang */
.top-filter {
    gap: 10px;
    margin-bottom: 14px;
}

.filter-select {
    border-radius: var(--ui-radius);
    border: 1px solid var(--ui-border-strong);
    background: var(--ui-surface);
}

.bottom-paginate {
    margin-top: 16px;
}

.page-info {
    font-size: 13.5px;
    color: var(--ui-muted);
}

.page-item {
    margin-left: 6px;
}

.page-link,
.page-item:first-child .page-link,
.page-item:last-child .page-link {
    width: 38px;
    height: 38px;
    line-height: 36px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--ui-radius-sm);
    color: var(--ui-text-2);
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
}

.page-link:hover {
    color: var(--ui-brand);
    background: var(--ui-brand-softer);
    border-color: var(--ui-brand-ring);
}

.page-item .active,
.page-item.active .page-link {
    color: #ffffff;
    background: var(--ui-gradient);
    border-color: transparent;
    box-shadow: 0 6px 14px -8px var(--ui-brand-shadow);
}

/* ---------------------------------------------------------------------
   15. BADGE / ALERT / MODAL
   --------------------------------------------------------------------- */
.badge {
    font-weight: 600;
    font-size: 11.5px;
    padding: .42em .75em;
    border-radius: var(--ui-radius-pill);
    letter-spacing: .01em;
}

.badge.bg-primary {
    background: var(--ui-brand) !important;
}

.badge.bg-success {
    background: var(--ui-success) !important;
}

.badge.bg-danger {
    background: var(--ui-danger) !important;
}

.badge.bg-warning {
    background: var(--ui-warning) !important;
    color: #ffffff;
}

.badge.bg-info {
    background: var(--ui-info) !important;
}

.alert {
    border-radius: var(--ui-radius);
    border-width: 1px;
    font-size: 14px;
    padding: 12px 16px;
}

.alert-primary {
    color: color-mix(in srgb, var(--ui-brand) 80%, #000000);
    background: var(--ui-brand-softer);
    border-color: var(--ui-brand-ring);
}

.modal-backdrop.show {
    opacity: .5;
}

/* Không dùng overflow:hidden vì nút đóng .modal-close của popup mua hàng
   nằm lòi ra ngoài góc (top/right âm) → sẽ bị cắt mất */
.modal-content {
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-xl);
    box-shadow: var(--ui-shadow-lg);
    overflow: visible;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--ui-border);
    border-radius: calc(var(--ui-radius-xl) - 1px) calc(var(--ui-radius-xl) - 1px) 0 0;
    background: var(--ui-surface-2);
}

/* Nút đóng tròn ở góc popup mua hàng */
.modal-close {
    top: -14px;
    right: -14px;
    width: 36px;
    height: 36px;
    font-size: 15px;
    line-height: 34px;
    color: var(--ui-text-2);
    background: #ffffff;
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-md);
    transition: color var(--ui-fast), background var(--ui-fast), transform var(--ui-fast);
}

.modal-close:hover {
    color: #ffffff;
    background: var(--ui-gradient);
    border-color: transparent;
    transform: rotate(90deg);
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ui-text);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--ui-border);
    gap: 8px;
}

.btn-close {
    top: 18px;
    right: 18px;
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: var(--ui-radius-sm);
    background-color: var(--ui-surface-3);
    background-size: 10px;
    opacity: .75;
}

.btn-close:hover {
    opacity: 1;
    background-color: #e7ebf2;
}

.list-group-item {
    border-color: var(--ui-border);
}

.breadcrumb-item,
.breadcrumb-item a {
    font-size: 13.5px;
    color: var(--ui-muted);
}

.breadcrumb-item.active {
    color: var(--ui-text);
    font-weight: 600;
}

/* ---------------------------------------------------------------------
   15b. POPUP MUA HÀNG (ajaxs/client/modal/view-product.php)
   Chỉ tạo kiểu trong .product-view — không đổi markup / JS mua hàng.
   --------------------------------------------------------------------- */

/* --- Cột trái: thông tin sản phẩm --- */
.product-view .view-name {
    margin-bottom: 10px;
    font-size: 22px;
    line-height: 1.35;
    font-weight: 800;
}

.product-view .view-name a {
    color: var(--ui-text);
}

.product-view .view-name a:hover {
    color: var(--ui-brand);
}

.product-view .view-meta {
    margin-bottom: 14px;
}

.product-view .view-meta p {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
}

.product-view .view-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.product-view .view-price span {
    background: var(--ui-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.product-view .view-price del {
    margin-right: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--ui-faint);
}

.product-view .card-hot-deal {
    margin-bottom: 16px;
    padding: 12px 14px;
    font-size: 13.5px;
    line-height: 1.7;
    color: #9a3412;
    border-radius: var(--ui-radius);
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

/* Dòng định dạng tài khoản (VD: Uid|Pass|Cookie|Token) trong ô kiểu code */
.product-view .view-desc {
    position: relative;
    margin-bottom: 18px;
    padding: 12px 14px 12px 42px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: var(--ui-text-2);
    word-break: break-word;
    border-radius: var(--ui-radius);
    background: var(--ui-surface-2);
    border: 1px dashed var(--ui-border-strong);
}

.product-view .view-desc::before {
    content: "\f15c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 15px;
    top: 12px;
    font-size: 14px;
    color: var(--ui-brand);
}

.product-view .view-list-group {
    align-items: center;
    gap: 10px;
}

.product-view .view-list-title {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--ui-muted);
}

.product-view .view-share-list {
    gap: 8px;
    margin: 0;
    padding: 0;
}

.product-view .view-share-list li {
    margin: 0;
}

.product-view .view-share-list li a {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: var(--ui-text-2);
    border-radius: var(--ui-radius-sm);
    background: var(--ui-surface-3);
    border: 1px solid var(--ui-border);
}

.product-view .view-share-list li a:hover {
    color: #ffffff;
    background: var(--ui-gradient);
    border-color: transparent;
    transform: translateY(-2px);
}

/* --- Cột phải: thẻ "Thông tin mua hàng" --- */
.product-view .view-details .table {
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-lg);
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow-xs);
}

/* Markup gốc có 1 thẻ <tr> rỗng thừa → ẩn đi */
.product-view .view-details .table tr:empty {
    display: none;
}

.product-view .view-details .table > tbody > tr > td {
    padding: 12px 16px;
    font-size: 13.5px;
    vertical-align: middle;
    color: var(--ui-text-2);
    background: transparent;
    border: 0;
    border-bottom: 1px dashed var(--ui-border);
}

.product-view .view-details .table > tbody > tr:last-child > td {
    border-bottom: 0;
}

/* Hàng tiêu đề "THÔNG TIN MUA HÀNG" */
.product-view .view-details .table > tbody > tr:first-child > td {
    padding: 13px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #ffffff;
    background: var(--ui-brand-bar);
    border-bottom: 0;
}

.product-view .view-details .table > tbody > tr:first-child > td strong::before {
    content: "\f543";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 8px;
}

.product-view .view-details .table td.text-right strong {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--ui-text);
}

/* Số dư: bỏ hiệu ứng chữ đỏ phát sáng của template → viên xanh lá */
.product-view .text-wallet,
.product-view .view-details .table td.text-right strong.text-wallet {
    display: inline-block;
    padding: 3px 10px;
    font-size: 14px;
    font-weight: 800;
    color: #15803d;
    text-shadow: none;
    border-radius: var(--ui-radius-pill);
    background: #dcfce7;
}

/* Dòng tổng tiền thanh toán nổi bật */
.product-view .view-details .table tr:has(#into_pay) > td {
    padding-top: 14px;
    padding-bottom: 14px;
    font-weight: 700;
    color: var(--ui-text);
    background: var(--ui-brand-softer);
}

.product-view #into_pay {
    font-size: 20px;
    color: var(--ui-brand-deep) !important;
}

/* Bộ tăng/giảm số lượng dạng viên */
.product-view .product-action {
    width: fit-content;
    margin-left: auto;
    align-items: center;
    gap: 2px;
    padding: 4px;
    border-radius: var(--ui-radius-pill);
    background: var(--ui-surface-3);
    border: 1px solid var(--ui-border);
}

.product-view .product-action button {
    padding: 0;
    line-height: 0;
    border: 0;
    background: transparent;
}

.product-view .product-action button i {
    width: 34px;
    height: 34px;
    line-height: 34px;
    font-size: 12px;
    border-radius: 50%;
    color: var(--ui-text-2);
    background: #ffffff;
    box-shadow: var(--ui-shadow-xs);
}

.product-view .product-action button i:hover {
    color: #ffffff;
    background: var(--ui-gradient);
}

.product-view .product-action input {
    width: 58px;
    height: 34px;
    margin: 0;
    padding: 0;
    font-size: 16px;
    font-weight: 800;
    text-align: center;
    color: var(--ui-text);
    text-shadow: none;
    border: 0;
    outline: none;
    background: transparent;
    -moz-appearance: textfield;
    appearance: textfield;
}

.product-view .product-action input::-webkit-outer-spin-button,
.product-view .product-action input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Ô mã giảm giá */
.product-view .form-control-view-product {
    height: 40px;
    padding: 0 12px;
    font-size: 13.5px;
    color: var(--ui-text);
    border-radius: var(--ui-radius);
    background: #ffffff;
    border: 1px solid var(--ui-border-strong);
    outline: none;
    transition: border-color var(--ui-fast), box-shadow var(--ui-fast);
}

.product-view .form-control-view-product:focus {
    border-color: var(--ui-brand);
    box-shadow: 0 0 0 4px var(--ui-brand-ring);
}

/* Nút THANH TOÁN */
.product-view .view-add-group {
    margin: 16px 0 12px;
}

.product-view .view-add-group .btn-buy {
    width: 100%;
    height: 52px;
    gap: 10px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .05em;
    border-radius: var(--ui-radius-lg);
}

.product-view .view-add-group .btn-buy i {
    font-size: 16px;
}

.product-view .view-add-group .btn-buy:disabled {
    opacity: .75;
    cursor: wait;
    transform: none;
}

/* Nút yêu thích */
.product-view .view-action-group {
    display: block;
}

.product-view .label_favorite {
    justify-content: center;
    padding: 11px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ui-text-2);
    border-radius: var(--ui-radius-lg);
    background: #ffffff;
    border: 1px solid var(--ui-border);
    box-shadow: none;
    transition: border-color var(--ui-fast), background-color var(--ui-fast), color var(--ui-fast);
}

.product-view .label_favorite:hover {
    color: #dc2626;
    background: #fff5f5;
    border-color: #fecaca;
}

.product-view .label_favorite svg {
    width: 20px;
    height: 20px;
}

/* Trạng thái mua thành công: nút "Sao chép" theo màu thương hiệu */
.product-view .vp-btn {
    border-radius: var(--ui-radius);
}

.product-view .vp-btn-primary {
    background: var(--ui-gradient);
}

@media (max-width: 767px) {
    .product-view .row > [class*="col"] + [class*="col"] {
        margin-top: 16px;
    }

    .product-view .view-price {
        font-size: 26px;
    }
}

/* ---------------------------------------------------------------------
   15c. TRANG CHI TIẾT SẢN PHẨM (views/client/product.php)
   --------------------------------------------------------------------- */
.details-content,
.details-content:hover {
    position: relative;
    padding: 28px;
    border-radius: var(--ui-radius-xl);
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-sm);
    overflow: hidden;
    isolation: isolate;
}

/* Dải gradient mảnh trên đầu thẻ */
.details-content::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    background: var(--ui-gradient);
}

.details-name {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 26px;
    line-height: 1.3;
    font-weight: 800;
    color: var(--ui-text);
}

/* Icon danh mục trong ô vuông bo góc */
.details-name img {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    padding: 9px;
    object-fit: contain;
    border-radius: var(--ui-radius);
    background: var(--ui-brand-softer);
    border: 1px solid var(--ui-border);
}

.details-meta {
    margin-bottom: 16px;
}

.details-meta p {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    white-space: normal;
}

.details-meta .label-text {
    margin: 0;
}

.details-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.02em;
}

.details-price span {
    background: var(--ui-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.details-price del {
    margin-right: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--ui-faint);
}

/* Ô trống (VD trang đơn hàng: sản phẩm không có ghi chú) → ẩn hẳn */
.details-desc:empty {
    display: none;
}

/* Trang chi tiết đơn hàng: ghi chú sau mua (HTML do Admin soạn) → hộp ghi chú chữ thường */
.account-card > .details-desc {
    margin: 4px 0 0;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--ui-text-2);
    word-break: break-word;
    border-radius: var(--ui-radius);
    background: var(--ui-brand-softer);
    border-left: 3px solid var(--ui-brand);
}

/* Trang chi tiết sản phẩm: mô tả ngắn / định dạng tài khoản trong ô kiểu code */
.details-content .details-desc {
    position: relative;
    margin-bottom: 18px;
    padding: 12px 14px 12px 42px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
    font-size: 13px;
    line-height: 1.65;
    color: var(--ui-text-2);
    word-break: break-word;
    border-radius: var(--ui-radius);
    background: var(--ui-surface-2);
    border: 1px dashed var(--ui-border-strong);
}

.details-content .details-desc::before {
    content: "\f15c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 15px;
    top: 12px;
    font-size: 14px;
    color: var(--ui-brand);
}

.details-list-group {
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.details-list-title {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--ui-muted);
}

.details-share-list {
    gap: 8px;
    margin: 0;
    padding: 0;
}

.details-share-list li {
    margin: 0;
}

.details-share-list li a {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: var(--ui-text-2);
    border-radius: var(--ui-radius-sm);
    background: var(--ui-surface-3);
    border: 1px solid var(--ui-border);
}

.details-share-list li a:hover {
    color: #ffffff;
    background: var(--ui-gradient);
    border-color: transparent;
    transform: translateY(-2px);
}

.details-content .btn-buy,
.details-content .btn-more {
    height: 50px;
    font-size: 14.5px;
    border-radius: var(--ui-radius-lg);
}

.details-content .btn-buy {
    gap: 10px;
    font-weight: 800;
    letter-spacing: .05em;
}

.details-content .btn-more {
    font-weight: 700;
    letter-spacing: .03em;
    background: var(--ui-surface);
}

/* ≥992px & không có cột ảnh: thẻ rộng hết hàng, chia 2 cột —
   trái: thông tin; phải: "ô mua hàng" gồm giá + nút */
@media (min-width: 992px) {
    .inner-section #col2:only-child {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }

    #col2:only-child .details-content,
    #col2:only-child .details-content:hover {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 360px;
        grid-template-rows: auto auto auto auto 1fr;
        grid-template-areas:
            "name   price"
            "meta   actions"
            "rating actions"
            "desc   actions"
            "share  actions";
        column-gap: 36px;
        padding: 32px;
    }

    #col2:only-child .details-name {
        grid-area: name;
    }

    #col2:only-child .details-meta {
        grid-area: meta;
    }

    #col2:only-child .details-rating {
        grid-area: rating;
    }

    #col2:only-child .details-desc {
        grid-area: desc;
    }

    #col2:only-child .details-list-group {
        grid-area: share;
        align-self: start;
        margin-bottom: 0;
    }

    /* Ô mua hàng: phần trên chứa giá */
    #col2:only-child .details-price {
        grid-area: price;
        align-self: stretch;
        align-items: flex-end;
        align-content: flex-end;
        margin: 0;
        padding: 22px 22px 8px;
        border-radius: var(--ui-radius-lg) var(--ui-radius-lg) 0 0;
        background: var(--ui-brand-softer);
        border: 1px solid var(--ui-border);
        border-bottom: 0;
    }

    /* Ô mua hàng: phần dưới chứa 2 nút xếp dọc */
    #col2:only-child .details-content > .row {
        grid-area: actions;
        align-self: start;
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin: 0;
        padding: 12px 22px 22px;
        border-radius: 0 0 var(--ui-radius-lg) var(--ui-radius-lg);
        background: var(--ui-brand-softer);
        border: 1px solid var(--ui-border);
        border-top: 0;
    }

    #col2:only-child .details-content > .row > [class*="col"] {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    #col2:only-child .details-content .btn-buy {
        margin-bottom: 0 !important;
    }
}

/* Thanh tab "Chi tiết / Tích hợp API / Tiếp thị liên kết" dạng viên */
.inner-section .nav-tabs {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    width: auto;
    padding: 5px;
    margin-bottom: 16px;
    border-radius: var(--ui-radius-pill);
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-xs);
}

.inner-section .nav-tabs li {
    margin: 0;
    padding: 0;
    border: 0;
}

.inner-section .tab-link {
    display: inline-flex;
    align-items: center;
    padding: 9px 18px;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--ui-muted);
    border-radius: var(--ui-radius-pill);
}

.inner-section .tab-link:hover {
    color: var(--ui-brand);
    background: var(--ui-brand-softer);
}

.inner-section .tab-link.active {
    color: #ffffff;
    background: var(--ui-gradient);
    box-shadow: 0 8px 16px -8px var(--ui-brand-shadow);
}

/* Khung nội dung chi tiết / API / affiliate */
.product-details-frame {
    padding: 26px 30px;
    line-height: 1.75;
    color: var(--ui-text-2);
    overflow-wrap: anywhere;
    border-radius: var(--ui-radius-xl);
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-xs);
}

.product-details-frame img {
    max-width: 100%;
    height: auto;
    border-radius: var(--ui-radius);
}

.product-details-frame .form-group.row {
    margin: 0;
    padding: 14px 0;
    border-bottom: 1px dashed var(--ui-border);
}

.product-details-frame .form-group.row:last-of-type {
    border-bottom: 0;
}

/* API key (inline color:blue) → ô code, bấm để sao chép */
.product-details-frame strong.copy {
    display: inline-block;
    margin-right: 6px;
    padding: 6px 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    word-break: break-all;
    cursor: pointer;
    color: var(--ui-brand-deep) !important;
    border-radius: var(--ui-radius-sm);
    background: var(--ui-surface-3);
    border: 1px solid var(--ui-border);
}

.product-details-frame .input-group-text {
    font-weight: 800;
    color: var(--ui-brand-deep);
    background: var(--ui-brand-softer);
}

.product-details-frame textarea.form-control {
    min-height: 220px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
}

@media (max-width: 767px) {
    .details-content,
    .details-content:hover {
        padding: 20px;
    }

    .details-name {
        font-size: 21px;
    }

    .details-price {
        font-size: 28px;
    }

    .product-details-frame {
        padding: 18px;
    }
}

/* ---------------------------------------------------------------------
   15d. TRANG TÀI LIỆU API (views/client/document-api.php → .api-docs)
   --------------------------------------------------------------------- */
.api-docs {
    padding-top: 8px !important;
}

/* Mỗi API là 1 hàng, có vạch ngăn */
.api-docs .form-group.row {
    align-items: center;
    margin: 0;
    padding: 16px 0;
    border-bottom: 1px dashed var(--ui-border);
}

.api-docs .form-group.row:last-child {
    border-bottom: 0;
}

.api-docs .form-group.row > [class*="col"] {
    padding-left: 0;
    padding-right: 0;
}

/* Tên API có chấm gradient phía trước */
.api-docs .col-form-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 16px 4px 0;
    font-size: 14.5px !important;
    font-weight: 700 !important;
    color: var(--ui-text);
}

.api-docs .col-form-label::before {
    content: "";
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ui-gradient);
    box-shadow: 0 0 0 4px var(--ui-brand-softer);
}

/* API key (inline color:blue) → ô code */
.api-docs strong#api_key {
    display: inline-block;
    padding: 8px 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    word-break: break-all;
    color: var(--ui-brand-fg) !important;
    border-radius: var(--ui-radius-sm);
    background: var(--ui-surface-3);
    border: 1px solid var(--ui-border);
}

/* Nút ẩn/hiện + đổi API key: nút vuông */
.api-docs #toggleApiKey,
.api-docs .fv-row > .btn-danger.btn-sm {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: var(--ui-radius-sm);
}

.api-docs #ip_whitelist {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
}

/* Thanh URL kiểu thanh địa chỉ: [GET] url [Copy] */
.api-docs .input-group {
    flex-wrap: nowrap;
    margin-bottom: 0 !important;
    overflow: hidden;
    border-radius: var(--ui-radius);
    background: var(--ui-surface-2);
    border: 1px solid var(--ui-border-strong);
    box-shadow: var(--ui-shadow-xs);
}

.api-docs .input-group:focus-within {
    border-color: var(--ui-brand);
    box-shadow: 0 0 0 4px var(--ui-brand-ring);
}

.api-docs .input-group-text {
    padding: 0 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    white-space: nowrap;
    color: var(--ui-brand-fg);
    border: 0;
    border-right: 1px solid var(--ui-border);
    border-radius: 0;
    background: var(--ui-brand-softer);
}

.api-docs .input-group > .form-control {
    height: 44px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    color: var(--ui-text-2);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.api-docs .input-group > .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px !important;
    font-size: 13px;
    border-radius: 0 !important;
    box-shadow: none;
    transform: none;
}

/* Nhãn "form-data:" / "Response:" */
.api-docs .fv-row > p {
    margin: 16px 0 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ui-muted);
}

/* Danh sách tham số form-data */
.api-docs .fv-row > ul {
    margin: 0 !important;
    padding: 4px 14px;
    list-style: none;
    border-radius: var(--ui-radius);
    background: var(--ui-surface-2);
    border: 1px solid var(--ui-border);
}

.api-docs .fv-row > ul li {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 8px 0;
    font-size: 13.5px;
    color: var(--ui-text-2);
    border-bottom: 1px dashed var(--ui-border);
}

.api-docs .fv-row > ul li:last-child {
    border-bottom: 0;
}

.api-docs .fv-row > ul li strong {
    padding: 2px 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ui-brand-fg);
    border-radius: var(--ui-radius-xs);
    background: var(--ui-brand-softer);
}

.api-docs #api_key_form {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    color: var(--ui-brand-fg) !important;
    word-break: break-all;
}

/* Response: khối code nền tối kiểu terminal */
.api-docs .fv-row > textarea.form-control:not(#ip_whitelist) {
    min-height: 260px;
    padding: 16px 18px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.7;
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: var(--ui-radius);
    background: var(--ui-ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
    resize: vertical;
}

@media (max-width: 991px) {
    .api-docs .col-form-label {
        padding-bottom: 10px;
    }
}

/* ---------------------------------------------------------------------
   16. TRANG ĐĂNG NHẬP / ĐĂNG KÝ
   --------------------------------------------------------------------- */
.user-form-card {
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
    padding: 32px;
    border-radius: var(--ui-radius-xl);
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-md);
}

.user-form-title {
    margin-bottom: 24px;
    text-align: center;
}

.user-form-title h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--ui-text);
}

.user-form-title p {
    color: var(--ui-muted);
    font-size: 14px;
}

.user-form .form-group {
    margin-bottom: 14px;
}

.user-form-remind {
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: var(--ui-radius-lg);
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-xs);
}

.user-form-remind p {
    font-size: 14px;
    color: var(--ui-muted);
}

.user-form-remind a {
    color: var(--ui-brand);
    font-weight: 600;
}

.user-form-social li a {
    border-radius: var(--ui-radius);
    font-weight: 600;
    font-size: 13.5px;
    box-shadow: var(--ui-shadow-xs);
}

@media (max-width: 575px) {
    .user-form-card {
        padding: 22px 18px;
    }
}

/* ---------------------------------------------------------------------
   17. BLOG / WIDGET PHỤ
   --------------------------------------------------------------------- */
.blog-widget {
    border-radius: var(--ui-radius-lg);
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-xs);
}

.blog-widget-title {
    font-weight: 700;
    color: var(--ui-text);
}

.single-banner {
    border-radius: var(--ui-radius-lg);
    overflow: hidden;
}

/* ---------------------------------------------------------------------
   18. FOOTER
   --------------------------------------------------------------------- */
.ftx {
    --ftx-bg: #0b1220;
    --ftx-line: rgba(148, 163, 184, .14);
    --ftx-text: #94a3b8;
    --ftx-strong: #e2e8f0;
    --ftx-accent: color-mix(in srgb, var(--ui-brand) 55%, #ffffff);
    position: relative;
    margin-top: 80px;
    background: var(--ui-ink-bg);
    color: var(--ftx-text);
    font-size: 14px;
}

.ftx ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ftx li {
    margin-left: 0;
}

/* Dải kêu gọi hỗ trợ, nhô lên trên mép footer */
.ftx-cta {
    position: relative;
    top: -42px;
    margin-bottom: -10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    padding: 26px 30px;
    border-radius: var(--ui-radius-xl);
    background: var(--ui-gradient);
    box-shadow: 0 24px 48px -20px var(--ui-brand-shadow);
    overflow: hidden;
    isolation: isolate;
}

.ftx-cta::before,
.ftx-cta::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
}

.ftx-cta::before {
    width: 220px;
    height: 220px;
    right: -60px;
    top: -110px;
}

.ftx-cta::after {
    width: 140px;
    height: 140px;
    right: 180px;
    bottom: -90px;
}

.ftx-cta-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255, 255, 255, .85);
}

.ftx-cta-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    color: #ffffff;
}

.ftx-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ftx-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    font-size: 14px;
    font-weight: 700;
    border-radius: var(--ui-radius-pill);
    white-space: nowrap;
}

.ftx-btn-light {
    color: var(--ui-text);
    background: #ffffff;
    box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .35);
}

.ftx-btn-light:hover {
    color: var(--ui-brand);
    transform: translateY(-1px);
}

.ftx-btn-ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, .45);
}

.ftx-btn-ghost:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, .12);
}

/* Lưới nội dung */
.ftx-main {
    row-gap: 32px;
    padding: 10px 0 36px;
}

.ftx-logo {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    margin-bottom: 16px;
    border-radius: 14px;
    background: #ffffff;
}

.ftx-logo img {
    max-height: 40px;
    width: auto;
}

.ftx-desc {
    max-width: 360px;
    margin-bottom: 18px;
    line-height: 1.7;
    color: var(--ftx-text);
}

.ftx-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ftx-trust li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ftx-strong);
    border-radius: var(--ui-radius-pill);
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--ftx-line);
}

.ftx-trust li i {
    color: var(--ftx-accent);
}

.ftx-heading {
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ftx-strong);
}

.ftx-links li {
    margin-bottom: 11px;
}

/* Link có gạch nhỏ trượt ra khi rê chuột */
.ftx-links a {
    display: inline-flex;
    align-items: center;
    color: var(--ftx-text);
}

.ftx-links a::before {
    content: "";
    width: 0;
    height: 2px;
    margin-right: 0;
    border-radius: 2px;
    background: var(--ftx-accent);
    transition: width var(--ui-fast), margin-right var(--ui-fast);
}

.ftx-links a:hover {
    color: #ffffff;
}

.ftx-links a:hover::before {
    width: 12px;
    margin-right: 8px;
}

.ftx-contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.ftx-contact-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--ui-radius);
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--ftx-line);
}

.ftx-contact-icon i,
.ftx-contact-icon svg {
    margin: 0 !important;
    font-size: 14px !important;
    color: var(--ftx-accent) !important;
}

.ftx-contact-text {
    padding-top: 7px;
    line-height: 1.5;
    color: var(--ftx-strong);
    word-break: break-word;
}

.ftx-contact-text p {
    margin: 0;
    color: inherit;
}

.ftx-pay {
    margin-top: 18px;
}

.ftx-pay-label {
    display: block;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ftx-text);
}

.ftx-pay-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ftx-pay-list img {
    height: 30px;
    width: auto;
    padding: 4px 7px;
    border-radius: var(--ui-radius-xs);
    background: #ffffff;
}

/* Thanh cuối footer */
.ftx-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px 0;
    border-top: 1px solid var(--ftx-line);
}

.ftx-copy {
    margin: 0;
    font-size: 13px;
    color: var(--ftx-text);
}

.ftx-copy a {
    font-weight: 600;
    color: var(--ftx-strong);
}

.ftx-copy a:hover {
    color: #ffffff;
}

.ftx-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ftx-strong);
}

.ftx-dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
}

.ftx-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #22c55e;
    animation: ftx-pulse 2s ease-out infinite;
}

@keyframes ftx-pulse {
    0% {
        transform: scale(1);
        opacity: .7;
    }

    100% {
        transform: scale(2.8);
        opacity: 0;
    }
}

@media (max-width: 767px) {
    .ftx-cta {
        top: -34px;
        padding: 22px 20px;
    }

    .ftx-cta-title {
        font-size: 17px;
    }

    .ftx-cta-actions,
    .ftx-btn {
        width: 100%;
    }

    .ftx-btn {
        justify-content: center;
    }

    .ftx-bottom {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 991px) {
    /* Chừa chỗ cho menu đáy cố định trên mobile */
    .ftx {
        padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    }
}

/* ---------------------------------------------------------------------
   19. NÚT NỔI (lên đầu trang / bảng xếp hạng)
   --------------------------------------------------------------------- */
.backtop {
    border-radius: var(--ui-radius) !important;
    background: var(--ui-gradient) !important;
    box-shadow: 0 10px 22px -10px var(--ui-brand-shadow);
}

.leaderboard-btn {
    box-shadow: 0 10px 22px -10px var(--ui-brand-shadow);
}

/* ---------------------------------------------------------------------
   20. GIẢM CHUYỂN ĐỘNG CHO NGƯỜI DÙNG YÊU CẦU
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }

    .feature-card:hover,
    .btn:hover,
    .btn-buy:hover,
    .btn-more:hover {
        transform: none;
    }
}

/* =====================================================================
   23. POPUP SWEETALERT2 + THÔNG BÁO GÓC MÀN HÌNH (SIMPLE NOTIFY)
   Dùng chung biến màu của site.
   (!important để đè CSS của thư viện và màu nút truyền vào bằng JS)
   ===================================================================== */

/* --- SweetAlert2 --- */
.swal2-container.swal2-backdrop-show {
    background: rgba(10, 15, 26, .55) !important;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.swal2-popup:not(.swal2-toast) {
    width: min(440px, calc(100vw - 32px)) !important;
    padding: 28px 24px 24px !important;
    font-family: inherit !important;
    border-radius: var(--ui-radius-xl) !important;
    background: var(--ui-surface) !important;
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-lg) !important;
}

.swal2-title {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: var(--ui-text) !important;
}

.swal2-content,
.swal2-html-container {
    font-size: 14.5px !important;
    line-height: 1.6 !important;
    color: var(--ui-muted) !important;
}

.swal2-icon {
    margin: 6px auto 12px !important;
    transform: scale(.85);
}

.swal2-icon.swal2-warning {
    color: #f59e0b !important;
    border-color: rgba(245, 158, 11, .45) !important;
}

.swal2-icon.swal2-error {
    border-color: rgba(239, 68, 68, .45) !important;
}

.swal2-icon.swal2-error [class^="swal2-x-mark-line"] {
    background-color: #ef4444 !important;
}

.swal2-icon.swal2-info,
.swal2-icon.swal2-question {
    color: var(--ui-brand-fg) !important;
    border-color: var(--ui-brand-ring) !important;
}

.swal2-icon.swal2-success {
    border-color: rgba(34, 197, 94, .45) !important;
}

.swal2-icon.swal2-success [class^="swal2-success-line"] {
    background-color: #22c55e !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(34, 197, 94, .3) !important;
}

/* Các mảng che của icon "thành công" mặc định màu trắng → trùng màu nền popup */
.swal2-icon.swal2-success [class^="swal2-success-circular-line"],
.swal2-icon.swal2-success .swal2-success-fix {
    background-color: var(--ui-surface) !important;
}

.swal2-actions {
    gap: 10px;
    margin-top: 22px !important;
}

.swal2-styled {
    margin: 0 !important;
    padding: 11px 22px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: var(--ui-radius) !important;
    box-shadow: none !important;
    transition: transform var(--ui-fast), filter var(--ui-fast) !important;
}

.swal2-styled:hover {
    background-image: none !important;
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.swal2-styled:focus {
    box-shadow: 0 0 0 4px var(--ui-brand-ring) !important;
}

/* Nút Đồng ý: gradient màu thương hiệu */
.swal2-styled.swal2-confirm {
    color: #ffffff !important;
    background: var(--ui-gradient) !important;
    border: 0 !important;
    box-shadow: 0 8px 18px -10px var(--ui-brand-shadow) !important;
}

/* Nút Đóng / Huỷ: trung tính */
.swal2-styled.swal2-cancel {
    color: var(--ui-text-2) !important;
    background: var(--ui-surface-3) !important;
    border: 1px solid var(--ui-border-strong) !important;
}

.swal2-styled.swal2-deny {
    color: #ffffff !important;
    background: var(--ui-danger) !important;
}

.swal2-close {
    color: var(--ui-faint) !important;
}

.swal2-close:hover {
    color: var(--ui-text) !important;
}

.swal2-input,
.swal2-textarea,
.swal2-select {
    color: var(--ui-text) !important;
    background: var(--ui-surface-2) !important;
    border: 1px solid var(--ui-border-strong) !important;
    border-radius: var(--ui-radius) !important;
    box-shadow: none !important;
}

.swal2-validation-message {
    color: #fca5a5 !important;
    background: rgba(239, 68, 68, .1) !important;
}

.swal2-timer-progress-bar {
    background: var(--ui-gradient) !important;
}

/* Swal dạng toast (góc màn hình) */
.swal2-popup.swal2-toast {
    border-radius: var(--ui-radius) !important;
    background: var(--ui-surface) !important;
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-md) !important;
}

.swal2-popup.swal2-toast .swal2-title {
    font-size: 14px !important;
    font-weight: 700 !important;
}

/* --- Simple Notify (thông báo nhỏ góc phải: "Thành công! / Thất bại!") --- */
.sn-notify {
    font-family: inherit !important;
    border-radius: var(--ui-radius-lg) !important;
}

.sn-notify.sn-notify-outline {
    background: var(--ui-surface) !important;
    border: 1px solid var(--ui-border) !important;
    border-left-width: 4px !important;
    box-shadow: var(--ui-shadow-lg) !important;
}

/* Vạch màu bên trái theo trạng thái */
.sn-notify-outline.sn-notify-success {
    border-left-color: #22c55e !important;
}

.sn-notify-outline.sn-notify-error {
    border-left-color: #ef4444 !important;
}

.sn-notify-outline.sn-notify-warning {
    border-left-color: #f59e0b !important;
}

.sn-notify-outline.sn-notify-info {
    border-left-color: #0ea5e9 !important;
}

.sn-notify-outline .sn-notify-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--ui-text) !important;
}

.sn-notify-outline .sn-notify-text {
    font-size: 13.5px !important;
    color: var(--ui-muted) !important;
}

.sn-notify-outline .sn-notify-close {
    color: var(--ui-faint) !important;
}

.sn-notify-outline .sn-notify-close:hover {
    color: var(--ui-text) !important;
}
