/* ============================================================
   AccesoriosEV — components.css
   Reusable UI: cards, rating bars, tables, FAQ, disclaimers.
   ============================================================ */

/* ---------- Category badge ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-blue { background: var(--accent-soft); color: var(--accent-dark); }
.badge-green { background: var(--green-soft); color: #0f7a52; }

/* ---------- Article card ---------- */
.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.article-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.article-card .thumb {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #1d5aa3, #2a78d6 55%, #1baf7a);
  position: relative;
}
.article-card .thumb.thumb-alt-1 { background: linear-gradient(135deg, #0b0b0b, #2a78d6); }
.article-card .thumb.thumb-alt-2 { background: linear-gradient(135deg, #1baf7a, #2a78d6); }
.article-card .thumb .badge { position: absolute; top: 14px; left: 14px; }
.article-card .body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.article-card h3 { margin-bottom: 8px; }
.article-card p { font-size: 0.93rem; margin-bottom: 16px; }
.article-card .read-more { margin-top: auto; font-weight: 700; color: var(--accent-dark); font-size: 0.92rem; }

/* ---------- Product card ---------- */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.product-card .thumb {
  aspect-ratio: 1/1;
  border-radius: var(--radius-sm);
  background: linear-gradient(150deg, var(--accent-soft), #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.product-card .thumb svg { width: 46%; height: 46%; color: var(--accent); opacity: 0.85; }
.product-card h4 { font-size: 1.02rem; margin: 0; font-weight: 800; }
.product-card .price { font-size: 1.1rem; font-weight: 800; color: var(--ink); }
.product-card .price span { font-size: 0.78rem; color: var(--muted); font-weight: 500; }

/* ---------- Rating bar (1-10) ---------- */
.rating {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rating-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-alt);
  overflow: hidden;
}
.rating-fill {
  height: 100%;
  border-radius: 999px;
  width: 0%;
  transition: width 1s var(--ease);
  background: var(--accent);
}
.rating-fill.is-visible { width: var(--fill, 0%); }
.rating-fill.tone-green { background: var(--green); }
.rating-fill.tone-yellow { background: var(--yellow); }
.rating-fill.tone-red { background: var(--red); }
.rating-score {
  font-weight: 800;
  font-size: 0.92rem;
  min-width: 34px;
  text-align: right;
}
.rating-score.tone-green { color: #0f7a52; }
.rating-score.tone-yellow { color: #96700a; }
.rating-score.tone-red { color: #a8302e; }

/* ---------- Comparison table ---------- */
.compare-wrap {
  overflow-x: auto;
  overflow-y: visible;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
}
table.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
.compare-table th,
.compare-table td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.94rem;
}
.compare-table thead th {
  background: var(--surface-alt);
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table tbody tr.is-best { background: var(--green-soft); }
.compare-table td.product-name { font-weight: 700; }
.compare-table td.product-name small { display: block; font-weight: 500; color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
.compare-table .cell-rating { min-width: 130px; }

@media (max-width: 720px) {
  .compare-wrap { border: none; background: none; overflow: visible; }
  table.compare-table, .compare-table thead, .compare-table tbody, .compare-table th, .compare-table td, .compare-table tr {
    display: block;
    min-width: 0;
  }
  .compare-table thead { display: none; }
  .compare-table tr {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    padding: 6px 4px;
  }
  .compare-table tr.is-best { border-color: var(--green); }
  .compare-table td {
    border-bottom: 1px dashed var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
  }
  .compare-table td:last-child { border-bottom: none; }
  .compare-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
  }
  .compare-table td.product-name { justify-content: flex-start; flex-direction: column; align-items: flex-start; gap: 2px; }
  .compare-table td.product-name::before { display: none; }
}

/* ---------- Ribbon for best pick ---------- */
.best-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
}

/* ---------- FAQ accordion ---------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  background: none;
  border: none;
  text-align: left;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}
.faq-question .icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}
.faq-item.is-open .faq-question .icon { transform: rotate(45deg); background: var(--accent); color: #fff; }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s var(--ease);
}
.faq-answer-inner { padding: 0 22px 20px; }
.faq-answer-inner p { margin: 0; font-size: 0.95rem; }

/* ---------- Affiliate disclaimer ---------- */
.disclaimer {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--accent-soft);
  border: 1px solid rgba(42, 120, 214, 0.25);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin: 24px 0;
  font-size: 0.86rem;
  color: #234b78;
}
.disclaimer svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; color: var(--accent-dark); }
.disclaimer p { margin: 0; color: #234b78; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--muted); transition: color 0.2s var(--ease); }
.breadcrumb a:hover { color: var(--accent-dark); }
.breadcrumb .sep { opacity: 0.5; }
.breadcrumb .current { color: var(--ink); font-weight: 600; }

/* ---------- Pros / cons ---------- */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}
.pros-cons > div {
  border-radius: var(--radius-md);
  padding: 18px 20px;
  border: 1px solid var(--border);
}
.pros-cons .pros { background: var(--green-soft); border-color: rgba(27,175,122,0.3); }
.pros-cons .cons { background: #fbecec; border-color: rgba(227,73,72,0.25); }
.pros-cons h4 { margin-bottom: 10px; font-size: 0.95rem; }
.pros-cons ul li { position: relative; padding-left: 22px; margin-bottom: 8px; font-size: 0.92rem; color: var(--ink-soft); }
.pros-cons .pros li::before { content: "✓"; position: absolute; left: 0; color: #0f7a52; font-weight: 800; }
.pros-cons .cons li::before { content: "✕"; position: absolute; left: 0; color: #a8302e; font-weight: 800; }
@media (max-width: 620px) { .pros-cons { grid-template-columns: 1fr; } }

/* ---------- Guide factor list ---------- */
.factor-list { display: flex; flex-direction: column; gap: 18px; margin: 24px 0; }
.factor-item { display: flex; gap: 16px; }
.factor-num {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
}
.factor-item h4 { margin-bottom: 4px; }
.factor-item p { margin: 0; font-size: 0.93rem; }

/* ---------- Simple 2-col comparison (wallbox vs schuko) ---------- */
.simple-compare {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}
.simple-compare th, .simple-compare td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  text-align: left;
}
.simple-compare thead th { background: var(--surface-alt); }
.simple-compare tbody tr:last-child td { border-bottom: none; }
.simple-compare tbody tr:nth-child(even) { background: rgba(0,0,0,0.015); }
