/* =============================================================
   BestDealz International — SECTION (category-alibaba) theme
   Used by: /category/{id}/{slug} (Section landing pages)
   Extends bd-alibaba.css — relies on its CSS variables and base.
============================================================= */

/* ---------- Breadcrumb ---------- */
.bj-breadcrumb {
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
    font-size: 12.5px;
}
.bj-breadcrumb ol {
    list-style: none;
    padding: 0; margin: 0;
    display: flex; flex-wrap: wrap; gap: 6px;
    align-items: center;
}
.bj-breadcrumb li {
    color: var(--ink-500);
    display: inline-flex; align-items: center; gap: 6px;
}
.bj-breadcrumb li::after {
    content: '›';
    color: var(--ink-300);
    margin-left: 4px;
}
.bj-breadcrumb li:last-child::after { content: ''; }
.bj-breadcrumb li a { color: var(--ink-700); text-decoration: none; font-weight: 500; }
.bj-breadcrumb li a:hover { color: var(--bd-orange); }
.bj-breadcrumb li.current { color: var(--ink-900); font-weight: 700; }

/* ---------- Hero banner ---------- */
.cat-hero {
    position: relative;
    background:
        linear-gradient(120deg, rgba(0,31,91,.94) 0%, rgba(0,60,140,.86) 60%, rgba(0,60,140,.55) 100%),
        var(--hero-bg, linear-gradient(135deg, #0f172a, #1e293b)) center/cover;
    color: #fff;
    overflow: hidden;
}
.cat-hero::after {
    content: '';
    position: absolute; right: -120px; top: -80px;
    width: 480px; height: 480px;
    background: radial-gradient(circle, rgba(240,140,0,.35) 0%, rgba(240,140,0,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}
.cat-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 28px;
    align-items: center;
    padding: 38px 0 32px;
}
.cat-hero-left h1 {
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 900;
    margin: 0 0 8px;
    letter-spacing: -.02em;
    line-height: 1.08;
}
.cat-hero-left h1 .pill {
    display: inline-block;
    background: var(--bd-orange);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 50px;
    vertical-align: 8px;
    margin-left: 10px;
    letter-spacing: .4px;
}
.cat-hero-left .lede {
    font-size: 15px;
    line-height: 1.55;
    opacity: .92;
    margin: 0 0 18px;
    max-width: 560px;
}
.cat-hero-stats {
    display: flex; flex-wrap: wrap; gap: 22px;
    margin-top: 4px;
}
.cat-hero-stat {
    display: flex; align-items: center; gap: 9px;
}
.cat-hero-stat .ic {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: rgba(255,255,255,.16);
    backdrop-filter: blur(4px);
    display: grid; place-items: center;
}
.cat-hero-stat .ic svg { width: 18px; height: 18px; }
.cat-hero-stat .v { font-size: 18px; font-weight: 900; line-height: 1; }
.cat-hero-stat .l { font-size: 11px; opacity: .85; }

.cat-hero-right {
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 14px;
    padding: 20px 22px;
}
.cat-hero-right h4 {
    font-size: 14px;
    font-weight: 800;
    margin: 0 0 10px;
    display: flex; align-items: center; gap: 8px;
}
.cat-hero-right h4 svg { width: 18px; height: 18px; color: var(--bd-orange); }
.cat-hero-right ul {
    list-style: none; padding: 0; margin: 0;
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px;
    font-size: 12.5px;
}
.cat-hero-right ul li {
    display: flex; align-items: center; gap: 7px;
    opacity: .92;
}
.cat-hero-right ul li svg {
    width: 14px; height: 14px;
    color: #4ade80;
    flex-shrink: 0;
}
.cat-hero-right .rfq-btn {
    margin-top: 14px;
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--bd-orange);
    color: #fff;
    padding: 9px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 800;
    font-size: 13px;
    transition: background .15s;
}
.cat-hero-right .rfq-btn:hover { background: var(--bd-orange-dk); }
.cat-hero-right .rfq-btn svg { width: 14px; height: 14px; }

/* ---------- Sticky horizontal filter rail ---------- */
.cat-rail {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 30;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.cat-rail-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.cat-rail-row::-webkit-scrollbar { display: none; }
.cat-rail-row > * { flex-shrink: 0; }
.cat-rail-label {
    font-size: 12px;
    font-weight: 800;
    color: var(--ink-500);
    text-transform: uppercase;
    letter-spacing: .5px;
    padding-right: 6px;
    border-right: 1px solid var(--line);
}
.cat-rail-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px;
    background: var(--bg-tint);
    border: 1px solid transparent;
    border-radius: 50px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-700);
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
}
.cat-rail-chip:hover {
    background: var(--bd-orange-soft);
    color: var(--bd-orange);
}
.cat-rail-chip.active {
    background: var(--bd-blue);
    color: #fff;
    border-color: var(--bd-blue);
}
.cat-rail-chip .ct {
    font-size: 10.5px;
    background: rgba(0,0,0,.08);
    padding: 1px 7px;
    border-radius: 50px;
    font-weight: 700;
}
.cat-rail-chip.active .ct { background: rgba(255,255,255,.22); }
.cat-rail-divider {
    width: 1px; height: 22px;
    background: var(--line);
    margin: 0 4px;
}
.cat-rail-more {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px;
    background: #fff;
    border: 1px solid var(--ink-700);
    border-radius: 50px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink-900);
    cursor: pointer;
    margin-left: auto;
}
.cat-rail-more svg { width: 13px; height: 13px; }
.cat-rail-sort {
    padding: 7px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 50px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-700);
    cursor: pointer;
    font-family: inherit;
}

/* ---------- Section heading ---------- */
.cat-section {
    padding: 32px 0 16px;
}
.cat-sec-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bd-blue);
}
.cat-sec-head h2 {
    font-size: 22px;
    font-weight: 900;
    color: var(--ink-900);
    margin: 0;
    letter-spacing: -.015em;
    display: flex; align-items: center; gap: 10px;
}
.cat-sec-head h2 .ic {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--bd-orange-soft);
    color: var(--bd-orange);
    display: grid; place-items: center;
}
.cat-sec-head h2 .ic svg { width: 16px; height: 16px; }
.cat-sec-head .desc {
    font-size: 12.5px;
    color: var(--ink-500);
    margin-top: 4px;
}
.cat-sec-head .right-link {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12.5px;
    color: var(--bd-orange);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.cat-sec-head .right-link svg { width: 12px; height: 12px; }

/* ---------- Featured strip (4 spotlight cards) ---------- */
.cat-spotlight {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.spot-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 0;
    transition: all .2s;
    text-decoration: none;
    color: inherit;
}
.spot-card:hover {
    border-color: var(--bd-orange);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.spot-card .img {
    background: var(--bg-tint);
    position: relative;
    aspect-ratio: 1 / 1;
}
.spot-card .img img { width: 100%; height: 100%; object-fit: cover; }
.spot-card .img .badge {
    position: absolute; top: 6px; left: 6px;
    font-size: 9px;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 3px;
    letter-spacing: .5px;
    color: #fff;
}
.spot-card .img .badge.hot { background: var(--ali-red); }
.spot-card .img .badge.top { background: var(--bd-blue); }
.spot-card .img .badge.fast { background: #15803d; }
.spot-card .img .badge.bulk { background: var(--bd-orange); }
.spot-card .body {
    padding: 11px 12px;
    display: flex; flex-direction: column;
    justify-content: space-between;
}
.spot-card .body h4 {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--ink-900);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.spot-card .body .price {
    font-size: 15px;
    font-weight: 900;
    color: var(--ali-red);
}
.spot-card .body .price .from { font-size: 10.5px; color: var(--ink-500); font-weight: 500; margin-right: 2px; }
.spot-card .body .meta { font-size: 10.5px; color: var(--ink-500); margin-top: 3px; }

/* ---------- Class-tab section ---------- */
.cat-classtab-wrap {
    background: linear-gradient(180deg, #fff 0%, var(--bg-tint) 100%);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 28px;
}
.cat-classtab-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--line);
    background: #fff;
}
.cat-classtab {
    padding: 18px 22px;
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    text-align: left;
    transition: all .2s;
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: inherit;
    position: relative;
}
.cat-classtab + .cat-classtab { border-left: 1px solid var(--line); }
.cat-classtab .ic {
    width: 44px; height: 44px;
    border-radius: 11px;
    display: grid; place-items: center;
    background: var(--bg-tint);
    color: var(--ink-500);
    flex-shrink: 0;
}
.cat-classtab .ic svg { width: 22px; height: 22px; }
.cat-classtab .txt h5 {
    font-size: 14px;
    font-weight: 900;
    margin: 0;
    color: var(--ink-900);
    letter-spacing: -.01em;
}
.cat-classtab .txt p {
    font-size: 11.5px;
    color: var(--ink-500);
    margin: 2px 0 0;
    font-weight: 500;
}
.cat-classtab .txt .stat {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--bd-orange);
    margin-top: 3px;
}
.cat-classtab:hover { background: var(--bg-tint); }
.cat-classtab.active {
    background: #fff;
    border-bottom-color: var(--bd-orange);
}
.cat-classtab.active.tab-a { border-bottom-color: var(--bd-blue); }
.cat-classtab.active.tab-a .ic { background: var(--bd-blue-soft); color: var(--bd-blue); }
.cat-classtab.active.tab-b { border-bottom-color: var(--bd-orange); }
.cat-classtab.active.tab-b .ic { background: var(--bd-orange-soft); color: var(--bd-orange); }
.cat-classtab.active.tab-c { border-bottom-color: #15803d; }
.cat-classtab.active.tab-c .ic { background: #dcfce7; color: #15803d; }

.cat-classtab-banner {
    padding: 14px 22px;
    background: var(--bd-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}
.cat-classtab-banner.b { background: var(--bd-orange); }
.cat-classtab-banner.c { background: #15803d; }
.cat-classtab-banner .blurb {
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}
.cat-classtab-banner .blurb svg { width: 18px; height: 18px; }
.cat-classtab-banner .meta {
    display: flex; gap: 18px; flex-wrap: wrap;
    font-size: 12px;
}
.cat-classtab-banner .meta .m {
    display: inline-flex; align-items: center; gap: 6px;
}
.cat-classtab-banner .meta .m svg { width: 13px; height: 13px; }

.cat-classtab-grid {
    padding: 5px 2px 2px;
}
.cat-classtab-grid .more-row {
    text-align: center;
    margin-top: 16px;
}
.cat-classtab-grid .more-row a {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 26px;
    background: #fff;
    border: 1px solid var(--ink-700);
    border-radius: 50px;
    color: var(--ink-900);
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    transition: all .15s;
}
.cat-classtab-grid .more-row a:hover {
    background: var(--ink-900);
    color: #fff;
}
.cat-classtab-grid .more-row a svg { width: 12px; height: 12px; }

.cat-classtab-empty {
    text-align: center;
    padding: 36px 24px;
    color: var(--ink-500);
    font-size: 13px;
}
.cat-classtab-empty .ic {
    width: 56px; height: 56px;
    margin: 0 auto 12px;
    background: var(--bg-tint);
    color: var(--ink-400);
    border-radius: 50%;
    display: grid; place-items: center;
}
.cat-classtab-empty .ic svg { width: 26px; height: 26px; }

/* ---------- Brand showcase strip ---------- */
.cat-brands {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
}
.cat-brand {
    aspect-ratio: 16 / 9;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid; place-items: center;
    text-decoration: none;
    color: var(--ink-700);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .5px;
    transition: all .15s;
    padding: 8px;
    text-align: center;
}
.cat-brand:hover {
    border-color: var(--bd-orange);
    color: var(--bd-orange);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}
.cat-brand .small {
    font-size: 9px;
    font-weight: 600;
    color: var(--ink-400);
    display: block;
    margin-top: 4px;
    letter-spacing: 0;
}

/* ---------- Top-rated podium ---------- */
.top-rated-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.tr-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 14px;
    transition: all .15s;
    text-decoration: none;
    color: inherit;
}
.tr-card:hover {
    border-color: var(--bd-orange);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}
.tr-card .img {
    aspect-ratio: 1/1;
    background: var(--bg-tint);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}
.tr-card .img img { width: 100%; height: 100%; object-fit: cover; }
.tr-card .img .rank {
    position: absolute; top: 4px; left: 4px;
    width: 22px; height: 22px;
    background: var(--bd-blue);
    color: #fff;
    border-radius: 50%;
    display: grid; place-items: center;
    font-size: 11px;
    font-weight: 900;
}
.tr-card .img .rank.gold { background: linear-gradient(135deg, #fbbf24, #d97706); }
.tr-card .img .rank.silver { background: linear-gradient(135deg, #d4d4d8, #71717a); }
.tr-card .img .rank.bronze { background: linear-gradient(135deg, #c2944a, #8b6914); }
.tr-card .body h4 {
    font-size: 13.5px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--ink-900);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tr-card .body .rating {
    display: flex; align-items: center; gap: 4px;
    font-size: 11.5px;
    color: var(--ink-500);
    margin-bottom: 4px;
}
.tr-card .body .rating .stars { color: #ff9900; display: inline-flex; gap: 1px; }
.tr-card .body .rating .stars svg { width: 11px; height: 11px; fill: currentColor; }
.tr-card .body .rating strong { color: var(--ink-900); font-weight: 800; }
.tr-card .body .price {
    font-size: 16px;
    font-weight: 900;
    color: var(--ali-red);
}
.tr-card .body .price .from { font-size: 10.5px; color: var(--ink-500); font-weight: 500; margin-right: 2px; }
.tr-card .body .review-snip {
    font-size: 11px;
    color: var(--ink-500);
    font-style: italic;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

/* ---------- Trust strip (4 columns) ---------- */
.cat-trust {
    background: linear-gradient(180deg, #fff 0%, var(--bg-tint) 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px 26px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 28px;
}
.cat-trust-item {
    display: flex; align-items: center; gap: 14px;
}
.cat-trust-item .ic {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: var(--bd-blue-soft);
    color: var(--bd-blue);
    display: grid; place-items: center;
    flex-shrink: 0;
}
.cat-trust-item .ic svg { width: 22px; height: 22px; }
.cat-trust-item strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: var(--ink-900);
    margin-bottom: 2px;
}
.cat-trust-item span {
    display: block;
    font-size: 12px;
    color: var(--ink-500);
    line-height: 1.45;
}

/* ---------- Subcategory tiles ---------- */
.cat-subgrid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}
.cat-subtile {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 12px 14px;
    text-align: center;
    text-decoration: none;
    transition: all .2s;
    position: relative;
    overflow: hidden;
}
.cat-subtile::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(0,60,140,0) 0%, rgba(0,60,140,.05) 100%);
    opacity: 0;
    transition: opacity .2s;
}
.cat-subtile:hover {
    border-color: var(--bd-orange);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}
.cat-subtile:hover::before { opacity: 1; }
.cat-subtile .img {
    width: 72px; height: 72px;
    margin: 0 auto 10px;
    background: var(--bd-orange-soft);
    border-radius: 50%;
    display: grid; place-items: center;
    overflow: hidden;
    position: relative;
    z-index: 1;
}
.cat-subtile .img img { width: 100%; height: 100%; object-fit: cover; }
.cat-subtile .img svg { width: 30px; height: 30px; color: var(--bd-orange); }
.cat-subtile h5 {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--ink-900);
    margin: 0 0 3px;
    position: relative; z-index: 1;
}
.cat-subtile .ct {
    font-size: 10.5px;
    color: var(--ink-500);
    position: relative; z-index: 1;
}

/* ---------- RFQ band ---------- */
.cat-rfq-band {
    background:
        linear-gradient(120deg, var(--bd-blue) 0%, #001f5b 100%);
    border-radius: var(--radius-lg);
    color: #fff;
    padding: 28px 32px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}
.cat-rfq-band::before {
    content: '';
    position: absolute; right: -100px; top: -100px;
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(240,140,0,.22) 0%, transparent 70%);
    border-radius: 50%;
}
.cat-rfq-band-text { position: relative; z-index: 1; }
.cat-rfq-band-text h3 {
    font-size: 22px;
    font-weight: 900;
    margin: 0 0 6px;
    letter-spacing: -.015em;
}
.cat-rfq-band-text p {
    font-size: 14px;
    margin: 0;
    opacity: .92;
    max-width: 540px;
    line-height: 1.5;
}
.cat-rfq-band-actions {
    position: relative; z-index: 1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.cat-rfq-band-actions a {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 12px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: all .15s;
}
.cat-rfq-band-actions a.primary {
    background: var(--bd-orange);
    color: #fff;
}
.cat-rfq-band-actions a.primary:hover { background: var(--bd-orange-dk); }
.cat-rfq-band-actions a.ghost {
    background: rgba(255,255,255,.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,.3);
}
.cat-rfq-band-actions a.ghost:hover { background: rgba(255,255,255,.2); }
.cat-rfq-band-actions a svg { width: 15px; height: 15px; }

/* ============================================================
   "Editorial" product cards — premium variant for class panels
============================================================ */
.cc-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.cc-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: all .25s cubic-bezier(.4, 0, .2, 1);
    display: flex;
    flex-direction: column;
}
/* Left-edge class stripe */
.cc-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--bd-blue);
    transition: width .2s;
    z-index: 2;
}
.cc-card.cls-b::before { background: var(--bd-orange); }
.cc-card.cls-c::before { background: #15803d; }

.cc-card:hover {
    border-color: transparent;
    box-shadow: 0 14px 32px rgba(0, 31, 91, .14);
    transform: translateY(-4px);
}
.cc-card:hover::before { width: 5px; }

/* Image area (square — full image, no cropping) */
.cc-img {
    position: relative;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #f5f7fa 0%, #eaeef3 100%);
    overflow: hidden;
}
.cc-img img {
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 0;
    transition: transform .45s cubic-bezier(.4, 0, .2, 1);
}
.cc-card:hover .cc-img img { transform: scale(1.07); }
.cc-img::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,.18) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s;
}
.cc-card:hover .cc-img::after { opacity: 1; }

/* Discount medallion (top-right) */
.cc-discount {
    position: absolute;
    top: 9px; right: 9px;
    background: var(--ali-red);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    width: 40px; height: 40px;
    border-radius: 50%;
    display: grid; place-items: center;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(216, 35, 42, .4);
    border: 2px solid #fff;
    line-height: 1;
}
.cc-discount.hot { background: linear-gradient(135deg, #ff6b35, #d8232a); }
.cc-discount.bulk { background: var(--bd-orange); box-shadow: 0 4px 12px rgba(240, 140, 0, .4); }

/* Pill in bottom-left of image */
.cc-img-pill {
    position: absolute;
    bottom: 10px; left: 10px;
    background: rgba(15, 23, 42, .82);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
    z-index: 3;
    display: inline-flex; align-items: center; gap: 5px;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,.15);
}
.cc-img-pill.stock { background: rgba(21, 128, 61, .92); }
.cc-img-pill.warn  { background: rgba(245, 158, 11, .92); }
.cc-img-pill.fast  { background: rgba(0, 60, 140, .92); }
.cc-img-pill svg { width: 11px; height: 11px; }

/* Action buttons (bottom-right of image, slide up on hover) */
.cc-actions {
    position: absolute;
    bottom: 10px; right: 10px;
    display: flex; gap: 5px;
    z-index: 3;
    opacity: 0;
    transform: translateY(8px);
    transition: all .25s cubic-bezier(.4, 0, .2, 1);
}
.cc-card:hover .cc-actions {
    opacity: 1;
    transform: translateY(0);
}
.cc-act {
    width: 32px; height: 32px;
    background: rgba(255, 255, 255, .98);
    border: 0;
    border-radius: 50%;
    display: grid; place-items: center;
    color: var(--ink-700);
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .22);
    transition: all .15s;
    text-decoration: none;
}
.cc-act:hover {
    background: var(--bd-orange);
    color: #fff;
    transform: scale(1.12);
}
.cc-act svg { width: 14px; height: 14px; }

/* ---------- Body ---------- */
.cc-body {
    padding: 12px 14px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Supplier row at TOP (B2B priority) */
.cc-sup {
    display: flex; align-items: center; gap: 6px;
    font-size: 10.5px;
    color: var(--ink-500);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line-soft);
}
.cc-sup .flag {
    width: 14px; height: 10px;
    background: linear-gradient(0deg, #007749 33%, #fff 33% 66%, #de3831 66%);
    border-radius: 1px;
    flex-shrink: 0;
}
.cc-sup .flag.cn {
    background: #d8232a;
    position: relative;
}
.cc-sup .flag.cn::before {
    content: '★';
    position: absolute;
    color: #ffd700;
    font-size: 7px;
    top: 0; left: 1px;
    line-height: 1;
}
.cc-sup .name {
    color: var(--ink-700);
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cc-sup .verified {
    color: #15803d;
    font-weight: 800;
    font-size: 9.5px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: #dcfce7;
    padding: 2px 7px;
    border-radius: 50px;
    white-space: nowrap;
}
.cc-sup .verified svg { width: 9px; height: 9px; }

/* Title */
.cc-title {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--ink-900);
    line-height: 1.38;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 38px;
}
.cc-title a { color: inherit; text-decoration: none; }
.cc-title a:hover { color: var(--bd-orange); }

/* Price */
.cc-price-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}
.cc-price {
    font-size: 20px;
    font-weight: 900;
    color: var(--ali-red);
    letter-spacing: -.015em;
    line-height: 1;
}
.cc-price .from {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-500);
    margin-right: 2px;
}
.cc-price-range {
    font-size: 12.5px;
    color: var(--ink-500);
    font-weight: 600;
}
.cc-price-was {
    font-size: 14px;
    color: var(--ink-400);
    text-decoration: line-through;
}
.cc-save-pill {
    display: inline-block;
    background: #dcfce7;
    color: #166534;
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 50px;
    margin-left: auto;
}

/* Rating */
.cc-rating {
    display: flex; align-items: center; gap: 6px;
    font-size: 11px;
    color: var(--ink-500);
}
.cc-rating .stars {
    color: #ff9900;
    display: inline-flex;
    gap: 1px;
}
.cc-rating .stars svg { width: 11px; height: 11px; fill: currentColor; }
.cc-rating strong { color: var(--ink-900); font-weight: 800; font-size: 12px; }
.cc-rating .sep { color: var(--ink-300); }

/* MOQ pill (Class B) */
.cc-moq {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    color: var(--ink-700);
    background: var(--bd-orange-soft);
    padding: 4px 9px;
    border-radius: 4px;
    font-weight: 700;
    align-self: flex-start;
}
.cc-moq strong { color: var(--bd-orange-dk); font-weight: 900; }

/* Tier pricing ladder (Class B) */
.cc-tiers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--line);
    margin-top: 2px;
}
.cc-tier {
    background: #fff;
    padding: 7px 4px;
    text-align: center;
}
.cc-tier .q {
    font-size: 9.5px;
    color: var(--ink-500);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    display: block;
}
.cc-tier .p {
    font-size: 12.5px;
    color: var(--ink-900);
    font-weight: 800;
    margin-top: 2px;
}
.cc-tier.best {
    background: var(--bd-orange-soft);
    position: relative;
}
.cc-tier.best::after {
    content: 'BEST';
    position: absolute;
    top: -1px; right: 2px;
    font-size: 7px;
    color: var(--bd-orange);
    font-weight: 900;
    letter-spacing: .3px;
}
.cc-tier.best .p { color: var(--bd-orange-dk); }

/* Trade Assurance strip (Class B) */
.cc-ta {
    margin: 0 -14px -14px;
    background: linear-gradient(90deg, var(--bd-blue-soft) 0%, #fff 100%);
    color: var(--bd-blue);
    padding: 8px 14px;
    font-size: 10.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--line-soft);
}
.cc-ta .left { display: inline-flex; align-items: center; gap: 5px; }
.cc-ta .left svg { width: 12px; height: 12px; }
.cc-ta .right {
    font-weight: 800;
    font-size: 10px;
    background: #fff;
    padding: 2px 7px;
    border-radius: 50px;
    border: 1px solid var(--bd-blue);
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
    .cat-spotlight { grid-template-columns: repeat(2, 1fr); }
    .cat-brands { grid-template-columns: repeat(6, 1fr); }
    .cat-subgrid { grid-template-columns: repeat(4, 1fr); }
    .top-rated-grid { grid-template-columns: repeat(2, 1fr); }
    .cat-trust { grid-template-columns: repeat(2, 1fr); }
    .cc-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
    .cat-hero-inner { grid-template-columns: 1fr; padding: 26px 0; }
    .cat-classtab-bar { grid-template-columns: 1fr; }
    .cat-classtab + .cat-classtab { border-left: 0; border-top: 1px solid var(--line); }
    .cat-spotlight { grid-template-columns: 1fr; }
    .cat-brands { grid-template-columns: repeat(4, 1fr); }
    .cat-subgrid { grid-template-columns: repeat(3, 1fr); }
    .top-rated-grid { grid-template-columns: 1fr; }
    .cat-trust { grid-template-columns: 1fr; padding: 18px; }
    .cat-rfq-band { grid-template-columns: 1fr; padding: 22px; }
    .cat-rfq-band-text h3 { font-size: 18px; }
    .cc-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (max-width: 480px) {
    .cat-brands { grid-template-columns: repeat(3, 1fr); }
    .cat-subgrid { grid-template-columns: repeat(2, 1fr); }
    /* Alibaba-style 2-column mobile grid (replaces the old single-column stack) */
    .cc-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* ═══════════════════════════════════════════════════════════════════
   MOBILE PRODUCT CARD — Alibaba-style compact 2-column layout (≤600px)
   Mirror of the rules in bd-alibaba-subcategory.css so /category/* pages
   render product cards exactly like /subcategory/* on mobile.
═══════════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {

    /* Card frame */
    .cc-grid .cc-card {
        border-radius: 9px;
        border-color: #ececec;
    }
    .cc-grid .cc-card::before { display: none; }
    .cc-grid .cc-card:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0,0,0,.06);
        border-color: #ececec;
    }
    .cc-grid .cc-card:hover .cc-img img { transform: none; }
    .cc-grid .cc-card .cc-img::after { display: none; }

    /* Image badges & pills */
    .cc-grid .cc-discount {
        top: 6px; right: 6px;
        width: 34px; height: 34px;
        font-size: 9.5px;
        border-width: 1.5px;
    }
    .cc-grid .cc-img-pill {
        bottom: 6px; left: 6px;
        font-size: 9px;
        padding: 3px 7px;
        gap: 3px;
    }
    .cc-grid .cc-img-pill svg { width: 9px; height: 9px; }
    .cc-grid .cc-actions { display: none !important; }

    /* Body */
    .cc-grid .cc-body {
        padding: 8px 9px 10px !important;
        gap: 5px !important;
    }

    /* Supplier row */
    .cc-grid .cc-sup {
        font-size: 9.5px !important;
        padding-bottom: 5px;
        gap: 4px;
    }
    .cc-grid .cc-sup .name { font-size: 9.5px; max-width: 90px; }
    .cc-grid .cc-sup .flag { width: 11px; height: 8px; }
    .cc-grid .cc-sup .verified {
        font-size: 8.5px;
        padding: 1px 5px;
    }
    .cc-grid .cc-sup .verified svg { width: 8px; height: 8px; }

    /* Title */
    .cc-grid .cc-title {
        font-size: 12.5px !important;
        line-height: 1.35;
        min-height: 34px;
        -webkit-line-clamp: 2;
        font-weight: 600;
    }

    /* Price row */
    .cc-grid .cc-price-row {
        gap: 5px !important;
        flex-wrap: nowrap;
        align-items: baseline;
    }
    .cc-grid .cc-price { font-size: 15.5px !important; }
    .cc-grid .cc-price .from { font-size: 10.5px; }
    .cc-grid .cc-price-was,
    .cc-grid .cc-price-range { font-size: 10.5px; }
    .cc-grid .cc-moq {
        font-size: 9.5px;
        margin-left: 0 !important;
    }
    .cc-grid .cc-moq strong { font-size: 9.5px; }
    .cc-grid .cc-save-pill {
        font-size: 9px;
        padding: 2px 6px;
    }

    /* Hide volume-tier ladder + Trade Assurance strip on mobile */
    .cc-grid .cc-tiers,
    .cc-grid .cc-ta { display: none !important; }

    /* Rating */
    .cc-grid .cc-rating {
        font-size: 10px !important;
        gap: 3px;
        flex-wrap: nowrap;
    }
    .cc-grid .cc-rating .stars { gap: 1px; }
    .cc-grid .cc-rating .stars svg { width: 10px; height: 10px; }
    .cc-grid .cc-rating .sep { display: none; }
    .cc-grid .cc-rating strong { font-size: 10.5px; }
}

@media (max-width: 380px) {
    .cc-grid { gap: 6px; }
    .cc-grid .cc-body { padding: 7px 8px 9px !important; }
    .cc-grid .cc-title { font-size: 12px !important; min-height: 32px; }
    .cc-grid .cc-price { font-size: 14.5px !important; }
    .cc-grid .cc-sup .name { max-width: 70px; }
}

/* ═══════════════════════════════════════════════════════════════════
   MOBILE EDGE-TIGHTENING — pull the cc-grid closer to the screen edges
   so cards don't lose half their width to container padding.
═══════════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
    .bd-container { padding-left: 8px !important; padding-right: 8px !important; }
}
@media (max-width: 380px) {
    .bd-container { padding-left: 6px !important; padding-right: 6px !important; }
}
