/*
Theme Name:  TM Editorial
Theme URI:   https://todomicrofonos.com
Description: Child theme de Asap con el sistema editorial D2 de TodoMicrofonos.
Author:      Paul
Author URI:  https://todomicrofonos.com/sobre-mi/
Template:    asap
Version:     1.1.0
License:     GPL-2.0-or-later
Text Domain: tm-editorial
*/

/* ============================================================
   TOKENS · DESIGN.md
   ============================================================ */
:root {
  --tm-bg:           #FAFAF7;
  --tm-bg-soft:      #F2EFE7;
  --tm-bg-card:      #FFFFFF;
  --tm-fg:           #1A1A1F;
  --tm-fg-soft:      #5A5D63;
  --tm-fg-mute:      #9CA0A6;
  --tm-rule:         #DDD9CF;
  --tm-rule-strong:  #1A1A1F;
  --tm-accent:       #C2410C;
  --tm-accent-soft:  #FED7AA;
  --tm-accent-faint: #FDF3E7;
  --tm-brand:        #5630FF;
  --tm-success:      #15803D;
  --tm-success-soft: #DCFCE7;
  --tm-warn:         #A16207;
  --tm-warn-soft:    #FEF3C7;
  --tm-rec:          #B91C1C;
  --tm-rec-soft:     #FEE2E2;
  --tm-max:          1240px;
  --tm-narrow:       760px;
}

/* ============================================================
   ÁMBITO body.tm-editorial
   ============================================================ */
body.tm-editorial {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  background: var(--tm-bg);
  color: var(--tm-fg);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-weight: 400;
}

body.tm-editorial .tm-container { max-width: var(--tm-max); margin: 0 auto; padding: 0 32px; }
body.tm-editorial .tm-narrow    { max-width: var(--tm-narrow); margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) {
  body.tm-editorial .tm-container, body.tm-editorial .tm-narrow { padding: 0 20px; }
}

/* TIPOGRAFÍA */
body.tm-editorial h1, body.tm-editorial h2, body.tm-editorial h3,
body.tm-editorial h4, body.tm-editorial h5 {
  letter-spacing: -0.015em; line-height: 1.2; color: var(--tm-fg); font-weight: 600;
}
body.tm-editorial h1 { font-size: 54px; line-height: 1.05; letter-spacing: -0.025em; }
body.tm-editorial h2 { font-size: 32px; }
body.tm-editorial h3 { font-size: 22px; }
@media (max-width: 768px) {
  body.tm-editorial h1 { font-size: 38px; }
  body.tm-editorial h2 { font-size: 26px; }
}
body.tm-editorial p { margin-bottom: 18px; font-size: 17px; line-height: 1.65; }
body.tm-editorial a { color: var(--tm-fg); text-decoration: underline; text-decoration-color: var(--tm-accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
body.tm-editorial a:hover { color: var(--tm-accent); }
body.tm-editorial strong { font-weight: 600; }

body.tm-editorial .tm-kicker {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  font-weight: 600; color: var(--tm-accent); margin-bottom: 12px;
}
body.tm-editorial .tm-deck {
  font-family: 'Newsreader', Georgia, serif; font-style: italic;
  font-size: 22px; line-height: 1.45; color: var(--tm-fg-soft);
  margin-bottom: 32px; font-weight: 400;
}
body.tm-editorial .tm-mono {
  font-family: 'IBM Plex Mono', Menlo, monospace;
  font-variant-numeric: tabular-nums; font-weight: 500;
}

/* BREADCRUMBS */
body.tm-editorial .tm-breadcrumbs {
  padding: 24px 0 0; font-size: 13px; color: var(--tm-fg-soft);
}
body.tm-editorial .tm-breadcrumbs a { color: var(--tm-fg-soft); text-decoration: none; }
body.tm-editorial .tm-breadcrumbs a:hover { color: var(--tm-accent); }

/* HERO PRODUCTO */
body.tm-editorial .tm-hero { padding: 48px 0 56px; border-bottom: 1px solid var(--tm-rule); }
body.tm-editorial .tm-hero-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start;
}
@media (max-width: 1024px) {
  body.tm-editorial .tm-hero-grid { grid-template-columns: 1fr; gap: 32px; }
}
body.tm-editorial .tm-hero-titulo {
  font-size: 64px; font-weight: 600; line-height: 1.02;
  letter-spacing: -0.025em; margin-bottom: 16px;
}
@media (max-width: 768px) {
  body.tm-editorial .tm-hero-titulo { font-size: 42px; }
}
body.tm-editorial .tm-hero-sub {
  font-size: 18px; color: var(--tm-fg-soft); max-width: 580px;
  line-height: 1.55; margin-bottom: 28px;
}
body.tm-editorial .tm-hero-meta {
  display: flex; gap: 18px; font-size: 12px; color: var(--tm-fg-soft);
  padding: 18px 0; border-top: 1px solid var(--tm-rule); border-bottom: 1px solid var(--tm-rule);
  flex-wrap: wrap; letter-spacing: 0.02em; align-items: center;
}
body.tm-editorial .tm-hero-meta strong { color: var(--tm-fg); font-weight: 600; }
body.tm-editorial .tm-hero-byline { display: inline-flex; align-items: center; gap: 8px; }
body.tm-editorial .tm-hero-byline-foto {
  width: 26px; height: 26px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0; background: var(--tm-bg-soft);
}
body.tm-editorial .tm-hero-byline-foto img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
body.tm-editorial .tm-hero-tags {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline;
  margin-top: 20px; font-size: 14px; line-height: 1.6;
}
body.tm-editorial .tm-hero-tags-label {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 600; color: var(--tm-accent); margin-right: 4px;
}
body.tm-editorial .tm-hero-tags a {
  color: var(--tm-fg); text-decoration: underline;
  text-decoration-color: var(--tm-accent); text-decoration-thickness: 1.5px;
  text-underline-offset: 3px; font-weight: 500;
}
body.tm-editorial .tm-sep { color: var(--tm-fg-mute); margin: 0 2px; }

body.tm-editorial .tm-hero-img {
  aspect-ratio: 1/1; background: var(--tm-bg-soft);
  border: 1px solid var(--tm-rule); display: flex; align-items: center;
  justify-content: center; padding: 32px; margin-bottom: 24px; overflow: hidden;
}
body.tm-editorial .tm-hero-img img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  display: block; mix-blend-mode: multiply;
}

/* CTA precio */
body.tm-editorial .tm-cta-card {
  background: var(--tm-bg-card); border: 1px solid var(--tm-rule); padding: 24px;
}
body.tm-editorial .tm-cta-label {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--tm-fg-soft); font-weight: 600; margin-bottom: 8px;
}
body.tm-editorial .tm-cta-precio {
  font-size: 36px; font-weight: 500; line-height: 1; color: var(--tm-fg);
  margin-bottom: 6px;
}
body.tm-editorial .tm-cta-source {
  font-size: 13px; color: var(--tm-fg-soft); margin-bottom: 18px;
}
body.tm-editorial .tm-cta-source strong { color: var(--tm-accent); font-weight: 600; }
body.tm-editorial .tm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 6px; font-weight: 600; font-size: 15px;
  text-decoration: none; width: 100%; transition: 150ms; cursor: pointer; border: 0;
}
body.tm-editorial .tm-btn-primary { background: var(--tm-accent); color: white; }
body.tm-editorial .tm-btn-primary:hover { background: #9A3209; color: white; }

/* SUMARIO 4 cifras */
body.tm-editorial .tm-sumario {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  margin-top: 48px; background: var(--tm-bg-card); border: 1px solid var(--tm-rule);
}
@media (max-width: 768px) { body.tm-editorial .tm-sumario { grid-template-columns: repeat(2, 1fr); } }
body.tm-editorial .tm-sumario-cell { padding: 24px; border-right: 1px solid var(--tm-rule); }
body.tm-editorial .tm-sumario-cell:last-child { border-right: 0; }
@media (max-width: 768px) {
  body.tm-editorial .tm-sumario-cell { border-right: 1px solid var(--tm-rule); border-bottom: 1px solid var(--tm-rule); }
  body.tm-editorial .tm-sumario-cell:nth-child(2), body.tm-editorial .tm-sumario-cell:nth-child(4) { border-right: 0; }
  body.tm-editorial .tm-sumario-cell:nth-child(3), body.tm-editorial .tm-sumario-cell:nth-child(4) { border-bottom: 0; }
}
body.tm-editorial .tm-sumario-label {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--tm-fg-soft); font-weight: 600; margin-bottom: 14px;
}
body.tm-editorial .tm-sumario-val {
  font-size: 36px; line-height: 1; letter-spacing: -0.02em; color: var(--tm-fg);
}
body.tm-editorial .tm-sumario-val small {
  font-size: 15px; color: var(--tm-fg-soft); font-weight: 400; margin-left: 4px;
}

/* SECCIONES */
body.tm-editorial .tm-bloque { padding: 64px 0; }
body.tm-editorial .tm-bloque + .tm-bloque { border-top: 1px solid var(--tm-rule); }
body.tm-editorial .tm-section-head {
  padding-bottom: 32px; border-bottom: 1px solid var(--tm-rule); margin-bottom: 32px;
}

/* VEREDICTO RÁPIDO (cómpralo si / mejor evítalo si) */
body.tm-editorial .tm-veredicto-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
}
@media (max-width: 768px) { body.tm-editorial .tm-veredicto-grid { grid-template-columns: 1fr; } }
body.tm-editorial .tm-veredicto-col {
  background: var(--tm-bg-card); border: 1px solid var(--tm-rule); padding: 28px;
}
body.tm-editorial .tm-veredicto-col.tm-si { border-top: 3px solid var(--tm-success); }
body.tm-editorial .tm-veredicto-col.tm-no { border-top: 3px solid var(--tm-rec); }
body.tm-editorial .tm-veredicto-col h3 {
  font-size: 14px; font-weight: 600; margin-bottom: 18px; padding-bottom: 12px;
  border-bottom: 1px solid var(--tm-rule); letter-spacing: -0.005em;
}
body.tm-editorial .tm-veredicto-col.tm-si h3 { color: var(--tm-success); }
body.tm-editorial .tm-veredicto-col.tm-no h3 { color: var(--tm-rec); }
body.tm-editorial .tm-veredicto-col ul { list-style: none; padding: 0; margin: 0; }
body.tm-editorial .tm-veredicto-col li {
  padding: 12px 0; border-bottom: 1px solid var(--tm-rule);
  font-size: 15px; line-height: 1.55;
}
body.tm-editorial .tm-veredicto-col li:last-child { border-bottom: 0; }
body.tm-editorial .tm-veredicto-col li::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--tm-accent); margin-right: 12px; vertical-align: middle; transform: translateY(-2px);
}
body.tm-editorial .tm-veredicto-col.tm-si li::before { background: var(--tm-success); }
body.tm-editorial .tm-veredicto-col.tm-no li::before { background: var(--tm-rec); }

/* TABLA SPECS */
body.tm-editorial .tm-specs-table {
  width: 100%; border-collapse: collapse; font-size: 15px;
  background: var(--tm-bg-card); border: 1px solid var(--tm-rule);
}
body.tm-editorial .tm-specs-table th {
  text-align: left; padding: 14px 16px; font-weight: 600;
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--tm-fg-soft); background: var(--tm-bg-soft);
  border-bottom: 1px solid var(--tm-rule-strong);
}
body.tm-editorial .tm-specs-table td {
  padding: 14px 16px; border-bottom: 1px solid var(--tm-rule); vertical-align: top;
}
body.tm-editorial .tm-specs-table tr:last-child td { border-bottom: 0; }
body.tm-editorial .tm-specs-table td:first-child { color: var(--tm-fg); font-weight: 500; }
body.tm-editorial .tm-specs-table td.tm-mono { color: var(--tm-fg); font-weight: 500; }
body.tm-editorial .tm-specs-table tbody tr:hover { background: var(--tm-bg-soft); }

/* CUERPO EDITORIAL (the_content) */
body.tm-editorial .tm-cuerpo {
  font-size: 17px; line-height: 1.65;
}

/* ARTÍCULO BLOG (single.php) */
body.tm-editorial .tm-hero-blog { padding: 48px 0 0; }
body.tm-editorial .tm-hero-titulo-blog {
  font-size: 54px; font-weight: 600; line-height: 1.05;
  letter-spacing: -0.025em; margin-bottom: 20px; max-width: 720px;
}
@media (max-width: 768px) { body.tm-editorial .tm-hero-titulo-blog { font-size: 36px; } }
body.tm-editorial .tm-articulo { padding: 48px 0 80px; }
body.tm-editorial .tm-articulo p { font-size: 18px; line-height: 1.7; }

/* AUTOR */
body.tm-editorial .tm-autor {
  display: flex; gap: 24px; align-items: center;
  padding: 28px 32px; background: var(--tm-bg-card); border: 1px solid var(--tm-rule);
}
@media (max-width: 640px) { body.tm-editorial .tm-autor { flex-direction: column; text-align: center; } }
body.tm-editorial .tm-autor-foto {
  width: 64px; height: 64px; border-radius: 50%; flex: 0 0 64px;
  overflow: hidden; background: var(--tm-bg-soft);
}
body.tm-editorial .tm-autor-foto img { width: 100%; height: 100%; object-fit: cover; }
body.tm-editorial .tm-autor-info h4 {
  font-size: 18px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.01em;
}
body.tm-editorial .tm-autor-info p { font-size: 14px; color: var(--tm-fg-soft); line-height: 1.55; }

/* BARRA FLOTANTE CTA */
body.tm-editorial .tm-floating-bar {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(160%); z-index: 90;
  display: flex; gap: 12px; align-items: center;
  transition: transform 380ms cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
}
body.tm-editorial .tm-floating-bar.visible {
  transform: translateX(-50%) translateY(0); pointer-events: auto;
}
@media (max-width: 640px) {
  body.tm-editorial .tm-floating-bar {
    bottom: 16px; width: calc(100% - 32px); left: 16px; transform: translateY(160%);
  }
  body.tm-editorial .tm-floating-bar.visible { transform: translateY(0); }
}
body.tm-editorial .tm-cta-amazon {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; background: var(--tm-fg); color: var(--tm-bg);
  font-weight: 600; font-size: 14px; text-decoration: none; border-radius: 100px;
  box-shadow: 0 8px 28px rgba(26,26,31,0.18), 0 2px 6px rgba(26,26,31,0.1);
  transition: 200ms; letter-spacing: -0.005em; white-space: nowrap;
}
body.tm-editorial .tm-cta-amazon:hover {
  background: var(--tm-accent); transform: translateY(-2px);
}
body.tm-editorial .tm-cta-amazon-precio {
  font-size: 13px; padding-left: 10px; margin-left: 4px;
  border-left: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.85);
}
body.tm-editorial .tm-cta-amazon-arrow { font-size: 13px; transition: transform 200ms; }
body.tm-editorial .tm-cta-amazon:hover .tm-cta-amazon-arrow { transform: translateX(3px); }
@media (max-width: 640px) {
  body.tm-editorial .tm-cta-amazon { flex: 1; justify-content: center; }
  body.tm-editorial .tm-cta-amazon-precio { display: none; }
}
