/* =============================================================================
   Sino-Machinery — Ashtar Portal design language
   Light slate surfaces + orange brand (#ea580c), emerald "selected/trusted",
   logical (RTL-safe) properties throughout.
   ========================================================================== */
:root {
  /* brand (Tailwind orange) */
  --brand-50: #fff7ed; --brand-100: #ffedd5; --brand-200: #fed7aa; --brand-300: #fdba74;
  --brand-400: #fb923c; --brand-500: #f97316; --brand-600: #ea580c; --brand-700: #c2410c; --brand-800: #9a3412;
  /* slate */
  --s50: #f8fafc; --s100: #f1f5f9; --s200: #e2e8f0; --s300: #cbd5e1; --s400: #94a3b8;
  --s500: #64748b; --s600: #475569; --s700: #334155; --s800: #1e293b; --s900: #0f172a;
  /* semantic */
  --em50: #ecfdf5; --em200: #a7f3d0; --em400: #34d399; --em600: #059669; --em700: #047857; --em800: #065f46;
  --red600: #dc2626; --amber50: #fffbeb; --amber200: #fde68a; --amber900: #78350f; --indigo600: #4f46e5;

  /* legacy variable names (used by dashboard/admin markup) */
  --bg: var(--s50);
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: var(--s100);
  --border: var(--s200);
  --text: var(--s900);
  --muted: var(--s500);
  --accent: var(--brand-600);
  --accent-2: var(--brand-700);
  --accent-ink: #ffffff;
  --danger: var(--red600);
  --ok: var(--em600);
  --radius: 16px;
  --shadow: 0 10px 25px -5px rgba(15, 23, 42, .12), 0 8px 10px -6px rgba(15, 23, 42, .08);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --font: Inter, Cairo, "Segoe UI", system-ui, -apple-system, "PingFang SC", "Hiragino Sans", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans Arabic", sans-serif;
  --mono: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
.ic { flex: none; display: inline-block; vertical-align: middle; }
.ic.fill { fill: currentColor; }
[dir="rtl"] .rtl-flip { transform: scaleX(-1); }
[hidden] { display: none !important; }

.container { width: min(1280px, 100% - 32px); margin: 0 auto; }
.wrap { width: min(1280px, 100% - 32px); margin: 0 auto; }

/* =============================================================================
   Header (storefront) — white sticky bar, 64px
   ========================================================================== */
.sh { background: #fff; border-bottom: 1px solid var(--s200); position: sticky; top: 0; z-index: 40; }
.sh-in { position: relative; max-width: 1280px; margin: 0 auto; padding: 0 16px; height: 64px; display: flex; align-items: center; gap: 16px; }
.sh-logo { display: flex; align-items: center; gap: 8px; flex: none; font-weight: 800; font-size: 20px; color: var(--brand-600); }
.sh-logo img { width: 54px; height: 36px; border-radius: 4px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.sh-nav { display: flex; align-items: center; gap: 24px; font-size: 14px; color: var(--s700); }
.sh-nav a:hover, .sh-nav a.active { color: var(--brand-600); }
.sh-nav a.active { font-weight: 600; }
.sh-spacer { flex: 1; }
.sh-btn-outline, .sh-btn-solid {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; flex: none;
  border-radius: 8px; padding: 8px 16px; font-size: 14px; font-weight: 500; transition: background .15s;
}
.sh-btn-outline { border: 1px solid var(--brand-600); color: var(--brand-700); }
.sh-btn-outline:hover { background: var(--brand-50); }
.sh-btn-solid { background: var(--brand-600); color: #fff; }
.sh-btn-solid:hover { background: var(--brand-700); }
.sh-pill {
  display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 10px; flex: none;
  border: 1px solid var(--s300); border-radius: 999px; color: var(--s700); font-size: 13px;
}
.sh-pill:hover { border-color: var(--brand-400); color: var(--brand-600); }
.sh-lang { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--s500); flex: none; }
.sh-lang a:hover { color: var(--brand-600); }
.sh-lang a.on { color: var(--brand-500); font-weight: 700; }
.sh-lang .sep { opacity: .4; }
.sh-lang-m { display: none; align-items: center; gap: 4px; height: 36px; padding: 0 8px 0 10px; border: 1px solid var(--s300); border-radius: 999px; color: var(--s600); }
.sh-lang-m select { border: 0; background: transparent; font-size: 12px; font-weight: 600; color: var(--s700); outline: none; max-width: 76px; }

/* Province tabs strip (Ashtar CountryTabsBar) */
.ptabs { background: linear-gradient(to left, var(--brand-600), var(--brand-500)); color: #fff; }
[dir="rtl"] .ptabs { background: linear-gradient(to right, var(--brand-600), var(--brand-500)); }
.ptabs-in { max-width: 1600px; margin: 0 auto; padding: 6px 12px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.ptabs-in::-webkit-scrollbar { display: none; }
.ptabs a { display: inline-flex; align-items: center; gap: 6px; flex: none; white-space: nowrap; border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 500; }
.ptabs a:hover { background: rgba(255, 255, 255, .15); }
.ptabs a.on { background: #fff; color: var(--brand-700); }
.ptabs a i { width: 6px; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .7); }
.ptabs a.on i { background: var(--brand-500); }
.ptabs a b { font-size: 11px; background: rgba(255, 255, 255, .22); border-radius: 999px; padding: 0 7px; line-height: 18px; }
.ptabs a.on b { background: var(--brand-100); }

/* =============================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  background: var(--brand-600); color: #fff;
  border: 1px solid transparent; border-radius: 8px; padding: 10px 18px;
  font-weight: 600; font-size: 14px; cursor: pointer; transition: .15s; font-family: inherit;
}
.btn:hover { background: var(--brand-700); }
.btn.ghost { background: #fff; color: var(--s700); border: 1px solid var(--s300); }
.btn.ghost:hover { background: var(--s50); }
.btn.danger { background: #fff; color: var(--red600); border: 1px solid #fecaca; }
.btn.danger:hover { background: #fef2f2; }
.btn.sm { padding: 7px 12px; font-size: 13px; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn-brand {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  background: var(--brand-600); color: #fff; border: 0; border-radius: 8px; padding: 10px 16px;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s;
}
.btn-brand:hover { background: var(--brand-700); }
.btn-brand.lg { padding: 10px 24px; font-weight: 500; }
.btn-glass {
  display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .15); color: #fff;
  backdrop-filter: blur(6px); border-radius: 8px; padding: 10px 20px; font-size: 14px; font-weight: 600;
}
.btn-glass:hover { background: rgba(255, 255, 255, .25); }
.link-muted { background: none; border: 0; padding: 0; cursor: pointer; color: var(--s500); font-size: 14px; }
.link-muted:hover { color: var(--brand-600); }
.link-muted.sm { font-size: 12px; }
.push { margin-inline-start: auto; }

/* =============================================================================
   Home
   ========================================================================== */
.home-top { padding: 24px 0 8px; display: flex; flex-direction: column; gap: 32px; }

/* Hero carousel */
.hero { position: relative; overflow: hidden; border-radius: 16px; box-shadow: var(--shadow); min-height: 310px; background: linear-gradient(135deg, var(--s800), var(--brand-800)); }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .7s; }
.hero-slide.on { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(to left, rgba(0, 0, 0, .75), rgba(0, 0, 0, .45), rgba(194, 65, 12, .6)); }
[dir="rtl"] .hero-shade { background: linear-gradient(to right, rgba(0, 0, 0, .75), rgba(0, 0, 0, .45), rgba(194, 65, 12, .6)); }
.hero-body { position: relative; z-index: 1; padding: 32px 64px; color: #fff; min-height: 310px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.hero-tag { display: inline-block; background: var(--brand-600); border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 700; }
.hero-title { margin: 12px 0 6px; font-size: clamp(24px, 3.4vw, 36px); font-weight: 800; line-height: 1.2; max-width: 760px; }
.hero-sub { margin: 0; font-size: 14px; color: rgba(255, 255, 255, .9); max-width: 640px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.hero-search { margin-top: 20px; display: flex; gap: 8px; width: 100%; max-width: 672px; background: #fff; border-radius: 12px; padding: 6px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .3); }
.hero-search input { flex: 1; min-width: 0; border: 0; outline: none; padding: 12px 16px; font-size: 15px; color: var(--s900); background: transparent; }
.hero-search button { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 10px; background: var(--s900); color: #fff; padding: 12px 24px; font-weight: 600; cursor: pointer; }
.hero-search button:hover { background: var(--s800); }
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 36px; height: 36px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .2); backdrop-filter: blur(6px); color: #fff; display: grid; place-items: center; cursor: pointer; }
.hero-arrow:hover { background: rgba(255, 255, 255, .35); }
.hero-arrow.prev { inset-inline-start: 12px; }
.hero-arrow.next { inset-inline-end: 12px; }
.hero-dots { position: absolute; bottom: 12px; inset-inline: 0; z-index: 2; display: flex; justify-content: center; gap: 6px; }
.hero-dots button { width: 6px; height: 6px; border-radius: 999px; border: 0; padding: 0; background: rgba(255, 255, 255, .5); cursor: pointer; transition: width .2s; }
.hero-dots button.on { width: 20px; background: #fff; }

/* Search panel */
.panel { background: #fff; border: 1px solid var(--s200); border-radius: 16px; padding: 20px; box-shadow: var(--shadow-sm); }
.panel h3 { margin: 0 0 16px; }
.panel-title { margin: 0 0 16px; font-size: 20px; font-weight: 700; color: var(--s800); }
.search-panel { display: flex; flex-direction: column; gap: 16px; }
.search-panel .panel-title { margin: 0; }
.kw-row { display: flex; gap: 8px; }
.kw-input { position: relative; flex: 1; }
.kw-ic { position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%); color: var(--s400); display: flex; }
.kw-input input { width: 100%; border: 1px solid var(--s300); border-radius: 8px; padding: 10px 12px; padding-inline-start: 34px; font-size: 14px; outline: none; background: #fff; }
.kw-input input:focus { border-color: var(--brand-400); box-shadow: 0 0 0 3px var(--brand-100); }
.or-div { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--s400); }
.or-div span { height: 1px; flex: 1; background: var(--s200); }
.or-div em { font-style: normal; }

.cascade { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cascade label, .f4-grid label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.step-lbl { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--s600); }
.step-n { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 999px; background: var(--brand-100); color: var(--brand-800); font-size: 9px; font-weight: 700; font-style: normal; flex: none; }
.step-n.off { background: var(--s200); color: var(--s500); }
.sel { width: 100%; border: 1px solid var(--s300); border-radius: 8px; padding: 8px 12px; background: #fff; font-size: 14px; color: var(--s800); outline: none; min-width: 0; }
.sel:focus { border-color: var(--brand-400); box-shadow: 0 0 0 3px var(--brand-100); }
.sel.picked { border-color: var(--em400) !important; background: var(--em50) !important; color: var(--em800) !important; }
.sel:disabled { background: var(--s50); color: var(--s400); cursor: not-allowed; }
.filters4 { background: var(--s50); border: 1px solid var(--s200); border-radius: 12px; padding: 16px; }
.f4-head { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--s700); margin-bottom: 12px; }
.f4-head b { color: var(--brand-700); }
.f4-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.f4-grid label > span { font-size: 12px; color: var(--s600); }
.cascade-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 8px; border-top: 1px solid var(--s200); }
.cat-chips-wrap h3 { margin: 0 0 10px; font-size: 14px; font-weight: 700; color: var(--s700); }
.cat-chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.cat-chip {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 100%;
  border: 1px solid var(--s200); border-radius: 16px; background: #fff; padding: 10px 12px;
  text-align: center; font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--s700); cursor: pointer; transition: all .15s;
}
.cat-chip:hover, .cat-chip.on { transform: translateY(-2px); border-color: var(--brand-500); background: var(--brand-600); color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
@keyframes chipPulse { 0%, 100% { transform: scale(1) rotate(0); } 40% { transform: scale(1.22) rotate(-6deg); } 60% { transform: scale(1.22) rotate(6deg); } }
.chip-pulse { display: inline-block; animation: chipPulse 2.4s ease-in-out infinite; transform-origin: center; }
@media (prefers-reduced-motion: reduce) { .chip-pulse { animation: none; } html { scroll-behavior: auto; } }

/* Results */
#results { padding-top: 40px; scroll-margin-top: 72px; }
#search { scroll-margin-top: 80px; }
.res-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.res-title { margin: 0; font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; letter-spacing: -.01em; color: var(--s900); display: inline; }
.res-sub { margin: 4px 0 0; font-size: 14px; color: var(--s500); }
.res-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.res-count { font-size: 14px; color: var(--s400); }
.city-quick { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--s600); }
.city-quick select { min-width: 180px; border: 1px solid var(--s300); border-radius: 8px; padding: 8px 12px; background: #fff; font-size: 14px; outline: none; }
.city-quick select:focus { border-color: var(--brand-400); box-shadow: 0 0 0 3px var(--brand-100); }

.ad-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; transition: opacity .15s; }
.ad-grid.busy { opacity: .55; }
.ad-grid > .empty, .ad-grid > .loading { grid-column: 1 / -1; }

/* Ad card (Ashtar AdCard anatomy) */
.ad-card { display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; border: 1px solid var(--s200); background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.ad-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.ad-thumb { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--s100); }
.ad-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.ad-card:hover .ad-thumb img { transform: scale(1.05); }
.noimg { width: 100%; height: 100%; display: grid; place-items: center; font-size: 44px; opacity: .45; background: linear-gradient(135deg, var(--brand-50), var(--brand-100)); }
.ad-badge { position: absolute; display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 4px 10px; font-size: 11px; font-weight: 700; color: #fff; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .15); }
.ad-badge.feat { top: 12px; inset-inline-start: 12px; background: var(--brand-600); }
.ad-badge.new { top: 12px; inset-inline-end: 12px; background: var(--em600); }
.ad-badge.used { top: 12px; inset-inline-end: 12px; background: var(--indigo600); }
.ad-sold { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .45); }
.ad-sold span { transform: rotate(-6deg); border-radius: 6px; background: var(--red600); color: #fff; padding: 6px 12px; font-size: 14px; font-weight: 800; box-shadow: var(--shadow); }
.ad-cmp { position: absolute; bottom: 12px; inset-inline-end: 12px; z-index: 2; width: 34px; height: 34px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .92); color: var(--s700); display: grid; place-items: center; cursor: pointer; transition: .15s; }
.ad-cmp:hover { color: var(--brand-600); border-color: var(--brand-300); }
.ad-cmp.on { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.ad-body { display: flex; flex-direction: column; gap: 8px; padding: 16px; flex: 1; }
.ad-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; min-height: 20px; }
.ad-cat { font-size: 12px; font-weight: 600; color: var(--brand-700); }
.trust-badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; background: var(--em50); color: var(--em700); border: 1px solid var(--em200); font-weight: 600; font-size: 11px; padding: 2px 8px; }
.trust-badge.md { font-size: 14px; padding: 4px 12px; gap: 6px; }
.ad-title { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--s900); min-height: 2.7em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color .15s; }
.ad-card:hover .ad-title { color: var(--brand-700); }
.ad-meta { font-size: 12px; color: var(--s500); }
.ad-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; font-size: 18px; font-weight: 800; color: var(--brand-600); }
.ad-price small { font-size: 12px; font-weight: 700; }
.ad-price.ask, .d-price.ask { font-size: 15px; font-weight: 700; }
.fob-chip { font-size: 10px; font-weight: 800; letter-spacing: .03em; border: 1px solid var(--brand-200); background: var(--brand-50); color: var(--brand-700); border-radius: 6px; padding: 1px 6px; }
.ad-loc { display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; color: var(--s900); }
.ad-loc .ic { color: var(--brand-600); }
.ad-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--s500); padding-top: 8px; margin-top: auto; border-top: 1px dashed var(--s200); }
.ad-foot b { color: var(--s700); }
.ad-seller { font-size: 12px; color: var(--s600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.ad-seller:hover { color: var(--brand-600); text-decoration: underline; }

/* Pagination (forced LTR like Ashtar) */
.pager { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 32px 0 8px; flex-wrap: wrap; }
.pg { min-width: 36px; border-radius: 8px; border: 1px solid var(--s300); background: #fff; padding: 6px 12px; font-size: 14px; color: var(--s600); cursor: pointer; }
.pg:hover:not([disabled]) { border-color: var(--brand-400); }
.pg.on { border-color: var(--brand-600); background: var(--brand-600); color: #fff; }
.pg[disabled] { opacity: .4; cursor: not-allowed; }
.pg-gap { color: var(--s400); }

/* City pills */
.city-pills { border-top: 1px solid var(--s200); padding-top: 20px; margin-top: 24px; }
.city-pills h2 { margin: 0 0 12px; font-size: 18px; font-weight: 700; color: var(--s800); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; border: 1px solid var(--s200); background: #fff; padding: 4px 12px; font-size: 14px; color: var(--s700); }
.pill:hover { border-color: var(--brand-300); color: var(--brand-700); }
.pill.has { border-color: var(--brand-200); }
.pill b { font-size: 11px; background: var(--brand-100); color: var(--brand-800); border-radius: 999px; padding: 0 6px; }
.pill.on { background: var(--em50); border-color: var(--em400); color: var(--em800); }

/* Browse by province */
#provinces { padding: 48px 0 8px; }
.sec-h { margin: 0 0 20px; border-inline-start: 4px solid var(--brand-500); padding-inline-start: 12px; font-size: 20px; font-weight: 700; color: var(--s900); }
.prov-grid { display: flex; flex-direction: column; gap: 20px; }
.prov-group h3 { margin: 0 0 10px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--s500); }
.prov-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.prov-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px; background: #fff; border: 1px solid var(--s200); border-radius: 12px; text-align: center; transition: .15s; }
.prov-tile:hover { border-color: var(--brand-300); background: var(--brand-50); }
.prov-tile.on { border-color: var(--em400); background: var(--em50); }
.prov-abbr { width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; font-size: 22px; font-weight: 800; color: var(--brand-600); background: var(--brand-50); border: 1px solid var(--brand-200); }
.prov-tile.has .prov-abbr { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.prov-name { font-size: 14px; font-weight: 600; color: var(--s800); }
.prov-meta { font-size: 11px; color: var(--s500); }
.prov-reg { font-size: 10px; color: var(--s400); text-transform: uppercase; letter-spacing: .05em; margin-top: -4px; }
.prov-meta b { color: var(--brand-700); }

.empty { text-align: center; color: var(--s500); padding: 48px 0; }
.loading { text-align: center; color: var(--s500); padding: 48px 0; }

/* =============================================================================
   Footer + mobile bottom nav
   ========================================================================== */
.sf { background: var(--s900); color: var(--s300); margin-top: 48px; }
.sf-in { max-width: 1280px; margin: 0 auto; padding: 40px 16px; display: grid; grid-template-columns: 1.4fr repeat(5, 1fr); gap: 28px; }
.sf-name { font-weight: 800; font-size: 20px; color: var(--brand-400); }
.sf-brand p { font-size: 14px; color: var(--s400); margin: 8px 0 0; }
.sf-langs { font-family: var(--mono); font-size: 12px !important; }
.sf h4 { margin: 0 0 12px; font-weight: 600; color: var(--s100); text-transform: uppercase; font-size: 12px; letter-spacing: .08em; }
.sf ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.sf a:hover { color: var(--brand-400); }
.sf-bottom { border-top: 1px solid var(--s800); }
.sf-bottom-in { max-width: 1280px; margin: 0 auto; padding: 16px; display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; font-size: 12px; color: var(--s500); }
.mbn, .mbn-spacer { display: none; }

/* =============================================================================
   Product detail (Ashtar ad page: 5/2 grid)
   ========================================================================== */
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--s500); padding: 16px 0 0; }
.crumbs a:hover { color: var(--brand-600); }
.crumbs .sep { color: var(--s300); }
.d-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 2fr); gap: 24px; padding: 16px 0 48px; }
.d-main, .d-aside { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.d-gallery { position: relative; aspect-ratio: 16 / 10; background: var(--s100); border-radius: 12px; overflow: hidden; }
.d-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.d-gallery:hover img { transform: scale(1.02); }
.d-gallery .noimg { font-size: 90px; }
.d-thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.gthumb { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 2px solid transparent; cursor: pointer; transition: .15s; }
.gthumb:hover { border-color: var(--brand-300); }
.gthumb.active { border-color: var(--brand-600); }
.gallery-caption { color: var(--s500); font-size: 13px; min-height: 1em; }
.d-title { margin: 0; font-size: 24px; font-weight: 700; color: var(--s900); line-height: 1.3; }
.d-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.d-chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; border: 1px solid var(--brand-200); background: var(--brand-50); padding: 4px 12px; font-size: 14px; font-weight: 500; color: var(--brand-700); }
.d-chip.em { border-color: var(--em200); background: var(--em50); color: var(--em700); }
.d-chip.in { border-color: #c7d2fe; background: #eef2ff; color: var(--indigo600); }
.d-sec { background: #fff; border: 1px solid var(--s200); border-radius: 12px; padding: 16px; }
.d-sec h2 { margin: 0 0 12px; font-size: 17px; font-weight: 700; color: var(--s800); }
.d-specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; }
.d-specs div { min-width: 0; }
.d-specs dt { font-size: 13px; color: var(--s500); }
.d-specs dd { margin: 2px 0 0; font-weight: 600; color: var(--s900); overflow-wrap: anywhere; }
.desc { color: var(--s600); white-space: pre-wrap; margin: 0; }
.d-card { background: #fff; border: 1px solid var(--s200); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.d-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 26px; font-weight: 800; color: var(--brand-700); }
.d-price small { font-size: 15px; font-weight: 700; }
.d-loc { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 700; color: var(--s900); }
.d-loc .ic { color: var(--brand-600); }
.d-loc a:hover { color: var(--brand-600); text-decoration: underline; }
.d-stock { font-size: 14px; font-weight: 600; }
.d-stock.ok { color: var(--em700); }
.d-stock.out { color: var(--red600); }
.d-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-line { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 1px solid var(--s300); background: #fff; color: var(--s700); padding: 8px; border-radius: 8px; font-weight: 500; font-size: 14px; cursor: pointer; }
.btn-line:hover { background: var(--s50); }
.btn-line.on { border-color: var(--brand-600); background: var(--brand-600); color: #fff; }
.d-contact { border-top: 1px solid var(--s200); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.d-contact .lbl { font-size: 13px; color: var(--s500); }
.d-seller { display: flex; align-items: center; gap: 12px; }
.d-seller .nm { font-weight: 700; color: var(--s900); }
.d-seller .sub { font-size: 13px; color: var(--s500); }
.d-alert { background: var(--amber50); border: 1px solid var(--amber200); border-radius: 12px; padding: 14px 16px; font-size: 14px; color: var(--amber900); }
.d-alert h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 14px; }
.d-alert p { margin: 0; }
.datasheet-btn { display: inline-flex; align-items: center; gap: 8px; color: var(--brand-700); text-decoration: underline; font-size: 14px; margin-bottom: 10px; }
.video-block h2 { margin: 0 0 8px; }
.prod-video { width: 100%; max-height: 500px; border-radius: 12px; border: 1px solid var(--s200); background: #000; }
.prod-video-fig { margin: 0 0 14px; }
.prod-video-fig figcaption { color: var(--s500); font-size: 13px; margin-top: 5px; }

/* Server-rendered crawler fallback (JS replaces #detail on load) */
#detail > article { max-width: 760px; padding: 20px 0; }
#detail > article table { border-collapse: collapse; margin-top: 12px; }
#detail > article th { text-align: start; color: var(--muted); padding: 6px 16px 6px 0; font-weight: 600; vertical-align: top; }
#detail > article td { padding: 6px 0; }

/* Inquiry form */
.inquiry-form { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.inquiry-form h2 { margin: 0; font-size: 16px; }
.inquiry-form input, .inquiry-form textarea { background: #fff; border: 1px solid var(--s300); color: var(--s900); border-radius: 8px; padding: 9px 12px; font-size: 14px; outline: none; width: 100%; }
.inquiry-form input:focus, .inquiry-form textarea:focus { border-color: var(--brand-400); box-shadow: 0 0 0 3px var(--brand-100); }
.inquiry-form textarea { min-height: 90px; resize: vertical; }
.inq-result { font-size: 14px; font-weight: 600; }
.inq-result.ok { color: var(--em700); }
.inq-result.err { color: var(--red600); }

/* =============================================================================
   Seller page
   ========================================================================== */
.seller-hero { display: flex; align-items: center; gap: 20px; margin: 24px 0 8px; background: #fff; border: 1px solid var(--s200); border-radius: 16px; padding: 20px; }
.seller-hero .logo-box { flex: none; }
.seller-hero .logo-box .noimg { width: 90px; height: 90px; border-radius: 18px; font-size: 40px; }
.seller-hero .logo-xl { width: 90px; height: 90px; border-radius: 18px; object-fit: cover; background: var(--brand-50); display: grid; place-items: center; font-size: 42px; flex: none; border: 1px solid var(--s200); }
.seller-hero h1 { margin: 0 0 6px; font-size: 24px; }
.badge-type { display: inline-block; background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-200); padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.seller-about { color: var(--s600); max-width: 720px; margin: 8px 0 0; }
.seller-contact { display: flex; gap: 8px 18px; flex-wrap: wrap; color: var(--s600); font-size: 14px; margin-top: 10px; }
.seller-contact a { color: var(--brand-700); }
.seller-logo { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: var(--s100); display: inline-grid; place-items: center; font-size: 13px; flex: none; }
.seller-logo.lg { width: 52px; height: 52px; border-radius: 12px; font-size: 24px; }
.page-h { margin: 24px 0 16px; }

/* =============================================================================
   Legacy / shared components (dashboard, admin, compare)
   ========================================================================== */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--s200); }
.site-header .bar { display: flex; align-items: center; gap: 12px; padding: 12px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--brand-600); }
.brand .logo { width: 54px; height: 36px; display: grid; place-items: center; border-radius: 4px; overflow: hidden; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.brand .logo img { width: 100%; height: 100%; }
.brand small { display: block; font-size: 11px; color: var(--s500); font-weight: 600; letter-spacing: .3px; }
.spacer { flex: 1; }
.lang-select { background: #fff; color: var(--s700); border: 1px solid var(--s300); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer; outline: none; }
.lang-select:hover, .lang-select:focus { border-color: var(--brand-400); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--s200); color: var(--s700); padding: 8px 14px; border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 600; transition: .15s; line-height: 1; }
.chip:hover { border-color: var(--brand-400); }
.chip.active { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }

.fob-tag { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .03em; background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-200); padding: 1px 6px; border-radius: 6px; margin-inline-end: 6px; vertical-align: middle; }
.verified-badge { display: inline-flex; align-items: center; gap: 3px; vertical-align: middle; background: var(--em50); color: var(--em700); border: 1px solid var(--em200); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.cond-badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.cond-badge.new { background: var(--em50); color: var(--em700); border: 1px solid var(--em200); }
.cond-badge.used { background: #eef2ff; color: var(--indigo600); border: 1px solid #c7d2fe; }
.loc-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--s700); }

.status-tag { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.status-tag.pending { background: var(--amber50); color: #b45309; border: 1px solid var(--amber200); }
.status-tag.published { background: var(--em50); color: var(--em700); border: 1px solid var(--em200); }
.status-tag.rejected { background: #fef2f2; color: var(--red600); border: 1px solid #fecaca; }
.inq-card { background: #fff; border: 1px solid var(--s200); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.inq-card.unread { border-inline-start: 4px solid var(--brand-500); }
.inq-card .inq-meta { color: var(--s500); font-size: 12px; margin-top: 4px; }
.subtab-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.subtab-bar button { background: #fff; border: 1px solid var(--s300); color: var(--s600); padding: 7px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 13px; }
.subtab-bar button.active { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }

/* Media uploader */
.media-grid { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.media-empty { color: var(--s500); font-size: 13px; padding: 8px 0; }
.media-item { display: flex; flex-direction: column; gap: 4px; width: 92px; }
.media-alt { width: 92px; background: #fff; border: 1px solid var(--s300); color: var(--s900); border-radius: 7px; padding: 5px 7px; font-size: 11px; outline: none; }
.media-alt:focus { border-color: var(--brand-400); }
.media-item.needs-alt .media-alt { border-color: var(--red600); }
.media-thumb { position: relative; width: 92px; height: 68px; border-radius: 8px; overflow: hidden; border: 1px solid var(--s200); background: var(--s100); }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; }
.media-thumb .media-del { position: absolute; top: 3px; inset-inline-end: 3px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; border: none; cursor: pointer; font-size: 11px; line-height: 1; padding: 0; }
.media-thumb .media-cover { position: absolute; bottom: 0; inset-inline-start: 0; background: var(--brand-600); color: #fff; font-size: 9px; font-weight: 800; padding: 1px 5px; border-start-end-radius: 5px; }

/* Compare */
.cmp-toggle.on { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.compare-bar { position: fixed; inset-block-end: 20px; inset-inline: 0; margin-inline: auto; width: max-content; max-width: calc(100% - 24px); z-index: 60; display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 16px; background: #fff; border: 1px solid var(--brand-300); border-radius: 999px; box-shadow: var(--shadow); }
.compare-bar .cb-count { font-weight: 800; color: var(--brand-600); }
.cmp-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--s200); border-radius: 12px; }
.cmp-table { border-collapse: collapse; width: 100%; min-width: 520px; }
.cmp-table th, .cmp-table td { border-bottom: 1px solid var(--s200); border-inline-end: 1px solid var(--s100); padding: 12px; text-align: center; vertical-align: middle; font-size: 14px; }
.cmp-table thead th { background: var(--s50); vertical-align: top; position: relative; }
.cmp-attr { background: var(--s50); font-weight: 600; color: var(--s500); text-align: start !important; white-space: nowrap; }
.cmp-img { width: 120px; height: 90px; object-fit: cover; border-radius: 10px; display: inline-block; }
.cmp-name { display: block; margin-top: 8px; font-weight: 700; color: var(--s900); }
.cmp-remove { position: absolute; top: 6px; inset-inline-end: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(15, 23, 42, .6); color: #fff; border: none; cursor: pointer; }
.cmp-highlight td { background: var(--brand-50); font-size: 15px; }

/* Seller chip (legacy) */
.seller-row { display: inline-flex; align-items: center; gap: 8px; background: var(--s50); border: 1px solid var(--s200); border-radius: 999px; padding: 4px 10px 4px 4px; cursor: pointer; color: var(--s700); max-width: 100%; }
.seller-row:hover { border-color: var(--brand-300); }
.seller-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seller-card { background: #fff; border: 1px solid var(--s200); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.seller-card-row { display: flex; align-items: center; gap: 14px; }

/* Auth (dashboard login/register) */
.auth-box { max-width: 520px; margin: 40px auto; background: #fff; border: 1px solid var(--s200); border-radius: 16px; padding: 28px; box-shadow: var(--shadow-sm); }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 20px; background: var(--s100); padding: 4px; border-radius: 10px; }
.auth-tabs button { flex: 1; background: transparent; border: 0; color: var(--s600); padding: 9px; border-radius: 8px; cursor: pointer; font-weight: 700; }
.auth-tabs button.active { background: #fff; color: var(--brand-700); box-shadow: var(--shadow-sm); }
.type-picker { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.type-picker label { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; background: #fff; border: 1px solid var(--s200); border-radius: 12px; padding: 12px 6px; cursor: pointer; font-size: 12px; font-weight: 600; transition: .15s; color: var(--s700) !important; }
.type-picker label:hover { border-color: var(--brand-300); }
.type-picker input { display: none; }
.type-picker label:has(input:checked) { border-color: var(--em400); background: var(--em50); color: var(--em800) !important; }
.type-picker .tp-icon { font-size: 24px; }
.logo-uploader { display: flex; align-items: center; gap: 14px; }
.logo-preview { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: var(--s100); border: 1px solid var(--s200); display: grid; place-items: center; font-size: 30px; flex: none; }

/* Forms (admin / dashboard) */
.admin-wrap { padding: 28px 0 60px; }
.login-box { max-width: 400px; margin: 70px auto; background: #fff; border: 1px solid var(--s200); border-radius: 16px; padding: 30px; box-shadow: var(--shadow-sm); }
.login-box h2 { margin-top: 0; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--s600); margin-bottom: 6px; font-weight: 600; }
.field input, .field textarea, .field select, .bd-filters select, .bd-filters input, .buyer-card textarea, .reply textarea { width: 100%; background: #fff; border: 1px solid var(--s300); color: var(--s900); border-radius: 8px; padding: 9px 12px; font-size: 14px; outline: none; }
.field input:focus, .field textarea:focus, .field select:focus, .bd-filters select:focus, .bd-filters input:focus, .buyer-card textarea:focus, .reply textarea:focus { border-color: var(--brand-400); box-shadow: 0 0 0 3px var(--brand-100); }
.field select:disabled { background: var(--s50); color: var(--s400); }
.field textarea { resize: vertical; min-height: 74px; }
.field.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field.check { display: flex; align-items: center; gap: 10px; }
.field.check input { width: auto; }
.field.loc { background: var(--brand-50); border: 1px solid var(--brand-200); border-radius: 12px; padding: 12px; }
.field.loc > .loc-h { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--brand-800); margin-bottom: 8px; }
.field.loc .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-head h1 { margin: 0; font-size: 24px; }
.admin-grid { display: grid; grid-template-columns: 440px 1fr; gap: 24px; align-items: start; }

table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: start; padding: 10px 8px; border-bottom: 1px solid var(--s200); font-size: 14px; vertical-align: middle; }
table.list th { color: var(--s500); font-weight: 600; font-size: 13px; }
table.list .thumb-sm { width: 52px; height: 38px; object-fit: cover; border-radius: 6px; background: var(--s100); }
.tag { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: var(--s100); color: var(--s600); }
.tag.feat { background: var(--brand-600); color: #fff; font-weight: 700; }
.row-actions { display: flex; gap: 6px; }

.toast { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 100; background: var(--s900); color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); transition: .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.err { background: var(--red600); }

.back-link { color: var(--s500); font-weight: 600; display: inline-flex; gap: 6px; margin: 18px 0; cursor: pointer; }
.back-link:hover { color: var(--brand-600); }

.req-note { color: var(--s500); font-size: 12px; margin: 4px 0 0; }
.req-star { color: var(--brand-600); }
.pdf-current { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; background: var(--s50); border: 1px solid var(--s200); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.pdf-current a { color: var(--brand-700); }

/* =============================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .ad-grid { grid-template-columns: repeat(3, 1fr); }
  .sf-in { grid-template-columns: 1fr 1fr 1fr; }
  .sf-brand { grid-column: 1 / -1; }
  .admin-grid { grid-template-columns: 1fr; }
  .cat-chips { grid-template-columns: repeat(3, 1fr); }
  .f4-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .sh-nav, .sh-lang, .sh-pill-lbl { display: none; }
  .sh-lang-m { display: inline-flex; }
  .d-grid { grid-template-columns: 1fr; }
  .d-specs { grid-template-columns: repeat(2, 1fr); }
  .d-thumbs { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 767px) {
  .ad-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .ad-body { padding: 12px; gap: 6px; }
  .ad-price { font-size: 16px; }
  .ad-loc { font-size: 13px; }
  .ad-foot { flex-direction: column; gap: 2px; }
  .ad-badge { padding: 3px 8px; font-size: 10px; top: 8px !important; }
  .ad-badge.feat { inset-inline-start: 8px; }
  .ad-badge.new, .ad-badge.used { inset-inline-end: 8px; }
  .ad-cmp { width: 30px; height: 30px; bottom: 8px; inset-inline-end: 8px; }
  .prov-tiles { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .prov-tile { padding: 12px 4px; }
  .cascade { grid-template-columns: 1fr; }
  .cat-chips { grid-template-columns: repeat(2, 1fr); }
  .hero, .hero-body { min-height: 250px; }
  .hero-body { padding: 20px 20px 36px; }
  .hero-arrow { display: none; }
  .hero-search button span { display: none; }
  .hero-search button { padding: 12px 16px; }
  .sf-in { grid-template-columns: 1fr 1fr; gap: 24px; }
  .mbn { display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; bottom: 0; inset-inline: 0; z-index: 50; background: #fff; border-top: 1px solid var(--s200); height: calc(4rem + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); }
  .mbn a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--s400); }
  .mbn a span { font-size: 10px; font-weight: 500; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 62px; }
  .mbn a.on { color: var(--brand-600); }
  .mbn a.mbn-post { color: var(--brand-600); }
  .mbn-spacer { display: block; height: calc(4rem + env(safe-area-inset-bottom)); }
  .compare-bar { inset-block-end: calc(4.5rem + env(safe-area-inset-bottom)); }
  .field.row2, .field.loc .row2 { grid-template-columns: 1fr; }
  .type-picker { grid-template-columns: 1fr; }
  .seller-hero { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 639px) {
  .sh-in { gap: 8px; padding: 0 12px; }
  .sh-word, .sh-btn-outline { display: none; }
  .sh-btn-solid { padding: 8px 12px; font-size: 13px; }
  .f4-grid { grid-template-columns: 1fr 1fr; }
  .d-actions { grid-template-columns: 1fr; }
  .res-tools, .city-quick { width: 100%; }
  .city-quick select { flex: 1; min-width: 0; }
}

/* ---- Chinese Companies Directory (دليل الشركات الصينية) ---- */
.dir-hero { background: linear-gradient(135deg, var(--brand-600), var(--brand-500)); color: #fff; padding: 32px 0 28px; margin-bottom: 24px; }
.dir-hero h1 { margin: 0 0 6px; font-size: 28px; font-weight: 800; }
.dir-hero p { margin: 0 0 18px; opacity: .92; }
.dir-search { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)) auto; gap: 8px; align-items: center; color: var(--s900); }
.dir-search select { height: 44px; border: 1px solid var(--s300); border-radius: 10px; padding: 0 10px; background: #fff; min-width: 0; }
.dir-kw { min-width: 0; }
.co-card .ad-thumb { aspect-ratio: 16 / 10; }
.co-media { position: absolute; bottom: 8px; inset-inline-end: 8px; background: rgba(15, 23, 42, .72); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.co-alt-names { color: var(--s500); font-size: 14px; margin-top: -8px; }
.co-about { margin: 0; white-space: pre-wrap; line-height: 1.7; color: var(--s700); }
.co-specs { grid-template-columns: 1fr !important; }
.co-btn { text-align: center; justify-content: center; }
.co-thumbs { grid-template-columns: repeat(5, 1fr); }
.co-back { color: var(--s500); font-size: 14px; }
.co-back:hover { color: var(--brand-600); }
.dir-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 32px 0 48px; padding: 20px; border: 1px dashed var(--brand-300, #fdba74); border-radius: 16px; background: var(--brand-50); }
.dir-cta p { margin: 4px 0 0; color: var(--s600); font-size: 14px; }
@media (max-width: 900px) {
  .dir-search { grid-template-columns: 1fr 1fr; }
  .dir-kw { grid-column: 1 / -1; }
  .dir-search .btn-brand { grid-column: 1 / -1; }
}

.type-picker.two { grid-template-columns: 1fr 1fr; }
.type-picker.two label { padding: 16px 8px; font-size: 14px; }
.lic-box { background: var(--em50); border: 1px solid var(--em200); border-radius: 12px; padding: 12px; }
.lic-box input { background: #fff; }

/* ---- Sidebar ads: fixed columns outside the 1280px content, wide screens only ---- */
.side-ads { display: none; }
@media (min-width: 1860px) {
  .side-ads { display: flex; flex-direction: column; gap: 20px; position: absolute; top: 84px; width: 220px; max-height: calc(100vh - 100px); overflow-y: auto; scrollbar-width: none; z-index: 20; transition: opacity .2s; }
  .side-ads.stuck { position: fixed; }
  .side-ads::-webkit-scrollbar { display: none; }
  /* 220px column + preferred 150px gap to the 1280px content (640+150+220 = 1010);
     on narrower screens the column stops 12px from the edge and the gap shrinks */
  .side-ads.left { left: max(12px, calc(50% - 1010px)); }
  .side-ads.right { right: max(12px, calc(50% - 1010px)); }
  body.sa-hide .side-ads { opacity: 0; pointer-events: none; }
}
.sa-label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--s500); }
.sa-label i { width: 7px; height: 7px; border-radius: 999px; background: var(--brand-500); display: inline-block; }
.sa-card { display: flex; flex-direction: column; height: var(--sa-h, auto); flex: none; background: #fff; border: 1px solid var(--s200); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
a.sa-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.sa-img { flex: 1; min-height: 0; aspect-ratio: 4 / 3; background: var(--s100); }
.side-ads[style*="--sa-h"] .sa-img { aspect-ratio: auto; }
.sa-img img { width: 100%; height: 100%; object-fit: cover; }
.sa-cap { padding: 8px 10px; font-size: 12px; color: var(--s600); line-height: 1.4; }
.sa-empty .sa-img { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 16px; background: linear-gradient(135deg, var(--brand-50), #fff); border: 2px dashed var(--brand-200); border-radius: 14px; color: var(--brand-700); }
.sa-empty .sa-img span { font-size: 34px; }
.sa-empty .sa-img small { color: var(--s500); font-size: 12px; }
.sa-admin-prev { width: 160px; aspect-ratio: 1 / 1.9; border: 1px dashed var(--s300); border-radius: 12px; display: grid; place-items: center; color: var(--s400); font-size: 12px; overflow: hidden; background: var(--s50, #f8fafc); }
.sa-admin-prev img { width: 100%; height: 100%; object-fit: cover; }
select[multiple] { height: auto; min-height: 120px; }
.btn-dir { display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; padding: 10px 16px; font-size: 14px; font-weight: 700; background: #fff; color: #b91c1c; border: 2px solid #fde68a; box-shadow: 0 4px 14px rgba(0,0,0,.18); transition: transform .15s, background .15s; }
.btn-dir:hover { transform: translateY(-1px); background: #fffbeb; }
.btn-dir .ic { color: #dc2626; }

.danger-zone { margin-top: 14px; border: 2px solid #fecaca; background: #fef2f2; border-radius: 12px; padding: 14px; }
.danger-zone h4 { margin: 0 0 6px; color: var(--red600); }
.danger-zone p { margin: 4px 0; font-size: 13px; color: var(--s700); }
.notice-box { margin-top: 14px; border: 1px solid #bfdbfe; background: #eff6ff; border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.6; }
.notice-box p { margin: 6px 0 0; }
.link-muted { color: var(--s500); font-size: 13px; }
.link-muted:hover { color: var(--brand-600); text-decoration: underline; }
.row-actions .btn.sm { padding: 5px 8px; }
.status-tag.paused { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.status-tag.sold { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }

/* Language dropdown (all screen sizes) */
.sh-lang-dd { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px; border: 1px solid var(--s300); border-radius: 999px; color: var(--s600); background: #fff; cursor: pointer; flex: none; }
.sh-lang-dd:hover { border-color: var(--brand-400); color: var(--brand-600); }
.sh-lang-dd select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; font-size: 13px; font-weight: 600; color: var(--s700); outline: none; cursor: pointer; padding-inline-end: 2px; }
.sh-lang-dd .ic:last-child { pointer-events: none; }
@media (max-width: 640px) { .sh-lang-dd { padding: 0 8px; } .sh-lang-dd select { max-width: 84px; font-size: 12px; } }

/* Custom language dropdown */
.lang-dd { position: relative; flex: none; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border: 1px solid var(--s300); border-radius: 999px; background: #fff; color: var(--s700); font-size: 13px; font-weight: 600; cursor: pointer; }
.lang-btn:hover, .lang-btn[aria-expanded="true"] { border-color: var(--brand-400); color: var(--brand-600); }
.lang-btn .ic:last-child { transition: transform .15s; }
.lang-btn[aria-expanded="true"] .ic:last-child { transform: rotate(180deg); }
.lang-menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 100; width: 220px; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--s200); border-radius: 14px; box-shadow: 0 16px 40px rgba(15, 23, 42, .18); }
.lang-menu[hidden] { display: none; }
.lang-opt { display: grid; grid-template-columns: 34px 1fr 18px; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--s800); text-align: start; cursor: pointer; font: inherit; }
.lang-opt:hover, .lang-opt:focus-visible { background: var(--brand-50); outline: none; }
.lang-opt.on { background: var(--brand-50); color: var(--brand-700); font-weight: 700; }
.lo-code { display: inline-grid; place-items: center; height: 24px; border-radius: 6px; background: var(--s100); color: var(--s600); font-size: 11px; font-weight: 700; letter-spacing: .5px; direction: ltr; }
.lang-opt.on .lo-code { background: var(--brand-500); color: #fff; }
.lo-name { display: flex; flex-direction: column; font-size: 14px; line-height: 1.2; }
.lo-name small { font-size: 11px; font-weight: 500; color: var(--s500); direction: ltr; }
.lang-opt { direction: ltr; } /* same row layout in every language */
.lo-name { text-align: left; }
.lo-check { color: var(--brand-600); font-weight: 800; text-align: center; }
@media (max-width: 640px) { .lang-btn { padding: 0 9px; } .lang-btn .lb-name { max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .lang-menu { width: 200px; } }

/* ---- Cars for sale ---- */
.car-hero { background: linear-gradient(135deg, #b91c1c, var(--brand-600)); }
.car-types { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.car-type { border: 1px solid rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .12); color: #fff; border-radius: 999px; padding: 7px 14px; font-weight: 700; cursor: pointer; font-size: 14px; }
.car-type small { opacity: .8; font-weight: 600; }
.car-type.on { background: #fff; color: var(--brand-700); border-color: #fff; }
.car-search { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: center; color: var(--s900); }
.car-search .car-kw { grid-column: span 2; }
.car-search .btn-brand { height: 44px; justify-content: center; }
.car-search select, .car-search input[type=number] { height: 44px; border: 1px solid var(--s300); border-radius: 10px; padding: 0 10px; background: #fff; min-width: 0; width: 100%; font: inherit; font-size: 14px; }
.car-brands { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 18px; font-size: 13px; }
.car-brands b { margin-inline-end: 4px; color: var(--s700); }
.brand-chip { border: 1px solid var(--s200); background: #fff; border-radius: 999px; padding: 4px 10px; cursor: pointer; font-size: 13px; color: var(--s700); }
.brand-chip span { color: var(--s500); }
.brand-chip small { background: var(--brand-50); color: var(--brand-700); border-radius: 999px; padding: 0 6px; font-weight: 700; }
.brand-chip:hover { border-color: var(--brand-300, #fdba74); }
.brand-chip.on { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.brand-chip.on span { color: #ffedd5; }
.res-head .car-sort { margin-inline-start: auto; height: 38px; border: 1px solid var(--s300); border-radius: 10px; padding: 0 10px; background: #fff; }
.res-head .btn-line.sm { width: auto; padding: 4px 10px; font-size: 13px; align-self: center; }
.res-head .car-sort { align-self: center; }
.ad-badge.sale { top: 12px; inset-inline-start: 12px; background: #b91c1c; }
.car-facts { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--s600); }
.d-gallery { position: relative; }
.mbn a .mbn-emoji { font-size: 18px; line-height: 20px; max-width: none; overflow: visible; }
@media (max-width: 1100px) { .car-search { grid-template-columns: repeat(3, minmax(0, 1fr)); } .car-search .car-kw, .car-search .btn-brand { grid-column: 1 / -1; } }
@media (max-width: 640px) { .car-search { grid-template-columns: 1fr 1fr; } .car-search .btn-brand { grid-column: 1 / -1; } }

/* Account page: actions next to the greeting */
.dash-actions { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-head { flex-wrap: wrap; gap: 10px; }
.tp-body small { font-weight: 500; color: var(--s500); }

/* First-login onboarding for companies in China */
.onboard { border: 2px solid var(--brand-500, #f97316); background: linear-gradient(135deg, #fff7ed, #fff); }
.onboard h3 { margin-top: 0; }
.ob-steps { list-style: none; padding: 0; margin: 12px 0 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.ob-steps li { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--s200, #e2e8f0); font-size: 14px; }
.ob-steps li.done { color: var(--em700, #047857); border-color: #a7f3d0; background: #ecfdf5; }
.ob-steps li.now { color: #fff; background: var(--brand-600, #ea580c); border-color: var(--brand-600, #ea580c); font-weight: 700; }

.co-mt { margin-top: 8px; font-size: 12px; color: var(--s500); }

/* Admin language switch (中文 / العربية / English) */
.ad-lang { display: inline-flex; border: 1px solid var(--border, #e2e8f0); border-radius: 999px; overflow: hidden; margin-inline-end: 8px; }
.ad-lang button { border: 0; background: #fff; padding: 6px 12px; font-size: 13px; cursor: pointer; color: var(--s600, #475569); }
.ad-lang button + button { border-inline-start: 1px solid var(--border, #e2e8f0); }
.ad-lang button.on { background: var(--brand-600, #ea580c); color: #fff; font-weight: 700; }

.scope-banner { margin: -6px 0 16px; padding: 10px 14px; border-radius: 10px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; font-size: 14px; }
.admin-grid.solo { grid-template-columns: 1fr; }

/* SEO section (H2 + three H3) under the listings */
.seo-block{margin:36px 0 12px;padding:22px 0 0;border-top:1px solid var(--line,#e5e7eb)}
.seo-block h2{font-size:1.2rem;margin:0 0 14px}
.seo-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px}
.seo-grid h3{font-size:1rem;margin:0 0 6px}
.seo-grid p{margin:0;color:var(--muted,#6b7280);font-size:.92rem;line-height:1.6}

/* Dangerous-upload notice (blocking dialog) */
.threat-overlay{position:fixed;inset:0;z-index:10000;background:rgba(15,23,42,.62);display:flex;align-items:center;justify-content:center;padding:16px}
.threat-box{background:#fff;max-width:520px;width:100%;border-radius:14px;border-top:6px solid #dc2626;box-shadow:0 20px 60px rgba(0,0,0,.35);padding:26px 24px 22px;text-align:center}
.threat-ic{font-size:46px;line-height:1;margin-bottom:8px}
.threat-box h2{color:#b91c1c;margin:0 0 10px;font-size:1.35rem}
.threat-msg{font-size:1.02rem;line-height:1.7;color:#111827;margin:0 0 12px;font-weight:600}
.threat-reason{font-size:.85rem;color:#6b7280;background:#fef2f2;border:1px solid #fecaca;border-radius:8px;padding:8px 10px;margin:0 0 16px}
.threat-ok{min-width:120px}

/* Video thumbnails (first frame + ▶) everywhere: galleries, cards, uploaders */
.gal-media{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}
.gal-media > img{width:100%;height:100%;object-fit:cover}
.gal-video{width:100%;height:100%;background:#000;object-fit:contain}
.gthumb{padding:0;background:var(--s100);overflow:hidden;position:relative;display:block}
.gthumb img,.gthumb video{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}
.vposter{width:100%;height:100%;object-fit:cover;display:block;background:#111;pointer-events:none}
.vposter.cover{position:absolute;inset:0}
.vplay{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:44px;height:44px;border-radius:50%;
  background:rgba(0,0,0,.6);color:#fff;display:flex;align-items:center;justify-content:center;font-size:18px;padding-left:3px;
  box-shadow:0 2px 10px rgba(0,0,0,.35);pointer-events:none;border:2px solid rgba(255,255,255,.85)}
.vplay.sm{width:34px;height:34px;font-size:13px}
.ad-thumb .vplay{top:auto;left:auto;transform:none;bottom:10px;inset-inline-end:10px}
.media-thumb.vid{position:relative}

/* Join us — province manager page */
.sf-join{color:var(--brand-400,#fb923c)!important;font-weight:700}
.join-hero{background:linear-gradient(135deg,#7c2d12,#ea580c);color:#fff;padding:48px 0 44px}
.join-tag{display:inline-block;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.35);border-radius:999px;padding:4px 12px;font-size:13px;font-weight:700;margin-bottom:12px}
.join-hero h1{margin:0 0 12px;font-size:clamp(1.5rem,3.2vw,2.3rem);line-height:1.3}
.join-lead{max-width:820px;font-size:1.05rem;line-height:1.8;opacity:.95;margin:0 0 20px}
.join-cta{background:#fff!important;color:#c2410c!important}
.join-body{padding:30px 16px 40px}
.join-h2{font-size:1.35rem;margin:6px 0 16px}
.join-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:16px;margin-bottom:34px}
.join-card{background:#fff;border:1px solid var(--s200);border-radius:14px;padding:20px 22px}
.join-card h3{margin:0 0 12px;font-size:1.1rem}
.join-card ul,.join-card ol{margin:0;padding-inline-start:20px;line-height:1.85;font-size:.95rem}
.join-card li{margin-bottom:6px}
.join-note{margin:14px 0 0;background:var(--brand-50,#fff7ed);border-radius:10px;padding:10px 12px;font-size:.9rem;line-height:1.7}
.join-sub{color:var(--s600);margin:-6px 0 14px}
.join-form{max-width:820px}
.join-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media (max-width:640px){.join-row{grid-template-columns:1fr}}
.join-roles{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.join-role{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--s300);border-radius:10px;padding:10px 12px;cursor:pointer;font-weight:400!important}
.join-role input{width:auto;margin-top:3px}
.join-role span{display:flex;flex-direction:column;gap:2px}
.join-role small{color:var(--s500)}
.join-role:has(input:checked){border-color:var(--brand-500,#f97316);background:var(--brand-50,#fff7ed)}
.join-provs{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:6px;border:1px solid var(--s300);border-radius:10px;padding:10px;max-height:260px;overflow:auto}
.join-provs.bad,.join-form .bad{border-color:#dc2626!important;box-shadow:0 0 0 3px #fee2e2}
.join-prov{display:flex;align-items:center;gap:6px;font-weight:400!important;margin:0!important;cursor:pointer;font-size:14px}
.join-prov input{width:auto}
.join-hint{display:block;color:var(--s500);margin-top:4px}
.join-consent{display:flex;gap:8px;align-items:flex-start;margin:6px 0 16px;font-size:14px;line-height:1.6}
.join-consent input{margin-top:4px}
.join-submit{width:100%;justify-content:center;height:46px;font-size:1rem}
.join-err{color:#b91c1c;font-weight:600;margin:10px 0 0;min-height:1em}
.hp{position:absolute;inset-inline-start:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;opacity:0;pointer-events:none}
.join-done{max-width:820px;text-align:center;padding:30px}
.join-done-ic{font-size:44px}
/* admin: job applications */
.tab-badge{display:inline-block;min-width:18px;padding:0 5px;border-radius:9px;background:#dc2626;color:#fff;font-size:11px;line-height:18px;text-align:center}
.app-item{border:1px solid var(--s200);border-radius:12px;padding:14px 16px;margin-bottom:12px;background:#fff}
.app-item.st-new{border-inline-start:4px solid var(--brand-500,#f97316)}
.app-item.st-accepted{border-inline-start:4px solid #16a34a}
.app-item.st-rejected{opacity:.7}
.app-head{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}
.app-contact,.app-provs{font-size:13px;color:var(--s600);margin-top:4px}
.app-side{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.app-side select{padding:5px 8px;border-radius:8px;border:1px solid var(--s300)}
.app-dl{margin:10px 0 8px;font-size:13px}
.app-dl dt{font-weight:700;color:var(--s600);margin-top:8px}
.app-dl dd{margin:2px 0 0;white-space:pre-wrap;word-break:break-word}
.app-dl a{color:var(--brand-600,#ea580c);text-decoration:underline}
/* Social-media promoter page */
.promo-hero{background:linear-gradient(135deg,#9f1239,#ea580c)}
.promo-platforms{font-weight:700;letter-spacing:.02em;margin:0 0 12px;opacity:.95}
.promo-target{background:#fff;border:1px solid var(--s200);border-inline-start:5px solid var(--brand-500,#f97316);border-radius:14px;padding:18px 22px;margin-bottom:26px;line-height:1.8}
.promo-target .join-h2{margin-top:0}
.promo-chips{display:flex;flex-wrap:wrap;gap:8px;list-style:none;padding:0;margin:8px 0}
.promo-chips li{background:var(--brand-50,#fff7ed);border:1px solid var(--brand-200,#fed7aa);border-radius:999px;padding:4px 12px;font-weight:600;font-size:14px}
.promo-table-wrap{overflow-x:auto;margin-bottom:26px}
.promo-table{width:100%;border-collapse:collapse;background:#fff;border:1px solid var(--s200);border-radius:12px;overflow:hidden;font-size:14px}
.promo-table th,.promo-table td{padding:10px 14px;border-bottom:1px solid var(--s100);text-align:start}
.promo-table th{background:var(--s50);font-size:13px;color:var(--s600)}
.promo-accounts{display:flex;flex-direction:column;gap:8px}
.promo-accounts.bad{outline:2px solid #dc2626;outline-offset:4px;border-radius:8px}
.promo-acc{display:grid;grid-template-columns:190px 1fr 120px 36px;gap:8px}
.promo-acc select,.promo-acc input{width:100%;border:1px solid var(--s300);border-radius:8px;padding:9px 10px;font-size:14px;background:#fff}
.pa-del{border:1px solid var(--s300);background:#fff;border-radius:8px;cursor:pointer;color:var(--s500)}
@media (max-width:640px){.promo-acc{grid-template-columns:1fr 1fr}.promo-acc .pa-handle{grid-column:1/-1;order:3}}
.promo-add{margin-top:8px}
.app-kind{display:inline-block;font-size:11px;font-weight:700;border-radius:6px;padding:1px 7px;background:#fce7f3;color:#9d174d;margin-inline-end:6px}
/* Marketing manager page (Chinese / English switch) */
.mk[data-show="zh"] [data-l="en"], .mk[data-show="en"] [data-l="zh"]{display:none!important}
.mk-hero{background:linear-gradient(135deg,#1e3a8a,#ea580c)}
.mk-switch{display:inline-flex;background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.35);border-radius:999px;padding:3px;margin-bottom:14px;float:inline-end}
.mk-switch button{background:none;border:0;color:#fff;font-weight:700;padding:5px 14px;border-radius:999px;cursor:pointer;font-size:14px}
.mk-switch button.on{background:#fff;color:#1e3a8a}
.mk-grid{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.promo-target ol{margin:0;padding-inline-start:20px;line-height:1.85}
.mk-skills{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:6px;border:1px solid var(--s300);border-radius:10px;padding:10px}
.mk-skills label{display:flex;gap:6px;align-items:center;font-weight:400!important;margin:0!important;font-size:14px;cursor:pointer}
.mk-skills input{width:auto}
.mk-skills.bad{border-color:#dc2626;box-shadow:0 0 0 3px #fee2e2}
.app-kind.mkt{background:#dbeafe;color:#1e40af}
.app-filter{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 12px}
.app-filter button{border:1px solid var(--s300);background:#fff;border-radius:999px;padding:4px 12px;cursor:pointer;font-size:13px}
.app-filter button.on{background:var(--brand-600,#ea580c);border-color:var(--brand-600,#ea580c);color:#fff}

/* Footer "Join us" column — same look in every language: icon + short one-line label */
.sf-joincol .sf-join{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;font-weight:700}
.sf-joincol .sf-ji{width:20px;text-align:center;flex:none}

/* Posting guide & rules page */
.rules-page{padding:28px 16px 40px}
.rules{max-width:880px;margin:0 auto;background:#fff;border:1px solid var(--s200);border-radius:16px;padding:28px 30px}
.rules h1{margin:0 0 10px;font-size:1.6rem}
.rules-intro{color:var(--s600);line-height:1.8;margin:0 0 18px}
.rules-sec{border-top:1px solid var(--s100);padding:14px 0}
.rules-sec h2{font-size:1.1rem;margin:0 0 8px}
.rules-sec ul{margin:0;padding-inline-start:22px;line-height:1.9}
.rules-sec.warn{background:#fef2f2;border:1px solid #fecaca;border-radius:12px;padding:14px 16px;margin:10px 0}
.rules-consent{margin-top:16px;background:var(--brand-50,#fff7ed);border:1px dashed var(--brand-300,#fdba74);border-radius:10px;padding:12px 14px;font-weight:600;line-height:1.7}
.rules-upd{color:var(--s500);font-size:13px;margin:12px 0 0}
/* consent box in forms */
.rules-check{display:flex;gap:10px;align-items:flex-start;background:#fff7ed;border:1px solid #fed7aa;border-radius:10px;padding:12px 14px;margin:6px 0 14px;line-height:1.7;font-size:14px}
.rules-check input{width:auto;margin-top:5px;flex:none}
.rules-check.bad{border-color:#dc2626;box-shadow:0 0 0 3px #fee2e2}
.rules-check a{color:var(--brand-600,#ea580c);font-weight:700}
/* Report this listing */
.report-btn{width:100%;margin-top:12px;background:#fff;border:1px solid #fecaca;color:#b91c1c;border-radius:10px;padding:9px 12px;font-weight:700;cursor:pointer;font-size:14px}
.report-btn:hover{background:#fef2f2}
.report-box{background:#fff;max-width:520px;width:100%;border-radius:14px;border-top:6px solid #dc2626;box-shadow:0 20px 60px rgba(0,0,0,.35);padding:22px 22px 18px;max-height:92vh;overflow:auto}
.report-box h2{margin:0 0 12px;font-size:1.2rem;color:#b91c1c}
.rp-reasons{border:1px solid var(--s200);border-radius:10px;padding:8px 12px;margin:0 0 12px;display:grid;gap:6px}
.rp-reasons legend{font-weight:700;font-size:13px;padding:0 4px}
.rp-reasons label{display:flex;gap:8px;align-items:center;font-size:14px;cursor:pointer}
.rp-lbl{display:block;font-size:13px;font-weight:600;color:var(--s600);margin-bottom:10px}
.rp-lbl textarea,.rp-lbl input{display:block;width:100%;margin-top:5px;border:1px solid var(--s300);border-radius:8px;padding:8px 10px;font-size:14px}
.rp-msg{color:#b91c1c;font-weight:600;min-height:1em;margin:4px 0}
.rp-note{font-size:13px;margin:0 0 12px}
.rp-actions{display:flex;gap:10px}
.rp-done{font-size:42px;text-align:center}
.rp-done-t{text-align:center;font-weight:600;line-height:1.7}
.rep-new td{background:#fff7ed}
/* Prices, shipping & documents — form + product page */
.trade-box{border:1px solid var(--s200);border-radius:12px;padding:10px 14px;margin:14px 0;background:#fcfcfd}
.trade-box summary{cursor:pointer;font-weight:800;font-size:15px;padding:4px 0}
.trade-box[open] summary{margin-bottom:8px}
.field.row3{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
@media (max-width:640px){.field.row3{grid-template-columns:1fr}}
.t-dims{display:flex;align-items:center;gap:6px}
.t-dims input{flex:1;min-width:0}
.t-cbm{color:var(--brand-600,#ea580c);font-weight:700}
.t-docs{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:6px;border:1px solid var(--s300);border-radius:10px;padding:10px}
.t-docs label{display:flex;gap:6px;align-items:center;font-weight:400!important;margin:0!important;font-size:14px;cursor:pointer}
.t-docs input{width:auto}
.trade-table{width:100%;border-collapse:collapse;font-size:14px;margin-bottom:12px}
.trade-table th,.trade-table td{padding:9px 12px;border-bottom:1px solid var(--s100);text-align:start;vertical-align:top}
.trade-table th{width:38%;color:var(--s600);font-weight:600;background:var(--s50)}
.t-doc{display:inline-block;background:#ecfdf5;color:#047857;border:1px solid #a7f3d0;border-radius:999px;padding:1px 9px;margin:2px;font-size:12.5px}
.t-expired{color:#b91c1c;font-weight:700;text-decoration:line-through}
.t-warn{background:#fef2f2;border:1px solid #fecaca;color:#b91c1c;border-radius:10px;padding:9px 12px;margin-bottom:10px;font-weight:600}
.guide-actions{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 16px}
.guide-table thead th{background:var(--brand-600,#ea580c);color:#fff}
.rules-sec p{line-height:1.85;margin:6px 0}
/* Conformity marks & approvals */
.marks-box{border:1px dashed var(--s300);border-radius:10px;padding:10px 12px;margin:0 0 14px;background:#fff}
.marks-h{font-weight:800!important;font-size:14px}
.marks-files{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:6px}
.mark-file{display:inline-flex;gap:6px;align-items:center;background:var(--s50);border:1px solid var(--s200);border-radius:8px;padding:3px 8px;font-size:13px}
.mark-file button{border:0;background:none;color:#b91c1c;cursor:pointer}
.mark-chips{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
.mark-chip{display:inline-block;background:#eff6ff;color:#1e40af;border:1px solid #bfdbfe;border-radius:6px;padding:2px 9px;font-weight:800;font-size:13px;letter-spacing:.02em}
.t-sub{font-size:13px;margin-top:5px;color:var(--s700,#334155)}
.t-note{font-size:12px;color:var(--s500);margin-top:6px;font-style:italic}
/* Display-currency selector (header): compact 💱 (+ chosen code); the native select is overlaid */
.cur-dd{position:relative;display:inline-flex;align-items:center;gap:4px;border:1px solid var(--s200);border-radius:999px;padding:0 10px;background:#fff;height:38px;cursor:pointer}
.cur-dd.on{border-color:var(--brand-400,#fb923c);background:var(--brand-50,#fff7ed)}
.cur-dd select{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer;font-size:14px}
.cur-ic{font-size:16px;line-height:1}
.cur-code{font-weight:800;font-size:12px;color:var(--brand-700,#c2410c)}
.cur-orig{display:block;font-size:.72em;color:var(--s500);font-weight:500;margin-top:2px}
.d-price .cur-orig{font-size:.5em}
@media (max-width:639px){ .cur-dd{height:34px;padding:0 8px} }
@media (max-width:420px){ .lang-btn .lb-name{display:none} }
/* Header fits every language at every width (long labels in ru/fr/de/es/pt) */
@media (max-width:1480px){ .lang-btn .lb-name{display:none} .sh-nav{gap:16px} }
@media (max-width:1280px){ .sh-btn-outline span{display:none} .sh-btn-outline{padding:0 10px} }
@media (max-width:1180px){ .sh-nav{display:none} }
@media (max-width:480px){ .sh-btn-solid span{display:none} .sh-btn-solid{padding:0 10px} }
/* Category chips: long words (de/ru/fr) wrap instead of widening the page */
.cat-chips > *{min-width:0}
.cat-chip{overflow-wrap:anywhere}
/* Long-label languages need the room earlier */
@media (max-width:1440px){ html:lang(ru) .sh-nav, html:lang(de) .sh-nav, html:lang(fr) .sh-nav, html:lang(es) .sh-nav, html:lang(pt) .sh-nav { display:none } }
.prov-grid > *, .sf-in > *, .ad-grid > *, .join-grid > *, .seo-grid > * {min-width:0}
.prov-tile, .sf-in a, .sf-in h4, .sf-in p {overflow-wrap:anywhere}

/* ---- Buyer profile, messages & buyers directory (GDPR / PIPL) ---- */
.buyer-panel h3, .msg-panel h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.buyer-panel .muted, .msg-panel .muted { color: var(--s500); }
.small { font-size: 13px; }
.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-grid .chip { font-weight: 500; padding: 7px 12px; line-height: 1.3; }
.chip-grid .chip input { margin: 0; accent-color: var(--brand-600); }
.consent-box { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--s200); border-radius: 12px; padding: 12px 14px; margin: 10px 0; cursor: pointer; background: #fff; }
.consent-box input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--brand-600); }
.consent-box b { display: block; color: var(--s800); }
.consent-box small { display: block; color: var(--s500); margin-top: 3px; line-height: 1.5; }
.consent-box.xb { background: #fffbeb; border-color: #fde68a; font-size: 14px; line-height: 1.55; }
.consent-box.xb.need { border-color: #f59e0b; }
.consent-box.bad { border-color: var(--red600); box-shadow: 0 0 0 3px #fee2e2; }
.notice-box.never { background: #f0fdf4; border-color: #bbf7d0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.badge { display: inline-block; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: var(--brand-600); color: #fff; font-size: 12px; font-weight: 700; text-align: center; }
.badge:empty { display: none; }
.msg-wrap { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 14px; }
.msg-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--s200); border-radius: 12px; max-height: 460px; overflow: auto; }
.msg-list li { padding: 10px 12px; border-bottom: 1px solid var(--s100); cursor: pointer; min-width: 0; }
.msg-list li:last-child { border-bottom: 0; }
.msg-list li.active { background: var(--brand-50); }
.msg-list li.unread b { color: var(--brand-700); }
.msg-list li small { color: var(--s500); }
.msg-list li .last { display: block; color: var(--s500); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-list li.empty { cursor: default; }
.msg-thread { border: 1px solid var(--s200); border-radius: 12px; padding: 12px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.thread-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.thread-head b { margin-inline-end: auto; }
.bubbles { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow: auto; padding: 4px; }
.bubble { max-width: 80%; background: var(--s100); border-radius: 14px; padding: 8px 12px; align-self: flex-start; overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble.mine { background: var(--brand-50); border: 1px solid var(--brand-200); align-self: flex-end; }
.bubble small { display: block; color: var(--s500); font-size: 11px; margin-top: 3px; white-space: normal; }
.reply { display: flex; gap: 8px; align-items: flex-end; }
.reply textarea { flex: 1; min-height: 60px; min-width: 0; }
@media (max-width: 760px) { .msg-wrap { grid-template-columns: minmax(0, 1fr); } .msg-list { max-height: 220px; } }

.bd-hero { background: linear-gradient(135deg, var(--brand-600), #b45309); color: #fff; border-radius: 18px; padding: 26px 24px; margin: 20px 0; }
.bd-hero h1 { margin: 0 0 8px; font-size: 28px; }
.bd-hero p { margin: 0; opacity: .95; line-height: 1.6; }
.bd-hero .chip-tag { display: inline-block; background: rgba(255,255,255,.18); border-radius: 999px; padding: 3px 12px; font-size: 13px; margin-bottom: 10px; }
.bd-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }
.bd-filters label { display: block; font-size: 13px; color: var(--s600); margin-bottom: 4px; }
.bd-filters select, .bd-filters input { width: 100%; }
@media (max-width: 900px) { .bd-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .bd-filters { grid-template-columns: minmax(0, 1fr); } }
.bd-note { margin: 14px 0; }
.bd-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin: 16px 0 10px; color: var(--s600); }
.buyer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.buyer-card { background: #fff; border: 1px solid var(--s200); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.buyer-card .top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.buyer-card .name { font-weight: 700; color: var(--s800); font-size: 16px; }
.buyer-card .meta { color: var(--s500); font-size: 13px; }
.buyer-card .secs { display: flex; flex-wrap: wrap; gap: 6px; }
.buyer-card .secs span { background: var(--s100); border-radius: 999px; padding: 2px 9px; font-size: 12px; }
.buyer-card .want { font-size: 14px; color: var(--s700); line-height: 1.5; }
.buyer-card .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.buyer-card .contact-box { display: none; flex-direction: column; gap: 8px; }
.buyer-card.open .contact-box { display: flex; }
.buyer-card textarea { min-height: 80px; }
.pager { display: flex; justify-content: center; gap: 6px; margin: 18px 0; flex-wrap: wrap; }
.modal-back { position: fixed; inset: 0; background: rgba(15,23,42,.55); display: none; align-items: center; justify-content: center; z-index: 200; padding: 16px; }
.modal-back.show { display: flex; }
.modal-card { background: #fff; border-radius: 16px; max-width: 560px; width: 100%; padding: 22px; max-height: 90vh; overflow: auto; }
.modal-card h2 { margin: 0 0 12px; font-size: 20px; }
.modal-card ol { padding-inline-start: 20px; line-height: 1.6; }
.privacy-doc { max-width: 860px; margin: 24px auto; overflow-wrap: anywhere; }
.privacy-doc h1 { font-size: 28px; }
.privacy-doc h2 { font-size: 20px; margin-top: 26px; }
.privacy-doc p, .privacy-doc li { line-height: 1.75; color: var(--s700); }
.privacy-doc .upd { color: var(--s500); font-size: 13px; }
.notice-box.off-notice { background: #fef2f2; border-color: #fca5a5; color: #991b1b; font-weight: 600; }
.ce-sub { background: var(--brand-50); border: 1px solid var(--brand-200); border-radius: 12px; padding: 12px 14px; color: var(--brand-700); font-weight: 600; }
.ce-note { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 10px 12px; font-weight: 600; }
.ce-cta { margin: 18px 0 6px; }
.ce-remind { background: var(--brand-50); border: 1px solid var(--brand-200); color: var(--brand-700); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-weight: 600; line-height: 1.6; margin: 10px 0 6px; }
.terms-tabs { max-width: 880px; margin: 0 auto 14px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.terms-tabs a { background: #fff; border: 1px solid var(--s200); border-radius: 999px; padding: 7px 16px; font-weight: 700; color: var(--s700); text-decoration: none; box-shadow: var(--shadow-sm); }
.terms-tabs a:hover { border-color: var(--brand-400); color: var(--brand-700); }
.terms-doc { margin-bottom: 22px; scroll-margin-top: 16px; overflow-wrap: anywhere; }
.terms-lang { display: inline-block; background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-200); border-radius: 999px; padding: 2px 12px; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.terms-choice { border: 1px solid var(--s200); border-radius: 12px; padding: 10px 14px; margin: 8px 0; background: var(--s50); line-height: 1.75; }
.terms-choice b { display: block; color: var(--s800); margin-bottom: 2px; }
/* Publish-my-information choice (registration + profile) */
.pub-choice { border: 2px solid var(--s200); border-radius: 14px; padding: 12px; background: #fff; }
.pub-choice.bad { border-color: var(--red600); box-shadow: 0 0 0 3px #fee2e2; }
.pub-opts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin: 6px 0 10px; }
@media (max-width: 560px) { .pub-opts { grid-template-columns: minmax(0, 1fr); } }
.pub-opt { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--s200); border-radius: 10px; padding: 10px; cursor: pointer; }
.pub-opt input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.pub-opt b { display: block; font-size: 14px; color: var(--s800); }
.pub-opt small { display: block; color: var(--s500); line-height: 1.5; margin-top: 2px; }
.pub-opt.yes:has(input:checked) { border-color: #16a34a; background: #f0fdf4; }
.pub-opt.no:has(input:checked) { border-color: var(--red600); background: #fef2f2; }
.pub-notice { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.65; font-weight: 600; }
.pub-notice > div { margin: 2px 0; }
.pub-notice .pn-common { color: #7f1d1d; font-weight: 500; }
.pub-notice a { display: inline-block; margin-top: 4px; color: #991b1b; text-decoration: underline; }
.pub-choice[data-choice="yes"] .pn-yes, .pub-choice[data-choice="no"] .pn-no { background: #fff; border-radius: 6px; padding: 2px 6px; outline: 2px solid currentColor; }
.pub-choice[data-choice="yes"] .pn-no, .pub-choice[data-choice="no"] .pn-yes { opacity: .55; }
.pub-unset { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; border-radius: 12px; padding: 12px 14px; font-weight: 700; margin-bottom: 16px; }
.no-contact { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; border-radius: 12px; padding: 14px; font-weight: 600; line-height: 1.6; }
/* Supplier type: manufacturer / distributor */
.st-badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; font-weight: 700; font-size: 12px; padding: 2px 9px; white-space: nowrap; border: 1px solid; }
.st-badge.manufacturer { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.st-badge.dealer { background: #faf5ff; color: #7e22ce; border-color: #e9d5ff; }
.st-badge.md { font-size: 14px; padding: 4px 12px; }
.ad-st { margin: 2px 0 4px; }
.st-note { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-weight: 600; line-height: 1.6; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
/* Chinese Companies Directory: its own service filters */
.dir-search { grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)) auto; }
.dir-service { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; }
.dir-service > span { color: var(--brand-700); font-weight: 700; font-size: 14px; white-space: nowrap; }
.dir-service select.picked, #cDirSvc.picked { border-color: #16a34a; background: #f0fdf4; }
@media (max-width: 900px) { .dir-search { grid-template-columns: 1fr 1fr; } .dir-service { grid-template-columns: minmax(0, 1fr); } .dir-service > span { white-space: normal; } }
.dir-svc-chips { margin: 18px 0 6px; }
.dir-svc-chips .cat-chip b { background: var(--brand-50); color: var(--brand-700); border-radius: 999px; padding: 0 6px; font-size: 11px; margin-inline-start: 4px; }
.co-svcs { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0; }
.co-svcs span, .co-svcs a { background: var(--s100); border-radius: 999px; padding: 2px 9px; font-size: 12px; color: var(--s700); text-decoration: none; }
.co-svcs a:hover { background: var(--brand-50); color: var(--brand-700); }
.cascade .dir-sub { grid-column: 2 / 3; }
.dir-sub-lbl { color: var(--brand-700); font-weight: 700; font-size: 12px; }
@media (max-width: 760px) { .cascade .dir-sub { grid-column: 1 / -1; } }
.cascade-actions .btn-brand { white-space: normal; max-width: 100%; text-align: center; }
/* About the Chinese Companies Directory */
.terms-tabs a.on { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.dg-doc { overflow-wrap: anywhere; }
.dg-doc p, .dg-doc li { line-height: 1.85; color: var(--s700); }
.dg-doc .dg-lead { font-size: 16px; color: var(--s800); }
.dg-h2 { font-size: 1.3rem; margin: 28px 0 8px; padding-top: 18px; border-top: 1px solid var(--s200); color: var(--s900); }
.dg-h3 { font-size: 1.05rem; margin: 18px 0 4px; color: var(--brand-700); }
.dg-doc ul { padding-inline-start: 22px; }
/* Directory page: join button + "?" explanation at the top; results only after a search / filter */
.dir-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.dir-top-txt { min-width: 0; flex: 1 1 320px; }
.dir-join { position: relative; display: flex; align-items: center; gap: 8px; flex: none; max-width: 100%; }
.dir-join-btn { background: #fff; color: var(--brand-700); font-weight: 800; border-radius: 12px; padding: 11px 18px; text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,.15); line-height: 1.3; }
.dir-join-btn:hover { background: var(--brand-50); }
.dir-help { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 2px solid #fff; background: rgba(255,255,255,.18); color: #fff; font-weight: 800; font-size: 17px; cursor: pointer; }
.dir-help:hover, .dir-help[aria-expanded="true"] { background: #fff; color: var(--brand-700); }
.dir-info { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 30; width: min(440px, calc(100vw - 32px)); background: #fff; color: var(--s700); border: 1px solid var(--s200); border-radius: 14px; padding: 16px 18px; box-shadow: 0 16px 40px rgba(15,23,42,.25); text-align: start; }
.dir-info b { color: var(--s900); font-size: 16px; }
.dir-hero .dir-info p { margin: 8px 0 0; line-height: 1.7; font-size: 14px; opacity: 1; color: var(--s700); }
.dir-info-acts { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.dir-info-acts a:not(.btn-brand) { color: var(--brand-700); font-weight: 700; }
.dir-hint { text-align: center; color: var(--s500); padding: 26px 12px 40px; font-size: 15px; }
.dir-join { flex: 0 1 auto; min-width: 0; }
.dir-join-btn { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .dir-join { flex: 1 1 100%; }
  .dir-join-btn { flex: 1; text-align: center; }
  .dir-info { inset-inline: 0; width: auto; }
}
.dir-join-btn { white-space: normal; }
.dir-info-acts .btn-brand { white-space: normal; max-width: 100%; text-align: center; }
/* Messages (toasts) appear in the middle of the page so nothing hides them */
.toast { inset-inline: auto; top: 50%; bottom: auto; left: 50%; right: auto; transform: translate(-50%, -50%) scale(.96); max-width: min(520px, calc(100vw - 32px)); width: max-content; text-align: center; font-size: 16px; font-weight: 600; padding: 16px 22px; border-radius: 14px; box-shadow: 0 20px 50px rgba(15,23,42,.35); line-height: 1.6; z-index: 1000; }
.toast.show { transform: translate(-50%, -50%) scale(1); }
/* Show-password eye button */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-inline-end: 42px !important; }
.pw-eye { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; background: transparent; cursor: pointer; font-size: 16px; line-height: 1; border-radius: 8px; opacity: .55; }
.pw-eye:hover, .pw-eye.on { opacity: 1; background: var(--s100); }

/* Footer: more space between the columns; the "Join us" column is wider and its long labels wrap instead of overlapping the next column */
.sf-in{grid-template-columns:1.5fr 1fr 1.15fr 1.5fr .9fr 1.25fr;gap:32px 56px}
.sf-in>div{min-width:0}
.sf-joincol .sf-join{white-space:normal;align-items:flex-start;line-height:1.35}
@media (max-width:1100px){.sf-in{grid-template-columns:1fr 1fr 1fr;gap:32px 40px}}
@media (max-width:640px){.sf-in{grid-template-columns:1fr 1fr;gap:28px 24px}}

/* Missing / wrong field: marked in place (see js/field-error.js) */
.field-bad{border-color:#dc2626!important;box-shadow:0 0 0 3px #fee2e2!important}
div.field-bad,.type-pick.field-bad{border:1px solid #dc2626;border-radius:10px;padding:6px}
.field-msg{margin:6px 0 0;color:#b91c1c;font-size:13px;font-weight:700}

/* Address box (bigger) + word counters on street / address */
textarea.addr-box{min-height:92px;resize:vertical;line-height:1.5}
.word-count{display:block;margin-top:4px;font-size:12px;color:var(--s500);text-align:end;font-family:var(--mono)}
.word-count.full{color:#b91c1c;font-weight:700}

/* Header when signed in: account name with an "online" dot (no Register / Login buttons) */
.sh-user{border-color:#16a34a;color:#166534;background:#f0fdf4;font-weight:700;max-width:220px}
.sh-user .sh-uname{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:160px}
.sh-on{width:8px;height:8px;border-radius:50%;background:#16a34a;flex:none}
@media (max-width:900px){.sh-user .sh-uname{max-width:90px}}
@media (max-width:480px){.sh-user .sh-uname{display:none}}

/* "?" help next to a label + the explanation it opens */
.help-q{width:22px;height:22px;border-radius:50%;border:1px solid var(--brand-600);background:#fff;color:var(--brand-700);font-weight:800;font-size:13px;line-height:1;cursor:pointer;padding:0;vertical-align:middle}
.help-q:hover{background:var(--brand-50)}
.field-help{margin:0 0 8px;padding:10px 12px;border-radius:10px;background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a;font-size:13.5px;line-height:1.7}
#pf_about{min-height:140px}

/* Account page views: profile (default) / listings (#post) */
#dashView[data-view="profile"] .v-post,#dashView[data-view="profile"] .v-cars{display:none!important}
#dashView[data-view="post"] .v-profile,#dashView[data-view="post"] .v-cars:not(.v-post),#dashView[data-view="post"] #buyerPanel,#dashView[data-view="post"] #msgPanel{display:none!important}
#dashView[data-view="cars"] .v-profile,#dashView[data-view="cars"] .v-post:not(.v-cars),#dashView[data-view="cars"] #buyerPanel,#dashView[data-view="cars"] #msgPanel{display:none!important}
#dashView[data-view="cars"] #cars{margin-top:0!important}

/* Profile: street (wide) + postal code (narrow) on one line */
.field.row2.street-row{grid-template-columns:2.2fr 1fr}
@media (max-width:640px){.field.row2.street-row{grid-template-columns:1fr}}

/* Business licence file (profile) */
.lic-file{border:1px dashed var(--brand-400);border-radius:12px;padding:12px 14px;background:#fffaf5}
.lic-file .field-help{margin-top:6px}
.lic-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.lic-state{font-size:13.5px;color:var(--s500);font-weight:700;margin-inline-end:auto}
.lic-state.ok{color:#166534}

/* Matching service */
.sh-nav a.sh-match{position:relative;font-weight:700;color:var(--brand-700)}
.sh-badge{display:inline-block;min-width:18px;height:18px;padding:0 5px;margin-inline-start:5px;border-radius:999px;background:#dc2626;color:#fff;font-size:11px;font-weight:800;line-height:18px;text-align:center;vertical-align:middle}
.mt-score{flex:none;min-width:54px;text-align:center;padding:6px 10px;border-radius:999px;background:#ecfdf5;border:1px solid #6ee7b7;color:#065f46;font-weight:800;font-size:15px}
.mt-new{align-self:flex-start}
.mt-prods{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.mt-prods a{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--s700);min-width:0}
.mt-prods img,.mt-noimg{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:8px;border:1px solid var(--s200);background:var(--s100);display:flex;align-items:center;justify-content:center;font-size:22px}
.mt-prods span[dir]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mt-notify{margin-bottom:14px}
.mt-switch{display:flex;gap:10px;align-items:flex-start;cursor:pointer}
.mt-switch input{width:20px;height:20px;margin-top:2px;flex:none}
.mt-switch small{display:block;color:var(--s500);margin-top:3px}
.mt-how{color:var(--s500);margin:16px 0 30px;line-height:1.7}

/* Profile closed for editing (after saving): read-only fields until "Edit my profile" */
.pf-locked input:disabled,.pf-locked select:disabled,.pf-locked textarea:disabled{background:var(--s100,#f1f5f9);color:var(--s700);cursor:not-allowed;opacity:1}
.pf-locked label[for="logoFile"],.pf-locked .help-q{pointer-events:none;opacity:.5}
.pf-locked .pub-opt{cursor:not-allowed}
/* Header nav: one line per link; below 1320px the "Compare" link gives its place to Matching */
.sh-nav a{white-space:nowrap}
@media (max-width:1320px){.sh-nav a[href="/compare.html"]{display:none}}

/* Add listing: one product name (wide) + its language (narrow) */
.field.row2.name-row{grid-template-columns:2.4fr 1fr}
@media (max-width:640px){.field.row2.name-row{grid-template-columns:1fr}}
/* Dashboard grids on small screens: a wide table must scroll inside its panel, not stretch the whole page */
.admin-grid>*{min-width:0}
.admin-grid>.panel{overflow-x:auto}

/* Quality marks (profile + public company page) */
.qm-box{border:1px solid var(--s200);border-radius:12px;padding:12px 14px;background:#fafcff}
.qm-grid{display:flex;flex-wrap:wrap;gap:8px}
.qm-opt{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:1px solid var(--s300);border-radius:999px;background:#fff;font-weight:700;font-size:13.5px;cursor:pointer}
.qm-opt input{width:16px;height:16px;margin:0}
.qm-opt:has(input:checked){border-color:#16a34a;background:#f0fdf4;color:#166534}
.qm-opt.qm-none:has(input:checked){border-color:var(--s500);background:var(--s100);color:var(--s700)}
.pf-locked .qm-opt{cursor:not-allowed}
.qm-public{margin:10px 0 0}
.qm-public small{display:block;color:var(--s500);font-weight:700;margin-bottom:6px}
.qm-public span{display:inline-block;margin:0 6px 6px 0;padding:4px 10px;border-radius:999px;border:1px solid #6ee7b7;background:#ecfdf5;color:#065f46;font-weight:800;font-size:12.5px}

/* Publishing & privacy policy: one page, two parts */
.doc-toc{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 18px}
.doc-toc a{padding:8px 14px;border-radius:999px;border:1px solid var(--s300);background:var(--s50,#f8fafc);font-weight:700;font-size:14px;color:var(--s700)}
.doc-toc a:hover{border-color:var(--brand-400);color:var(--brand-700)}
.doc-sep{border:0;border-top:2px dashed var(--s200);margin:30px 0}
.rules h1[id]{scroll-margin-top:90px}
.rules h1,.rules h2{overflow-wrap:anywhere}

/* Footer without the "Top regions" column: brand + 4 columns */
.sf-in{grid-template-columns:1.5fr 1fr 1.15fr 1.5fr 1.25fr}
@media (max-width:1100px){.sf-in{grid-template-columns:1fr 1fr 1fr}}
@media (max-width:640px){.sf-in{grid-template-columns:1fr 1fr}}

/* Quality certificates (files) */
.qf-area{margin-top:12px;padding-top:12px;border-top:1px dashed var(--s200)}
.qf-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.qf-item{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--s200);border-radius:10px;background:#fff;padding:5px 8px;max-width:100%}
.qf-item a{display:inline-flex;align-items:center;gap:8px;font-size:13.5px;font-weight:700;color:var(--s700);min-width:0}
.qf-item a span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:220px}
.qf-item img{width:36px;height:36px;object-fit:cover;border-radius:6px;border:1px solid var(--s200)}
.qm-public .qf-item a span{display:inline;margin:0;padding:0;border:0;background:none;color:inherit;font-weight:700;font-size:13.5px}
