/* DatasheetHub Pro — category & manufacturer cards (homepage, /manufacturers, manufacturer pages).
   Uses the theme's tokens from datasheethub.css; no colours of its own beyond them. */

.dsh-homecards { display: grid; gap: 36px; }
.dsh-homecards__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dsh-homecards__title { margin: 0; font-size: clamp(19px, 2.2vw, 23px); font-weight: var(--dsh-h-weight, 700); color: var(--dsh-ink); }
.dsh-homecards__sub { margin: 4px 0 0; font-size: 13.5px; color: var(--dsh-muted); }
.dsh-homecards__more { font-size: 13px; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.dsh-homecards__more svg { width: 14px; height: 14px; }

/* ── Category cards ──────────────────────────────────────────── */
.dsh-catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.dsh-catcard { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px; background: var(--dsh-surface);
  border: 1px solid var(--dsh-line); border-radius: calc(var(--dsh-radius) + 4px); transition: border-color .15s, box-shadow .15s, transform .15s; }
.dsh-catcard:hover { border-color: color-mix(in srgb, var(--dsh-accent) 45%, var(--dsh-line)); box-shadow: 0 10px 24px -16px rgba(15, 23, 42, .35); transform: translateY(-1px); }
.dsh-catcard__top { display: flex; align-items: center; gap: 12px; }
.dsh-catcard__ico { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 10px; background: var(--dsh-tint); color: var(--dsh-accent); }
.dsh-catcard__ico svg { width: 21px; height: 21px; }
.dsh-catcard__name { margin: 0; font-size: 15px; font-weight: 650; line-height: 1.3; color: var(--dsh-ink); }
.dsh-catcard__name a { color: inherit; text-decoration: none; }
.dsh-catcard__name a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }   /* whole card clickable */
.dsh-catcard__count { display: block; margin-top: 2px; font-size: 12.5px; color: var(--dsh-muted); font-weight: 400; }
.dsh-catcard__parts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; position: relative; z-index: 1; }
.dsh-catcard__part { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; background: var(--dsh-line-2);
  font-family: var(--dsh-mono); font-size: 11.5px; font-weight: 600; color: var(--dsh-body); text-decoration: none; }
.dsh-catcard__part:hover { background: var(--dsh-tint); color: var(--dsh-accent); text-decoration: none; }

/* ── Manufacturer cards ──────────────────────────────────────── */
.dsh-mfrgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.dsh-mfrcard { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 18px 14px 16px;
  background: var(--dsh-surface); border: 1px solid var(--dsh-line); border-radius: calc(var(--dsh-radius) + 4px); color: var(--dsh-ink); text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s; }
.dsh-mfrcard:hover { text-decoration: none; border-color: color-mix(in srgb, var(--dsh-accent) 45%, var(--dsh-line)); box-shadow: 0 10px 24px -16px rgba(15, 23, 42, .35); transform: translateY(-1px); }
.dsh-mfrcard__logo { display: grid; place-items: center; width: 100%; height: 64px; }
.dsh-mfrcard__logo img { max-width: 140px; max-height: 56px; width: auto; height: auto; object-fit: contain; }
.dsh-mfrcard__mono { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; font-weight: 700; font-size: 18px; letter-spacing: .02em;
  color: var(--dsh-accent); background: linear-gradient(135deg, var(--dsh-tint), var(--dsh-tint-2)); }
.dsh-mfrcard__name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.dsh-mfrcard__count { font-size: 12px; color: var(--dsh-muted); margin-top: -6px; }
.dsh-mfrcard:hover .dsh-mfrcard__name { color: var(--dsh-accent); }

/* Directory page: an A–Z jump bar above the cards */
.dsh-az { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 18px; }
.dsh-az a, .dsh-az span { display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 6px; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--dsh-line); background: #fff; color: var(--dsh-body); text-decoration: none; }
.dsh-az a:hover { border-color: var(--dsh-accent); color: var(--dsh-accent); }
.dsh-az span { color: var(--dsh-faint); background: var(--dsh-line-2); border-color: transparent; }
.dsh-azgroup { scroll-margin-top: 90px; }
.dsh-azgroup + .dsh-azgroup { margin-top: 26px; }
.dsh-azgroup__letter { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--dsh-muted); }

/* Manufacturer page header: logo beside name */
.dsh-mfrhead { display: flex; align-items: center; gap: 16px; margin: 0 0 18px; padding: 16px; background: var(--dsh-surface); border: 1px solid var(--dsh-line);
  border-radius: calc(var(--dsh-radius) + 4px); }
.dsh-mfrhead__logo { display: grid; place-items: center; width: 120px; height: 64px; flex: none; }
.dsh-mfrhead__logo img { max-width: 120px; max-height: 60px; object-fit: contain; }
.dsh-mfrhead__facts { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--dsh-muted); }
.dsh-mfrhead__facts a { font-weight: 600; }
.dsh-mfrhead__facts span { display: inline-flex; align-items: center; gap: 6px; }
.dsh-mfrhead__facts svg { width: 15px; height: 15px; }

@media (max-width: 560px) {
  .dsh-catgrid { grid-template-columns: 1fr; }
  .dsh-mfrgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dsh-mfrhead { flex-direction: column; align-items: flex-start; }
}
