/* PowerRef — Global Styles
   Design reference: AllAboutCircuits + Octopart
   White background, blue accent (#005fa3), data-dense, utilitarian */

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  margin: 0;
  background: #fff;
  color: #222;
  font-size: 14px;
  line-height: 1.6;
}

/* ── Top bar ── */
.top-bar {
  background: #fff;
  border-bottom: 3px solid #005fa3;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  height: 52px;
  gap: 2rem;
}
.logo {
  color: #005fa3;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.logo span { color: #222; }
nav { display: flex; align-items: center; gap: 0; }
nav a {
  color: #555;
  font-size: 0.82rem;
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  font-weight: 500;
}
nav a:hover { color: #005fa3; }

/* ── Page container ── */
.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ── Typography ── */
.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #222;
  margin: 0 0 0.25rem;
}
.page-subtitle {
  color: #777;
  font-size: 0.85rem;
  margin: 0 0 2rem;
}

/* ── Section heads ── */
.section { margin-bottom: 2.5rem; }
.section-head {
  font-size: 0.92rem;
  font-weight: 700;
  color: #005fa3;
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e0e0e0;
}

/* ── Tabular listing ── */
.parts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.parts-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid #e0e0e0;
  background: #fafafa;
}
.parts-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #f0f0f0;
}
.parts-table tr:hover td { background: #f7f9fc; }
.parts-table a { color: #005fa3; text-decoration: none; font-weight: 600; }
.parts-table a:hover { text-decoration: underline; }
.parts-table .type-label { font-size: 0.72rem; color: #999; }
.parts-table .spec-count { font-size: 0.78rem; color: #999; }

/* ── Newsletter bar ── */
.newsletter-bar {
  margin-top: 1rem;
  padding: 1rem 0;
  border-top: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.newsletter-bar label { font-size: 0.82rem; color: #555; font-weight: 500; }
.newsletter-bar form { display: flex; gap: 0.4rem; }
.newsletter-bar input[type=email] {
  padding: 0.4rem 0.65rem;
  border: 1px solid #d0d0d0;
  border-radius: 3px;
  font-size: 0.82rem;
  width: 210px;
  font-family: inherit;
}
.newsletter-bar input[type=email]:focus { outline: none; border-color: #005fa3; }
.newsletter-bar button {
  background: #005fa3;
  color: #fff;
  border: none;
  padding: 0.4rem 0.9rem;
  border-radius: 3px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.newsletter-bar button:hover { background: #004a82; }

/* ── Footer ── */
footer {
  border-top: 1px solid #e0e0e0;
  padding: 1.25rem 1.5rem;
  text-align: center;
  font-size: 0.72rem;
  color: #aaa;
}
footer a { color: #888; text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer p { margin: 0.4rem 0 0; }

/* ── Two-column layout (component pages) ── */
.page-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 820px) {
  .page-body { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
}

/* ── Part hero (component pages) ── */
.part-hero {
  background: #fafafa;
  border-bottom: 1px solid #e0e0e0;
  padding: 1.25rem 1.5rem;
}
.part-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.part-hero h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #222;
  margin: 0;
}
.part-hero .meta {
  font-size: 0.78rem;
  color: #888;
  margin-top: 0.2rem;
}
.buy-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #00875a;
  color: #fff;
  text-decoration: none;
  padding: 0.45rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.82rem;
  white-space: nowrap;
}
.buy-link:hover { background: #006e49; }
.buy-link--newark { background: #c8401a; }
.buy-link--newark:hover { background: #a33316; }

/* ── Part photo ── */
.part-photo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 4px;
  flex-shrink: 0;
}

/* ── Content area ── */
.main-content { min-width: 0; }

/* ── Spec table ── */
.main-content table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin-bottom: 1.5rem; }
.main-content th {
  text-align: left;
  padding: 0.45rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid #e0e0e0;
  background: #fafafa;
}
.main-content td {
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
}
.main-content td:first-child { color: #555; }
.main-content td:nth-child(2) { font-weight: 600; color: #222; }
.main-content tr:last-child td { border-bottom: none; }
.main-content table a { color: #005fa3; font-size: 0.75rem; text-decoration: none; }
.main-content table a:hover { text-decoration: underline; }

/* ── Prose ── */
.main-content h2 {
  font-size: 1rem;
  font-weight: 700;
  color: #005fa3;
  margin: 2rem 0 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #e0e0e0;
}
.main-content h2:first-child { margin-top: 0; }
.main-content h3 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #222;
  margin: 1.5rem 0 0.5rem;
}
.main-content p { margin: 0.5rem 0; color: #333; }
.main-content ul, .main-content ol { padding-left: 1.4rem; }
.main-content li { margin-bottom: 0.35rem; color: #333; }
.main-content strong { color: #222; }
.main-content code {
  background: #f5f5f5;
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-size: 0.85em;
}
.main-content pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.85em;
}
.main-content pre code { background: none; padding: 0; color: inherit; }

/* ── Sidebar ── */
.sidebar { position: sticky; top: 1rem; }
.sidebar-section {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f0f0f0;
}
.sidebar-section:last-child { border-bottom: none; }
.sidebar-section h3 {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #aaa;
  margin: 0 0 0.5rem;
}

/* Sidebar distributor links */
.dist-link {
  display: block;
  padding: 0.4rem 0;
  color: #005fa3;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
}
.dist-link:hover { text-decoration: underline; }
.dist-link--newark { color: #c8401a; }
.dist-note { font-size: 0.68rem; color: #bbb; margin: 0.3rem 0 0; }

/* TOC links */
.toc-links { list-style: none; padding: 0; margin: 0; }
.toc-links li { margin-bottom: 0.15rem; }
.toc-links a {
  color: #555;
  text-decoration: none;
  font-size: 0.78rem;
  display: block;
  padding: 0.2rem 0;
}
.toc-links a:hover { color: #005fa3; }

/* Sidebar newsletter */
.sidebar-newsletter input[type=email] {
  display: block;
  width: 100%;
  padding: 0.4rem 0.5rem;
  border: 1px solid #d0d0d0;
  border-radius: 3px;
  font-size: 0.8rem;
  font-family: inherit;
  margin-bottom: 0.35rem;
}
.sidebar-newsletter input[type=email]:focus { outline: none; border-color: #005fa3; }
.sidebar-newsletter button {
  display: block;
  width: 100%;
  background: #005fa3;
  color: #fff;
  border: none;
  padding: 0.4rem;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.sidebar-newsletter button:hover { background: #004a82; }
.sidebar-newsletter p { font-size: 0.72rem; color: #bbb; margin: 0.3rem 0 0; }

/* ── Breadcrumb (components listing page) ── */
.breadcrumb {
  font-size: 0.75rem;
  color: #999;
  margin-bottom: 0.75rem;
}
.breadcrumb a { color: #888; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ── Breadcrumb bar (component detail pages) ── */
.breadcrumb-bar {
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
  padding: 0.5rem 1.5rem;
}
.breadcrumb-inner {
  max-width: 1100px;
  margin: 0 auto;
  font-size: 0.72rem;
  color: #bbb;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.breadcrumb-inner a { color: #888; text-decoration: none; }
.breadcrumb-inner a:hover { color: #005fa3; text-decoration: underline; }
.breadcrumb-inner span:last-child { color: #999; }
.bc-sep { color: #ccc; }

/* ── Meta badges (component hero) ── */
.meta-badge {
  display: inline-block;
  background: #f0f4f8;
  border: 1px solid #dce5ee;
  border-radius: 3px;
  padding: 0.1em 0.45em;
  font-size: 0.7rem;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.4rem;
}
.meta-specs { font-size: 0.78rem; color: #888; }
.meta-specs--none { color: #bbb; font-style: italic; }

/* ── Filter tabs ── */
.filter-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 1.5rem;
}
.filter-tab {
  padding: 0.6rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  font-family: inherit;
}
.filter-tab:hover { color: #222; }
.filter-tab.active { color: #005fa3; border-bottom-color: #005fa3; }
