/* =====================================================================
   GIAO DIỆN ĐIỆN THOẠI / MÁY TÍNH BẢNG
   Nạp sau shop.css. Selector bắt đầu bằng "html body" để thắng style
   riêng viết trong từng trang (<style> trong view) mà không cần sửa view.
   ===================================================================== */

/* Các thành phần chỉ dùng trên điện thoại: mặc định ẩn */
.m-tabbar, .m-searchbar, .m-search-btn, .m-cats, .m-filter-btn,
.filter-sheet-head, .filter-ov, .m-drawer-ov, .ck-bar { display: none; }

/* ---------- Menu trượt cạnh phải (≤1140px, mở bằng nút ☰ / tab "Danh mục") ---------- */
html body .mobile-nav-menu {
    display: flex; flex-direction: column; gap: 0;
    position: fixed; top: 0; right: 0; bottom: 0; left: auto;
    width: min(86vw, 360px); padding: 0; z-index: 1700; /* trên nút chat nổi (1500) */
    background: #fff; border: none; border-radius: 22px 0 0 22px;
    box-shadow: -18px 0 50px rgba(15, 23, 42, .18);
    transform: translateX(105%); visibility: hidden;
    transition: transform .28s cubic-bezier(.2, .8, .2, 1), visibility .28s;
    animation: none; backdrop-filter: none; -webkit-backdrop-filter: none;
}
html body .mobile-nav-menu.show { transform: none; visibility: visible; }
html body .m-drawer-ov { display: block; position: fixed; inset: 0; z-index: 1650; background: rgba(15, 23, 42, .45); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
html body .m-drawer-ov.show { opacity: 1; visibility: visible; }
.md-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 12px 20px; border-bottom: 1px solid #f1f5f9; }
.md-head .navbar-brand-neon { font-size: 17px; }
.md-close { width: 38px; height: 38px; border-radius: 12px; border: none; background: #f1f5f9; color: #334155; font-size: 17px; }
.md-body { flex: 1; overflow-y: auto; padding: 14px 16px 18px; overscroll-behavior: contain; }
.md-user { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: linear-gradient(135deg, #fff1f7, #f5f3ff); color: #0f172a; text-decoration: none; }
.md-user span:nth-child(2) { flex: 1; min-width: 0; }
.md-user b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-user small { color: #64748b; font-size: 12px; }
.md-user > i { color: #94a3b8; font-size: 12px; }
.md-auth { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.md-btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 14px; font-weight: 800; font-size: 14px; text-decoration: none !important; }
.md-btn.ghost { border: 1.5px solid #e2e8f0; color: #0f172a !important; background: #fff; }
.md-btn.solid { background: linear-gradient(135deg, #ff007f, #7928ca); color: #fff !important; box-shadow: 0 8px 18px rgba(255, 0, 127, .25); }
.md-label { margin: 18px 4px 8px; font-size: 11.5px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: #94a3b8; }
.md-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.md-cats a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px 10px; border-radius: 14px; background: #f8fafc; border: 1px solid #f1f5f9; color: #334155; font-weight: 700; font-size: 12.5px; text-decoration: none; }
.md-cats a i { font-size: 19px; }
.md-cats a:active { background: #fff1f7; border-color: #fbcfe8; }
.md-list { display: flex; flex-direction: column; }
.md-list a { display: flex; align-items: center; gap: 12px; padding: 12px 6px; color: #1e293b; font-weight: 600; font-size: 14.5px; text-decoration: none; border-bottom: 1px solid #f8fafc; }
.md-list a i { width: 22px; text-align: center; color: #94a3b8; }
.md-list a:active { background: #f8fafc; }
.md-list a.md-admin { color: #047857; } .md-list a.md-admin i { color: #10b981; }
.md-list a.md-danger { color: #e11d48; } .md-list a.md-danger i { color: #e11d48; }
.md-hotline { display: flex; align-items: center; gap: 12px; margin: 0 16px calc(16px + env(safe-area-inset-bottom)); padding: 12px 14px; border-radius: 16px; background: #0f172a; color: #fff !important; text-decoration: none !important; }
.md-hotline i { width: 36px; height: 36px; border-radius: 12px; background: rgba(255, 255, 255, .12); display: flex; align-items: center; justify-content: center; color: #67e8f9; }
.md-hotline span { font-size: 12px; color: #cbd5e1; }
.md-hotline b { display: block; font-size: 16px; color: #fff; letter-spacing: .3px; }

/* ---------- Máy tính bảng: tránh header bị tràn khi nhiều nút ---------- */
@media (max-width: 991px) {
    html body .btn-admin-top .lbl-admin { display: none; }
    html body .btn-admin-top { padding: 0 12px; }
}

/* =====================================================================
   ĐIỆN THOẠI (≤767px)
   ===================================================================== */
@media (max-width: 767px) {
    html body { padding-top: 60px !important; padding-bottom: calc(64px + env(safe-area-inset-bottom)); -webkit-tap-highlight-color: transparent; }
    html body input.input-lite, html body input.form-control, html body select.input-lite, html body select.form-control,
    html body textarea.input-lite, html body textarea.form-control, html body .m-searchbar input { font-size: 16px; } /* iOS không tự phóng to khi gõ */

    /* ----- Header gọn 60px ----- */
    html body .navbar-custom { height: 60px; box-shadow: 0 1px 0 rgba(15, 23, 42, .06), 0 6px 18px rgba(15, 23, 42, .04); border-bottom-width: 2px; }
    html body .navbar-custom .container { padding: 0 12px 0 16px; gap: 8px; }
    html body .navbar-brand-neon { font-size: 16px; letter-spacing: 0; gap: 0; }
    html body .navbar-brand-neon i { display: none; }
    html body .auth-wrapper { gap: 6px; }
    html body .auth-wrapper .btn-auth-outline, html body .auth-wrapper .btn-auth-solid,
    html body #acctDrop, html body .btn-admin-top, html body .auth-wrapper .m-cart { display: none !important; }
    html body .m-search-btn, html body .notif-bell, html body .navbar-toggle-btn {
        display: inline-flex; align-items: center; justify-content: center;
        width: 40px; height: 40px; padding: 0; border: none; border-radius: 12px;
        background: #f1f5f9; color: #0f172a; font-size: 16px; box-shadow: none;
    }
    html body .m-search-btn[aria-expanded="true"] { background: #fff1f7; color: #ff007f; }
    html body .notif-count { top: -4px; left: 24px; }
    html body .notif-panel { position: fixed; top: 68px; left: 10px; right: 10px; width: auto; }

    /* ----- Ô tìm kiếm thả xuống ----- */
    html body .m-searchbar { display: block; position: fixed; top: 60px; left: 0; right: 0; z-index: 990; padding: 10px 12px 12px; background: #fff; box-shadow: 0 14px 30px rgba(15, 23, 42, .12); transform: translateY(-115%); visibility: hidden; transition: transform .25s ease, visibility .25s; }
    html body .m-searchbar.show { transform: none; visibility: visible; }
    .m-searchbar-in { position: relative; display: flex; align-items: center; height: 46px; border-radius: 14px; background: #f1f5f9; border: 1.5px solid transparent; padding: 0 5px 0 14px; }
    .m-searchbar-in:focus-within { border-color: #ff007f; background: #fff; }
    .m-searchbar-in > i { color: #94a3b8; }
    .m-searchbar-in input { flex: 1; min-width: 0; border: none; background: transparent; outline: none; padding: 0 10px; height: 100%; color: #0f172a; }
    .m-searchbar-in button { height: 36px; padding: 0 16px; border: none; border-radius: 10px; background: linear-gradient(135deg, #ff007f, #7928ca); color: #fff; font-weight: 800; font-size: 13.5px; }
    html body .m-searchbar .suggest-box { left: 0; right: 0; width: auto; }

    /* ----- Thanh điều hướng dưới ----- */
    html body .m-tabbar {
        display: grid; grid-template-columns: repeat(5, 1fr);
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
        height: calc(62px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
        background: rgba(255, 255, 255, .97); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
        border-top: 1px solid #eef2f7; box-shadow: 0 -6px 24px rgba(15, 23, 42, .06);
    }
    .m-tabbar a, .m-tabbar button {
        position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
        border: none; background: none; padding: 0; color: #94a3b8; text-decoration: none !important; font: inherit;
    }
    .m-tabbar i { font-size: 19px; transition: transform .2s; }
    .m-tabbar span { font-size: 10.5px; font-weight: 700; letter-spacing: .1px; }
    .m-tabbar .on { color: #ff007f; }
    .m-tabbar .on i { transform: translateY(-1px); }
    .m-tabbar .on::before { content: ""; position: absolute; top: 0; width: 26px; height: 3px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, #ff007f, #7928ca); }
    .m-tabbar a:active i, .m-tabbar button:active i { transform: scale(.88); }
    .m-tabbar em { position: absolute; top: 7px; left: calc(50% + 4px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #ff007f; color: #fff; font-style: normal; font-size: 10.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; }
    .m-tabbar em.zero { display: none; }

    /* Các nút nổi đứng trên thanh điều hướng dưới */
    html body .bc-launcher { bottom: calc(74px + env(safe-area-inset-bottom)); right: 14px; width: 50px; height: 50px; font-size: 21px; }
    html body .bc-teaser { bottom: calc(132px + env(safe-area-inset-bottom)); right: 14px; }
    html body .compare-float { bottom: calc(74px + env(safe-area-inset-bottom)) !important; right: auto; left: 12px; padding: 10px 14px; font-size: 13px; border-radius: 14px; }
    html body .qb-toast { bottom: calc(76px + env(safe-area-inset-bottom)); max-width: calc(100vw - 24px); white-space: normal; text-align: center; }

    /* ----- Chân trang gọn ----- */
    html body .footer-neon { padding: 26px 0 14px; }
    html body .footer-neon .container { padding: 0 18px; }
    html body .footer-badge-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 10px; padding: 4px 0 20px; margin: 0 0 20px; }
    html body .footer-badge-strip > div { width: auto; max-width: none; padding: 0; margin: 0 !important; }
    html body .badge-box { gap: 10px; align-items: flex-start; }
    html body .badge-box i { font-size: 19px; margin-top: 2px; }
    html body .badge-text-title { font-size: 11.5px; line-height: 1.3; }
    html body .badge-text-sub { font-size: 11px; line-height: 1.35; }
    html body .footer-neon h5 { font-size: 13px; margin-bottom: 12px; }
    html body .footer-neon p { font-size: 13px; line-height: 1.6; margin-bottom: 8px; }
    html body .footer-neon .row > [class*="col-md-"] { margin-bottom: 20px !important; }
    html body .footer-neon ul { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
    html body .footer-neon ul li { margin-bottom: 9px; }
    html body .footer-neon ul li a { font-size: 13px; }
    html body .footer-neon ul li a i { display: none; }
    html body .social-neon-wrap { margin-top: 12px; }
    html body .footer-bottom { padding-top: 14px; font-size: 11.5px; }
    html body .footer-bottom p { margin: 0; }

    /* ----- Phần chung ----- */
    html body .container { padding-left: 14px; padding-right: 14px; }
    html body .breadcrumb-lite { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 12px !important; }
    html body .pstrip-row { grid-auto-columns: 46%; gap: 10px; margin: 0 -14px; padding: 0 14px 6px; scroll-padding: 0 14px; scrollbar-width: none; }
    html body .pstrip-row::-webkit-scrollbar { display: none; }
    html body .pstrip-title { font-size: 16px; }
    html body .related-card img { height: 120px; }
    html body .pager-lite a, html body .pager-lite span { min-width: 38px; height: 38px; }
    html body .swal2-popup { width: calc(100vw - 32px) !important; border-radius: 20px !important; }

    /* =========================== TRANG CHỦ =========================== */
    html body.pg-home-index #main-content > .container { margin-top: 12px !important; }

    /* Danh mục dạng ô vuốt ngang */
    html body .m-cats { display: flex; gap: 6px; overflow-x: auto; margin: 0 -14px 14px; padding: 2px 14px 4px; scroll-snap-type: x proximity; scrollbar-width: none; }
    .m-cats::-webkit-scrollbar { display: none; }
    .m-cats a { flex: 0 0 66px; display: flex; flex-direction: column; align-items: center; gap: 6px; scroll-snap-align: start; color: #334155; font-size: 11.5px; font-weight: 700; text-decoration: none; text-align: center; line-height: 1.2; }
    .m-cats a span { width: 54px; height: 54px; border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 21px; border: 2px solid transparent; transition: transform .15s; }
    .m-cats a:active span { transform: scale(.92); }
    .m-cats a.on { color: #ff007f; }
    .m-cats a.on span { border-color: #ff007f; box-shadow: 0 6px 14px rgba(255, 0, 127, .18); }

    /* Cột trái → khung bộ lọc trượt từ dưới lên */
    html body .home-aside {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1700; width: 100%;
        max-height: 84vh; overflow-y: auto; overscroll-behavior: contain;
        padding: 0 14px calc(18px + env(safe-area-inset-bottom)); background: #f8fafc;
        border-radius: 22px 22px 0 0; box-shadow: 0 -20px 50px rgba(15, 23, 42, .25);
        transform: translateY(105%); visibility: hidden; transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility .3s;
    }
    html body .home-aside.is-open { transform: none; visibility: visible; }
    html body .filter-sheet-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 2; margin: 0 -14px 12px; padding: 18px 14px 12px; background: #f8fafc; }
    .filter-sheet-head::before { content: ""; position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: #cbd5e1; }
    .filter-sheet-head b { font-size: 16px; font-weight: 900; color: #0f172a; }
    .filter-sheet-head b i { color: #ff007f; margin-right: 6px; }
    .filter-sheet-head button { width: 36px; height: 36px; border-radius: 12px; border: none; background: #e2e8f0; color: #334155; }
    html body .filter-ov { display: block; position: fixed; inset: 0; z-index: 1650; background: rgba(15, 23, 42, .45); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
    html body .filter-ov.show { opacity: 1; visibility: visible; }
    html body .home-aside .sidebar-wrapper { margin-bottom: 12px; border-radius: 16px; }
    html body .home-aside .sidebar-header { padding: 12px 16px; font-size: 13px; }
    html body .home-aside .sidebar-menu li a { padding: 11px 16px; font-size: 14px; }
    html body .home-aside .sidebar-menu li a:hover { padding-left: 16px; }

    /* Banner & khối khuyến mãi */
    html body .hero-slider { height: 188px; border-radius: 18px; margin-bottom: 14px; border: none; }
    html body .hs-copy { padding: 0 18px; max-width: 78%; }
    html body .hs-eyebrow { font-size: 10px; letter-spacing: 1.2px; margin-bottom: 6px; }
    html body .hs-copy h2 { font-size: 19px; margin-bottom: 6px; }
    html body .hs-copy p { font-size: 12px; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    html body .hs-cta { font-size: 12.5px; padding: 8px 14px; }
    html body .hs-dots { bottom: 9px; }
    html body .promo-duo { grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 16px; }
    html body .pd-card { padding: 12px; border-radius: 16px; align-items: flex-start; flex-direction: column-reverse; gap: 8px; }
    html body .pd-copy b { font-size: 14px; }
    html body .pd-copy small { font-size: 11px; line-height: 1.35; }
    html body .pd-pill { font-size: 9px; padding: 2px 7px; }
    html body .pd-ic { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 11px; font-size: 16px; }

    /* Flash sale: vuốt ngang */
    html body .flash-strip { padding: 14px; border-radius: 18px; margin-bottom: 18px; }
    html body .flash-head h4 { font-size: 15px; }
    html body .flash-timer { font-size: 12px; padding: 4px 10px; }
    html body .flash-grid { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 42%; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; }
    html body .flash-grid::-webkit-scrollbar { display: none; }
    html body .flash-item img { height: 100px; }

    /* Thanh tìm kiếm cũ của trang chủ: đã có ô tìm trên header */
    html body .search-panel-neon { display: none; }
    html body .toolbar-lite { margin: 0 0 12px; font-size: 13px; gap: 8px; }
    html body .toolbar-lite > div:first-child { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
    html body .toolbar-lite select { height: 36px; font-size: 13px; padding-right: 28px; }
    html body .m-filter-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; margin-right: 4px; border-radius: 12px; border: 1.5px solid #e2e8f0; background: #fff; color: #0f172a; font-weight: 800; font-size: 13px; }
    html body .m-filter-btn i { color: #ff007f; }

    /* Lưới sản phẩm 2 cột */
    html body.pg-home-index main > .row { margin-left: -5px; margin-right: -5px; }
    html body.pg-home-index main > .row > [class*="col-sm-6"] { flex: 0 0 50%; max-width: 50%; width: 50%; padding-left: 5px; padding-right: 5px; }
    html body .shoe-card { margin-bottom: 10px; border-radius: 16px; border-width: 1px; box-shadow: 0 4px 14px rgba(15, 23, 42, .05); }
    html body .shoe-card::before { height: 2.5px; }
    html body .shoe-card:hover { transform: none; }
    html body .shoe-card:hover .shoe-img-wrap img { transform: none; }
    html body .shoe-img-wrap { padding: 12px 8px; }
    html body .shoe-img-wrap img { height: 118px; }
    html body .badge-swallowtail { left: 8px; width: 34px; font-size: 8px !important; padding: 6px 4px 11px !important; }
    html body .shoe-card .sale-tag { top: 8px; right: 8px; font-size: 10.5px; padding: 2px 6px; }
    html body .shoe-info { padding: 10px 10px 11px; text-align: left; }
    html body .shoe-info > .mb-1 { margin-bottom: 4px !important; }
    html body .shoe-info > .mb-1 .badge { font-size: 9.5px; padding: 3px 6px; }
    html body .shoe-info > .mb-1 .badge:first-child { display: none; }
    html body .shoe-title { font-size: 13px; height: 36px; line-height: 1.38; margin-bottom: 4px; font-weight: 700; }
    html body .shoe-info > div[style*="min-height"] { font-size: 11px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px !important; }
    html body .shoe-info .stars { font-size: 11px; letter-spacing: 0; }
    html body .shoe-info .rating-count { font-size: 11px; }
    html body .shoe-price { font-size: 16px; margin-bottom: 9px; }
    html body .shoe-price .old-price { display: block; margin: 0; font-size: 11.5px; -webkit-text-fill-color: #94a3b8; }
    html body .card-actions { gap: 6px; }
    html body .card-actions .btn-buy { padding: 0; height: 36px; font-size: 12px; letter-spacing: 0; border-radius: 10px; gap: 6px; box-shadow: 0 4px 10px rgba(255, 0, 127, .25); }
    html body .card-actions .btn-wish { min-width: 36px; width: 36px; height: 36px; padding: 0; }
    html body .card-actions .btn-compare { display: none; }

    /* ======================= CHI TIẾT SẢN PHẨM ======================= */
    html body .details-container { padding: 14px; border-radius: 22px; margin-top: 8px !important; margin-bottom: 18px; }
    html body .details-img-wrap { height: auto; aspect-ratio: 1 / 1; padding: 22px; border-radius: 18px; }
    html body .details-img-wrap:hover img { transform: none; }
    html body .gallery-thumb { flex-basis: 60px; height: 60px; }
    html body .details-content { padding: 16px 2px 0; }
    html body .tag-category { padding: 4px 10px; font-size: 10px; letter-spacing: .8px; margin-bottom: 6px; border-radius: 7px; }
    html body .details-title { font-size: 21px; line-height: 1.3; letter-spacing: -.2px; margin-bottom: 8px; }
    html body .details-price { font-size: 25px; margin-bottom: 12px; }
    html body .stock-status { font-size: 13.5px; padding: 10px 12px; }
    html body .buy-label { margin-top: 12px; }
    html body .variant-opt span { padding: 8px 12px; font-size: 13.5px; }
    /* Nút mua cố định ở đáy màn hình (thay thanh điều hướng dưới) */
    html body.pg-home-details { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
    html body.pg-home-details .m-tabbar { display: none; }
    html body .btn-action-group {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; margin: 0 !important; gap: 8px;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97);
        backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 -8px 26px rgba(15, 23, 42, .1);
    }
    html body .btn-action-group .btn-back { display: none; }
    html body .btn-action-group .btn-add-cart { height: 50px; padding: 0 10px; font-size: 14px; letter-spacing: .2px; border-radius: 14px; flex: 1 1 0; min-width: 0; }
    html body .btn-action-group .btn-add-cart:hover:not([disabled]) { transform: none; }
    html body.pg-home-details .bc-launcher { bottom: calc(84px + env(safe-area-inset-bottom)); }
    html body.pg-home-details .bc-teaser { bottom: calc(142px + env(safe-area-inset-bottom)); }
    html body.pg-home-details .compare-float { bottom: calc(84px + env(safe-area-inset-bottom)) !important; }
    html body .spec-grid { grid-template-columns: 1fr 1fr; gap: 8px; }

    /* =========================== GIỎ HÀNG =========================== */
    html body .white-cart-wrapper { padding: 14px 0 26px; min-height: 0; }
    html body .checkout-steps { margin-bottom: 14px; justify-content: space-between; gap: 4px; }
    html body .step-item { padding: 6px 10px 6px 6px; gap: 6px; font-size: 12px; border-radius: 999px; box-shadow: none; white-space: nowrap; }
    html body .step-item.active { transform: none; box-shadow: 0 0 0 3px rgba(0, 242, 254, .12); }
    html body .step-item:not(.active) { padding: 6px; }
    html body .step-item:not(.active) span:not(.step-number) { display: none; }
    html body .step-number { width: 24px; height: 24px; font-size: 12px; }
    html body .step-connector { flex: 1; width: auto; min-width: 10px; margin: 0; }
    html body .cart-container { padding: 16px; border-radius: 20px; }
    html body .cart-container:hover { box-shadow: 0 15px 40px rgba(15, 23, 42, .06); }
    html body .cart-title { font-size: 17px; margin-bottom: 4px; padding-bottom: 12px; gap: 8px; }
    /* Bảng → thẻ sản phẩm */
    html body .table-cart thead { display: none; }
    html body .table-cart, html body .table-cart tbody { display: block; }
    html body .table-cart tr {
        display: grid; grid-template-columns: 74px 1fr auto; column-gap: 12px; row-gap: 4px;
        grid-template-areas: "img name name" "img price price" "img qty total";
        position: relative; padding: 14px 0; border-bottom: 1px dashed #e2e8f0;
    }
    html body .table-cart td { display: block; padding: 0 !important; border: none !important; }
    html body .table-cart td:nth-child(1) { grid-area: img; }
    html body .table-cart td:nth-child(2) { grid-area: name; padding-right: 38px !important; }
    html body .table-cart td:nth-child(3) { grid-area: price; }
    html body .table-cart td:nth-child(4) { grid-area: qty; margin-top: 4px; }
    html body .table-cart td:nth-child(5) { grid-area: total; align-self: end; text-align: right; padding-bottom: 20px !important; }
    html body .table-cart td:nth-child(6) { position: absolute; top: 12px; right: 0; }
    html body .cart-img { width: 74px; height: 74px; border-radius: 14px; }
    html body .cart-product-name { font-size: 14px; line-height: 1.35; }
    html body .cart-price { font-size: 13px; }
    html body .cart-line-total { font-size: 15px; }
    html body .table-cart td small { font-size: 11.5px; }
    html body .qty-step .qty-input { width: 40px; font-size: 15px; }
    html body .qs-btn { width: 32px; }
    html body .voucher-teaser { padding: 12px 14px; margin-top: 14px; font-size: 12.5px; gap: 10px; }
    html body .cart-summary { flex-direction: column; align-items: stretch; margin: 16px 0 0; padding-top: 14px; }
    html body .cart-summary > [class*="col-"] { width: 100%; max-width: 100%; flex: none; padding: 0; text-align: left !important; }
    html body .cart-summary > .col-md-7 { order: -1; }
    html body .total-title { display: flex; align-items: baseline; gap: 4px; margin: 0 0 6px; font-size: 14px; }
    html body .total-title strong, html body .total-title .total-price { margin-left: auto; }
    html body .total-price { font-size: 24px; }
    html body .cart-summary .btn-checkout { display: flex; width: 100%; justify-content: center; margin-top: 10px; padding: 15px 16px; font-size: 14.5px; letter-spacing: .4px; border-radius: 16px; }
    html body .cart-summary .btn-continue { display: flex; width: 100%; justify-content: center; margin-top: 10px; background: #fff; }
    html body .empty-cart-msg { padding: 30px 0 10px; }
    html body .empty-cart-msg i { font-size: 54px; }
    html body .empty-cart-msg h4 { font-size: 18px; }
    html body .empty-cart-msg .btn-checkout { padding: 13px 22px !important; font-size: 13.5px; letter-spacing: .3px; }
    html body .empty-cart-msg .btn-checkout i { font-size: 15px; margin: 0; color: #fff; }

    /* Thanh tiến trình 3 bước dùng chung (thanh toán, lịch sử đơn) */
    html body .checkout-steps { flex-direction: row; }
    html body .checkout-steps .step-connector { display: block; }
    html body .step-item.completed { padding: 6px; }

    /* ========================== THANH TOÁN ========================== */
    html body .white-checkout-wrap { padding: 14px 0 20px; min-height: 0; }
    html body.pg-shoppingcart-checkout { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
    html body.pg-shoppingcart-checkout .m-tabbar { display: none; }
    html body.pg-shoppingcart-checkout .bc-launcher { bottom: calc(88px + env(safe-area-inset-bottom)); }
    html body.pg-shoppingcart-checkout .bc-teaser { display: none !important; }
    html body .white-card { padding: 16px; border-radius: 20px; margin-bottom: 14px; box-shadow: 0 6px 20px rgba(15, 23, 42, .05); }
    html body .white-card:hover { border-color: var(--card-border, #e2e8f0); box-shadow: 0 6px 20px rgba(15, 23, 42, .05); }
    html body .white-card::before { height: 3px; }
    html body .card-heading { font-size: 15.5px; letter-spacing: .2px; margin-bottom: 14px; gap: 10px; }
    html body .card-heading i { font-size: 17px; width: 34px; height: 34px; border-radius: 11px; background: #fff1f7; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
    html body .white-card .field { margin-bottom: 14px; }
    html body .white-card .field > div[style*="space-between"] { flex-direction: column; align-items: flex-start !important; gap: 8px; }
    html body .btn-map-toggle { padding: 7px 12px; font-size: 12.5px; }
    html body #mapContainer .map-controls-bar { flex-wrap: wrap; }
    html body .address-chips { grid-template-columns: 1fr; }
    html body .payment-grid { gap: 10px; }
    html body .payment-card { padding: 14px 16px; border-radius: 16px; }
    html body .payment-card:hover { transform: none; }
    html body .voucher-box { padding: 14px; margin-bottom: 16px; border-radius: 16px; }
    html body .voucher-input-group .input-lite { min-width: 0; height: 46px; }
    html body .btn-apply-voucher { padding: 0 14px; flex-shrink: 0; }
    html body .voucher-chips { gap: 6px; }
    html body .voucher-chip { padding: 6px 10px; font-size: 11.5px; border-radius: 10px; }
    html body .mini-cart-item { padding: 10px 0; }
    html body .mini-cart-img { width: 56px; height: 56px; border-radius: 12px; object-fit: contain; }
    html body .summary-row { font-size: 13.5px; padding: 6px 0; }
    html body .summary-row.total-row { font-size: 14px; padding-top: 12px; }
    html body .neon-grand-total { font-size: 22px; }
    html body .white-checkout-wrap .btn-submit-order { display: none; } /* dùng nút ở thanh dưới */
    html body .btn-back-cart { margin-top: 12px; }
    html body .ck-bar {
        display: flex; align-items: center; gap: 12px;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97);
        backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 -8px 26px rgba(15, 23, 42, .1);
    }
    .ck-bar-total { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
    .ck-bar-total small { font-size: 11.5px; color: #64748b; font-weight: 600; }
    .ck-bar-total b { font-size: 20px; font-weight: 900; color: #ff007f; white-space: nowrap; }
    .ck-bar-btn { height: 50px; padding: 0 22px; border: none; border-radius: 14px; background: linear-gradient(135deg, #ff007f, #7928ca); color: #fff; font-weight: 900; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 8px 20px rgba(255, 0, 127, .3); white-space: nowrap; }
    .ck-bar-btn:disabled { opacity: .75; }

    /* ======================== LỊCH SỬ ĐƠN HÀNG ======================== */
    html body .white-history-wrap { padding: 14px 0 24px; min-height: 0; }
    html body .history-top-bar { flex-wrap: wrap; gap: 10px; margin-bottom: 16px; align-items: flex-end; }
    html body .history-top-bar > div:first-child { flex: 1 1 100%; }
    html body .history-top-title { font-size: 20px; gap: 10px; }
    html body .history-top-bar p { font-size: 13px !important; margin: 4px 0 0 !important; }
    html body .history-top-bar > .btn-order-detail-neon { margin-left: 0; padding: 8px 14px !important; font-size: 12.5px; }
    html body .order-card-neon { border-radius: 18px; margin-bottom: 14px; box-shadow: 0 6px 18px rgba(15, 23, 42, .05); }
    html body .order-card-neon:hover { transform: none; }
    html body .order-card-head { padding: 14px 14px 12px; gap: 8px; }
    html body .order-card-head > div { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
    html body .order-id-badge { font-size: 13.5px; padding: 3px 10px; }
    html body .order-date-text { margin-left: 0 !important; font-size: 12px; }
    html body .badge-status-neon { padding: 4px 10px; font-size: 10.5px; box-shadow: none; }
    html body .order-products-wrap { padding: 2px 14px; }
    html body .order-product-row { display: grid; grid-template-columns: 60px 1fr; column-gap: 12px; padding: 12px 0; align-items: start; }
    html body .order-prod-thumb { width: 60px; height: 60px; grid-row: span 2; object-fit: contain; }
    html body .order-prod-name { font-size: 13.5px; line-height: 1.35; }
    html body .order-prod-tags { flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
    html body .order-prod-tags .badge { font-size: 10px; }
    html body .order-prod-qty-price { font-size: 12px; }
    html body .order-prod-item-total { grid-column: 2; text-align: left; font-size: 14.5px; margin-top: 2px; }
    html body .order-card-foot { padding: 12px 14px 14px; flex-direction: column; align-items: stretch; gap: 12px; }
    html body .order-foot-info { max-width: 100%; }
    html body .delivery-meta-item { font-size: 12.5px; align-items: flex-start; gap: 6px; flex-wrap: nowrap; }
    html body .delivery-meta-item i { margin-top: 3px; }
    html body .btn-maps-badge { font-size: 11.5px; padding: 5px 12px; }
    html body .order-card-foot > div:last-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px dashed #e2e8f0; }
    html body .order-total-block { text-align: left; display: flex; flex-direction: column; }
    html body .order-grand-label { font-size: 12px; }
    html body .order-grand-amount { margin-left: 0; font-size: 19px; }
    html body .order-card-foot .btn-order-detail-neon { margin-left: 0; padding: 9px 14px; white-space: nowrap; }

    /* ======================== CHI TIẾT ĐƠN HÀNG ======================== */
    html body .white-detail-wrap { padding: 14px 0 20px; min-height: 0; }
    html body .detail-card-white { border-radius: 18px; margin-bottom: 14px; }
    html body .detail-header-white { padding: 14px; gap: 10px; }
    html body .detail-title-white { font-size: 15px; gap: 8px; flex-wrap: wrap; letter-spacing: .2px; }
    html body .order-id-tag-white { font-size: 13px; padding: 2px 10px; }
    html body .detail-header-white > div { width: 100%; }
    html body .btn-back-history-white { padding: 8px 14px; font-size: 12.5px; }
    html body .detail-card-white > div[style*="margin-bottom:16px"] { padding: 12px 14px 0; }
    html body .detail-card-white > .flash { margin: 12px 14px 0; }
    html body .delivery-summary-box { padding: 14px; }
    html body .delivery-summary-title { font-size: 12.5px; margin-bottom: 10px; }
    html body .delivery-info-row { font-size: 13px; align-items: flex-start; }
    html body .delivery-info-row i { margin-top: 3px; }
    /* Bảng sản phẩm → thẻ */
    html body .table-details-white thead { display: none; }
    html body .table-details-white, html body .table-details-white tbody { display: block; }
    html body .table-details-white tr { display: grid; grid-template-columns: 64px 1fr auto; column-gap: 12px; row-gap: 2px; grid-template-areas: "img name name" "img qty total" "img price price"; padding: 12px 14px; border-bottom: 1px dashed #e2e8f0; }
    html body .table-details-white td { display: block; padding: 0 !important; border: none !important; text-align: left !important; }
    html body .table-details-white td[colspan] { grid-column: 1 / -1; text-align: center !important; padding: 20px 0 !important; }
    html body .table-details-white td:nth-child(1) { grid-area: img; }
    html body .table-details-white td:nth-child(2) { grid-area: name; }
    html body .table-details-white td:nth-child(3) { grid-area: qty; font-size: 12.5px !important; font-weight: 600 !important; color: #64748b !important; margin-top: 4px; }
    html body .table-details-white td:nth-child(3)::before { content: "Số lượng: "; }
    html body .table-details-white td:nth-child(4) { grid-area: price; font-size: 12px; }
    html body .table-details-white td:nth-child(4)::before { content: "Đơn giá: "; }
    html body .table-details-white td:nth-child(5) { grid-area: total; text-align: right !important; font-size: 15px !important; margin-top: 4px; }
    html body .detail-product-img-white { width: 64px; height: 64px; object-fit: contain; }
    html body .detail-product-name-white { font-size: 13.5px; line-height: 1.35; }
    html body .detail-footer-white { padding: 14px; flex-direction: column-reverse; align-items: stretch; gap: 10px; }
    html body .detail-footer-white .text-right { text-align: left !important; }
    html body .detail-grand-total-white { font-size: 24px; }
    html body .detail-footer-white .text-right > span:first-of-type { margin-right: 6px !important; }
    html body .white-detail-wrap + .container .card-lite form { width: 100%; }
    html body .white-detail-wrap + .container .card-lite input[name="reason"] { width: 100% !important; flex: 1 1 100%; }
    html body .white-detail-wrap + .container .card-lite button { width: 100%; justify-content: center; }

    /* ========================== TÀI KHOẢN ========================== */
    html body .account-nav { position: relative; flex-wrap: nowrap; overflow-x: auto; gap: 8px; margin: 0 -14px 16px; padding: 2px 14px 6px; scrollbar-width: none; }
    html body .account-nav::-webkit-scrollbar { display: none; }
    html body .account-nav a { flex: 0 0 auto; white-space: nowrap; padding: 8px 14px; font-size: 13px; border-radius: 999px; }
    html body .card-lite { border-radius: 18px; }
    /* Bảng dữ liệu (điểm thưởng, chính sách, so sánh, tra cứu đơn): vuốt ngang thay vì bóp chữ */
    html body table.table-lite { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    html body table.table-lite th, html body table.table-lite td { white-space: nowrap; }
    html body table.table-lite.compare-table td { white-space: normal; min-width: 150px; }
    html body .page-title { font-size: 20px; }
    html body .page-sub { font-size: 13px; }
}

/* Máy rất nhỏ (≤360px) */
@media (max-width: 360px) {
    html body .navbar-brand-neon { font-size: 14px; }
    html body .m-search-btn, html body .notif-bell, html body .navbar-toggle-btn { width: 36px; height: 36px; }
    html body .shoe-img-wrap img { height: 100px; }
    html body .card-actions .btn-buy { font-size: 11px; }
    html body .card-actions .btn-buy i { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html body .mobile-nav-menu, html body .home-aside, html body .m-searchbar { transition: none; }
}
