/* =========================================================================
 *  rbnd-mobile.css — Giao diện ĐIỆN THOẠI & MÁY TÍNH BẢNG (< 992px)
 * =========================================================================
 *  BẮT BUỘC: mọi quy tắc làm thay đổi bố cục đều nằm trong
 *  @media (max-width: 991.98px). Giao diện máy tính (≥ 992px) để nguyên.
 *  Các phần tử chỉ có ở điện thoại mang sẵn lớp d-lg-none nên dù quy tắc
 *  trang trí nằm ngoài media query cũng không hiện ở máy tính.
 *
 *  Nạp ở layouts/index.php (trang công khai) và layouts/bare.php (quản trị).
 *  Markup: templates/partials/mobile-ui.php, account-open.php, admin-open.php
 *  Hành vi: assets/js/rbnd-mobile.js, assets/js_pages/listing-form-steps.js
 * ========================================================================= */

:root {
    --m-green: var(--rbnd-primary, #0a603d);
    --m-green-2: #13854f;
    --m-bottom-h: 62px;
    --m-safe: env(safe-area-inset-bottom, 0px);
}

@media (max-width: 991.98px) {

    /* Khung trang: rbnd-app.css dùng "padding: 24px 0 60px" nên .container mất lề trái/phải,
       còn .row bên trong vẫn lùi -12px → trang rộng hơn màn hình 24px, nội dung dính sát mép.
       Trả lại lề mặc định của Bootstrap (chỉ trên điện thoại). */
    .container.listing-list-page, .container.listing-detail, .container.project-detail,
    .container.profile-page, .container.valuation-page, .container.contact-page,
    .container.account-page {
        padding-left: calc(var(--bs-gutter-x, 1.5rem) * .5);
        padding-right: calc(var(--bs-gutter-x, 1.5rem) * .5);
    }

    /* =====================================================================
     *  1. THANH ĐIỀU HƯỚNG + NÚT MENU
     * ================================================================== */
    .navbar-custom { padding-top: 6px; padding-bottom: 6px; }
    .navbar-custom .navbar-brand img { max-height: 38px; width: auto; }
    #navbarNav { display: none !important; }       /* thay bằng offcanvas */

    .m-menu-btn {
        display: inline-flex; align-items: center; gap: 8px;
        padding: 7px 12px 7px 10px;
        border: 0 !important; border-radius: 999px;
        background: linear-gradient(135deg, var(--m-green), var(--m-green-2));
        color: #fff; font-weight: 600; font-size: .9rem; line-height: 1;
        box-shadow: 0 4px 12px rgba(10, 96, 61, .28);
    }
    .m-menu-btn:focus { box-shadow: 0 0 0 3px rgba(10, 96, 61, .3); }
    .m-menu-btn__bars { display: inline-flex; flex-direction: column; gap: 3px; width: 18px; }
    .m-menu-btn__bars i { display: block; height: 2px; border-radius: 2px; background: #fff; }
    .m-menu-btn__bars i:nth-child(2) { width: 70%; }

    /* =====================================================================
     *  2. MENU OFFCANVAS
     * ================================================================== */
    .m-menu.offcanvas { --bs-offcanvas-width: min(86vw, 340px); border-right: 0; }
    .m-menu__head {
        display: flex; align-items: center; justify-content: space-between;
        padding: 12px 14px; border-bottom: 1px solid #eef0f2;
    }
    .m-menu__logo img { max-height: 34px; width: auto; }
    .m-menu__close {
        width: 36px; height: 36px; border: 0; border-radius: 50%;
        background: #f1f3f5; color: #495057; font-size: 1.05rem;
        display: inline-flex; align-items: center; justify-content: center;
    }
    .m-menu__body { padding: 14px 14px 24px; background: #f7f9f8; }

    .m-user {
        display: flex; align-items: center; gap: 12px; padding: 12px;
        border-radius: 14px; text-decoration: none; color: #fff;
        background: linear-gradient(135deg, var(--m-green), var(--m-green-2));
        box-shadow: 0 6px 16px rgba(10, 96, 61, .25);
    }
    .m-user img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.7); }
    .m-user__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
    .m-user__info strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .m-user__info small { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; opacity: .95; }
    .m-user__vip { padding: 1px 8px; border-radius: 999px; color: #fff; font-size: .72rem; }
    .m-user__go { opacity: .8; }

    .m-guest { background: #fff; border-radius: 14px; padding: 14px; border: 1px solid #e6ebe8; }
    .m-guest p { font-size: .88rem; color: #6c757d; margin: 0 0 10px; }
    .m-guest__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .m-guest__btns .btn { font-size: .9rem; border-radius: 10px; }

    .m-post-btn {
        display: flex; align-items: center; justify-content: center; gap: 8px;
        margin: 12px 0; padding: 11px; border-radius: 12px;
        background: #ff7a00; color: #fff; font-weight: 600; text-decoration: none;
        box-shadow: 0 4px 12px rgba(255, 122, 0, .3);
    }
    .m-post-btn:hover { color: #fff; background: #f06d00; }

    .m-nav { background: #fff; border-radius: 14px; border: 1px solid #e6ebe8; overflow: hidden; }
    .m-nav__item {
        display: flex; align-items: center; gap: 12px; width: 100%;
        padding: 12px 14px; border: 0; border-bottom: 1px solid #f0f2f1;
        background: none; color: #212529; text-decoration: none; text-align: left;
        font-size: .95rem; font-weight: 500;
    }
    .m-nav__item > i:first-child {
        width: 30px; height: 30px; border-radius: 9px; flex: 0 0 30px;
        display: inline-flex; align-items: center; justify-content: center;
        background: #e8f4ee; color: var(--m-green); font-size: .85rem;
    }
    .m-nav__item.is-active { color: var(--m-green); background: #f2faf6; font-weight: 600; }
    .m-nav__caret { margin-left: auto; font-size: .75rem; color: #adb5bd; transition: transform .2s; }
    .m-nav__toggle:not(.collapsed) .m-nav__caret { transform: rotate(180deg); color: var(--m-green); }
    .m-nav__sub { background: #fafbfa; border-bottom: 1px solid #f0f2f1; }
    .m-nav__sub a {
        display: flex; align-items: center; gap: 10px;
        padding: 9px 14px 9px 56px; color: #495057; text-decoration: none; font-size: .9rem;
    }
    .m-nav__sub a i { color: #8a969f; width: 16px; text-align: center; }
    .m-nav__sub a:active { background: #eef6f1; }

    .m-menu__contact { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; font-size: .88rem; }
    .m-menu__contact a { color: #495057; text-decoration: none; display: flex; gap: 8px; align-items: center; }
    .m-menu__contact i { color: var(--m-green); width: 16px; }
    .m-menu__logout { color: #dc3545 !important; margin-top: 4px; }
    .m-menu__logout i { color: #dc3545 !important; }

    /* =====================================================================
     *  3. THANH 4 NÚT DƯỚI ĐÁY
     * ================================================================== */
    body.has-m-bottom { padding-bottom: calc(var(--m-bottom-h) + var(--m-safe)); }

    .m-bottom {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035;
        display: grid; grid-template-columns: repeat(4, 1fr);
        height: calc(var(--m-bottom-h) + var(--m-safe));
        padding-bottom: var(--m-safe);
        background: rgba(255, 255, 255, .97);
        backdrop-filter: blur(8px);
        border-top: 1px solid #e6ebe8;
        box-shadow: 0 -4px 18px rgba(0, 0, 0, .08);
    }
    .m-bottom__btn {
        position: relative;
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        border: 0; background: none; color: #6c757d; text-decoration: none;
        font-size: .72rem; font-weight: 500;
    }
    .m-bottom__btn i { font-size: 1.2rem; }
    .m-bottom__btn.is-active, .m-bottom__btn:active { color: var(--m-green); }
    .m-bottom__btn.is-active::before {
        content: ""; position: absolute; top: 0; left: 30%; right: 30%;
        height: 3px; border-radius: 0 0 3px 3px; background: var(--m-green);
    }
    .m-bottom__avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; border: 1.5px solid currentColor; }
    .m-bottom__badge {
        position: absolute; top: 6px; left: calc(50% + 6px);
        min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
        background: #dc3545; color: #fff; font-size: .65rem; line-height: 18px; text-align: center;
    }

    /* Các thứ nổi khác phải đứng TRÊN thanh đáy chứ không bị nó che */
    body.has-m-bottom .cmp-bar { bottom: calc(var(--m-bottom-h) + var(--m-safe)); }
    body.has-m-bottom .errc-fab { bottom: calc(var(--m-bottom-h) + var(--m-safe) + 70px); right: 14px; }

    /* =====================================================================
     *  4. NÚT LÊN ĐẦU TRANG
     * ================================================================== */
    .m-gotop {
        position: fixed; right: 14px; z-index: 1034;
        bottom: calc(var(--m-bottom-h) + var(--m-safe) + 14px);
        width: 46px; height: 46px; border: 0; border-radius: 50%;
        background: #fff; color: var(--m-green); font-size: 1.05rem;
        box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
        display: flex; align-items: center; justify-content: center;
        opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none;
        transition: opacity .2s, transform .2s;
    }
    .m-gotop.is-show { opacity: 1; transform: none; pointer-events: auto; }
    body:not(.has-m-bottom) .m-gotop { bottom: 18px; }

    /* =====================================================================
     *  5. BẢNG DANH MỤC (offcanvas-bottom)
     * ================================================================== */
    .m-sheet.offcanvas-bottom {
        --bs-offcanvas-height: auto;
        max-height: 82vh; border-radius: 18px 18px 0 0; border-top: 0;
    }
    .m-sheet__grip { width: 42px; height: 4px; border-radius: 2px; background: #d7dcdf; margin: 8px auto 0; }
    .m-sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px 4px; }
    .m-sheet__head h5 { margin: 0; font-size: 1.05rem; }
    .m-sheet__head h5 i { color: var(--m-green); }
    .m-sheet__body { padding: 6px 16px calc(20px + var(--m-safe)); }
    .m-sheet__title {
        display: flex; justify-content: space-between; align-items: center;
        font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: #6c757d; margin: 14px 0 10px;
    }
    .m-sheet__title a { text-transform: none; letter-spacing: 0; color: var(--m-green); text-decoration: none; font-size: .82rem; }
    .m-cate-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 6px; }
    .m-cate-grid a {
        display: flex; flex-direction: column; align-items: center; gap: 6px;
        text-decoration: none; color: #343a40; font-size: .74rem; text-align: center; line-height: 1.25;
    }
    .m-cate-grid__ic {
        width: 48px; height: 48px; border-radius: 14px;
        display: flex; align-items: center; justify-content: center;
        background: #e8f4ee; color: var(--m-green); font-size: 1.1rem;
    }
    .m-cate-grid a:active .m-cate-grid__ic { background: var(--m-green); color: #fff; }

    /* =====================================================================
     *  6. MODAL TÌM KIẾM
     * ================================================================== */
    .m-search .modal-header { border-bottom: 0; padding-bottom: 4px; }
    .m-search .modal-title { font-size: 1.05rem; }
    .m-search .modal-title i { color: var(--m-green); }
    .m-search__tabs { display: grid; grid-template-columns: 1fr 1fr; background: #f1f3f5; border-radius: 12px; padding: 4px; margin-bottom: 14px; }
    .m-search__tabs input { position: absolute; opacity: 0; pointer-events: none; }
    .m-search__tabs label { text-align: center; padding: 9px; border-radius: 9px; font-weight: 600; color: #6c757d; cursor: pointer; }
    .m-search__tabs input:checked + label { background: #fff; color: var(--m-green); box-shadow: 0 2px 6px rgba(0,0,0,.08); }
    .m-search__tabs input:focus-visible + label { outline: 2px solid var(--m-green); }
    .m-search__label { display: block; font-size: .82rem; font-weight: 600; color: #495057; margin: 10px 0 5px; }
    .m-search__kw { position: relative; }
    .m-search__kw > i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--m-green); z-index: 2; }
    .m-search__kw .form-control { padding-left: 34px; }
    .m-search .form-control, .m-search .form-select { height: 46px; border-radius: 10px; }
    .m-search__kw .rbnd-search-host { position: relative; }
    .m-search__submit { margin-top: 20px; border-radius: 12px; }

    /* =====================================================================
     *  7. TRANG CHỦ — DỰ ÁN THÀNH CAROUSEL MỘT DÒNG
     * ================================================================== */
    .project-grid.js-m-carousel {
        display: flex; gap: 12px;
        overflow-x: auto; overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory; scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch; scrollbar-width: none;
        padding: 2px 2px 6px;
    }
    .project-grid.js-m-carousel::-webkit-scrollbar { display: none; }
    .project-grid.js-m-carousel > .project-card { flex: 0 0 78%; scroll-snap-align: start; }
    .m-carousel-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; }
    .m-carousel-nav__btn {
        width: 34px; height: 34px; border-radius: 50%;
        border: 1px solid #dfe5e2; background: #fff; color: var(--m-green);
        display: inline-flex; align-items: center; justify-content: center;
    }
    .m-carousel-nav__dots { display: flex; gap: 6px; }
    .m-carousel-nav__dots span { width: 7px; height: 7px; border-radius: 4px; background: #cfd8d3; transition: width .2s, background .2s; }
    .m-carousel-nav__dots span.is-active { width: 20px; background: var(--m-green); }

    /* =====================================================================
     *  8. KHU TÀI KHOẢN — MENU TRÁI THÀNH NGĂN KÉO
     * ================================================================== */
    .acc-trigger {
        display: flex; align-items: center; gap: 12px; width: 100%;
        margin: 0 0 16px; padding: 12px 14px;
        border: 0; border-radius: 14px; text-align: left; color: #fff;
        background: linear-gradient(135deg, var(--m-green) 0%, var(--m-green-2) 60%, #1aa564 100%);
        box-shadow: 0 8px 20px rgba(10, 96, 61, .28);
        position: sticky; top: calc(var(--m-nav-h, 58px) + 8px); z-index: 1010;
    }
    .acc-trigger__ic {
        width: 40px; height: 40px; border-radius: 12px; flex: 0 0 40px;
        display: flex; align-items: center; justify-content: center;
        background: rgba(255, 255, 255, .2); font-size: 1.1rem;
        animation: m-pulse 2.4s ease-out 1s 3;
    }
    .acc-trigger__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
    .acc-trigger__txt small { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; opacity: .85; }
    .acc-trigger__txt strong { font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .acc-trigger__go {
        width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--m-green);
        display: flex; align-items: center; justify-content: center; font-size: .8rem;
    }
    @keyframes m-pulse {
        0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .6); }
        100% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); }
    }

    .acc-drawer {
        position: fixed; top: 0; bottom: 0; left: 0; z-index: 1050;
        width: min(86vw, 320px); overflow-y: auto; overscroll-behavior: contain;
        background: #f7f9f8; box-shadow: 8px 0 30px rgba(0, 0, 0, .18);
        transform: translateX(-105%); visibility: hidden;
        transition: transform .28s ease, visibility 0s linear .28s;
        padding-bottom: calc(20px + var(--m-safe));
    }
    .acc-drawer.is-open { transform: none; visibility: visible; transition: transform .28s ease; }
    .acc-drawer__head {
        position: sticky; top: 0; z-index: 2;
        display: flex; align-items: center; justify-content: space-between;
        padding: 14px 16px; color: #fff;
        background: linear-gradient(135deg, var(--m-green), var(--m-green-2));
    }
    .acc-drawer__close {
        width: 34px; height: 34px; border: 0; border-radius: 50%;
        background: rgba(255, 255, 255, .2); color: #fff;
    }
    .acc-drawer .account-nav { position: static; border: 0; border-radius: 0; background: transparent; margin: 0; }
    .acc-drawer .account-nav li a { padding: 10px 18px; }

    /* =====================================================================
     *  9. QUẢN TRỊ — SIDEBAR THÀNH NGĂN KÉO
     * ================================================================== */
    .admin-shell { flex-direction: row; }
    .admin-shell > .admin-main { min-width: 0; width: 100%; padding: 14px 14px 60px; }
    .admin-sidebar {
        position: fixed; top: 0; bottom: 0; left: 0; z-index: 1050;
        width: min(84vw, 280px); flex: none !important;
        transform: translateX(-105%); visibility: hidden;
        transition: transform .28s ease, visibility 0s linear .28s;
        box-shadow: 8px 0 30px rgba(0, 0, 0, .3);
        overscroll-behavior: contain;
    }
    .admin-sidebar.is-open { transform: none; visibility: visible; transition: transform .28s ease; }
    .adm-sidebar-close {
        position: absolute; top: 12px; right: 12px;
        width: 34px; height: 34px; border: 0; border-radius: 50%;
        background: #272c33; color: #fff;
    }
    .admin-topbar { gap: 10px; margin-bottom: 14px; }
    .admin-topbar h1 { font-size: 1.1rem; flex: 1 1 auto; min-width: 0; }
    .adm-menu-btn {
        display: inline-flex; align-items: center; gap: 8px;
        padding: 8px 14px; border: 0; border-radius: 10px;
        background: #1b1f24; color: #fff; font-weight: 600; font-size: .9rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
    }
    .adm-menu-btn i { color: #5fd49a; }

    /* Lớp phủ chung cho hai ngăn kéo */
    .m-drawer-backdrop {
        position: fixed; inset: 0; z-index: 1045;
        background: rgba(15, 23, 42, .5);
        opacity: 0; transition: opacity .25s;
    }
    .m-drawer-backdrop.is-show { opacity: 1; }
    body.m-drawer-lock { overflow: hidden; }

    /* =====================================================================
     *  10. FORM ĐĂNG TIN — TỪNG BƯỚC MỘT MÀN HÌNH
     * ================================================================== */
    .lf-wizard > .form-section { display: none; }
    .lf-wizard > .form-section.is-current { display: block; animation: lf-in .25s ease; }
    .lf-wizard > .form-section > legend .step { display: none; }
    .lf-wizard .form-actions .js-submit-btn { display: none; }
    .lf-wizard:not(.is-last) > .form-actions { display: none; }

    .lf-progress {
        position: sticky; top: calc(var(--m-nav-h, 58px)); z-index: 1010;
        background: #fff; margin: 0 -12px 14px; padding: 10px 12px 12px;
        border-bottom: 1px solid #eef0f2; box-shadow: 0 4px 10px rgba(0, 0, 0, .04);
    }
    .lf-progress__top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
    .lf-progress__label { font-weight: 600; font-size: .95rem; color: #212529; }
    .lf-progress__count { font-size: .8rem; color: #6c757d; white-space: nowrap; }
    .lf-progress__count b { color: var(--m-green); }
    .lf-progress__bar { height: 8px; border-radius: 4px; background: #e9efec; overflow: hidden; }
    .lf-progress__fill {
        height: 100%; border-radius: 4px; width: 0;
        background: linear-gradient(90deg, var(--m-green), #1aa564);
        transition: width .35s ease;
    }
    .lf-progress__dots { display: flex; justify-content: space-between; margin-top: 8px; }
    .lf-progress__dots button {
        width: 26px; height: 26px; border-radius: 50%; padding: 0;
        border: 2px solid #dfe5e2; background: #fff; color: #8a969f; font-size: .75rem; font-weight: 700;
    }
    .lf-progress__dots button.is-done { background: #e8f4ee; border-color: var(--m-green); color: var(--m-green); }
    .lf-progress__dots button.is-current { background: var(--m-green); border-color: var(--m-green); color: #fff; }
    .lf-progress__dots button.has-error { border-color: #dc3545; color: #dc3545; }

    .lf-stepnav {
        position: sticky; bottom: calc(var(--m-bottom-h) + var(--m-safe)); z-index: 1020;
        display: flex; gap: 10px;
        margin: 16px -12px 0; padding: 10px 12px;
        background: rgba(255, 255, 255, .97); border-top: 1px solid #eef0f2;
        box-shadow: 0 -4px 14px rgba(0, 0, 0, .06);
    }
    body:not(.has-m-bottom) .lf-stepnav { bottom: 0; }
    .lf-stepnav .btn { flex: 1; height: 48px; border-radius: 12px; font-weight: 600; }
    .lf-stepnav .lf-prev { flex: 0 0 38%; }
    .lf-stepnav .lf-prev[disabled] { visibility: hidden; }
    .lf-stepnav .js-submit-btn { flex: 1; margin: 0; }

    @keyframes lf-in {
        from { opacity: 0; transform: translateX(14px); }
        to   { opacity: 1; transform: none; }
    }
}

/* Máy tính: khung ngăn kéo "trong suốt" với bố cục — menu tài khoản vẫn dính
   (position: sticky) theo cột trái như trước khi có lớp bọc này. */
@media (min-width: 992px) {
    .acc-drawer { display: contents; }
}

@media (prefers-reduced-motion: reduce) {
    .acc-trigger__ic { animation: none; }
    .lf-wizard > .form-section.is-current { animation: none; }
}

/* =========================================================================
 *  NGĂN KÉO BỘ LỌC — trang danh sách tin (templates/listings/list.php)
 * =========================================================================
 *  Ngoại lệ của quy ước "chỉ < 992px": cột lọc bên trái ẩn ở MỌI kích thước,
 *  bấm nút .flt-trigger mới trượt ra từ trái (JS: data-drawer-all).
 * ========================================================================= */
.flt-trigger {
    display: inline-flex; align-items: center; gap: 8px;
    margin: 0 0 14px; padding: 8px 16px;
    border: 0; border-radius: 999px; color: #fff; font-weight: 600;
    background: linear-gradient(135deg, var(--m-green) 0%, var(--m-green-2) 100%);
    box-shadow: 0 6px 16px rgba(10, 96, 61, .22);
    transition: transform .15s, box-shadow .15s;
}
.flt-trigger:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(10, 96, 61, .3); }
.flt-trigger__badge {
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
    background: #fff; color: var(--m-green); font-size: .75rem;
    display: inline-flex; align-items: center; justify-content: center;
}

.flt-drawer {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 1050;
    width: min(86vw, 340px); overflow-y: auto; overscroll-behavior: contain;
    background: #f7f9f8; box-shadow: 8px 0 30px rgba(0, 0, 0, .18);
    transform: translateX(-105%); visibility: hidden;
    transition: transform .28s ease, visibility 0s linear .28s;
    padding-bottom: calc(20px + var(--m-safe));
}
.flt-drawer.is-open { transform: none; visibility: visible; transition: transform .28s ease; }
.flt-drawer__head {
    position: sticky; top: 0; z-index: 2;
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; color: #fff;
    background: linear-gradient(135deg, var(--m-green), var(--m-green-2));
}
.flt-drawer__head .acc-drawer__close {
    width: 34px; height: 34px; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .2); color: #fff;
}
.flt-drawer .filter-sidebar { padding: 12px; }

/* Lớp phủ + khóa cuộn cũng phải có ở máy tính khi mở ngăn kéo bộ lọc */
.m-drawer-backdrop {
    position: fixed; inset: 0; z-index: 1045;
    background: rgba(15, 23, 42, .5);
    opacity: 0; transition: opacity .25s;
}
.m-drawer-backdrop.is-show { opacity: 1; }
body.m-drawer-lock { overflow: hidden; }

@media (max-width: 991.98px) {
    /* Điện thoại: nút rộng hết hàng và dính dưới thanh điều hướng như menu tài khoản */
    .flt-trigger {
        display: flex; width: 100%; justify-content: center; padding: 11px 16px;
        position: sticky; top: calc(var(--m-nav-h, 58px) + 8px); z-index: 1010;
    }
}

@media (prefers-reduced-motion: reduce) {
    .flt-drawer, .flt-drawer.is-open { transition: none; }
}
