/* === TablePress comparison tables === */

.tablepress-scroll-wrapper,
.article-content .tablepress-scroll-wrapper { overflow: visible; margin: 0; }

.article-content table.tablepress,
table.tablepress {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-size: .9rem;
  margin: 24px 0;
  background: var(--color-surface);
}

table.tablepress thead th {
  background: var(--color-text);
  color: #fff;
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 14px 16px;
  text-align: left;
  white-space: nowrap;
  border: none;
}
table.tablepress thead th:first-child { border-radius: var(--radius-lg) 0 0 0; }
table.tablepress thead th:last-child { border-radius: 0 var(--radius-lg) 0 0; text-align: center; }

table.tablepress tbody td {
  padding: 14px 16px;
  border-top: 1px solid var(--color-border);
  vertical-align: middle;
  border-bottom: none; border-left: none; border-right: none;
}
table.tablepress tbody tr:first-child td { border-top: none; }
table.tablepress tbody tr { transition: background var(--transition); }
table.tablepress tbody tr:hover { background: var(--color-muted); }
table.tablepress tbody td:first-child { font-weight: 600; }
table.tablepress tbody td:first-child a {
  color: var(--color-text); font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), color var(--transition);
}
table.tablepress tbody td:first-child a:hover { color: var(--color-accent); border-bottom-color: var(--color-accent); }
table.tablepress tbody td:last-child { text-align: center; font-weight: 700; }

.tb-score {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 32px; padding: 0 10px;
  border-radius: 20px; font-size: .85rem; font-weight: 700; color: #fff;
}
.tb-score--high { background: #16a34a; }
.tb-score--mid  { background: #d97706; }
.tb-score--low  { background: #dc2626; }

/* Table mobile cards */
@media (max-width: 680px) {
  table.tablepress thead { display: none; }
  table.tablepress, table.tablepress tbody, table.tablepress tr, table.tablepress td { display: block; width: 100%; }
  table.tablepress { border: none; background: transparent; }
  table.tablepress tbody tr {
    background: var(--color-surface); border: 1px solid var(--color-border);
    border-radius: var(--radius-lg); padding: 16px; margin-bottom: 12px;
    display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center;
  }
  table.tablepress tbody tr:hover { box-shadow: var(--shadow-md); }
  table.tablepress tbody td { border: none; padding: 2px 0; font-size: .875rem; }
  table.tablepress tbody td:first-child {
    width: 100%; font-size: 1rem; padding-bottom: 6px;
    border-bottom: 1px solid var(--color-border); margin-bottom: 6px;
  }
  table.tablepress tbody td:last-child { margin-left: auto; }
  table.tablepress tbody td::before {
    content: attr(data-label); display: inline; font-size: .75rem; font-weight: 500;
    color: var(--color-text-secondary); text-transform: uppercase;
    letter-spacing: .03em; margin-right: 6px;
  }
  table.tablepress tbody td:first-child::before { display: none; }
}


/* ============================================================
   PRODUCT CARDS — built by gear-tables.js
   ============================================================ */

.tb-product-card {
  border-top: 1px solid var(--color-border);
  padding: 36px 0;
}

.tb-product-card:first-child,
.article-content table + .tb-product-card,
.article-content .tablepress-scroll-wrapper + .tb-product-card {
  border-top: none;
  padding-top: 16px;
}

/* Header row — title + score */
.tb-product-card__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

/* Title */
.tb-product-card__title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.3;
}

/* Score badge next to title */
.tb-product-card__score {
  flex-shrink: 0;
}

/* Image */
.tb-product-card__image {
  text-align: center;
  margin-bottom: 24px;
}

.tb-product-card__image a {
  display: inline-block;
  text-decoration: none;
  border: none;
  outline: none;
}

.tb-product-card__image img {
  max-width: 300px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Specs + buy row */
.tb-product-card__info {
  margin-bottom: 24px;
}

/* Specs grid */
.tb-product-card__specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.tb-spec {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
}

.tb-spec:nth-child(2n) { border-right: none; }
.tb-spec:nth-last-child(1) { border-bottom: none; }
.tb-spec:nth-last-child(2):nth-child(odd) { border-bottom: none; }

.tb-spec__label {
  display: block;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--color-text-secondary);
  margin-bottom: 2px;
}

.tb-spec__value {
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-text);
}

@media (min-width: 768px) {
  .tb-product-card__specs {
    grid-template-columns: repeat(3, 1fr);
  }
  .tb-spec { border-right: 1px solid var(--color-border); }
  .tb-spec:nth-child(2n) { border-right: 1px solid var(--color-border); }
  .tb-spec:nth-child(3n) { border-right: none; }
  .tb-spec:nth-last-child(1),
  .tb-spec:nth-last-child(2),
  .tb-spec:nth-last-child(3) { border-bottom: none; }
}

/* Buy button */
.tb-product-card__buy {
  text-align: center;
}

.tb-buy-btn,
a.tb-buy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: #2563eb;
  color: #fff !important;
  font-size: .9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  transition: background var(--transition), transform var(--transition);
  text-decoration: none !important;
  white-space: nowrap;
}

a.tb-buy-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  color: #fff !important;
}

a.tb-buy-btn::after {
  content: "→";
  font-size: 1.1em;
}

/* Verdict text */
.tb-product-card__verdict p {
  font-size: .95rem;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 12px;
}

.tb-product-card__verdict p:last-child {
  margin-bottom: 0;
}

/* Extra content */
.tb-product-card__extra {
  margin-top: 16px;
}

.tb-product-card__extra p {
  margin-bottom: 12px;
  line-height: 1.65;
}

/* Mobile tweaks */
@media (max-width: 520px) {
  .tb-product-card__image img {
    max-width: 240px;
  }

  .tb-product-card__header {
    flex-wrap: wrap;
  }
}


/* === h2 section headings (How I Tested, FAQs) — not product cards === */
.article-content h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--color-text);
  margin: 48px 0 14px;
  padding: 0;
  border: none;
  background: none;
  letter-spacing: -.01em;
}

/* h4 fallback for any not caught by JS */
.article-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #111;
  margin: 20px 0 10px;
}

.article-content h4 strong { color: #111; font-weight: 700; }
