/* ================================================================
   shortcodes.css — estilos de todos los shortcodes editoriales
   Complementa shortcode-consolas.css (grid de cards).
   Sigue el sistema de variables de cholloconsola:
   --red, --bg2, --bg3, --border, --border2, --white,
   --gray-hi, --gray-mid, --gray-lo, --green, --body, --orb
================================================================ */


/* ────────────────────────────────────────────────────────────
   COMPARTIDOS
──────────────────────────────────────────────────────────── */
.rt-sc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.rt-sc-header-accent {
  display: block;
  width: 3px;
  height: 18px;
  background: var(--red);
  border-radius: 2px;
  flex-shrink: 0;
}
.rt-sc-title {
  font-family: var(--body);
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-mid);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 0;
  padding: 0;
  border: none;
}
.rt-sc-title::before { display: none !important; }

.rt-sc-error {
  font-size: 12px;
  color: var(--red);
  opacity: 0.6;
  font-style: italic;
}
.rt-sc-nd {
  color: var(--gray-lo);
}


/* ────────────────────────────────────────────────────────────
   [cc_precio] / [cc_precio_minimo] — inline en párrafo
──────────────────────────────────────────────────────────── */
.rt-sc-price-inline {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-variant-numeric: tabular-nums;
}
.rt-sc-precio {
  font-weight: 700;
  color: var(--white);
}
.rt-sc-precio--minimo {
  color: var(--red);
}
.rt-sc-precio-link {
  text-decoration: none;
  border-bottom: 1px dotted rgba(255,59,47,.4);
  color: inherit;
  transition: border-color .15s;
}
.rt-sc-precio-link:hover {
  border-color: var(--red);
  opacity: 1;
}


/* ────────────────────────────────────────────────────────────
   [cc_tabla_comparativa]
──────────────────────────────────────────────────────────── */
.rt-sc-tabla-wrap {
  margin: 28px 0;
  width: 100%;
}
.rt-sc-tabla-overflow {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  border: 1px solid var(--border2);
}
.rt-sc-tabla {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

/* Header con imagen y nombre */
.rt-sc-tabla thead tr {
  background: var(--bg3);
  border-bottom: 1px solid var(--border2);
}
.rt-sc-tabla-th {
  padding: 14px 12px;
  text-align: center;
  vertical-align: middle;
  font-weight: 600;
}
.rt-sc-tabla-th--label {
  width: 28%;
  min-width: 110px;
}
.rt-sc-tabla-th-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--white);
}
.rt-sc-tabla-img {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg2);
  border: 1px solid var(--border2);
  flex-shrink: 0;
}
.rt-sc-tabla-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rt-sc-tabla-emoji {
  font-size: 36px;
  display: block;
  line-height: 1;
}
.rt-sc-tabla-nombre {
  font-family: var(--body);
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  text-align: center;
}
.rt-sc-tabla-th-link:hover .rt-sc-tabla-nombre {
  color: var(--red);
}

/* Filas de datos */
.rt-sc-tabla tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.rt-sc-tabla tbody tr:last-child { border-bottom: 0; }
.rt-sc-tabla tbody tr:nth-child(odd) { background: var(--bg2); }
.rt-sc-tabla tbody tr:nth-child(even) { background: var(--bg3); }
.rt-sc-tabla tbody tr:hover { background: rgba(255,255,255,.025); }

.rt-sc-tabla-label {
  padding: 10px 14px;
  font-family: var(--body);
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-mid);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  white-space: nowrap;
  vertical-align: middle;
}
.rt-sc-tabla-val {
  padding: 10px 12px;
  font-family: var(--body);
  font-size: 13px;
  color: var(--white);
  text-align: center;
  vertical-align: middle;
  font-weight: 500;
}
.rt-sc-tabla-val--winner {
  color: var(--green);
  font-weight: 700;
  position: relative;
}
.rt-sc-tabla-val--winner::after {
  content: '✓ mejor precio';
  display: block;
  font-size: 9px;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
}
.rt-sc-tabla-val--muted {
  color: var(--gray-lo);
  font-size: 12px;
}
.rt-sc-tabla-cupon-badge {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Fila de botones */
.rt-sc-tabla-tr--actions td {
  padding: 10px 10px;
  background: var(--bg3) !important;
  border-top: 1px solid var(--border2);
}
.rt-sc-tabla-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--body);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  background: var(--red);
  color: var(--white);
  border-radius: 8px;
  text-decoration: none;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  transition: opacity .15s;
  min-height: 36px;
  width: 100%;
}
.rt-sc-tabla-btn:hover { opacity: 0.85; color: var(--white); }


/* ────────────────────────────────────────────────────────────
   [cc_consola_destacada]
──────────────────────────────────────────────────────────── */
.rt-sc-dest {
  margin: 28px 0;
  position: relative;
}
.rt-sc-dest-label {
  display: inline-block;
  font-family: var(--body);
  font-size: 10px;
  font-weight: 700;
  color: var(--white);
  background: var(--red);
  padding: 4px 10px;
  border-radius: 6px 6px 0 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.rt-sc-dest-inner {
  display: grid;
  grid-template-columns: clamp(140px, 28%, 220px) minmax(0, 1fr);
  gap: 0;
  background: var(--bg2);
  border: 1px solid var(--red);
  border-radius: 0 14px 14px 14px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(255,59,47,.10), 0 2px 8px rgba(0,0,0,.18);
}
.rt-sc-dest-img-wrap {
  display: block;
  overflow: hidden;
  background: radial-gradient(ellipse at center, rgba(255,59,47,.08), transparent 70%), var(--bg3);
  border-right: 1px solid var(--border2);
  aspect-ratio: 4/3;
}
.rt-sc-dest-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .28s cubic-bezier(.34,1.56,.64,1);
}
.rt-sc-dest-img-wrap:hover .rt-sc-dest-img { transform: scale(1.04); }
.rt-sc-dest-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 140px;
  font-size: 52px;
}

.rt-sc-dest-info {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rt-sc-dest-marca {
  font-family: var(--body);
  font-size: 9px;
  font-weight: 800;
  color: var(--red);
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.85;
}
.rt-sc-dest-nombre {
  font-family: var(--body);
  font-size: clamp(15px, 2vw, 20px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
  padding: 0;
  border: none;
}
.rt-sc-dest-nombre::before { display: none !important; }
.rt-sc-dest-nombre a {
  color: inherit;
  text-decoration: none;
  transition: color .15s;
}
.rt-sc-dest-nombre a:hover { color: var(--red); }
.rt-sc-dest-extracto {
  font-family: var(--body);
  font-size: 13px;
  color: var(--gray-hi);
  line-height: 1.55;
  margin: 0;
}
.rt-sc-dest-specs {
  margin-top: 2px;
}

/* Bottom: precio + botones */
.rt-sc-dest-bottom {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.rt-sc-dest-precio-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rt-sc-dest-precio-old {
  font-size: 12px;
  color: var(--gray-lo);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.rt-sc-dest-precio {
  font-size: 24px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.rt-sc-dest-cupon-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.rt-sc-dest-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rt-sc-dest-btn-main {
  font-size: 13px;
  padding: 10px 18px;
  min-height: 44px;
  border-radius: 10px;
  white-space: nowrap;
}
.rt-sc-dest-btn-comp {
  min-height: 44px;
  min-width: 44px;
  padding: 10px 12px;
  border-radius: 10px;
}


/* ────────────────────────────────────────────────────────────
   [cc_cupon]
──────────────────────────────────────────────────────────── */
.rt-sc-cupon-wrap {
  margin: 24px 0;
}


/* ────────────────────────────────────────────────────────────
   [cc_aviso]
──────────────────────────────────────────────────────────── */
.rt-sc-aviso {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 20px 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}
.rt-sc-aviso::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
}

/* Variantes */
.rt-sc-aviso--tip    { background: rgba(74,222,128,.06);  border-color: rgba(74,222,128,.18); }
.rt-sc-aviso--tip::before { background: #4ade80; }
.rt-sc-aviso--info   { background: rgba(34,158,217,.06);  border-color: rgba(34,158,217,.18); }
.rt-sc-aviso--info::before { background: #229ED9; }
.rt-sc-aviso--warning { background: rgba(251,146,60,.06); border-color: rgba(251,146,60,.20); }
.rt-sc-aviso--warning::before { background: #fb923c; }
.rt-sc-aviso--danger { background: rgba(255,59,47,.06);   border-color: rgba(255,59,47,.20); }
.rt-sc-aviso--danger::before { background: var(--red); }

.rt-sc-aviso-icon {
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1.4;
  margin-left: 4px;
}
.rt-sc-aviso-body {
  flex: 1;
  min-width: 0;
}
.rt-sc-aviso-titulo {
  display: block;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}
.rt-sc-aviso-content {
  font-family: var(--body);
  font-size: 13px;
  color: var(--gray-hi);
  line-height: 1.6;
}
.rt-sc-aviso-content p { margin: 0 0 8px; }
.rt-sc-aviso-content p:last-child { margin-bottom: 0; }
.rt-sc-aviso-content a { color: var(--white); text-decoration: underline; text-decoration-color: rgba(255,255,255,.3); }
.rt-sc-aviso-content a:hover { text-decoration-color: var(--white); }


/* ────────────────────────────────────────────────────────────
   [cc_pasos]
──────────────────────────────────────────────────────────── */
.rt-sc-pasos {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  counter-reset: none;
}
.rt-sc-paso {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.rt-sc-paso:last-child { border-bottom: none; }

/* Línea conectora vertical entre pasos */
.rt-sc-paso:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 15px;
  top: 48px;
  bottom: -1px;
  width: 1px;
  background: var(--border2);
}

.rt-sc-paso-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-family: var(--body);
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
  line-height: 1;
  position: relative;
  z-index: 1;
  box-shadow: 0 2px 10px rgba(255,59,47,.25);
}
.rt-sc-paso-body {
  flex: 1;
  min-width: 0;
  padding-top: 4px;
}
.rt-sc-paso-titulo {
  display: block;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
  line-height: 1.3;
}
.rt-sc-paso-content {
  font-family: var(--body);
  font-size: 13px;
  color: var(--gray-hi);
  line-height: 1.65;
}
.rt-sc-paso-content p { margin: 0 0 8px; }
.rt-sc-paso-content p:last-child { margin-bottom: 0; }
.rt-sc-paso-content ul {
  margin: 6px 0;
  padding-left: 0;
  list-style: none;
}
.rt-sc-paso-content ul li {
  padding-left: 16px;
  position: relative;
  margin-bottom: 3px;
}
.rt-sc-paso-content ul li::before {
  content: '▸';
  color: var(--red);
  font-size: 10px;
  position: absolute;
  left: 0;
  top: 3px;
}
.rt-sc-paso-content code {
  font-family: monospace;
  font-size: 12px;
  background: var(--bg3);
  color: #4ade80;
  padding: 2px 6px;
  border-radius: 4px;
}


/* ────────────────────────────────────────────────────────────
   RESPONSIVE GLOBAL
──────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  /* Tabla comparativa: min-width para scroll horizontal */
  .rt-sc-tabla { min-width: 380px; }
  .rt-sc-tabla-img { width: 48px; height: 48px; border-radius: 8px; }
  .rt-sc-tabla-emoji { font-size: 28px; }
  .rt-sc-tabla-nombre { font-size: 11px; }
  .rt-sc-tabla-label { font-size: 10px; padding: 8px 10px; }
  .rt-sc-tabla-val { font-size: 12px; padding: 8px 8px; }

  /* Card destacada: colapsa a columna */
  .rt-sc-dest-inner {
    grid-template-columns: 1fr;
  }
  .rt-sc-dest-img-wrap {
    border-right: none;
    border-bottom: 1px solid var(--border2);
    aspect-ratio: 16/7;
  }
  .rt-sc-dest-info { padding: 14px 16px; }
  .rt-sc-dest-precio { font-size: 20px; }
  .rt-sc-dest-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
  .rt-sc-dest-actions { width: 100%; }
  .rt-sc-dest-btn-main { flex: 1; text-align: center; justify-content: center; }

  /* Avisos */
  .rt-sc-aviso { padding: 12px 14px; gap: 10px; }
  .rt-sc-aviso-icon { font-size: 16px; }

  /* Pasos */
  .rt-sc-paso { gap: 12px; padding: 14px 0; }
  .rt-sc-paso-num { width: 28px; height: 28px; font-size: 12px; }
  .rt-sc-paso:not(:last-child)::after { left: 13px; top: 42px; }
}