/* ============================================
   Shared Components
   Cards, badges, buttons, scores, pros-cons, tables
   ============================================ */

/* --- Badges --- */
.badge {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 3px;
  display: inline-block;
}

.badge-review    { background: rgba(255,107,0,0.2); color: var(--blue-bright); }
.badge-guide     { background: rgba(255,184,0,0.2); color: var(--cyan); }
.badge-compare   { background: rgba(192,57,43,0.25); color: #E07070; }
.badge-budget    { background: rgba(200,140,0,0.25); color: #E0B840; }
.badge-news      { background: rgba(255,184,0,0.2); color: var(--cyan); }
.badge-roundup   { background: rgba(0,204,119,0.15); color: var(--green); }
.badge-verdict   { background: rgba(34,197,94,0.15); color: var(--green); }
.badge-editor    { background: rgba(255,215,0,0.15); color: var(--gold); }
.badge-new       { background: rgba(255,184,0,0.15); color: var(--cyan); }

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--blue-mid), var(--blue-glow));
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: transform var(--dur-fast), box-shadow var(--dur-fast);
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255,107,0,0.4);
  color: #fff;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 6px;
  background: transparent;
  color: var(--chrome-white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid var(--panel-border);
  cursor: pointer;
  transition: border-color var(--dur-fast), color var(--dur-fast);
  text-decoration: none;
}

.btn-secondary:hover {
  border-color: var(--blue-glow);
  color: var(--blue-bright);
}

/* --- Article Cards --- */
.article-card {
  background: var(--bg-panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--dur-fast), transform var(--dur-fast), box-shadow var(--dur-fast);
  text-decoration: none;
  color: inherit;
}

.article-card:hover {
  border-color: rgba(255,136,0,0.5);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(255,107,0,0.18);
}

.card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(40,20,0,0.7), rgba(30,15,0,0.5));
  border-bottom: 1px solid var(--panel-border);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-muted);
}

.card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,136,0,0.06) 100%);
}

/* Brand-tinted thumbnails */
.thumb-bambulab  { background: linear-gradient(135deg, #1A1500, #2A2000); }
.thumb-creality  { background: linear-gradient(135deg, #001A20, #002030); }
.thumb-elegoo    { background: linear-gradient(135deg, #0A0020, #1A0040); }
.thumb-anycubic  { background: linear-gradient(135deg, #1A0A00, #2A1500); }

.card-badge-row {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  gap: 6px;
}

.card-score-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(20,12,4,0.85);
  border: 1px solid rgba(255,136,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  color: var(--blue-bright);
}

.card-body {
  padding: 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-meta {
  font-size: 11px;
  color: var(--chrome-silver);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.card-meta-dot { color: var(--text-muted); }

.card-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.25;
  color: var(--chrome-white);
  transition: color var(--dur-fast);
}

.article-card:hover .card-title { color: var(--blue-bright); }

.card-excerpt {
  font-size: 13px;
  color: var(--chrome-silver);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(255,136,0,0.1);
  margin-top: auto;
}

.card-read-more {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  color: var(--blue-glow);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-read-more svg {
  width: 14px;
  height: 14px;
  transition: transform var(--dur-fast);
}

.article-card:hover .card-read-more svg { transform: translateX(3px); }

.card-read-time {
  font-size: 11px;
  color: var(--chrome-silver);
}

/* Featured card variant */
.article-card.featured {
  grid-column: span 2;
  flex-direction: row;
}

.article-card.featured .card-thumb {
  width: 320px;
  flex-shrink: 0;
  aspect-ratio: auto;
  border-bottom: none;
  border-right: 1px solid var(--panel-border);
}

.article-card.featured .card-title { font-size: 22px; }

/* --- Score Banner --- */
.score-banner {
  background: var(--bg-panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  padding: 24px 28px;
  align-items: center;
  margin: 24px 0;
}

.score-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: conic-gradient(var(--blue-glow) calc(var(--score-deg, 324) * 1deg), rgba(30,15,5,0.5) 0);
}

.score-circle::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--bg-deep);
}

.score-number {
  position: relative;
  z-index: 1;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 28px;
  color: var(--blue-bright);
}

.score-breakdown {
  display: grid;
  gap: 8px;
}

.score-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.score-label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 12px;
  color: var(--chrome-silver);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 100px;
}

.score-bar-track {
  flex: 1;
  height: 4px;
  background: rgba(255,136,0,0.12);
  border-radius: 2px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue-mid), var(--blue-bright));
  transition: width 0.6s ease;
}

.score-val {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  color: var(--blue-bright);
  width: 32px;
  text-align: right;
}

.score-verdict {
  text-align: center;
}

.score-verdict-label {
  font-size: 10px;
  color: var(--chrome-silver);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.score-verdict-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  color: var(--green);
}

/* --- Pros / Cons --- */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}

.pros-box, .cons-box {
  background: var(--bg-panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 20px;
}

.pros-box { border-top: 3px solid var(--pros-border); }
.cons-box { border-top: 3px solid var(--cons-border); }

.pros-cons-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.pros-box .pros-cons-title { color: var(--pros-text); }
.cons-box .pros-cons-title { color: var(--cons-text); }

.pros-box ul, .cons-box ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pros-box li, .cons-box li {
  font-size: 14px;
  color: var(--text-body);
  padding-left: 20px;
  position: relative;
}

.pros-box li::before { content: '+'; position: absolute; left: 0; color: var(--pros-text); font-weight: 700; }
.cons-box li::before { content: '-'; position: absolute; left: 2px; color: var(--cons-text); font-weight: 700; }

/* --- Verdict Box --- */
.verdict-box {
  background: linear-gradient(135deg, rgba(60,30,0,0.4), rgba(40,15,0,0.3));
  border-left: 4px solid var(--blue-glow);
  border-radius: 8px;
  padding: 24px 28px;
  margin: 32px 0;
}

.verdict-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--blue-bright);
  margin-bottom: 8px;
}

.verdict-text {
  font-size: 16px;
  color: var(--text-body);
  line-height: 1.6;
}

/* --- Specs Table --- */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.specs-table th {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--chrome-silver);
  background: rgba(40,20,0,0.4);
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--panel-border);
}

.specs-table td {
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-body);
  border-bottom: 1px solid rgba(255,136,0,0.1);
}

.specs-table tr:nth-child(odd) td {
  background: rgba(25,15,5,0.25);
}

/* --- Sidebar --- */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: calc(var(--nav-height) + 16px);
  align-self: start;
}

.sidebar-panel {
  background: var(--bg-panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 20px;
}

.sidebar-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--chrome-silver);
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

/* TOC */
.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-list a {
  display: block;
  padding: 5px 8px;
  font-size: 13px;
  color: var(--chrome-silver);
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast);
}

.toc-list a:hover,
.toc-list a.active {
  background: rgba(255,136,0,0.08);
  border-left-color: var(--blue-glow);
  color: var(--blue-bright);
}

.toc-list a.toc-h3 { padding-left: 20px; font-size: 12px; }

/* Buy buttons */
.buy-btn-link {
  display: block;
  width: 100%;
  padding: 11px 16px;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  text-decoration: none;
  margin-bottom: 8px;
  transition: transform var(--dur-fast), box-shadow var(--dur-fast);
}

.buy-btn-link.primary {
  background: linear-gradient(135deg, var(--blue-mid), var(--blue-glow));
  color: #fff;
}

.buy-btn-link.secondary {
  background: transparent;
  color: var(--chrome-white);
  border: 1px solid var(--panel-border);
}

.buy-btn-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255,107,0,0.3);
  color: #fff;
}

.buy-price {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

/* Related items */
.related-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,136,0,0.1);
  text-decoration: none;
}

.related-item:last-child { border-bottom: none; }

.related-thumb {
  width: 52px;
  height: 38px;
  background: var(--bg-panel);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  flex-shrink: 0;
}

.related-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  color: var(--chrome-white);
  line-height: 1.3;
}

.related-meta {
  font-size: 11px;
  color: var(--text-muted);
}

/* --- FPS Chips (from V3) --- */
.fps-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

.fps-good { background: rgba(68,255,136,0.15); color: var(--green-bright); }
.fps-ok   { background: rgba(255,215,0,0.15); color: var(--gold); }
.fps-bad  { background: rgba(255,68,68,0.15); color: var(--red-bright); }

/* --- Responsive --- */
@media (max-width: 900px) {
  .pros-cons { grid-template-columns: 1fr; }
  .score-banner { grid-template-columns: auto 1fr; }
  .score-verdict { display: none; }
  .sidebar { display: none; }
  .article-card.featured { grid-column: span 1; flex-direction: column; }
  .article-card.featured .card-thumb { width: 100%; aspect-ratio: 16/9; border-right: none; }
}
