/* PartChin buying guide — page styles.
 * RTL comes from body{direction:rtl}, so everything here uses logical
 * properties; inset-inline-start maps to `right`, which is what we want. */

/* ---------------- hero ---------------- */
.pc-hero { margin-bottom: 18px; }
.pc-hero-title { font-size: 26px; line-height: 1.5; margin-bottom: 10px; }
.pc-hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  color: var(--muted); font-size: 13.5px; margin-bottom: 14px;
}
.pc-hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.pc-hero-meta .svg { width: 15px; height: 15px; color: var(--brand); }
.pc-hero-lede {
  font-size: 16px; font-weight: 600; color: var(--text); line-height: 2;
  background: var(--brand-tint); padding: 16px 20px; border-radius: 12px; margin: 0;
}
@media (max-width: 760px) { .pc-hero-title { font-size: 21px; } }

/* ---------------- contents ----------------
   One collapsible strip, not a sidebar: the two-column layout squeezed the
   tables and gave the page a second thing to read before the content. */
.pc-toc { margin: 0 0 24px; }
.pc-toc-toggle {
  display: inline-flex; align-items: center; gap: 9px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 18px; font: inherit; font-weight: 700; font-size: 13.5px;
  color: var(--text); cursor: pointer;
}
.pc-toc-toggle:hover { border-color: var(--brand); color: var(--brand); }
.pc-toc-toggle .svg { width: 16px; height: 16px; color: var(--brand); }
.pc-toc-toggle::after { content: "▾"; color: var(--muted); font-size: 11px; }
.pc-toc-toggle[aria-expanded="true"]::after { content: "▴"; }

.pc-toc-list {
  list-style: none; margin: 12px 0 0; padding: 16px 20px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  columns: 2; column-gap: 30px;
}
.pc-toc-list[hidden] { display: none; }
/* no JS: the toggle never fires, so show the list rather than hiding it forever */
.no-js .pc-toc-list[hidden] { display: block; }
.no-js .pc-toc-toggle { display: none; }
.pc-toc-list li { margin-bottom: 9px; break-inside: avoid; }
.pc-toc-link { color: #374151; font-size: 13.5px; font-weight: 600; text-decoration: none; }
.pc-toc-link:hover { color: var(--brand); }
@media (max-width: 700px) { .pc-toc-list { columns: 1; } }

/* anchor targets must clear the sticky header */
[data-guide-section], .pc-guide-main h2[id], .pc-guide-main h3[id] {
  scroll-margin-top: calc(var(--header-h, 64px) + 22px);
}
body.admin-bar [data-guide-section] { scroll-margin-top: calc(var(--header-h, 64px) + 54px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------------- sections ---------------- */
.pc-guide-main > section { margin: 34px 0; }
.pc-guide-main > section > h2 { font-size: 21px; margin-bottom: 14px; }
.pc-guide-main > section > h3 { font-size: 16px; margin: 20px 0 10px; }

/* heading with a leading icon */
.pc-h { display: flex; align-items: center; gap: 11px; }
.pc-h .svg {
  width: 34px; height: 34px; flex-shrink: 0; padding: 7px;
  border-radius: 10px; background: var(--brand-tint); color: var(--brand);
}

/* ---------------- badges, price, CTA ---------------- */
.pc-badge {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: var(--bg); color: var(--text);
}
.pc-badge.is-gold { background: #fef3c7; color: #92400e; }
.pc-badge.is-green { background: #dcfce7; color: #166534; }
.pc-badge.is-brand { background: var(--brand-tint); color: var(--brand); }

.pc-price .price-now { font-weight: 800; font-size: 15px; white-space: nowrap; }
.pc-price .price-old { text-decoration: line-through; color: var(--muted); font-size: 12.5px; }
.pc-price .cur { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.pc-oos { color: var(--muted); font-size: 12.5px; font-weight: 700; }

/* The buy button is the shared .pc-atc component (styles.css). These two rules
 * only exist because it sits inside .page-prose and .pc-ctable, both of which
 * recolour every link they contain — without them the label comes out the same
 * colour as the button. */
.pc-guide-main .pc-atc--full, .pc-guide-main .pc-atc--full:hover { color: #fff; }
.pc-guide-main .pc-atc--full.is-view, .pc-guide-main .pc-atc--icon { color: var(--brand); }
.pc-guide-main .pc-atc.added, .pc-guide-main .pc-atc.added:hover { color: #fff; }
.pc-guide-main .pc-atc--icon.added { color: #16a34a; }

/* ---------------- quick verdict ---------------- */
.pc-verdict-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pc-verdict-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 9px;
}
.pc-verdict-media {
  display: grid; place-items: center; height: 150px; margin: 2px 0 4px;
}
.pc-verdict-media img, .pc-verdict-media svg {
  max-width: 100%; max-height: 150px; width: auto; height: auto; object-fit: contain;
}
.pc-verdict-name { font-weight: 700; font-size: 14.5px; line-height: 1.8; color: var(--text); text-decoration: none; }
.pc-verdict-name:hover { color: var(--brand); }
.pc-verdict-for { color: var(--muted); font-size: 13px; margin: 0; }
.pc-verdict-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line);
}
@media (max-width: 860px) { .pc-verdict-grid { grid-template-columns: 1fr; } }

/* ---------------- comparison table ---------------- */
.pc-ctable-wrap {
  position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: var(--r); background: #fff;
}
.pc-ctable { width: 100%; min-width: 880px; border-collapse: collapse; }
.pc-ctable th, .pc-ctable td {
  border-bottom: 1px solid var(--line); padding: 11px 14px;
  font-size: 13.5px; text-align: start; vertical-align: middle;
}
.pc-ctable thead th { background: var(--bg); font-weight: 700; white-space: nowrap; }
.pc-ctable tbody tr:last-child th, .pc-ctable tbody tr:last-child td { border-bottom: 0; }
.pc-ctable tbody tr:hover { background: #fafbfc; }
.pc-ctable a { color: var(--text); font-weight: 600; text-decoration: none; }
.pc-ctable a:hover { color: var(--brand); }

/* first column pinned; inset-inline-start resolves to `right` under RTL */
.pc-ctable th:first-child, .pc-ctable td:first-child {
  position: sticky; inset-inline-start: 0; z-index: 2;
  background: #fff; min-width: 210px;
}
.pc-ctable thead th:first-child { background: var(--bg); z-index: 3; }
.pc-ctable tbody tr:hover th:first-child { background: #fafbfc; }
/* separator that flips with the writing direction */
.pc-ctable th:first-child::after, .pc-ctable td:first-child::after {
  content: ""; position: absolute; top: 0; bottom: 0;
  inset-inline-end: 0; width: 1px; background: var(--line);
}

.pc-ctable-wrap.is-scrollable::before {
  content: ""; position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: 26px;
  background: linear-gradient(to left, rgba(0,0,0,.06), transparent);
  pointer-events: none; z-index: 4;
}
.pc-ctable-wrap.is-end::before { display: none; }
.pc-ctable-hint { color: var(--muted); font-size: 12.5px; margin: 8px 2px 0; }
@media (min-width: 1024px) { .pc-ctable-hint { display: none; } }

.pc-fit-table { min-width: 820px; }

/* ---------------- item cards ---------------- */
.pc-gitem {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px 20px; margin-bottom: 16px;
}
.pc-gitem-title { font-size: 17px; line-height: 1.7; margin-bottom: 14px; }
.pc-gitem-title a { color: var(--text); text-decoration: none; }
.pc-gitem-title a:hover { color: var(--brand); }

.pc-gitem-grid { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.pc-gitem-media { position: relative; text-align: center; }
.pc-gitem-media img, .pc-gitem-media svg { max-width: 100%; height: auto; border-radius: 10px; }
.pc-gitem-media .pc-badge { position: absolute; top: 8px; inset-inline-start: 8px; }
.pc-score { margin-top: 10px; }
.pc-score b { display: block; font-size: 22px; color: var(--brand); line-height: 1.2; }
.pc-score span { font-size: 11.5px; color: var(--muted); }

.pc-gitem-verdict { line-height: 2; color: #374151; font-size: 14px; margin: 0 0 14px; }
.pc-gitem-specs { width: 100%; margin-bottom: 14px; }
.pc-gitem-fit { font-size: 13px; margin-bottom: 14px; line-height: 2.2; }
.pc-chip {
  display: inline-block; background: var(--bg); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 11px; font-size: 12.5px;
  color: var(--text); text-decoration: none; margin-inline-end: 5px;
}
.pc-chip:hover { border-color: var(--brand); color: var(--brand); }

.pc-proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.pc-pros, .pc-cons { border-radius: 10px; padding: 12px 16px; font-size: 13.5px; }
.pc-pros { background: #f0fdf4; }
.pc-cons { background: #fef2f2; }
.pc-pros b, .pc-cons b { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.pc-pros b .svg, .pc-cons b .svg { width: 16px; height: 16px; }
.pc-pros b { color: #166534; }
.pc-cons b { color: #991b1b; }
.pc-pros ul, .pc-cons ul { margin: 0; padding-inline-start: 18px; }
.pc-pros li, .pc-cons li { margin-bottom: 5px; line-height: 1.9; }

.pc-gitem-foot {
  display: flex; align-items: center; gap: 14px;
  padding-top: 14px; border-top: 1px solid var(--line);
}
.pc-gitem-foot .pc-atc-wrap { margin-inline-start: auto; }

@media (max-width: 760px) {
  .pc-gitem-grid { grid-template-columns: 1fr; }
  .pc-gitem-media { max-width: 200px; margin-inline: auto; }
  .pc-proscons { grid-template-columns: 1fr; }
  .pc-gitem-foot { flex-wrap: wrap; }
  .pc-gitem-foot .pc-atc-wrap { margin-inline-start: 0; width: 100%; }
  .pc-gitem-foot .pc-atc--full { flex: 1; }
}

/* ---------------- FAQ ---------------- */
.pc-faq-item {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 4px 16px; margin-bottom: 10px; background: #fff;
}
.pc-faq-item summary {
  cursor: pointer; font-weight: 700; padding: 13px 0; color: var(--text); list-style: none;
}
.pc-faq-item summary::-webkit-details-marker { display: none; }
.pc-faq-item summary::before { content: "+ "; color: var(--brand); font-weight: 900; }
.pc-faq-item[open] summary::before { content: "− "; }
.pc-faq-item > div { padding-bottom: 12px; line-height: 2; color: #374151; font-size: 14px; }
.pc-faq-item p { margin: 0 0 10px; }
.pc-faq-item p:last-child { margin-bottom: 0; }

/* ---------------- conclusion ---------------- */
.pc-conclusion p { line-height: 2; color: #374151; font-size: 14.5px; }
/* The theme's product grid is five across and assumes a full-width container.
 * Inside this page's narrower main column it would push the whole page sideways. */
.pc-conclusion-row .prod-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .pc-conclusion-row .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pc-related { margin: 0 0 18px; padding-inline-start: 20px; }
.pc-related li { margin-bottom: 7px; line-height: 2; }
.pc-related a { color: var(--brand); font-weight: 600; }

/* prose written in the editor keeps the existing .page-prose rules */
.pc-guide-prose > :first-child { margin-top: 0; }


/* ---------------- guide archive (/compare/) ---------------- */
.pc-guide-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.pc-guide-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column;
}
.pc-guide-card-media {
  display: grid; place-items: center; aspect-ratio: 16/9;
  background: var(--bg); color: var(--brand);
}
.pc-guide-card-media img { width: 100%; height: 100%; object-fit: cover; }
.pc-guide-card-media .svg { width: 54px; height: 54px; }
.pc-guide-card-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pc-guide-card-title { font-weight: 800; font-size: 15px; line-height: 1.8; color: var(--text); text-decoration: none; }
.pc-guide-card-title:hover { color: var(--brand); }
.pc-guide-card-body p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.9; }
.pc-guide-card-meta {
  display: flex; gap: 14px; margin-top: auto; padding-top: 10px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px;
}
@media (max-width: 980px) { .pc-guide-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .pc-guide-cards { grid-template-columns: 1fr; } }
