/* Comparador interactivo (page-comparador.php) — se carga solo en esa plantilla */

.rc-comp-selectors { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 12px; }
.rc-comp-select-wrap { display: flex; align-items: center; gap: 6px; flex: 1 1 220px; max-width: 320px; min-width: 0; }
.rc-comp-select {
  flex: 1;
  min-width: 0; /* sin esto, un <select> nativo se dimensiona por la opción
                   más larga e ignora el ancho del flex, "saliéndose" sobre
                   el siguiente selector en vez de recortar el texto. */
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rc-comp-remove {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg-alt);
  color: var(--text-muted); font-size: 16px; line-height: 1; cursor: pointer;
  flex-shrink: 0;
}
.rc-comp-remove:hover { background: var(--red-light); color: var(--red); border-color: var(--red); }

.rc-comp-add {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; margin-bottom: 24px;
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
  background: var(--bg-alt); color: var(--text-muted);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.rc-comp-add:hover { border-color: var(--primary); color: var(--primary); }

.rc-comp-table-wrap { overflow-x: auto; margin: 20px 0 40px; -webkit-overflow-scrolling: touch; }
.rc-comp-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 540px; }
.rc-comp-table th, .rc-comp-table td { border-bottom: 1px solid var(--border-light); padding: 12px 14px; text-align: center; vertical-align: middle; }
.rc-comp-table td:first-child, .rc-comp-table th.rc-comp-th-label { text-align: left; color: var(--text-muted); font-weight: 600; font-size: 13px; white-space: nowrap; background: var(--bg-alt); }
.rc-comp-table tbody tr:hover td { background: rgba(22,163,74,.03); }
.rc-comp-table tbody tr:hover td:first-child { background: var(--bg-alt); }
.rc-comp-table td.best { color: var(--primary-dark); font-weight: 700; background: var(--primary-light); }

.rc-comp-th-prod { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rc-comp-th-prod img, .rc-comp-th-noimg { width: 72px; height: 72px; object-fit: contain; }
.rc-comp-th-noimg { display: flex; align-items: center; justify-content: center; font-size: 32px; background: var(--bg-alt); border-radius: var(--radius-sm); }
.rc-comp-th-marca { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-light); }
.rc-comp-th-name { font-size: 13.5px; font-weight: 700; color: var(--text); max-width: 180px; }
.rc-comp-th-cta { font-size: 12.5px; padding: 8px 16px; margin-top: 2px; }

.rc-comp-row-precio .rc-comp-precio { font-size: 19px; font-weight: 800; color: var(--primary-dark); }
.rc-comp-precio-tag { font-size: 10px; font-weight: 700; color: var(--text-light); letter-spacing: .04em; }
.rc-comp-score { color: var(--gold); font-weight: 700; }

.rc-comp-h2 { font-size: 20px; font-weight: 800; margin: 8px 0 18px; }
.rc-comp-radar-grid { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 32px; align-items: start; }
.rc-comp-radar-svg svg { width: 100%; height: auto; max-width: 380px; }
.rc-comp-radar-legend { display: flex; flex-wrap: wrap; gap: 12px 18px; justify-content: center; margin-top: 8px; }
.rc-comp-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-muted); }
.rc-comp-legend-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

.rc-comp-bars { display: flex; flex-direction: column; gap: 16px; }
.rc-comp-bar-label { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.rc-comp-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.rc-comp-bar-track { flex: 1; height: 8px; border-radius: 4px; background: var(--bg-alt); overflow: hidden; }
.rc-comp-bar-fill { height: 100%; border-radius: 4px; }
.rc-comp-bar-val { font-size: 12.5px; font-weight: 700; color: var(--text-muted); width: 26px; text-align: right; flex-shrink: 0; }

@media (max-width: 720px) {
  .rc-comp-radar-grid { grid-template-columns: 1fr; }
  .rc-comp-select-wrap { max-width: none; flex-basis: 100%; }
}
