/* =============================================================
   BestDealz International — Discovery theme (Sprint 2)
   Used by: Search, Category, Subcategory, Brand, Suppliers,
   Single supplier shop. Extends bd-alibaba.css.
============================================================= */

/* ---------- Page header band ---------- */
.dx-page-head {
    background: linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%);
    border-bottom: 1px solid var(--line);
    padding: 18px 0 16px;
}
.dx-page-head .dx-row {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
}
.dx-page-head h1 {
    font-size: clamp(20px, 2.6vw, 26px);
    font-weight: 800;
    color: var(--ink-900);
    margin: 0;
    letter-spacing: -.01em;
    display: inline-flex; align-items: center; gap: 10px;
}
.dx-page-head h1 .accent { color: var(--bd-orange); }
.dx-page-head h1 .pill {
    background: var(--bd-orange-soft);
    color: var(--bd-orange);
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 50px;
    font-weight: 800;
    letter-spacing: .8px;
}
.dx-page-head .count {
    font-size: 12.5px;
    color: var(--ink-500);
    margin-top: 4px;
}
.dx-page-head .count strong { color: var(--ink-900); font-weight: 700; }
.dx-page-head .query {
    color: var(--bd-orange); font-weight: 700;
}

/* ---------- Toolbar (sort + view + filter trigger on mobile) ---------- */
.dx-toolbar {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 14px;
    display: flex; align-items: center; gap: 10px;
    flex-wrap: wrap;
}
.dx-toolbar-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 200px; }
.dx-toolbar-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dx-toolbar .applied-filters {
    display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}
.dx-filter-pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 10px;
    background: var(--bd-orange-soft);
    color: var(--bd-orange);
    border-radius: 50px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.dx-filter-pill:hover { background: rgba(240,140,0,.2); }
.dx-filter-pill::after { content: '×'; font-size: 14px; line-height: 1; opacity: .7; }
.dx-clear-all {
    font-size: 11.5px;
    color: var(--ali-red);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: 0;
    background: none;
    padding: 4px 8px;
}
.dx-clear-all:hover { text-decoration: underline; }
.dx-sort-select {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 12.5px;
    background: #fff;
    color: var(--ink-700);
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.dx-view-toggle {
    display: flex;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
}
.dx-view-toggle button {
    background: #fff;
    border: 0;
    padding: 7px 10px;
    color: var(--ink-500);
    cursor: pointer;
    transition: all .15s;
}
.dx-view-toggle button:hover { background: var(--bg-tint); }
.dx-view-toggle button.active { background: var(--bd-orange); color: #fff; }
.dx-view-toggle button svg { width: 14px; height: 14px; vertical-align: -2px; }
.dx-mobile-filter-btn {
    display: none;
    align-items: center; gap: 6px;
    padding: 8px 14px;
    background: var(--bd-orange);
    color: #fff;
    border: 0;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
}
.dx-mobile-filter-btn svg { width: 13px; height: 13px; }
.dx-mobile-filter-btn .badge {
    background: rgba(255,255,255,.25);
    padding: 1px 6px;
    border-radius: 50px;
    font-size: 10px;
    margin-left: 2px;
}

/* ---------- Discovery layout (sidebar + main) ---------- */
.dx-shell {
    background: var(--bg-soft);
    padding: 14px 0 50px;
    min-height: 60vh;
}
.dx-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 16px;
    align-items: flex-start;
}

/* ---------- Filter sidebar ---------- */
.dx-sidebar {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    position: sticky;
    top: 14px;
    max-height: calc(100vh - 30px);
    overflow-y: auto;
}
.dx-sidebar::-webkit-scrollbar { width: 4px; }
.dx-sidebar::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }
.dx-filter-group {
    border-bottom: 1px solid var(--line-soft);
    padding: 14px 18px;
}
.dx-filter-group:last-child { border-bottom: 0; }
.dx-filter-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px;
    cursor: pointer;
    user-select: none;
}
.dx-filter-head h6 {
    font-size: 12px;
    font-weight: 800;
    color: var(--ink-900);
    margin: 0;
    letter-spacing: .8px;
    text-transform: uppercase;
}
.dx-filter-head svg {
    width: 12px; height: 12px;
    color: var(--ink-400);
    transition: transform .15s;
}
.dx-filter-group.collapsed .dx-filter-head svg { transform: rotate(-90deg); }
.dx-filter-body { display: block; }
.dx-filter-group.collapsed .dx-filter-body { display: none; }

.dx-filter-item {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 0;
    font-size: 12.5px;
    color: var(--ink-700);
    cursor: pointer;
    transition: color .15s;
}
.dx-filter-item:hover { color: var(--bd-orange); }
.dx-filter-item input[type=checkbox],
.dx-filter-item input[type=radio] {
    accent-color: var(--bd-orange);
    cursor: pointer;
}
.dx-filter-item .count {
    margin-left: auto;
    color: var(--ink-400);
    font-size: 11px;
    font-weight: 600;
}
.dx-filter-item.active { color: var(--bd-orange); font-weight: 700; }

.dx-price-range {
    display: flex; gap: 8px; align-items: center;
    margin-top: 4px;
}
.dx-price-range input {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 12px;
    background: #fff;
    outline: none;
    font-family: inherit;
    transition: border-color .15s;
    min-width: 0;
}
.dx-price-range input:focus { border-color: var(--bd-orange); }
.dx-price-range button {
    padding: 7px 12px;
    background: var(--bd-orange);
    color: #fff;
    border: 0;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
}
.dx-price-presets {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-top: 8px;
}
.dx-price-presets button {
    background: var(--bg-tint);
    border: 1px solid var(--line);
    color: var(--ink-700);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 11px;
    cursor: pointer;
    transition: all .15s;
}
.dx-price-presets button:hover {
    border-color: var(--bd-orange);
    color: var(--bd-orange);
}

/* Class filter — colored chips */
.dx-class-chips {
    display: flex; gap: 6px; flex-wrap: wrap;
}
.dx-class-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 12px;
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: 50px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    color: var(--ink-700);
}
.dx-class-chip:hover { border-color: var(--ink-300); }
.dx-class-chip.active.a { background: var(--bd-blue); border-color: var(--bd-blue); color: #fff; }
.dx-class-chip.active.b { background: var(--bd-orange); border-color: var(--bd-orange); color: #fff; }
.dx-class-chip.active.c { background: var(--bd-green); border-color: var(--bd-green); color: #fff; }
.dx-class-chip .dot {
    width: 7px; height: 7px; border-radius: 50%;
}
.dx-class-chip .dot.a { background: var(--bd-blue); }
.dx-class-chip .dot.b { background: var(--bd-orange); }
.dx-class-chip .dot.c { background: var(--bd-green); }
.dx-class-chip.active .dot { background: rgba(255,255,255,.7); }

/* Star rating filter */
.dx-stars-filter { display: flex; flex-direction: column; gap: 4px; }
.dx-stars-filter .dx-filter-item .stars {
    color: #ff9900;
    letter-spacing: 1px;
}
.dx-stars-filter .dx-filter-item .stars .empty { color: var(--line); }

/* ---------- Product grid (uses .product-grid from alibaba.css) ---------- */
.dx-grid-main { min-width: 0; }
.dx-products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.dx-products.list-view {
    grid-template-columns: 1fr;
    gap: 12px;
}
.dx-products.list-view .pd-card {
    display: grid;
    grid-template-columns: 200px 1fr 180px;
    gap: 0;
}
.dx-products.list-view .pd-card .pd-image { aspect-ratio: 1/1; }
.dx-products.list-view .pd-card .pd-body { padding: 16px 18px; }
.dx-products.list-view .pd-card .pd-title { font-size: 14px; min-height: 0; }
.dx-products.list-view .pd-card .pd-foot-actions {
    display: flex; flex-direction: column; gap: 8px;
    padding: 16px;
    border-left: 1px solid var(--line);
    background: var(--bg-tint);
    justify-content: center;
}

/* ---------- Pagination ---------- */
.dx-pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 4px;
    margin-top: 22px;
    flex-wrap: wrap;
}
.dx-pagination a,
.dx-pagination span {
    min-width: 36px; height: 36px;
    padding: 0 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-700);
    text-decoration: none;
    transition: all .15s;
}
.dx-pagination a:hover {
    border-color: var(--bd-orange);
    color: var(--bd-orange);
}
.dx-pagination .active,
.dx-pagination .current {
    background: var(--bd-orange);
    border-color: var(--bd-orange);
    color: #fff;
}
.dx-pagination .disabled {
    opacity: .4;
    cursor: not-allowed;
    pointer-events: none;
}
.dx-pagination .dx-page-arrow {
    font-weight: 800;
}

/* ---------- Empty state ---------- */
.dx-empty {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 60px 24px;
    text-align: center;
}
.dx-empty .ic {
    width: 80px; height: 80px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--bd-orange-soft);
    color: var(--bd-orange);
    display: grid; place-items: center;
}
.dx-empty .ic svg { width: 36px; height: 36px; }
.dx-empty h3 { font-size: 18px; font-weight: 800; color: var(--ink-900); margin: 0 0 6px; }
.dx-empty p { font-size: 13.5px; color: var(--ink-500); margin: 0 0 18px; max-width: 420px; margin-left: auto; margin-right: auto; }
.dx-empty .suggestions {
    display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
    margin: 14px 0 0;
}
.dx-empty .suggestions a {
    padding: 7px 14px;
    background: var(--bg-tint);
    border: 1px solid var(--line);
    border-radius: 50px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-700);
    text-decoration: none;
    transition: all .15s;
}
.dx-empty .suggestions a:hover {
    border-color: var(--bd-orange);
    color: var(--bd-orange);
    background: var(--bd-orange-soft);
}

/* ---------- Suppliers list ---------- */
.dx-supplier-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all .25s;
}
.dx-supplier-card:hover {
    border-color: var(--bd-orange);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}
.dx-supplier-cover {
    position: relative;
    height: 110px;
    background: linear-gradient(135deg, var(--bd-blue-soft), var(--bd-orange-soft));
    overflow: hidden;
}
.dx-supplier-cover img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.dx-supplier-cover::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.35));
}
.dx-supplier-cover .verified-pill {
    position: absolute; top: 10px; right: 10px;
    background: var(--bd-green);
    color: #fff;
    font-size: 9.5px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 50px;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-flex; align-items: center; gap: 4px;
}
.dx-supplier-cover .verified-pill svg { width: 10px; height: 10px; }
.dx-supplier-logo {
    position: absolute;
    left: 16px; bottom: -22px;
    width: 56px; height: 56px;
    border-radius: 10px;
    background: #fff;
    border: 2px solid #fff;
    box-shadow: var(--shadow-sm);
    display: grid; place-items: center;
    font-size: 18px;
    font-weight: 900;
    color: var(--bd-orange);
    z-index: 2;
}
.dx-supplier-body { padding: 30px 18px 16px; }
.dx-supplier-name {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--ink-900);
    margin: 0 0 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dx-supplier-meta {
    display: flex; align-items: center; gap: 6px;
    font-size: 11.5px;
    color: var(--ink-500);
    margin-bottom: 10px;
}
.dx-supplier-meta .flag {
    width: 14px; height: 10px;
    border-radius: 1px;
    flex-shrink: 0;
}
.dx-supplier-meta .flag.cn { background: #d8232a; }
.dx-supplier-meta .flag.za { background: linear-gradient(180deg, #007749 50%, #de3831 50%); }
.dx-supplier-meta .dot { color: var(--ink-300); }
.dx-supplier-badges {
    display: flex; flex-wrap: wrap; gap: 4px;
    margin-bottom: 10px;
}
.dx-supplier-badges .b {
    font-size: 9.5px;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 3px;
    letter-spacing: .5px;
    text-transform: uppercase;
    display: inline-flex; align-items: center; gap: 3px;
}
.dx-supplier-badges .b.gold { background: #fff4d3; color: #b8860b; }
.dx-supplier-badges .b.green { background: var(--bd-green-soft); color: var(--bd-green); }
.dx-supplier-badges .b.blue { background: var(--bd-blue-soft); color: var(--bd-blue); }
.dx-supplier-badges .b svg { width: 10px; height: 10px; }
.dx-supplier-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 10px 0;
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    margin-bottom: 10px;
}
.dx-supplier-stats .stat { text-align: center; }
.dx-supplier-stats .num {
    font-size: 13.5px; font-weight: 800; color: var(--ink-900);
    line-height: 1;
}
.dx-supplier-stats .lbl {
    font-size: 10px;
    color: var(--ink-400);
    margin-top: 3px;
    letter-spacing: .3px;
}
.dx-supplier-cta {
    display: flex; gap: 6px;
}
.dx-supplier-cta a {
    flex: 1;
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-700);
    font-weight: 700;
    font-size: 11.5px;
    text-decoration: none;
    transition: all .15s;
}
.dx-supplier-cta a:hover { border-color: var(--bd-orange); color: var(--bd-orange); }
.dx-supplier-cta a.primary {
    background: var(--bd-orange);
    color: #fff;
    border-color: var(--bd-orange);
}
.dx-supplier-cta a.primary:hover { background: var(--bd-orange-dk); color: #fff; }

/* Suppliers grid layout */
.dx-suppliers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

/* ---------- Single supplier shop hero ---------- */
.dx-shop-hero {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 14px;
}
.dx-shop-banner {
    height: 180px;
    background: linear-gradient(135deg, var(--bd-blue) 0%, var(--bd-blue-dk) 50%, var(--bd-navy-900, #001838) 100%);
    position: relative;
    overflow: hidden;
}
.dx-shop-banner::before {
    content: '';
    position: absolute;
    right: -50px; top: -50px;
    width: 240px; height: 240px;
    background: radial-gradient(circle, rgba(240,140,0,.3), transparent 60%);
    pointer-events: none;
}
.dx-shop-banner img {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: .35;
}
.dx-shop-info {
    padding: 0 24px 22px;
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 22px;
    align-items: flex-end;
    position: relative;
    margin-top: -50px;
}
.dx-shop-logo {
    width: 100px; height: 100px;
    border-radius: 14px;
    background: #fff;
    border: 3px solid #fff;
    box-shadow: var(--shadow-md);
    display: grid; place-items: center;
    font-size: 32px;
    font-weight: 900;
    color: var(--bd-orange);
    z-index: 2;
}
.dx-shop-text {
    padding-bottom: 8px;
}
.dx-shop-text h1 {
    font-size: 22px; font-weight: 800;
    color: var(--ink-900);
    margin: 0 0 6px;
    letter-spacing: -.01em;
}
.dx-shop-text .meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    font-size: 13px; color: var(--ink-500);
    margin-bottom: 8px;
}
.dx-shop-text .meta .flag {
    width: 16px; height: 12px;
    border-radius: 1px;
}
.dx-shop-text .meta .flag.cn { background: #d8232a; }
.dx-shop-text .meta .flag.za { background: linear-gradient(180deg, #007749 50%, #de3831 50%); }
.dx-shop-text .meta .sep { color: var(--ink-300); }
.dx-shop-text .badges { display: flex; flex-wrap: wrap; gap: 5px; }
.dx-shop-actions {
    padding-bottom: 8px;
    display: flex; gap: 8px; flex-wrap: wrap;
}
.dx-shop-actions a {
    padding: 9px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12.5px;
    text-decoration: none;
    transition: all .15s;
}
.dx-shop-actions a.primary { background: var(--bd-orange); color: #fff; }
.dx-shop-actions a.primary:hover { background: var(--bd-orange-dk); }
.dx-shop-actions a.ghost {
    background: #fff; color: var(--ink-700);
    border: 1px solid var(--line);
}
.dx-shop-actions a.ghost:hover { border-color: var(--bd-orange); color: var(--bd-orange); }
.dx-shop-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line-soft);
    padding: 14px 0;
    margin: 14px 24px 0;
}
.dx-shop-stats .stat { text-align: center; }
.dx-shop-stats .stat:not(:last-child) { border-right: 1px solid var(--line-soft); }
.dx-shop-stats .num {
    font-size: 18px; font-weight: 800;
    color: var(--bd-orange);
    line-height: 1;
}
.dx-shop-stats .lbl {
    font-size: 11px;
    color: var(--ink-500);
    margin-top: 4px;
}

/* ---------- Mobile filter drawer ---------- */
.dx-filter-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
}
.dx-filter-backdrop.show { opacity: 1; pointer-events: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .dx-grid { grid-template-columns: 1fr; }
    .dx-sidebar {
        position: fixed;
        left: 0; top: 0;
        width: min(92vw, 360px);
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        border: 0;
        transform: translateX(-100%);
        transition: transform .25s ease;
        z-index: 1001;
        box-shadow: 10px 0 40px rgba(0,0,0,.2);
    }
    .dx-sidebar.open { transform: translateX(0); }
    .dx-sidebar-mobile-head {
        display: flex; align-items: center; justify-content: space-between;
        padding: 14px 18px;
        background: var(--bd-orange);
        color: #fff;
        position: sticky; top: 0;
        z-index: 2;
    }
    .dx-sidebar-mobile-head h4 { font-size: 14px; font-weight: 800; margin: 0; }
    .dx-sidebar-mobile-head button {
        background: rgba(255,255,255,.18);
        color: #fff; border: 0;
        width: 30px; height: 30px;
        border-radius: 50%;
        font-size: 18px; cursor: pointer;
    }
    .dx-mobile-filter-btn { display: inline-flex; }
    .dx-suppliers-grid { grid-template-columns: repeat(2, 1fr); }
    .dx-products { grid-template-columns: repeat(3, 1fr); }
    .dx-products.list-view .pd-card { grid-template-columns: 140px 1fr 150px; }
    .dx-shop-info { grid-template-columns: 80px 1fr; padding: 0 18px 18px; gap: 14px; }
    .dx-shop-actions { grid-column: 1 / -1; }
    .dx-shop-logo { width: 80px; height: 80px; font-size: 24px; }
    .dx-shop-stats { grid-template-columns: repeat(2, 1fr); gap: 0; margin: 14px 16px 0; }
    .dx-shop-stats .stat:nth-child(2) { border-right: 0; }
    .dx-shop-stats .stat { padding: 8px 0; }
    .dx-shop-stats .stat:nth-child(odd) { border-right: 1px solid var(--line-soft); }
}
@media (max-width: 768px) {
    .dx-page-head { padding: 14px 0 12px; }
    .dx-page-head h1 { font-size: 18px; }
    .dx-toolbar { padding: 10px 12px; }
    .dx-toolbar-left { width: 100%; }
    .dx-toolbar-right { width: 100%; justify-content: flex-end; }
    .dx-products { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .dx-products.list-view .pd-card {
        grid-template-columns: 110px 1fr;
        grid-template-areas:
            "img info"
            "img foot";
    }
    .dx-products.list-view .pd-card .pd-image { grid-area: img; aspect-ratio: 1/1; }
    .dx-products.list-view .pd-card .pd-body { grid-area: info; padding: 10px 12px; }
    .dx-products.list-view .pd-card .pd-foot-actions {
        grid-area: foot;
        grid-column: 1 / -1;
        flex-direction: row;
        border-left: 0;
        border-top: 1px solid var(--line);
        padding: 8px 12px;
    }
    .dx-suppliers-grid { grid-template-columns: 1fr; }
    .dx-shop-banner { height: 130px; }
    .dx-shop-text h1 { font-size: 18px; }
    .dx-pagination a,
    .dx-pagination span { min-width: 32px; height: 32px; font-size: 12px; }
}
@media (max-width: 480px) {
    .dx-products,
    .dx-products.list-view { grid-template-columns: 1fr; }
    .dx-products .pd-card { display: grid; grid-template-columns: 120px 1fr; }
    .dx-products .pd-card .pd-image { aspect-ratio: 1/1; }
    .dx-shop-info { grid-template-columns: 70px 1fr; }
    .dx-shop-logo { width: 70px; height: 70px; font-size: 20px; }
}

/* =============================================================
   Category polish (v1.2) — richer hero, class banner, chips, trust
============================================================= */

/* ---------- Hero ---------- */
.dx-hero {
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    border-bottom: 1px solid var(--line);
    padding: 22px 0 18px;
}
.dx-hero-row {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.dx-hero-thumb {
    width: 92px; height: 92px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 4px 12px rgba(0, 60, 140, .06);
}
.dx-hero-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dx-hero-body { flex: 1; min-width: 240px; }
.dx-hero-body h1 {
    font-size: clamp(22px, 2.8vw, 30px);
    font-weight: 900;
    color: var(--ink-900);
    margin: 0 0 6px;
    letter-spacing: -.02em;
    display: inline-flex; align-items: center; gap: 12px;
    line-height: 1.15;
}
.dx-hero-body h1 .pill {
    background: var(--bd-orange);
    color: #fff;
    font-size: 11.5px;
    padding: 4px 11px;
    border-radius: 50px;
    font-weight: 800;
    letter-spacing: .6px;
    box-shadow: 0 2px 8px rgba(240, 140, 0, .25);
}
.dx-hero-body .lede {
    font-size: 13.5px;
    color: var(--ink-700);
    margin: 0;
    line-height: 1.55;
    max-width: 720px;
}

.dx-class-tally {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-top: 12px;
}
.dx-tally {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px;
    border-radius: 50px;
    background: #fff;
    border: 1px solid var(--line);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--ink-700);
}
.dx-tally .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dx-tally.a .dot { background: #003c8c; }
.dx-tally.b .dot { background: #f08c00; }
.dx-tally.c .dot { background: #15803d; }

/* ---------- Class panel banner (mirror of homepage class-panel-banner) ---------- */
.dx-class-panel-banner {
    margin-top: 18px;
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px 22px;
    border-radius: 14px;
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 60, 140, .12);
}
.dx-class-panel-banner.p-a { background: linear-gradient(135deg, #003c8c 0%, #0056cc 100%); }
.dx-class-panel-banner.p-b { background: linear-gradient(135deg, #f08c00 0%, #e76f00 100%); box-shadow: 0 6px 18px rgba(240, 140, 0, .22); }
.dx-class-panel-banner.p-c { background: linear-gradient(135deg, #15803d 0%, #0f6b30 100%); box-shadow: 0 6px 18px rgba(21, 128, 61, .18); }
.dx-class-panel-banner .ic {
    width: 56px; height: 56px;
    background: rgba(255, 255, 255, .18);
    border-radius: 14px;
    display: grid; place-items: center;
    flex-shrink: 0;
}
.dx-class-panel-banner .ic svg { width: 26px; height: 26px; color: #fff; }
.dx-class-panel-banner .txt h4 {
    font-size: 15.5px;
    font-weight: 800;
    margin: 0 0 3px;
    color: #fff;
    letter-spacing: -.01em;
}
.dx-class-panel-banner .txt p {
    font-size: 12.5px;
    margin: 0;
    opacity: .92;
    line-height: 1.45;
}
.dx-class-panel-banner .meta {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
.dx-class-panel-banner .meta .m {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px;
    opacity: .95;
}
.dx-class-panel-banner .meta .m svg { width: 15px; height: 15px; }
.dx-class-panel-banner .meta .m strong { font-weight: 800; }

/* ---------- Subcategory chip strip ---------- */
.dx-subcat-chips {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
}
.dx-subcat-chips a {
    padding: 7px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 50px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink-700);
    text-decoration: none;
    transition: all .15s;
}
.dx-subcat-chips a:hover {
    border-color: var(--bd-orange);
    color: var(--bd-orange);
}
.dx-subcat-chips a.active {
    background: var(--bd-blue);
    border-color: var(--bd-blue);
    color: #fff;
}

/* ---------- Applied filter chips (in toolbar) ---------- */
.dx-applied-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.dx-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 10px;
    background: var(--bd-orange);
    color: #fff;
    border-radius: 50px;
    font-size: 11.5px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity .15s;
}
.dx-chip:hover { opacity: .85; }
.dx-chip .x {
    width: 14px; height: 14px;
    background: rgba(255, 255, 255, .25);
    border-radius: 50%;
    display: grid; place-items: center;
    font-size: 13px;
    line-height: 1;
}
.dx-chip-clear {
    font-size: 11.5px;
    color: var(--ali-red, #dc2626);
    font-weight: 700;
    text-decoration: none;
    padding: 5px 8px;
    margin-left: 4px;
}
.dx-chip-clear:hover { text-decoration: underline; }

/* ---------- Sidebar trust block ---------- */
.dx-sidebar-trust {
    margin-top: 18px;
    padding: 16px 14px;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    border: 1px solid var(--line);
    border-radius: 10px;
}
.dx-sidebar-trust h6 {
    font-size: 11px;
    font-weight: 800;
    color: var(--ink-500);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin: 0 0 12px;
}
.dx-sidebar-trust-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 0;
    border-top: 1px solid #f1f5f9;
}
.dx-sidebar-trust-row:first-of-type { border-top: 0; padding-top: 0; }
.dx-sidebar-trust-row svg {
    width: 18px; height: 18px;
    color: var(--bd-orange);
    flex-shrink: 0;
    margin-top: 2px;
}
.dx-sidebar-trust-row strong {
    display: block;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--ink-900);
    margin-bottom: 2px;
}
.dx-sidebar-trust-row span {
    display: block;
    font-size: 11px;
    color: var(--ink-500);
    line-height: 1.45;
}

/* ---------- Trust strip below the grid ---------- */
.dx-trust-strip {
    margin-top: 26px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.dx-trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
}
.dx-trust-item .ic {
    width: 42px; height: 42px;
    border-radius: 10px;
    background: var(--bd-orange-soft);
    color: var(--bd-orange);
    display: grid; place-items: center;
    flex-shrink: 0;
}
.dx-trust-item .ic svg { width: 20px; height: 20px; }
.dx-trust-item strong {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: var(--ink-900);
    margin-bottom: 2px;
}
.dx-trust-item span {
    display: block;
    font-size: 11.5px;
    color: var(--ink-500);
    line-height: 1.45;
}

/* ---------- Related categories ---------- */
.dx-related-cats {
    margin-top: 26px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 22px;
}
.dx-related-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.dx-related-head h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--ink-900);
    margin: 0;
    letter-spacing: -.01em;
}
.dx-related-head a {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--bd-orange);
    text-decoration: none;
}
.dx-related-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}
.dx-related-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 8px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 10px;
    text-decoration: none;
    transition: all .15s;
}
.dx-related-tile:hover {
    border-color: var(--bd-orange);
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 60, 140, .08);
}
.dx-related-tile img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 8px;
}
.dx-related-tile .ph {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--bd-orange-soft);
    color: var(--bd-orange);
    display: grid; place-items: center;
    margin-bottom: 8px;
}
.dx-related-tile .ph svg { width: 22px; height: 22px; }
.dx-related-tile span {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--ink-700);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Class chips in sidebar (enhanced) ---------- */
.dx-class-chips {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}
.dx-class-chip {
    display: grid;
    grid-template-columns: 18px auto 1fr;
    gap: 8px;
    align-items: center;
    padding: 9px 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink-700);
    transition: all .15s;
}
.dx-class-chip:hover { border-color: var(--bd-orange); background: #fff8ee; }
.dx-class-chip.active {
    border-color: var(--bd-blue);
    background: rgba(0, 60, 140, .04);
    color: var(--bd-blue);
}
.dx-class-chip .dot {
    width: 14px; height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dx-class-chip .dot.a { background: #003c8c; }
.dx-class-chip .dot.b { background: #f08c00; }
.dx-class-chip .dot.c { background: #15803d; }
.dx-class-chip strong { font-size: 13px; font-weight: 900; color: var(--ink-900); }
.dx-class-chip .lbl { font-size: 11.5px; color: var(--ink-500); font-weight: 600; }

/* ---------- Responsive overrides ---------- */
@media (max-width: 1100px) {
    .dx-trust-strip { grid-template-columns: repeat(2, 1fr); }
    .dx-related-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 720px) {
    .dx-class-panel-banner {
        grid-template-columns: 48px 1fr;
        gap: 12px;
        padding: 14px 16px;
    }
    .dx-class-panel-banner .meta {
        grid-column: 1 / -1;
        padding-top: 6px;
        border-top: 1px solid rgba(255, 255, 255, .2);
        margin-top: 2px;
        gap: 12px;
    }
    .dx-class-panel-banner .ic { width: 48px; height: 48px; }
    .dx-hero-thumb { width: 64px; height: 64px; }
    .dx-trust-strip { grid-template-columns: 1fr; gap: 12px; }
    .dx-related-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
    .dx-related-grid { grid-template-columns: repeat(2, 1fr); }
}
