/* ==========================================================================
   Vendor directory
   ========================================================================== */

.vendor-page {
  background: var(--bg);
  min-height: 60vh;
}

.vendor-hero {
  padding: 26px 0 30px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(800px 320px at 18% -20%, var(--brand-50), transparent 70%),
    linear-gradient(180deg, var(--brand-50), transparent 92%);
}

.vendor-hero .crumbs { margin-bottom: 18px; }

.vendor-hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px 40px;
}

.vendor-eyebrow {
  margin-bottom: 10px;
  color: var(--brand-700);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: .1em;
}

.vendor-hero h1 {
  font-size: clamp(28px, 3.8vw, 38px);
  letter-spacing: -.045em;
}

.vendor-hero p {
  max-width: 660px;
  margin-top: 10px;
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 1.75;
}

.vendor-stats {
  display: flex;
  flex-shrink: 0;
  gap: 28px;
  padding-bottom: 3px;
}

.vendor-stats b {
  display: block;
  color: var(--ink);
  font-size: 22px;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}

.vendor-stats span {
  color: var(--ink-4);
  font-size: 11.5px;
}

.vendor-body {
  padding: 22px 0 58px;
}

/* Search */
.vendor-search-shell {
  position: relative;
  z-index: 20;
  max-width: 760px;
}

.vendor-search {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 60px;
  padding: 0 12px 0 17px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transition: border-color .15s, box-shadow .15s;
}

.vendor-search:focus-within {
  border-color: var(--brand-400);
  box-shadow: 0 18px 46px -20px rgba(16, 34, 24, .32), 0 0 0 4px var(--brand-50);
}

.vendor-search-icon {
  width: 19px;
  height: 19px;
  flex: none;
  color: var(--ink-4);
}

#vendor-search {
  flex: 1;
  min-width: 0;
  height: 58px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 550;
}

#vendor-search::placeholder {
  color: var(--ink-4);
  font-weight: 450;
}

.vendor-clear {
  display: none;
  width: 27px;
  height: 27px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-4);
  font-size: 16px;
  line-height: 1;
}

.vendor-clear[hidden] { display: none !important; }
.vendor-clear.is-visible { display: grid !important; place-items: center; }
.vendor-clear:hover { color: var(--ink); background: var(--brand-50); }

.vendor-open {
  flex: none;
  white-space: nowrap;
}

/* Search results */
.vendor-search-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  display: none;
  max-height: 390px;
  overflow: auto;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.vendor-search-panel.is-open { display: block; }

.vendor-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 9px 8px;
  color: var(--ink-4);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.vendor-result {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  text-align: left;
}

.vendor-result:hover,
.vendor-result.is-active {
  background: var(--brand-50);
}

.vendor-result .vendor-logo {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  font-size: 10px;
}

.vendor-result-main {
  min-width: 0;
  flex: 1;
}

.vendor-result-name {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vendor-result-meta {
  display: block;
  overflow: hidden;
  margin-top: 1px;
  color: var(--ink-3);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vendor-result-enter { color: var(--ink-4); font-size: 12px; }

.vendor-no-result {
  padding: 24px 12px;
  color: var(--ink-3);
  font-size: 12.5px;
  text-align: center;
}

/* Quick chips */
.vendor-quick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  color: var(--ink-4);
  font-size: 11.5px;
}

.vendor-quick button {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 11.5px;
}

.vendor-quick button:hover {
  border-color: var(--brand-100);
  background: var(--brand-50);
  color: var(--brand-700);
}

/* Directory */
.vendor-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 34px 0 13px;
}

.vendor-section-head h2 {
  font-size: 17px;
  letter-spacing: -.025em;
}

.vendor-section-head p {
  margin-top: 3px;
  color: var(--ink-4);
  font-size: 11.5px;
}

.vendor-count {
  color: var(--ink-4);
  font-size: 11.5px;
  white-space: nowrap;
}

.vendor-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.vendor-tabs button {
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
}

.vendor-tabs button:hover { border-color: var(--brand-100); }

.vendor-tabs button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg-elevated);
}

.vendor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.vendor-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 74px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: transform .16s var(--ease), border-color .16s, box-shadow .16s;
}

.vendor-card[hidden] { display: none !important; }

.vendor-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-100);
  box-shadow: var(--shadow-md);
}

.vendor-logo {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 12px;
  object-fit: contain;
  background: var(--surface-2);
}

.vendor-logo-text {
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--vendor-logo, var(--brand-600));
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.vendor-card-main {
  min-width: 0;
  flex: 1;
}

.vendor-name {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 750;
  letter-spacing: -.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vendor-meta {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--ink-4);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vendor-verified {
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 9.5px;
  font-style: normal;
  font-weight: 600;
  vertical-align: 1px;
}

.vendor-verified.is-verified {
  background: var(--brand-50);
  color: var(--brand-700);
}

.vendor-card-go {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: none;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink-4);
}

.vendor-card-go svg { width: 13px; height: 13px; }
.vendor-card:hover .vendor-card-go { background: var(--brand-50); color: var(--brand-700); }

.vendor-empty[hidden] { display: none !important; }

.vendor-empty {
  padding: 38px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  color: var(--ink-3);
  text-align: center;
}

.vendor-empty strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 14px;
}

.vendor-empty span { font-size: 12px; }

.vendor-foot-note {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink-4);
  font-size: 10.5px;
}

@media (max-width: 900px) {
  .vendor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .vendor-hero-row { align-items: flex-start; flex-direction: column; gap: 12px; }
  .vendor-stats { gap: 20px; }
  .vendor-search { min-height: 56px; padding-left: 14px; }
  #vendor-search { height: 54px; font-size: 14px; }
  .vendor-open { display: none; }
  .vendor-grid { grid-template-columns: 1fr; }
  .vendor-section-head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .vendor-foot-note { flex-direction: column; gap: 5px; }
}
