/* ============================================================================
   Sellers directory / hub — /sellers
   Ported from Sigrix_new/Marketplace - Sellers.html (.sh-* block).

   Loaded only on the sellers hub page (via {% block extra_head %}). Pairs with
   the design-system base (css/sx-home.css) and the global --sx-* tokens in
   base.html. See css/sx-seller.css for the theme-scoping note.
   ========================================================================== */

:root {
  --sx-font-num: 'Space Grotesk', 'Geist', ui-sans-serif, system-ui, sans-serif;
  --sx-shadow-1: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 1px 2px rgba(0, 0, 0, 0.4);
  --sx-shadow-2: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 24px -12px rgba(0, 0, 0, 0.6);
}

.sh-page { padding: 28px 0 0; }

/* ---- header ---- */
.sh-header {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: 26px; flex-wrap: wrap;
}
.sh-header h1 { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; margin: 0; }
.sh-lede { font-size: 15px; color: var(--sx-text-2); margin-top: 10px; max-width: 62ch; line-height: 1.55; }
.sh-header-stat {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  padding: 14px 22px; border-radius: var(--sx-r-lg);
  background: var(--sx-surface); box-shadow: 0 0 0 1px var(--sx-line) inset;
}
.sh-header-stat .v { font-family: var(--sx-font-num); font-size: 28px; font-weight: 600; color: var(--sx-text); letter-spacing: -0.02em; }
.sh-header-stat .l { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--sx-text-3); font-family: var(--sx-font-mono); }

/* ---- toolbar ---- */
.sh-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 22px; flex-wrap: wrap;
}
.sh-tabs { display: flex; gap: 2px; padding: 4px; background: var(--sx-surface); border-radius: var(--sx-r-md); box-shadow: 0 0 0 1px var(--sx-line) inset; flex-wrap: wrap; }
.sh-tab {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 14px; border-radius: var(--sx-r-sm);
  font-size: 13px; font-weight: 500; color: var(--sx-text-2);
  background: transparent; border: 0; cursor: pointer; text-decoration: none;
  transition: background 120ms, color 120ms;
}
.sh-tab:hover { color: var(--sx-text); }
.sh-tab.is-active { background: var(--sx-bg); color: var(--sx-text); box-shadow: 0 0 0 1px var(--sx-line) inset; }
.sh-tab-count { font-family: var(--sx-font-mono); font-size: 11px; color: var(--sx-text-3); font-variant-numeric: tabular-nums; }
.sh-tab.is-active .sh-tab-count { color: var(--sx-brand-3); }
[data-theme="light"] .sh-tab.is-active .sh-tab-count { color: var(--sx-brand); }

.sh-tools-right { display: flex; align-items: center; gap: 8px; }
.sh-search {
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 12px; border-radius: var(--sx-r-md);
  background: var(--sx-surface); box-shadow: 0 0 0 1px var(--sx-line) inset;
  color: var(--sx-text-3); transition: box-shadow 120ms;
}
.sh-search:focus-within { box-shadow: 0 0 0 1px var(--sx-brand-3) inset; }
.sh-search input { border: 0; background: transparent; outline: none; font: inherit; font-size: 13px; color: var(--sx-text); width: 190px; }
.sh-search input::placeholder { color: var(--sx-text-3); }
.sh-select {
  height: 38px; padding: 0 12px; border-radius: var(--sx-r-md);
  background: var(--sx-surface); box-shadow: 0 0 0 1px var(--sx-line) inset;
  color: var(--sx-text-2); font: inherit; font-size: 13px; cursor: pointer; border: 0;
}

/* ---- grid ---- */
.sh-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-bottom: 8px; }
.sh-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--sx-surface); border-radius: var(--sx-r-lg);
  box-shadow: 0 0 0 1px var(--sx-line) inset;
  overflow: hidden; transition: transform 140ms, box-shadow 140ms;
}
.sh-card:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--sx-line-2) inset, var(--sx-shadow-2); }
.sh-cover { position: relative; height: 76px; }
.sh-cover-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.10) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.10) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, black 0%, transparent 90%);
  -webkit-mask-image: linear-gradient(180deg, black 0%, transparent 90%);
}
.sh-badge {
  position: absolute; top: 12px; right: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px; border-radius: 999px;
  background: rgba(11,13,18,0.46); backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.20) inset;
  color: #fff; font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}
.sh-badge svg { color: var(--sx-warn); }

.sh-card-body { padding: 0 20px 20px; position: relative; }
.sh-avatar {
  width: 56px; height: 56px; border-radius: 16px; margin-top: -28px;
  border: 3px solid var(--sx-surface);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sx-font-num); font-weight: 600; font-size: 19px; color: #fff;
  box-shadow: var(--sx-shadow-1); position: relative; z-index: 1;
}
.sh-id { margin-top: 12px; }
.sh-id h3 { font-size: 17px; font-weight: 600; color: var(--sx-text); letter-spacing: -0.01em; margin: 0; }
.sh-handle { font-size: 12px; color: var(--sx-text-3); margin-top: 2px; display: block; }
.sh-tagline { font-size: 13px; color: var(--sx-text-2); line-height: 1.5; margin-top: 12px; min-height: 38px; }
.sh-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.sh-tag {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px;
  font-size: 11px; color: var(--sx-text-2); background: var(--sx-bg); box-shadow: 0 0 0 1px var(--sx-line) inset;
}
.sh-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--sx-line);
}
.sh-stat { display: flex; flex-direction: column; gap: 2px; }
.sh-stat .v { font-family: var(--sx-font-num); font-size: 16px; font-weight: 600; color: var(--sx-text); font-variant-numeric: tabular-nums; }
.sh-stat .l { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--sx-text-3); font-family: var(--sx-font-mono); }
.sh-view {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px; font-size: 13px; font-weight: 500; color: var(--sx-brand-3);
  transition: gap 140ms;
}
[data-theme="light"] .sh-view { color: var(--sx-brand); }
.sh-card:hover .sh-view { gap: 10px; }

.sh-empty { padding: 60px; text-align: center; color: var(--sx-text-3); font-size: 14px; }

/* Client-side filter hides non-matching cards without touching the server
   `hidden` attribute it strips on load (sellers_directory.js). */
.sh-card.is-hidden { display: none; }

@media (max-width: 1000px) { .sh-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) {
  .sh-grid { grid-template-columns: 1fr; }
  .sh-tools-right { width: 100%; }
  .sh-search { flex: 1; }
  .sh-search input { width: 100%; }
}
