/*!
 * YQX Mobile/Tablet Alibaba-style layer  v1.0  —  2026-11-15
 * Phone + tablet (<=1024px). Loaded AFTER yqx-rwd.css so it wins.
 * Imitates the Alibaba supplier mobile layout the client supplied.
 * Desktop (>=1025px) is untouched; the mobile-only nodes are hidden there.
 */
@media (max-width:1024px){

  /* ---------- hide the welcome topbar on mobile ---------- */
  .topbar{ display:none !important; }

  /* ---------- sticky brand bar ---------- */
  .cat-header{
    position:sticky; top:0; z-index:9000;
    background:#fff; border-bottom:1px solid #eef1f5;
    box-shadow:0 1px 6px rgba(20,40,80,.06);
  }
  .cat-header__row{
    display:flex; align-items:center; gap:10px;
    padding:8px 12px; min-height:52px;
  }
  .brand{ flex:0 1 auto; min-width:0; }
  .brand i{ width:34px; height:34px; font-size:14px; border-radius:8px; }
  .brand span{ font-size:14px; line-height:1.12; }
  .brand small{ display:none; }
  .cat-search{ display:none !important; }            /* toggled by the search icon */
  .cat-search.yqx-m-open{ display:flex !important; flex-basis:100%; order:3; margin-top:6px; }
  .cat-cta{ display:none !important; }

  /* mobile control cluster (search + share), built by yqx-mobile.js */
  .yqx-m-ctrl{ display:flex; align-items:center; gap:6px; margin-left:auto; flex:0 0 auto; }
  .yqx-m-ctrl button{
    width:38px; height:38px; border:0; border-radius:10px; background:#f2f5fa;
    color:#1f2d3d; display:grid; place-items:center; cursor:pointer; line-height:1;
  }
  .yqx-m-ctrl button svg{ width:19px; height:19px; }

  /* ---------- blue gradient tab nav (the signature element) ---------- */
  .cat-navbar{
    position:sticky; top:52px; z-index:8999;
    background:linear-gradient(90deg,#e9f1fe 0%,#dbe7fb 100%);
    border-bottom:1px solid #cfe0fb;
  }
  /* NOTE: specificity must beat yqx-rwd.css's `[data-yqx-rwd-navhost]:not(.yqx-rwd-open) > .menu.cat-nav{display:none!important}` (0,4,0).
     Adding the same [data-yqx-rwd-navhost] attribute raises us to (0,4,2) so the tab bar stays visible on phones. */
  html body .cat-navbar[data-yqx-rwd-navhost] .menu.cat-nav{
    display:flex !important; flex-wrap:nowrap; overflow-x:auto;
    -webkit-overflow-scrolling:touch; gap:0; padding:0 8px;
    scrollbar-width:none;
  }
  html body .cat-navbar[data-yqx-rwd-navhost] .menu.cat-nav::-webkit-scrollbar{ display:none; }
  html body .cat-navbar[data-yqx-rwd-navhost] .menu.cat-nav > a{
    flex:0 0 auto; white-space:nowrap; padding:13px 15px;
    font-size:15px; font-weight:600; color:#21304a;
    border-bottom:3px solid transparent; background:transparent;
  }
  html body .cat-navbar[data-yqx-rwd-navhost] .menu.cat-nav > a.active{
    font-weight:800; color:#0b1f3a; border-bottom-color:#0b1f3a;
  }
  html body .yqx-rwd-navbtn{ display:none !important; }

  /* ---------- supplier strip (built by JS) ---------- */
  .yqx-m-supplier{
    display:flex; align-items:center; gap:12px; padding:13px 14px;
    background:#fff; border-bottom:1px solid #eef1f5;
  }
  .yqx-m-supplier .yqx-m-badge{
    display:inline-flex; align-items:center; gap:4px; font-size:12px; font-weight:700;
    color:#1677d2; background:#eaf3ff; padding:3px 9px; border-radius:999px; white-space:nowrap;
  }
  .yqx-m-supplier .yqx-m-name{ font-size:16px; font-weight:800; color:#16243a; line-height:1.2; }
  .yqx-m-supplier .yqx-m-meta{ font-size:12.5px; color:#5b6675; margin-top:3px; }
  .yqx-m-supplier .yqx-m-open{
    margin-left:auto; flex:0 0 auto; background:#ff6a00; color:#fff; border:0;
    font-weight:700; font-size:13px; padding:9px 16px; border-radius:999px; cursor:pointer; white-space:nowrap;
  }

  /* ---------- hero tagline banner (built by JS) ---------- */
  .yqx-m-hero{
    background:linear-gradient(120deg,#f4f8ff,#eaf1ff);
    padding:20px 18px; text-align:center; border-bottom:1px solid #eef1f5;
  }
  .yqx-m-hero b{ display:block; font-size:22px; color:#16243a; letter-spacing:.2px; }
  .yqx-m-hero span{ font-size:14px; color:#5b6675; }

  /* ---------- product cards: Alibaba style ---------- */
  html body .cat-grid{ grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:12px; }
  html body .yqx-grid{ grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:12px; }
  .card{
    background:#fff; border:1px solid #eef1f5; border-radius:12px; overflow:hidden;
    box-shadow:0 1px 4px rgba(20,40,80,.05);
  }
  .card .img{ background:#f3f5f8; position:relative; aspect-ratio:1/1; }
  .card .img picture, .card .img img{ width:100%; height:100%; object-fit:cover; display:block; }
  /* white circular play/preview button (matches the Alibaba video cards) */
  .card .img::after{
    content:""; position:absolute; left:8px; bottom:8px; width:30px; height:30px;
    border-radius:50%; background:rgba(255,255,255,.94) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23333' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center/13px no-repeat;
    box-shadow:0 1px 4px rgba(0,0,0,.22);
  }
  .card .badge-cat{ display:none !important; }
  .card .badge-sale{ position:absolute; top:8px; left:8px; z-index:2; background:#ff4d4f; color:#fff; font-size:10px; padding:2px 6px; border-radius:6px; }
  .card .bd{ padding:9px 10px 11px; }
  html body .card .sku{ display:none !important; }
  html body .card .nm{
    display:-webkit-box !important; -webkit-line-clamp:2; -webkit-box-orient:vertical;
    overflow:hidden; font-size:13px; line-height:1.35; color:#22303f; font-weight:600;
    min-height:35px;
  }
  html body .card .prices{ display:flex; align-items:baseline; gap:6px; margin-top:6px; flex-wrap:wrap; }
  html body .card .price-now{ font-size:17px; font-weight:800; color:#ff4d2e; }
  html body .card .price-old{ font-size:12px; color:#9aa6b2; text-decoration:line-through; }
  html body .card .acts{ display:none !important; }   /* bottom bar handles chat / details */

  /* ---------- contact card (built by JS) ---------- */
  .yqx-m-contact{
    display:flex; gap:12px; padding:14px; background:#fff; border:1px solid #eef1f5;
    border-radius:14px; margin:14px; align-items:center; box-shadow:0 1px 4px rgba(20,40,80,.05);
  }
  .yqx-m-contact .yqx-m-ava{
    width:52px; height:52px; border-radius:50%; background:#1677d2; color:#fff;
    display:grid; place-items:center; font-weight:800; font-size:18px; flex:0 0 auto;
  }
  .yqx-m-contact .yqx-m-cname{ font-size:15px; font-weight:800; color:#16243a; }
  .yqx-m-contact .yqx-m-rows{ font-size:12px; color:#5b6675; margin-top:3px; line-height:1.5; }
  .yqx-m-contact .yqx-m-cbtn{
    margin-left:auto; flex:0 0 auto; background:#ff6a00; color:#fff; border:0;
    border-radius:999px; padding:9px 14px; font-weight:700; font-size:13px; text-decoration:none; white-space:nowrap;
  }

  /* ---------- fixed bottom action bar (built by JS) ---------- */
  .yqx-m-bar{
    position:fixed; left:0; right:0; bottom:0; z-index:9500;
    display:flex; align-items:center; gap:10px;
    padding:8px 12px calc(8px + env(safe-area-inset-bottom));
    background:#fff; border-top:1px solid #eef1f5;
    box-shadow:0 -2px 12px rgba(20,40,80,.10);
  }
  .yqx-m-bar .yqx-m-cat{
    display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
    font-size:11px; color:#22303f; background:none; border:0; cursor:pointer; padding:0; flex:0 0 auto;
  }
  .yqx-m-bar .yqx-m-cat svg{ width:20px; height:20px; }
  .yqx-m-bar .yqx-m-inq{
    flex:1 1 auto; text-align:center; border:1.5px solid #22303f; background:#fff; color:#22303f;
    font-weight:700; font-size:14px; padding:11px 10px; border-radius:999px; text-decoration:none;
  }
  .yqx-m-bar .yqx-m-chat{
    flex:0 0 auto; background:#ff6a00; color:#fff; border:0; font-weight:700; font-size:14px;
    padding:11px 20px; border-radius:999px; text-decoration:none;
  }

  /* keep content clear of the fixed bottom bar */
  body{ padding-bottom:66px; }
  .site-footer{ padding-bottom:84px; }

  /* lift the existing floating buttons above the bottom bar */
  html body .fab{ bottom:74px !important; }
  html body #yqx-lsw{ bottom:122px !important; }
  html body .yqx-rwd-side-btn{ bottom:84px !important; }
  html body #yqx-ltip{ bottom:74px !important; }
}

@media (max-width:430px){
  html body .card .nm{ font-size:12.5px; }
  html body .card .price-now{ font-size:16px; }
  .yqx-m-bar .yqx-m-chat{ padding:11px 16px; }
  .yqx-m-bar .yqx-m-inq{ font-size:13px; padding:11px 8px; }
}

/* ---------- hide the mobile-only nodes on desktop ---------- */
@media (min-width:1025px){
  .yqx-m-bar, .yqx-m-supplier, .yqx-m-hero, .yqx-m-contact, .yqx-m-ctrl{ display:none !important; }
}

/* YQX-A11Y-V1 : WCAG AA contrast + touch targets (kill switch: ?yqx_a11y_off=1) */
html body .yqx-m-supplier .yqx-m-badge{ color:#0b5ea8 !important; }
html body .yqx-m-supplier .yqx-m-open{ background:#c24800 !important; min-height:44px; min-width:64px; }
html body .yqx-m-ctrl button{ min-width:44px; min-height:44px; }
html body .fab a{ width:48px !important; height:48px !important; }
html body .foot h3{ color:#fff; font-size:14px; margin-bottom:12px; }
/* /YQX-A11Y-V1 */
/* YQX-A11Y-V2 : WCAG AA round2 - video hero chip contrast + target spacing (kill switch: ?yqx_a11y_off=1) */
html body .cat-hero--video .cat-chip.active{ background:#8a5a1c !important; border-color:#8a5a1c !important; color:#fff !important; }
html body .fab{ gap:14px !important; }
html body .fab a, html body .fab button{ width:48px !important; height:48px !important; min-width:48px; min-height:48px; }
html body a[href^="mailto:"], html body a[href^="tel:"]{ min-width:44px; min-height:44px; }
html body button[class^="yqx-"]{ min-width:44px; min-height:44px; }
/* /YQX-A11Y-V2 */
/* YQX-A11Y-V3 : WCAG AA desktop gold buttons contrast (kill switch: ?yqx_a11y_off=1) */
html body .btn.btn--fill{ background:#8a5a1c !important; border-color:#8a5a1c !important; color:#fff !important; }
html body .cat-search button{ background:#8a5a1c !important; color:#fff !important; }
html body .cat-search button:hover{ background:#6f4716 !important; }
/* /YQX-A11Y-V3 */



/* YQX-A11Y-V4 : WCAG AA round3 - live badge + SALE badge contrast */
html body .cat-count .live{ color:#0f704e !important; }
html body .badge-sale{ background:#c02b2a !important; color:#fff !important; }
/* /YQX-A11Y-V4 */

/* YQX-A11Y-V5 : WCAG AA round4 - card buttons + gold small-text contrast */
html body .card .acts .b-chat{ background:#1a8047 !important; color:#fff !important; }
html body .card .tag{ color:#8a5a1c !important; }
html body .card .sku{ color:#8a5a1c !important; }
html body .cat-hero h1 em{ color:#8a5a1c !important; }
html body details.idx summary::after{ color:#8a5a1c !important; }
html body .nav a:hover,html body .nav a.on{ color:#8a5a1c !important; }
/* /YQX-A11Y-V5 */

/* YQX-A11Y-V6 : fix V5 regression - hero em on dark bg needs bright gold */
html body .cat-hero h1 em{ color:#e0a850 !important; }
html body .cat-hero--video h1 em{ color:#e0a850 !important; }
/* /YQX-A11Y-V6 */

/* YQX-A11Y-V7 : WCAG AA round5 - footer brand small text on dark bg */
html body .site-footer .brand small{ color:#9fb3b8 !important; }
html body .site-footer small{ color:#9fb3b8 !important; }
/* /YQX-A11Y-V7 */

/* YQX-A11Y-V8 : WCAG AA round6 - contact plugin green text on light bg */
html body .yqx-sc-whatsapp,html body .yqx-wa-link{ color:#0a6e37 !important; }
html body .yqx-sc-wechat,html body .yqx-wx-id,html body .yqx-wx-copy{ color:#0a6e37 !important; }
html body .yqx-wa-name{ color:#0a6e37 !important; }
/* /YQX-A11Y-V8 */

/* YQX-A11Y-V9 : mobile PSI final - orange CTA contrast + floating target spacing */
html body .yqx-m-ctn,html body .yqx-m-chat{ background:#c24800 !important; color:#fff !important; border-color:#c24800 !important; }
html body .yqx-m-bar .yqx-m-chat{ background:#c24800 !important; color:#fff !important; }
html body .fab{ gap:14px !important; }
html body .fab a,html body .fab button{ width:48px !important; height:48px !important; min-width:48px !important; min-height:48px !important; }
html body .yqx-rwd-side-btn{ width:48px !important; height:48px !important; min-width:48px !important; min-height:48px !important; right:auto !important; left:12px !important; }
html body .yqx-rwd-side.yqx-rwd-side-open{ right:auto !important; left:12px !important; }
/* /YQX-A11Y-V9 */

/* YQX-A11Y-V10 : final mobile contrast - contact card CTA */
html body .yqx-m-contact .yqx-m-cbtn{ background:#c24800 !important; color:#fff !important; border-color:#c24800 !important; }
/* /YQX-A11Y-V10 */

/* YQX-A11Y-V11 : desktop CLS - reserve language switcher height */
@media (min-width:769px){
  html body .topbar__right{ min-height:44px !important; }
  html body .topbar__lang{ height:44px !important; min-height:44px !important; display:inline-flex !important; align-items:center !important; }
}
/* /YQX-A11Y-V11 */
