/* MSC Retail polish layer — loaded last on every public page (via partials/site-header.php). */

/* ---------- mobile header: logo + search spacing, round search button ---------- */
@media (max-width:640px){
  html body.retail>header,html body.retail>header:has(>.auth){grid-template-columns:auto minmax(0,1fr)!important;column-gap:12px!important;padding-left:12px!important;padding-right:12px!important}
  html body.retail>header>.brand{gap:7px!important;min-width:0!important;max-width:118px!important;overflow:visible!important}
  html body.retail>header>.brand img{width:32px!important;height:32px!important;flex:none!important}
  html body.retail>header>.brand span{display:flex!important;flex-direction:column!important;line-height:1.05!important;gap:1px!important;min-width:0}
  html body.retail>header>.brand b{font-size:15px!important;letter-spacing:.2px!important}
  html body.retail>header>.brand strong{font-size:9px!important;letter-spacing:1.3px!important}
  html body.retail>header>.brand small{display:none!important}
  html body.retail>header>.market-search,html body.retail>header:has(>.auth)>.market-search{display:flex!important;align-items:center!important;gap:4px!important;min-width:0!important;width:100%!important;height:42px!important;padding:0 4px 0 14px!important;margin:0!important;border-radius:22px!important;box-sizing:border-box!important}
  html body.retail>header .market-search input{flex:1 1 auto!important;min-width:0!important;width:auto!important;font-size:15px!important;padding:0!important;height:100%!important;background:transparent!important;border:0!important;outline:0!important}
  html body.retail>header .market-search button[type=submit]{flex:none!important;width:34px!important;height:34px!important;min-width:34px!important;padding:0!important;margin:0!important;border-radius:50%!important;display:flex!important;align-items:center!important;justify-content:center!important;font-size:0!important;line-height:0!important;overflow:hidden!important;color:#fff!important}
  html body.retail>header .market-search button[type=submit] svg{width:18px!important;height:18px!important;margin:0!important}
}
@media (max-width:360px){html body.retail>header>.brand span{display:none!important}}

/* ---------- empty / signed-out states ---------- */
body.retail #retail-main .empty{max-width:520px;margin:28px auto;padding:34px 24px 30px;text-align:center;background:#fff;border:1px solid #eceef2;border-radius:18px;box-shadow:0 6px 24px rgba(16,24,40,.05)}
body.retail #retail-main .empty::before{content:"";display:block;width:64px;height:64px;margin:0 auto 14px;border-radius:50%;background:#fff1e6 url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23ed7026" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M5 8h14l-1 12H6z"/><path d="M9 8a3 3 0 0 1 6 0"/></svg>') center/30px no-repeat}
body.retail #retail-main .empty .eyebrow{font-size:11px;letter-spacing:1.4px}
body.retail #retail-main .empty h1{font-size:24px!important;line-height:1.25!important;letter-spacing:-.3px!important;margin:6px 0 8px!important;font-weight:700!important;text-align:center}
body.retail #retail-main .empty p{margin:0 0 18px}
body.retail #retail-main .empty .pol-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
body.retail #retail-main .empty .pol-actions .rbutton{min-width:150px;justify-content:center}
body.retail #retail-main .empty .pol-actions .rbutton.secondary{background:#fff!important;color:#ed7026!important;border:1.5px solid #ed7026!important}

/* ---------- account page (signed out) ---------- */
body.retail .pol-welcome{background:#fff;border:1px solid #f1e3d8;border-radius:18px;padding:22px;text-align:center;box-shadow:0 6px 24px rgba(16,24,40,.05)}
body.retail .pol-welcome .pol-av{width:60px;height:60px;margin:0 auto 10px;border-radius:50%;background:#fff1e6;display:grid;place-items:center;color:#ed7026}
body.retail .pol-welcome .pol-av svg{width:28px;height:28px}
body.retail .pol-welcome h2{font-size:20px;margin:0 0 6px;color:#1f2328}
body.retail .pol-welcome p{color:#5b636e;margin:0 0 16px;font-size:14px}
body.retail .pol-welcome .pol-btns{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
body.retail .pol-welcome .pol-btns button{min-width:140px;height:44px;border-radius:22px;font-weight:700;font-size:15px;cursor:pointer}
body.retail .pol-welcome .pol-btns .pri{background:#ed7026;color:#fff;border:0}
body.retail .pol-welcome .pol-btns .sec{background:#fff;color:#ed7026;border:1.5px solid #ed7026}
body.retail .pol-tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:14px}
body.retail .pol-tiles a{display:flex;flex-direction:column;align-items:center;gap:6px;padding:14px 6px;background:#fff;border:1px solid #eceef2;border-radius:14px;color:#1f2328;font-size:12.5px;font-weight:600;text-decoration:none;transition:.15s}
body.retail .pol-tiles a:hover{border-color:#ed7026;color:#ed7026}
body.retail .pol-tiles span{width:40px;height:40px;border-radius:12px;background:#fff1e6;color:#ed7026;display:grid;place-items:center}
body.retail .pol-tiles svg{width:21px;height:21px}
body.retail .msc-account.pol-guest .msc-account-dashboard-heading h1{font-size:22px!important}
body.retail .msc-account.pol-guest [data-account-report]{display:none!important}
@media (max-width:768px){
  body.retail .msc-account .eng-account-toolbar{margin:4px 0 10px}
  body.retail .msc-account .eng-account-menu-button{width:100%;justify-content:center;border-radius:12px!important}
  body.retail .msc-account.pol-guest .msc-account-dashboard-top{display:none!important}
  body.retail .msc-account.pol-guest .msc-account-dashboard-heading{display:none!important}
  body.retail .msc-account.pol-guest .msc-account-identity{display:none!important}
}
@media (max-width:768px){
  body.retail .msc-account.pol-guest .msc-account-dashboard-side{display:none!important}
  body.retail .msc-account.pol-guest .msc-account-dashboard-shell{border:0!important;background:transparent!important;box-shadow:none!important}
  body.retail .msc-account.pol-guest .msc-account-dashboard-main{padding:0!important;background:transparent!important}
}

/* ===== product card v2 (Alibaba-style) ===== */
body.retail .product-card.pc2{position:relative;display:flex;flex-direction:column;background:#fff;border:1px solid #eceef2;border-radius:12px;overflow:hidden;padding:0;box-shadow:none;transition:box-shadow .2s,transform .2s;min-width:0}
body.retail .product-card.pc2:hover{box-shadow:0 8px 22px rgba(16,24,40,.08);transform:translateY(-2px)}
body.retail .pc2 .pc2-pic{display:grid;place-items:center;aspect-ratio:1;background:#f6f7f9;overflow:hidden}
body.retail .pc2 .pc2-pic img{width:100%;height:100%;object-fit:cover;border-radius:0;transition:transform .35s}
body.retail .pc2:hover .pc2-pic img{transform:scale(1.05)}
body.retail .pc2 .woo-photo-placeholder{color:#8a909c;font-size:13px}
body.retail .pc2 button.save{all:unset;position:absolute;top:8px;right:8px;width:32px;height:32px;border-radius:50%;background:rgba(255,255,255,.92);box-shadow:0 2px 8px rgba(0,0,0,.1);display:grid;place-items:center;font-size:17px;line-height:1;color:#ed7026;cursor:pointer}
body.retail .pc2 button.save[aria-pressed="true"]{color:#e4393c}
body.retail .pc2 .pc2-body{display:flex;flex-direction:column;gap:3px;padding:10px 10px 12px;flex:1;min-width:0}
body.retail .pc2 .pc2-name{margin:0!important;font-size:13.5px!important;line-height:1.35!important;font-weight:500!important;letter-spacing:0!important;text-align:left!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.7em}
body.retail .pc2 .pc2-name a{color:#1f2328;text-decoration:none}
body.retail .pc2 .pc2-name a:hover{color:#ed7026}
body.retail .pc2 .pc2-price{font-size:17px;font-weight:800;color:#1f2328;letter-spacing:-.2px;margin-top:2px}
body.retail .pc2 .pc2-moq{color:#8a909c;font-size:12px}
body.retail .pc2 .pc2-sample{color:#8a909c;font-size:12px;margin-top:4px}
body.retail .pc2 .supplier-identity{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;margin:6px 0 0;padding:0;border:0;background:none;min-width:0}
body.retail .pc2 .supplier-name-link{all:unset;cursor:pointer;flex:1 1 100%;font-size:12px;color:#545b66;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-decoration:none}
body.retail .pc2 .supplier-name-link:hover{color:#ed7026}
body.retail .pc2 .supplier-country{display:inline-flex;flex:none}
body.retail .pc2 .supplier-country img{width:18px;height:12px;border-radius:2px;box-shadow:0 0 0 1px #e3e6ea}
body.retail .pc2 .supplier-label-status{display:inline-flex;align-items:center;gap:6px;min-width:0;flex-wrap:wrap;font-size:11.5px;color:#8a909c}
body.retail .msc-badge-img{display:inline-flex;align-items:center;line-height:0;padding:0;margin:0;border:0;background:none;text-decoration:none}
body.retail .msc-badge-img img{height:16px;width:auto;display:block}
body.retail .msc-badge-none{height:14px;width:auto;display:block;opacity:.85}
body.retail .pc2 .pc2-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:auto;padding-top:10px}
body.retail .pc2 .pc2-btn{all:unset;box-sizing:border-box;cursor:pointer;display:flex;align-items:center;justify-content:center;height:34px;border-radius:17px;font-size:13px;font-weight:700;background:#ed7026;color:#fff;border:1.5px solid #ed7026;transition:.15s;text-align:center;white-space:nowrap}
body.retail .pc2 .pc2-btn:hover{background:#c95514;border-color:#c95514;color:#fff}
body.retail .pc2 .pc2-btn.ghost{background:#fff;color:#ed7026}
body.retail .pc2 .pc2-btn.ghost:hover{background:#fff1e6;color:#c95514}
body.retail .products:has(.pc2){gap:12px}
@media (max-width:768px){
  body.retail .products:has(.pc2){gap:8px}
  body.retail .pc2 .pc2-body{padding:8px 8px 10px}
  body.retail .pc2 .pc2-price{font-size:16px}
  body.retail .pc2 .pc2-btn{height:32px;font-size:12.5px}
}

/* store/product pages: badges as images */
body.retail .msc-store-badges .msc-badge-img img,body.retail .supplier-card .msc-badge-img img{height:20px}
/* pc2 inside product/store pages (their scoped resets use #retail-main) */
#retail-main .product-card.pc2{background:#fff!important;border:1px solid #eceef2!important;border-radius:12px!important}
#retail-main .pc2 .pc2-btn{font:700 13px/1 Inter,system-ui,-apple-system,"Segoe UI",sans-serif!important;color:#fff!important;background:#ed7026!important;border:1.5px solid #ed7026!important;border-radius:17px!important;height:34px!important;display:flex!important;align-items:center!important;justify-content:center!important}
#retail-main .pc2 .pc2-btn.ghost{background:#fff!important;color:#ed7026!important}
#retail-main .pc2 .pc2-btn:hover{background:#c95514!important;border-color:#c95514!important;color:#fff!important}
#retail-main .pc2 .pc2-btn.ghost:hover{background:#fff1e6!important;color:#c95514!important}
#retail-main .pc2 .pc2-name a{color:#1f2328!important}
#retail-main .pc2 .supplier-name-link{color:#545b66!important}
@media (max-width:768px){#retail-main .pc2 .pc2-btn{height:32px!important;font-size:12.5px!important}}
body.retail .pc2 .supplier-name-link,#retail-main .pc2 .supplier-name-link{border:0!important;text-decoration:none!important;box-shadow:none!important}

/* ---------- 2026-10-21 mobile header v2: stacked wordmark, balanced search pill ---------- */
@media (max-width:640px){
  html body.retail>header,html body.retail>header:has(>.auth){column-gap:10px!important;padding-left:14px!important;padding-right:14px!important}
  html body.retail>header>a.brand{max-width:none!important;gap:7px!important}
  html body.retail>header>a.brand>span:not(#_){display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;gap:2px!important;line-height:1!important}
  html body.retail>header>a.brand>span:not(#_) b{display:block!important;font-size:16px!important;line-height:1!important}
  html body.retail>header>a.brand>span:not(#_) strong{display:block!important;font-size:8.5px!important;line-height:1!important;letter-spacing:1.6px!important;margin:0!important}
  html body.retail>header>.market-search,html body.retail>header:has(>.auth)>.market-search{height:40px!important;padding:0 3px 0 14px!important;gap:2px!important;border:1px solid #e6e8ec!important;background:#f5f6f8!important;border-radius:20px!important;overflow:hidden!important;box-shadow:none!important}
  html body.retail>header>.market-search:focus-within{border-color:#ed7026!important;background:#fff!important;box-shadow:0 0 0 3px rgba(237,112,38,.14)!important}
  html body.retail>header .market-search input{font-size:14px!important}
  html body.retail>header .market-search .retail-image-search{flex:none!important;width:32px!important;height:32px!important;min-height:32px!important;padding:0!important;margin:0!important;border:0!important;border-radius:50%!important;background:transparent!important;display:grid!important;place-items:center!important;grid-row:auto!important;grid-column:auto!important}
  html body.retail>header .market-search .retail-image-search span{display:none!important}
  html body.retail>header .market-search .retail-image-search svg{width:19px!important;height:19px!important}
  html body.retail>header .market-search button[type=submit]{width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;box-shadow:none!important;border:0!important}
  html body.retail>header .market-search button[type=submit] svg{width:16px!important;height:16px!important}
}
@media (max-width:359px){html body.retail>header>a.brand>span:not(#_){display:none!important}}
