/* ============================================================================
   YIWU — Brand layer (public site only; NOT loaded on /admin/).
   Aligns the site with the YIWU Brand Guidelines:
     Yiwu Red #BE2227 · Silk Gold #E8B94A · Paper Cream #FBF7F0 · Ink #0D0909
     Headings: Fraunces · Body: Manrope · Arabic/Kurdish: Noto Sans Arabic
   Loaded last, after theme/layout/pages/tailwind, so it only re-tunes tokens
   and a few brand-specific surfaces.
   ============================================================================ */

@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(../fonts/manrope-latin.woff2) format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 500 800; font-display: swap;
  src: url(../fonts/fraunces-latin.woff2) format('woff2'); }

:root {
  /* Brand red scale, built around Yiwu Red #BE2227 */
  --red-50:  #fcf1ef;
  --red-100: #f8e0dc;
  --red-200: #f0c2bb;
  --red-300: #e49a91;
  --red-400: #d86a62;
  --red-500: #cc3f3c;
  --red-600: #c42c2f;
  --red-700: #be2227;   /* PRIMARY — Yiwu Red */
  --red-800: #a91c21;   /* Wave Red */
  --red-900: #8e1519;   /* Deep Red */
  --crimson: #b01f24;   /* Seal Red */

  --gold:      #e8b94a;  /* Silk Gold */
  --gold-deep: #d9a93a;
  --cream:     #fbf7f0;  /* Paper Cream */
  --sand:      #e6d9c2;
  --ink:       #0d0909;

  /* Warm neutrals */
  --gray-50:  #faf6ef;
  --gray-100: #f3ece1;
  --gray-200: #e6d9c2;
  --gray-300: #d4c4ab;
  --gray-400: #a39686;
  --gray-500: #6b5e5e;
  --gray-600: #4a3f3f;
  --gray-700: #3a3030;
  --gray-800: #241b1b;
  --gray-900: #0d0909;
  --charcoal: #1a1212;

  --bg:          var(--cream);
  --bg-elevated: #ffffff;
  --surface:     #ffffff;
  --surface-2:   #f6efe4;
  --border:      #eadfcd;
  --border-soft: #f2eadc;
  --text:        #1a1212;
  --text-soft:   #4a3f3f;
  --text-muted:  #6b5e5e;
  --primary:     var(--red-700);
  --primary-h:   var(--red-900);
  --ring:        rgba(190,34,39,.30);

  --glass-bg:     rgba(251,247,240,.86);
  --glass-border: rgba(255,255,255,.6);

  --shadow-xs: 0 1px 2px rgba(36,27,27,.05);
  --shadow-sm: 0 2px 8px rgba(36,27,27,.06);
  --shadow-md: 0 8px 24px rgba(36,27,27,.08);
  --shadow-lg: 0 16px 48px rgba(36,27,27,.12);
  --shadow-red: 0 10px 28px rgba(190,34,39,.26);

  --font: "Manrope", "Noto Sans Arabic", system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", "Noto Sans", Arial, sans-serif;
  --font-display: "Fraunces", "Noto Sans Arabic", Georgia, "Times New Roman", serif;

  /* Header logo: a bit smaller than before (was 78px) */
  --logo-h: 54px;
}

/* Dark mode = Lacquer & Ink (warm red-black, never blue-grey) */
html.dark {
  --bg:          #0d0909;
  --bg-elevated: #150e0e;
  --surface:     #191111;
  --surface-2:   #221818;
  --border:      #33262a;
  --border-soft: #261b1d;
  --text:        #fbf7f0;
  --text-soft:   #d6cabd;
  --text-muted:  #a3968a;
  --primary:     #d6393b;
  --primary-h:   #e25a58;
  --ring:        rgba(214,57,59,.4);
  --glass-bg:     rgba(13,9,9,.82);
  --glass-border: rgba(255,255,255,.07);
  --shadow-md: 0 8px 24px rgba(0,0,0,.45);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.6);
}

/* ── Typography ─────────────────────────────────────────────────────────── */
body { font-family: var(--font); font-feature-settings: "ss01" 0; }
h1, h2, h3,
.section-head h2, .slide-copy h1, .cta-band h2, .auth-form h1, .auth-side h2 {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -.015em;
  font-optical-sizing: auto;
}
/* Arabic / Kurdish: Fraunces has no Arabic glyphs — keep the sans for headings */
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] .section-head h2, html[dir="rtl"] .slide-copy h1 { font-family: var(--font); font-weight: 800; letter-spacing: 0; }

.section-head .eyebrow { color: var(--primary); letter-spacing: .16em; }

/* ── Logo ──────────────────────────────────────────────────────────────── */
.brand-logo img { height: var(--logo-h); width: auto; }
.brand-logo .logo-dark { display: none; }
html.dark .brand-logo .logo-light { display: none; }
html.dark .brand-logo .logo-dark { display: block; }
.site-footer .brand-logo img { height: 46px; }
.drawer .brand-logo img { height: 38px; }
.auth-side .brand-logo img { height: clamp(52px, 4.6vw, 70px); }
@media (max-width: 980px) { :root { --logo-h: 46px; } }
@media (max-width: 480px) { .brand-logo img { height: 36px; } }
@media (max-width: 380px) { .brand-logo img { height: 31px; } }

/* ── Header ────────────────────────────────────────────────────────────── */
.site-header { border-bottom-color: var(--border); }
.site-header::after { content:""; position:absolute; inset-inline:0; bottom:-1px; height:2px;
  background: linear-gradient(90deg, var(--red-700), var(--red-700) 60%, var(--gold)); opacity:.9; pointer-events:none; }

/* ── Brand surfaces: Yiwu Red + seigaiha wave pattern ─────────────────── */
.slide.theme-red,
.auth-side,
.sp-cover,
.supplier-card .cover {
  background:
    linear-gradient(115deg, rgba(142,21,25,.72), rgba(190,34,39,.15) 55%, rgba(190,34,39,0)),
    url(../img/seigaiha-red.svg) 0 0 / 40px 20px repeat,
    var(--red-700);
}
.cta-band {
  background:
    linear-gradient(120deg, rgba(142,21,25,.65), rgba(190,34,39,0) 70%),
    url(../img/seigaiha-red.svg) 0 0 / 40px 20px repeat,
    var(--red-700);
}
.slide.theme-navy { background: linear-gradient(115deg, #2e080b, #5c0d11 60%, #841216); }   /* App Lacquer */
.slide.theme-dark { background:
    linear-gradient(115deg, rgba(13,9,9,.4), rgba(13,9,9,0)),
    url(../img/seigaiha-ink.svg) 0 0 / 40px 20px repeat, #140c0c; }
.slide.theme-light { background: linear-gradient(115deg, #fbf7f0, #f5ecdc 60%, #efe1c8); color: var(--ink); }
.slide.theme-light .slide-badge { background: rgba(190,34,39,.10); color: var(--red-700); }
.slide.theme-light p { color: var(--gray-600); }

/* Gold frame inside red brand panels (from the business-card front) */
.slide.theme-red::before, .auth-side::before, .cta-band::before {
  content:""; position:absolute; inset: 14px; border: 1px solid rgba(232,185,74,.55);
  border-radius: calc(var(--r-xl) - 10px); pointer-events:none; z-index: 0; }
.auth-side::before { border-radius: 4px; }
.slide.theme-red .slide-inner, .cta-band > * { position: relative; z-index: 1; }

.slide-badge { background: rgba(232,185,74,.16); color: #f6d98f; border: 1px solid rgba(232,185,74,.45); }
.slide.theme-light .slide-badge { border-color: rgba(190,34,39,.25); }
.slide-cta { color: var(--red-700); }

/* News ticker: deep red band with a gold label */
.news-banner, html.dark .news-banner {
  background: linear-gradient(90deg, var(--red-900), var(--red-800) 55%, var(--red-700)); }
.nb-label { background: var(--gold); color: var(--ink); box-shadow: 0 0 0 6px var(--red-900); }

/* ── Buttons & accents ─────────────────────────────────────────────────── */
.btn-primary { background: var(--red-700); }
.btn-primary:hover { background: var(--red-900); }
html.dark .btn-primary { background: var(--primary); }
html.dark .btn-primary:hover { background: var(--red-700); }
.badge-gold { background: linear-gradient(135deg, #fbefcf, #f4dc9c); color: #7a5508; }
html.dark .badge-gold { background: rgba(232,185,74,.16); color: var(--gold); }

.text-gradient { background: linear-gradient(100deg, var(--red-700), var(--crimson) 60%, var(--red-900));
  -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Soft brand tints instead of pink */
html.dark .cat-card .glyph, html.dark .feat-card .glyph, html.dark .wel-card .glyph,
html.dark .dir-group .dg-head .glyph { background: linear-gradient(135deg, rgba(190,34,39,.22), rgba(190,34,39,.08)); }
html.dark .rail-cta { background: rgba(190,34,39,.14); }

/* Footer in brand ink with a gold rule */
.site-footer { border-top: 2px solid var(--gold); }

::selection { background: rgba(232,185,74,.45); color: var(--ink); }

/* Hero: give the prev/next arrows their own gutter so they never sit on the
   headline or the gold frame, and keep the art inside the frame. */
.slide-inner { padding-inline: clamp(64px, 6vw, 88px); }
.slide-nav { width: 38px; height: 38px; background: rgba(13,9,9,.28); }
.slide-prev { inset-inline-start: 20px; }
.slide-next { inset-inline-end: 20px; }
.slide-art img { max-height: calc(100% - 40px); }
@media (max-width: 700px) { .slide-inner { padding-inline: clamp(26px, 6vw, 40px); } .slide-nav { display: none; } }

/* ── Help Center (mirrors the app's Support screen) ─────────────────────── */
.hc-hero { padding: 26px 0 34px; background:
    radial-gradient(1200px 400px at 85% -40%, rgba(232,185,74,.18), transparent 60%), var(--bg); }
.hc-hero .breadcrumb { margin-bottom: 18px; }
.hc-pill { display:inline-block; padding: 5px 14px; border-radius: var(--r-full); background: #f8d98a; color: #3a2a06;
  font-weight: 800; font-size: .82rem; }
.hc-hero h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.08; margin: 14px 0 8px; color: var(--text); }
.hc-hero h1 em { font-style: normal; color: #a97a12; }
html.dark .hc-hero h1 em { color: var(--gold); }
.hc-lead { color: var(--text-soft); font-size: 1.05rem; }
.hc-search { display:flex; align-items:center; gap: 12px; max-width: 640px; margin-top: 22px; padding: 0 20px; height: 56px;
  border-radius: var(--r-full); background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.hc-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
.hc-search input { flex:1; border:0; background: transparent; outline: none; color: var(--text); font-size: 1rem; min-width: 0; }

.hc-wrap { display:grid; grid-template-columns: minmax(0,1fr) 360px; gap: 36px; padding-bottom: 72px; align-items: start; }
@media (max-width: 960px) { .hc-wrap { grid-template-columns: 1fr; } }
.hc-group { margin-bottom: 30px; }
.hc-group h2 { font-family: var(--font); font-size: 1.2rem; font-weight: 800; letter-spacing: 0; margin-bottom: 12px;
  display:flex; align-items:center; gap: 8px; color: var(--text); }
.hc-spark { color: var(--gold-deep); }

.hc-q { border-radius: 16px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 10px;
  transition: background .2s var(--ease), border-color .2s var(--ease); }
.hc-q.is-tinted { background: #fdf1dc; border-color: #f6e3bf; }
html.dark .hc-q.is-tinted { background: rgba(232,185,74,.09); border-color: rgba(232,185,74,.22); }
.hc-q summary { list-style: none; cursor: pointer; display:flex; align-items:center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; font-weight: 600; color: var(--text); }
.hc-q summary::-webkit-details-marker { display:none; }
.hc-q summary:hover { color: var(--primary); }
.hc-arrow { flex:none; transition: transform .2s var(--ease); color: var(--text); }
.hc-q[open] .hc-arrow { transform: rotate(90deg); }
html[dir="rtl"] .hc-arrow { transform: scaleX(-1); }
html[dir="rtl"] .hc-q[open] .hc-arrow { transform: rotate(90deg); }
.hc-q p { padding: 0 20px 18px; color: var(--text-soft); line-height: 1.65; }

.hc-nomatch p { color: var(--text-muted); margin-bottom: 10px; }
.hc-ask { display:flex; align-items:center; gap: 12px; padding: 16px 20px; border-radius: 16px; background: var(--surface);
  border: 1px dashed var(--primary); color: var(--text); font-weight: 600; margin-bottom: 24px; }
.hc-ask .ico { color: var(--primary); }
.hc-ask .txt { flex: 1; }


.hc-side { display:flex; flex-direction: column; gap: 18px; position: sticky; top: calc(var(--header-h) + var(--nav-h) + 16px); }
@media (max-width: 960px) { .hc-side { position: static; } }
.hc-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 22px; box-shadow: var(--shadow-sm); }
.hc-card h3 { font-size: 1.25rem; margin-bottom: 6px; }
.hc-card .muted { color: var(--text-muted); font-size: .92rem; margin-bottom: 14px; }
.hc-contact, .hc-office { display:flex; align-items:flex-start; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border-soft); }
.hc-contact:hover b { color: var(--primary); }
.hc-contact .ico, .hc-office .ico { flex:none; width: 42px; height: 42px; border-radius: 12px; display:grid; place-items:center;
  background: var(--red-50); color: var(--primary); font-size: 1.05rem; }
html.dark .hc-contact .ico, html.dark .hc-office .ico { background: rgba(190,34,39,.16); }
.hc-contact .ico.wa { background: #e6f7ec; color: #1a9e4b; font-size: 1.3rem; }
html.dark .hc-contact .ico.wa { background: rgba(37,211,102,.14); color: #4ad37f; }
.hc-contact .txt, .hc-office .txt { display:flex; flex-direction: column; gap: 2px; min-width: 0; }
.hc-contact b, .hc-office b { font-weight: 800; color: var(--text); }
.hc-contact .txt span, .hc-office .txt span { color: var(--text-soft); font-size: .92rem; overflow-wrap: anywhere; }
.hc-office a { color: var(--primary); font-weight: 700; font-size: .86rem; margin-top: 4px; }
.hc-legal { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-soft); color: var(--text-muted); font-size: .8rem; }

/* Footer is always ink-dark: always the white logo there. */
.site-footer .brand-logo .logo-light { display: none; }
.site-footer .brand-logo .logo-dark { display: block; }

/* Buttons on red brand panels: always white with red text (any theme). */
html .cta-band .btn-primary, html.dark .cta-band .btn-primary,
html .sp-cover .btn-primary, html.dark .sp-cover .btn-primary {
  background: #fff; color: var(--red-700); border-color: #fff; box-shadow: 0 10px 28px rgba(0,0,0,.22); }
html .cta-band .btn-primary:hover, html.dark .cta-band .btn-primary:hover,
html .sp-cover .btn-primary:hover, html.dark .sp-cover .btn-primary:hover { background: var(--cream); color: var(--red-900); }
html.dark .cta-band .btn-ghost { color: #fff; border-color: rgba(255,255,255,.55); background: transparent; }
html.dark .cta-band .btn-ghost:hover { background: rgba(255,255,255,.12); }

/* ---- App announcement (app-promo.css/js) ---- */
:root { --yap-head: "Fraunces", Georgia, serif; }
.footer-app { display: inline-flex; align-items: center; gap: 12px; margin-top: 18px; padding: 10px 18px 10px 14px; border-radius: 12px; background: #000; color: #fff !important; border: 1px solid rgba(232,185,74,.55); text-decoration: none !important; transition: transform .15s, border-color .15s; }
.footer-app:hover { transform: translateY(-1px); border-color: var(--gold, #e8b94a); }
.footer-app svg { width: 24px; height: 24px; fill: #fff; flex: none; }
.footer-app span { display: flex; flex-direction: column; line-height: 1.2; }
.footer-app b { font-size: 15px; }
.footer-app small { font-size: 12.5px; color: rgba(255,255,255,.72); }

/* ---- Help & support pop-up (partials/whatsapp.php + js/support.js), the app's support centre ---- */
.sp { position: fixed; right: 24px; bottom: 24px; z-index: 80; font-family: var(--font-sans, inherit); }
.sp-fab { position: relative; display: flex; align-items: center; border: 0; padding: 0; background: none; cursor: pointer; margin-left: auto; }
.sp-fab-ico { position: relative; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: #f2c14e; color: #3a2400; font-size: 24px; box-shadow: 0 10px 26px rgba(0,0,0,.28), inset 0 -3px 0 rgba(0,0,0,.08); transition: transform .18s, background .18s; }
.sp-fab-ico > span { position: absolute; display: grid; place-items: center; transition: opacity .18s, transform .18s; }
.sp-fab-ico .i-close { font-size: 32px; line-height: 1; opacity: 0; transform: rotate(-45deg); }
.sp.is-open .sp-fab-ico .i-open { opacity: 0; transform: rotate(45deg); }
.sp.is-open .sp-fab-ico .i-close { opacity: 1; transform: none; }
.sp-fab:hover .sp-fab-ico { transform: scale(1.06); background: #f5cb63; }
.sp-fab:focus-visible .sp-fab-ico { outline: 3px solid var(--red, #be2227); outline-offset: 3px; }
.sp-fab-label { max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; margin-right: -26px; padding: 0; height: 44px; line-height: 44px; border-radius: 22px 0 0 22px; background: #16100f; color: #fff; font-weight: 600; font-size: 14.5px; transition: max-width .25s, opacity .2s, padding .25s; }
.sp-fab:hover .sp-fab-label, .sp-fab:focus-visible .sp-fab-label { max-width: 220px; opacity: 1; padding: 0 36px 0 18px; }
.sp.is-open .sp-fab-label { display: none; }
@media (prefers-reduced-motion: no-preference) { .sp-fab-ico { animation: sp-pulse 2.4s ease 1.5s 2; } }
@keyframes sp-pulse { 0%,100% { box-shadow: 0 10px 26px rgba(0,0,0,.28), 0 0 0 0 rgba(242,193,78,.55); } 50% { box-shadow: 0 10px 26px rgba(0,0,0,.28), 0 0 0 14px rgba(242,193,78,0); } }

.sp-panel { position: absolute; right: 0; bottom: 76px; width: 390px; max-height: min(640px, calc(100vh - 150px)); display: flex; flex-direction: column; background: var(--paper, #fff); color: var(--ink, #16100f); border: 1px solid var(--line, #ece3dc); border-radius: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.28); overflow: hidden; opacity: 0; transform: translateY(12px) scale(.98); transform-origin: bottom right; transition: opacity .2s, transform .22s cubic-bezier(.2,.8,.2,1); }
.sp-panel.is-in { opacity: 1; transform: none; }
html.dark .sp-panel { background: #1b1312; border-color: #3a2b27; color: #f6eee8; }
.sp-head { position: relative; padding: 18px 20px 14px; background: linear-gradient(180deg, var(--cream, #fbf7f0), transparent); border-bottom: 1px solid var(--line, #ece3dc); }
html.dark .sp-head { background: linear-gradient(180deg, #24191a, transparent); border-color: #3a2b27; }
.sp-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 20px; background: #fdf1d2; color: #8a5a00; font-size: 12.5px; font-weight: 700; }
html.dark .sp-pill { background: #3a2d12; color: #f2c14e; }
.sp-x { position: absolute; top: 12px; inset-inline-end: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; color: inherit; opacity: .6; font-size: 26px; line-height: 1; cursor: pointer; }
.sp-x:hover { opacity: 1; background: rgba(0,0,0,.06); }
.sp-head h2 { margin: 10px 0 12px; font-family: var(--yap-head, inherit); font-size: 27px; line-height: 1.1; letter-spacing: -.02em; }
.sp-head h2 em { font-style: normal; color: #d49a12; }
html.dark .sp-head h2 em { color: #f2c14e; }
.sp-search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 26px; background: rgba(0,0,0,.05); color: var(--muted, #6c5f5a); }
html.dark .sp-search { background: rgba(255,255,255,.07); }
.sp-search input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; font: inherit; font-size: 16px; color: var(--ink, #16100f); }
html.dark .sp-search input { color: #f6eee8; }
.sp-search:focus-within { box-shadow: 0 0 0 2px #f2c14e; }
.sp-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px 8px; display: flex; flex-direction: column; gap: 20px; }
.sp-group h3, .sp-ways h3 { margin: 0 0 10px; font-size: 16.5px; font-weight: 700; }
.sp-h { display: flex; align-items: baseline; justify-content: space-between; }
.sp-all { border: 0; background: none; color: var(--red-700, #a51d22); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; padding: 4px 0; }
html.dark .sp-all { color: #ff8f92; }
.sp-spark { color: #d49a12; }
.sp-q { border: 1px solid var(--line, #ece3dc); border-radius: 14px; margin-bottom: 8px; background: transparent; }
html.dark .sp-q { border-color: #3a2b27; }
.sp-q.is-tinted { background: #fdf6e3; border-color: #f4e3b5; }
html.dark .sp-q.is-tinted { background: #2a2113; border-color: #4a3a18; }
.sp-q summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; cursor: pointer; font-weight: 600; font-size: 14.5px; }
.sp-q summary::-webkit-details-marker { display: none; }
.sp-arrow { flex: none; font-size: 12px; opacity: .7; transition: transform .2s; }
[dir=rtl] .sp-arrow { transform: scaleX(-1); }
.sp-q[open] .sp-arrow { transform: rotate(90deg); }
.sp-q p { margin: 0; padding: 0 14px 14px; font-size: 14px; line-height: 1.55; color: var(--muted, #6c5f5a); }
html.dark .sp-q p { color: #c5b6ae; }
.sp-nomatch p { margin: 0 0 10px; color: var(--muted, #6c5f5a); }
.sp-ask { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: #e9f9ef; color: #0d5a2c !important; font-weight: 600; text-decoration: none !important; }
.sp-ask .txt { flex: 1; }
html.dark .sp-ask { background: #10301d; color: #7fe3a5 !important; }
.sp-ch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.sp-ch a { display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; border-radius: 26px; border: 1px solid var(--line, #ece3dc); color: inherit !important; font-weight: 600; font-size: 14.5px; text-decoration: none !important; }
.sp-ch a:hover { border-color: #f2c14e; }
.sp-ch .fa-whatsapp { color: #25d366; font-size: 18px; }
html.dark .sp-ch a { border-color: #3a2b27; }
.sp-office { display: flex; gap: 12px; align-items: center; padding: 8px 0; color: inherit !important; text-decoration: none !important; }
.sp-office .ico { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #fbeaea; color: var(--red, #be2227); }
html.dark .sp-office .ico { background: #3b1716; color: #ff8f92; }
.sp-office .txt { display: flex; flex-direction: column; font-size: 13.5px; line-height: 1.4; }
.sp-office .txt span { color: var(--muted, #6c5f5a); }
.sp-office:hover b { text-decoration: underline; }
.sp-center { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-weight: 700; font-size: 14px; color: var(--red-700, #a51d22) !important; }
html.dark .sp-center { color: #ff8f92 !important; }
[dir=rtl] .sp-center .fa-arrow-right, [dir=rtl] .sp-ask .fa-arrow-right { transform: scaleX(-1); }
.sp-foot { padding: 10px 16px 16px; background: linear-gradient(180deg, transparent, var(--paper, #fff) 40%); }
html.dark .sp-foot { background: linear-gradient(180deg, transparent, #1b1312 40%); }
.sp-live { display: flex; align-items: center; justify-content: center; gap: 12px; height: 58px; border-radius: 30px; background: linear-gradient(90deg, #be2227, #8f171b); color: #fff !important; text-decoration: none !important; box-shadow: 0 8px 20px rgba(190,34,39,.3); transition: transform .15s; }
.sp-live:hover { transform: translateY(-1px); }
.sp-live .ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #25d366; color: #fff; font-size: 20px; }
.sp-live .txt { display: flex; flex-direction: column; line-height: 1.15; }
.sp-live b { font-size: 16px; }
.sp-live small { font-size: 12.5px; opacity: .8; }
@media (max-width: 699px) {
  .sp { right: 16px; bottom: 16px; }
  .sp-fab-ico { width: 56px; height: 56px; }
  .sp-panel { position: fixed; left: 0; right: 0; bottom: 0; width: auto; max-height: 88vh; border-radius: 22px 22px 0 0; transform: translateY(30px); transform-origin: bottom center; }
  .sp-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .sp.is-open .sp-fab { display: none; }
  .sp.is-open::before { content: ""; position: fixed; inset: 0; background: rgba(18,8,7,.5); }
}

/* ---- Supplier card: main products line, cards end level ---- */
.supplier-card .mainp { margin: 0; font-size: .84rem; line-height: 1.45; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.supplier-card .cname { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.home-suppliers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1100px) { .home-suppliers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px)  { .home-suppliers { grid-template-columns: minmax(0, 1fr); } }
/* A supplier's own cover photo is shown as it is: no red tint, just a soft shade at the bottom behind the logo. */
.supplier-card .cover.has-photo { background-color: var(--bg-elevated, #1b1312); background-size: cover; background-position: center; background-repeat: no-repeat; }
.supplier-card .cover.has-photo::after { background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.28)); }
/* No cover photo: YIWU red with the seigaiha waves and our logo as a large white watermark (replaces the old initials). */
.supplier-card .cover:not(.has-photo) { overflow: hidden; }
.supplier-card .cover-mark { position: absolute; z-index: 0; top: 50%; right: -4%; width: 78%; aspect-ratio: 1227 / 313; transform: translateY(-46%); background: url(../img/yiwu-ca-logo-white.svg) center / contain no-repeat; opacity: .17; pointer-events: none; transition: opacity .25s, transform .4s cubic-bezier(.2,.8,.2,1); }
.supplier-card:hover .cover-mark { opacity: .26; transform: translateY(-46%) scale(1.04); }
.supplier-card .cover:not(.has-photo)::after { background: radial-gradient(circle at 85% -30%, rgba(232,185,74,.28), transparent 55%), linear-gradient(180deg, transparent 50%, rgba(0,0,0,.18)); }
[dir=rtl] .supplier-card .cover-mark { right: auto; left: -4%; transform: translateY(-46%); }
[dir=rtl] .supplier-card:hover .cover-mark { transform: translateY(-46%) scale(1.04); }

/* ---- Smooth scrolling on phones ----
   overflow-x:hidden on <body> turns it into its own scroll box on iPhone, which makes
   vertical swipes stick and stutter; clip hides sideways overflow without that. */
@supports (overflow: clip) { html, body { overflow-x: clip; } }
.hero-slides { touch-action: pan-y pinch-zoom; }
@media (max-width: 760px) { .slide { transform: none; } }

/* A closed help panel must be truly gone: the [hidden] attribute alone loses to
   .sp-panel's display:flex, which left an invisible full-screen sheet on phones
   that swallowed every swipe (the page could not scroll). */
.sp-panel[hidden] { display: none !important; }
.sp-panel:not(.is-in) { pointer-events: none; }
