/* ── Product Cards ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.product-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.product-card-inner {
  padding: 1.5rem;
  flex: 1;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.product-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .25rem;
}

.product-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brand);
}

.product-card-brand {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-brand);
  margin: 0;
}

.product-card-model {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  letter-spacing: -.03em;
  color: var(--color-fg);
  margin: 0;
}

.product-card-title {
  font-size: var(--text-sm);
  color: var(--color-fg-muted);
  margin: 0;
}

.product-card-desc {
  font-size: var(--text-sm);
  color: var(--color-fg-muted);
  line-height: var(--leading-relaxed);
  margin: 0;
  flex: 1;
}

.product-card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
  margin-top: .5rem;
}

.spec-pill span {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  font-family: var(--font-mono);
  padding: .2rem .5rem;
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-fg);
}

.product-card-actions {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: .5rem;
}

.product-card-actions .btn { flex: 1; justify-content: center; }

/* ── Category Filter Tabs ── */
.filter-tabs {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-tab {
  padding: .5rem 1rem;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  border: 1.5px solid var(--color-border);
  color: var(--color-fg-muted);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.filter-tab:hover,
.filter-tab.active {
  border-color: var(--color-brand);
  color: var(--color-brand);
  background: rgba(10,37,64,.05);
}

/* ── Spec Table (Product Detail) ── */
.spec-table-wrapper {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* ── Blog Article ── */
.article-body {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-fg-muted);
  max-width: 72ch;
}

.article-body h2 {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: var(--color-fg);
  margin: 2.5rem 0 1rem;
  letter-spacing: -.025em;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
}

.article-body h3 {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--color-fg);
  margin: 2rem 0 .75rem;
}

.article-body h4 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-fg);
  margin: 1.5rem 0 .5rem;
}

.article-body p { margin-bottom: 1.25rem; }

.article-body ul, .article-body ol {
  margin: 1rem 0 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.article-body li { color: var(--color-fg-muted); }
.article-body ul li { list-style: disc; }
.article-body ol li { list-style: decimal; }

.article-body strong { color: var(--color-fg); font-weight: var(--weight-semibold); }

.article-body a {
  color: var(--color-brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body blockquote {
  border-left: 4px solid var(--color-accent);
  padding: 1rem 1.5rem;
  background: var(--color-bg-muted);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.5rem 0;
  font-style: italic;
}

.article-body blockquote p { margin: 0; }

.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  margin: 1.5rem 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.article-body th {
  background: var(--color-brand);
  color: #fff;
  padding: .75rem 1rem;
  text-align: left;
  font-weight: var(--weight-semibold);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.article-body td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-fg-muted);
}

.article-body tr:last-child td { border-bottom: none; }
.article-body tr:nth-child(even) td { background: var(--color-bg-subtle); }

/* ── TOC ── */
.toc {
  background: #fff;
  border: 1.5px solid var(--color-border-strong);
  border-left: 4px solid var(--color-brand);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.toc strong {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  color: #0a0a0a;
  margin-bottom: .75rem;
}

.toc-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #0a0a0a;
  margin-bottom: 1rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  list-style: decimal;
}

.toc li,
.article-body .toc li {
  color: #1a1a1a;
  list-style: decimal;
}

.toc a,
.article-body .toc a {
  font-size: var(--text-sm);
  color: #1a1a1a;
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.toc a:hover,
.article-body .toc a:hover {
  color: var(--color-brand);
  text-decoration: underline;
}

/* ── FAQ ── */
.faq-list { display: flex; flex-direction: column; gap: 1rem; }

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-fg);
  cursor: pointer;
  background: var(--color-bg);
  text-align: left;
  gap: 1rem;
  transition: background var(--transition-fast);
}

.faq-question:hover { background: var(--color-bg-subtle); }

.faq-question svg {
  flex-shrink: 0;
  transition: transform var(--transition-base);
  color: var(--color-fg-subtle);
}

.faq-item.open .faq-question svg { transform: rotate(180deg); }

.faq-answer {
  display: none;
  padding: 0 1.5rem 1.25rem;
  font-size: var(--text-sm);
  color: var(--color-fg-muted);
  line-height: var(--leading-relaxed);
  background: var(--color-bg);
}

.faq-item.open .faq-answer { display: block; }

.faq-answer a { color: var(--color-brand); text-decoration: underline; }

@media (max-width: 768px) {
  .products-grid { grid-template-columns: 1fr; }
  .article-body h2 { font-size: var(--text-2xl); }
}
