/* Refined minimalist progressive mobile catalogue (Brand + OEM unified).
   Keeps only Category, Search, Progressive Filter, and Download Catalogue.
   Smart-hides on scroll down, resets all mobile typography to crisp Apple-grade scale. */
@media(max-width:1024px) {
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] {
    --bs-pg-ink:#0f172a;
    --bs-pg-muted:#8592a3;
    --bs-pg-blue:#0b5ed7;
    --bs-pg-line:rgba(15,23,42,.07);
    --bs-pg-surface:#f6f8fb;
    background:#fff!important;
    color:var(--bs-pg-ink)!important;
    font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","PingFang SC","Helvetica Neue",sans-serif!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] :is(.oem-night-root,.oem-collection,.oc-layout,.oc-results,.fc-layout,.fc-results) {
    background-color:#fff!important;
    color:var(--bs-pg-ink);
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] :is(.oc-layout,.fc-layout) {
    padding:4px 12px 32px!important;
    margin-block:0!important;
    gap:0!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] :is(.oc-sidebar,.fc-drawer) { display:none!important; }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] :is(.oc-results,.fc-results) { min-width:0!important;padding:0!important;margin:0!important; }

  /* Hide all redundant legacy bars & controls on mobile */
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] :is(.oc-results,.fc-results) > :is(.oc-search-row,.bs-catalog-search-row,.oc-toolbar,.bs-catalog-view-row,.oc-catalogue-filters,.bs-catalogue-pinned-filters),
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] :is(.bs-progressive-tools,.bs-progressive-sort,.bs-progressive-qr-source,.oc-card-compare,.fc-view-modes,.oc-modes,.bs-mobile-filter-views,.bs-progressive-share,.bs-progressive-compare-toggle,.bs-currency-picker) {
    display:none!important;
  }

  /* Subtle floating sticky top bar with smart scroll-hide */
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-catalogue {
    position:sticky;
    top:var(--bs-catalogue-sticky-top,56px);
    z-index:35;
    margin:0 -12px 10px;
    padding:4px 12px 6px;
    background:rgba(255,255,255,.88);
    -webkit-backdrop-filter:saturate(180%) blur(16px);
    backdrop-filter:saturate(180%) blur(16px);
    border-bottom:1px solid var(--bs-pg-line);
    transition:transform .28s cubic-bezier(.22,1,.36,1),opacity .22s ease;
    will-change:transform,opacity;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-catalogue[data-bs-bar-hidden] {
    transform:translateY(-108%);
    opacity:0;
    pointer-events:none;
  }

  /* Compact single-line bar: Category on left, 3 icon pills on right */
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-primary {
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:8px!important;
    position:static!important;
    width:100%!important;
    min-height:38px!important;
    margin:0!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
    box-sizing:border-box;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-primary > :is(.bs-mobile-category-field,.bs-progressive-category) {
    flex:1 1 auto!important;
    min-width:0!important;
    min-height:36px!important;
    height:auto!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    background:none!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-primary > :is(.bs-mobile-category-field,.bs-progressive-category)::after { display:none!important; }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-primary select {
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:36px!important;
    height:36px!important;
    margin:0!important;
    padding:4px 4px 4px 0!important;
    appearance:auto!important;
    -webkit-appearance:menulist!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    background:transparent!important;
    background-image:none!important;
    color:var(--bs-pg-ink)!important;
    font-family:inherit!important;
    font-size:13.5px!important;
    font-weight:600!important;
    letter-spacing:-0.01em!important;
    line-height:1.3!important;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  /* Reset oversized category readout from mobile-catalogue-cards-20261127.css */
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-mobile-category-readout {
    min-height:36px!important;
    padding-inline:0 4px!important;
    gap:1px 5px!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-mobile-category-name {
    font-size:13.5px!important;
    font-weight:600!important;
    letter-spacing:-0.01em!important;
    line-height:1.25!important;
    color:var(--bs-pg-ink)!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-mobile-category-readout small {
    font-size:10.5px!important;
    font-weight:450!important;
    color:var(--bs-pg-muted)!important;
    line-height:1.2!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-mobile-category-readout svg {
    width:12px!important;
    height:12px!important;
    opacity:.55;
  }

  /* Minimalist icon-only action cluster (Search · Filter · Download) */
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-actions {
    display:inline-flex!important;
    align-items:center!important;
    gap:4px!important;
    flex-shrink:0!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-primary :is(.bs-progressive-search-toggle,.bs-progressive-filter-toggle,.bs-progressive-download-toggle) {
    position:relative!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:34px!important;
    min-width:34px!important;
    height:34px!important;
    min-height:34px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:999px!important;
    background:var(--bs-pg-surface)!important;
    box-shadow:none!important;
    color:#334155!important;
    font-size:0!important;
    line-height:0!important;
    cursor:pointer;
    -webkit-tap-highlight-color:transparent;
    transition:background-color .18s ease,color .18s ease,transform .15s ease;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-primary :is(.bs-progressive-search-toggle,.bs-progressive-filter-toggle,.bs-progressive-download-toggle):active {
    transform:scale(.93);
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-primary :is(.bs-progressive-search-toggle,.bs-progressive-filter-toggle)[aria-expanded=true] {
    background:rgba(11,94,215,.1)!important;
    color:var(--bs-pg-blue)!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-primary .bs-progressive-download-toggle[hidden] {
    display:none!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-primary .bs-progressive-button-label {
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    overflow:hidden!important;
    clip-path:inset(50%)!important;
    white-space:nowrap!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-primary .bs-pg-ico {
    width:16.5px!important;
    height:16.5px!important;
    display:block!important;
    flex:none!important;
  }
  /* Active filter indicator dot */
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-filter-toggle[data-has-active]::after {
    content:"";
    position:absolute;
    top:6px;
    right:6px;
    width:5px;
    height:5px;
    border-radius:999px;
    background:var(--bs-pg-blue);
    box-shadow:0 0 0 1.5px #fff;
  }

  /* Progressive Search Panel */
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-search {
    min-width:0!important;
    width:100%!important;
    margin:0!important;
    border:0!important;
    background:transparent!important;
    overflow:hidden;
    max-height:0;
    opacity:0;
    visibility:hidden;
    padding-block:0!important;
    transition:max-height .24s cubic-bezier(.22,1,.36,1),opacity .18s ease,visibility .24s ease!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue][data-bs-search-open] .bs-progressive-search {
    max-height:56px;
    opacity:1;
    visibility:visible;
    padding-top:6px!important;
    padding-bottom:2px!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-search :is(.cf-list-search,.oc-search-field) {
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    position:relative!important;
    width:100%!important;
    height:36px!important;
    min-height:36px!important;
    margin:0!important;
    padding:0 12px!important;
    border:1px solid transparent!important;
    border-radius:999px!important;
    background:var(--bs-pg-surface)!important;
    box-shadow:none!important;
    box-sizing:border-box!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-search :is(.cf-list-search,.oc-search-field):focus-within {
    border-color:rgba(11,94,215,.35)!important;
    background:#fff!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-search :is(.cf-list-search,.oc-search-field)::before,
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-search :is(.cf-list-search,.oc-search-field)::after { display:none!important; }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-search svg.bs-catalog-magnifier {
    width:14px!important;
    height:14px!important;
    flex:0 0 14px!important;
    color:var(--bs-pg-muted)!important;
    fill:none!important;
    stroke:currentColor!important;
    stroke-width:1.8!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-search input[type=search] {
    width:100%!important;
    min-width:0!important;
    height:34px!important;
    min-height:34px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    color:var(--bs-pg-ink)!important;
    font-family:inherit!important;
    font-size:13.5px!important;
    font-weight:400!important;
    line-height:1.4!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-search input::placeholder { color:var(--bs-pg-muted)!important;opacity:1;font-size:13px!important; }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-search input:focus { outline:0!important; }

  /* Progressive Filter Disclosure (Layered smooth reveal) */
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-disclosure {
    display:grid;
    grid-template-rows:0fr;
    opacity:0;
    visibility:hidden;
    margin:0;
    padding:0;
    border:0;
    background:transparent;
    transition:grid-template-rows .26s cubic-bezier(.22,1,.36,1),opacity .18s ease,visibility .26s ease;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-disclosure[data-open] {
    grid-template-rows:1fr;
    opacity:1;
    visibility:visible;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-disclosure-inner { min-height:0;overflow:hidden;padding-block:0; }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-disclosure[data-open] > .bs-progressive-disclosure-inner { overflow:visible;padding-top:8px;padding-bottom:4px; }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-disclosure[hidden] { display:none!important; }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-filters :is(.cf-controls,.cf-toolbar,.bs-catalog-filter-row,.bs-catalogue-pinned-filters) {
    margin:0!important;padding:0!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;position:static!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-filters .cf-controls { position:relative!important; }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-filters .cf-quick {
    display:flex!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:6px!important;
    width:100%;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-filters .cf-quick > button {
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:4px!important;
    flex:0 0 auto!important;
    min-height:30px!important;
    height:30px!important;
    margin:0!important;
    padding:0 11px!important;
    border:1px solid transparent!important;
    border-radius:999px!important;
    background:var(--bs-pg-surface)!important;
    box-shadow:none!important;
    color:#334155!important;
    font-family:inherit!important;
    font-size:12px!important;
    font-weight:500!important;
    line-height:1!important;
    white-space:nowrap!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-filters .cf-quick > button[aria-expanded=true],
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-filters .cf-quick > button[aria-pressed=true] {
    background:rgba(11,94,215,.1)!important;
    border-color:rgba(11,94,215,.22)!important;
    color:var(--bs-pg-blue)!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-filters :is(.cf-panel,.cf-popover) {
    background:#fff!important;
    color:var(--bs-pg-ink)!important;
    border:1px solid var(--bs-pg-line)!important;
    border-radius:12px!important;
    box-shadow:0 10px 30px rgba(15,23,42,.08)!important;
    font-size:12.5px!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-filters :is(.cf-panel,.cf-popover) :is(button,label,span,a) {
    font-size:12px!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue][data-bs-filters-open] .bs-progressive-filters > .bs-progressive-disclosure-inner {
    max-height:calc(100dvh - var(--bs-mobile-dock,68px) - 150px);
    overflow-y:auto;
    overscroll-behavior:contain;
  }

  /* Subtle micro result count */
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-count {
    display:block!important;
    margin:2px 0 0!important;
    padding:0!important;
    color:var(--bs-pg-muted)!important;
    font-size:10.5px!important;
    font-weight:450!important;
    line-height:1.4!important;
    letter-spacing:0.02em!important;
    text-align:end;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-count > :is(.fc-result-count,.oc-count) {
    display:inline!important;margin:0!important;padding:0!important;font:inherit!important;color:inherit!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-count > :is(.fc-result-count,.oc-count)::before,
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-count > :is(.fc-result-count,.oc-count)::after {
    content:none!important;display:none!important;
  }

  /* Refined mobile gallery grid & typography reset (Brand + OEM unified) */
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] :is(.oem-collection:not([data-mode=list]) .oc-grid,.fc-product-grid) {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:18px 11px!important;
  }
  @media(min-width:600px) and (max-width:1024px) {
    html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] :is(.oem-collection:not([data-mode=list]) .oc-grid,.fc-product-grid) {
      grid-template-columns:repeat(3,minmax(0,1fr))!important;
      gap:20px 14px!important;
    }
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] :is(.oc-card,.fc-product-grid > .product-item) {
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    background:#fff!important;
    padding:0!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] :is(.oc-photo,.product__media,.product-item__media) {
    overflow:hidden!important;
    border-radius:12px!important;
    background:#f7f9fc!important;
    aspect-ratio:1/1!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .oc-photo-open {
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    margin:0!important;
    padding:8px!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .oc-photo-open img {
    width:100%!important;
    height:100%!important;
    object-fit:contain!important;
    transform:none!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .oc-copy { padding:7px 2px 0!important; }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] :is(.oc-copy h2,.oc-copy .oc-title-open,.oc-card .oc-card-title,.catalog-card-title .product-item__name,.product-item__name) {
    margin:0!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    color:var(--bs-pg-ink)!important;
    font-size:12.5px!important;
    font-weight:560!important;
    line-height:1.38!important;
    letter-spacing:-0.01em!important;
    text-align:start!important;
    display:-webkit-box!important;
    -webkit-line-clamp:2!important;
    -webkit-box-orient:vertical!important;
    overflow:hidden!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] :is(.oc-card-meta,.product-item__subtitle,.catalog-card-meta) {
    color:var(--bs-pg-muted)!important;
    font-size:11px!important;
    line-height:1.35!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] :is(.oc-price-row .price,.product-price,.price) {
    color:var(--bs-pg-ink)!important;
    font-size:12.5px!important;
    font-weight:600!important;
    font-variant-numeric:tabular-nums!important;
    line-height:1.3!important;
  }
  html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] .bs-progressive-owned[hidden] { display:none!important; }
  @media(prefers-reduced-motion:reduce) {
    html body :is(#root #MainContent,#app)[data-bs-progressive-catalogue] :is(.bs-progressive-catalogue,.bs-progressive-search,.bs-progressive-disclosure) { transition:none!important; }
  }
}

/* =====================================================================
   2026-12-02: Mobile + Foldable Mobile (<=900px or coarse <=1024px)
   Exact browser-verified fixes:
   1. Hide redundant div.fc-active-filters (breadcrumb + 全部系列)
   2. Overlay select.cf-category cleanly over .bs-mobile-category-readout (no duplicate top bar!)
   3. Force clean 2-column vertical showcase cards (1:1 large photo on TOP, title + 询价 BELOW)
      even when data-fc-mode="list" is active on 768px unfolded foldable phones!
   Strictly Mobile + Foldable ONLY — ZERO Desktop impact!
   ===================================================================== */
@media (max-width: 900px), (max-width: 1024px) and (pointer: coarse) {
  html body main.fidelity-catalog .fc-active-filters,
  html body .fc-results .fc-active-filters {
    display: none !important;
  }
  html body :is(#root #MainContent, #app)[data-bs-progressive-catalogue] .bs-category-readout-ready .bs-mobile-category-field {
    position: relative !important;
    min-height: 49px !important;
  }
  html body :is(#root #MainContent, #app)[data-bs-progressive-catalogue] .bs-category-readout-ready .bs-mobile-category-field > select {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    z-index: 2 !important;
    cursor: pointer !important;
  }
  html body :is(#root #MainContent, #app)[data-bs-progressive-catalogue] .bs-progressive-primary > .bs-mobile-category-field ~ .bs-mobile-category-field,
  html body :is(#root #MainContent, #app)[data-bs-progressive-catalogue] .bs-progressive-primary > .bs-mobile-category-field ~ .bs-progressive-category,
  html body :is(#root #MainContent, #app)[data-bs-progressive-catalogue] .bs-category-readout-ready .bs-progressive-count {
    display: none !important;
  }
  /* 2-column vertical showcase grid on BOTH standard phones & unfolded foldable phones */
  html body :is(#root #MainContent, #app)[data-bs-progressive-catalogue] :is(.wacsw-cards.bs-product-grid, .fc-product-grid, .oc-grid) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
  html body main.fidelity-catalog[data-fc-mode="list"] .product-item__wrapper,
  html body main.fidelity-catalog .product-item__wrapper,
  html body .oem-collection .oc-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  html body main.fidelity-catalog .product-item__inner,
  html body main.fidelity-catalog .product__media,
  html body .oem-collection .oc-card .oc-photo {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 14px !important;
    background: #f8fafc !important;
    overflow: hidden !important;
  }
  html body main.fidelity-catalog .product__media img,
  html body main.fidelity-catalog img.product-image,
  html body .oem-collection .oc-card .oc-photo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    padding: 8px !important;
    box-sizing: border-box !important;
  }
  html body main.fidelity-catalog .product-item__information,
  html body .oem-collection .oc-card .oc-card-body {
    width: 100% !important;
    margin-top: 10px !important;
    padding: 0 2px !important;
    text-align: left !important;
  }
}
