/* Estudios «¿Cuánto cuesta?» (1.21.0; inc/study.php, template-parts/study/). Con modelo de portada se carga encima de
   css/home-base.css y css/single.css y usa sus tonos; sin modelo, los valores de reserva de cada var(). */

.imk-study-page .entry-meta, .imk-study-page .post-thumb-img-content { display: none }  /* autor y foto de Astra: sobran */
.imk-study { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; color: var(--imk-ink, inherit) }  /* minmax: las tablas anchas se desplazan dentro, no estiran la página */
.imk-study h2 { margin: 0; font-family: var(--imk-display, inherit); font-weight: 500; font-size: 1.45rem; line-height: 1.2; text-wrap: balance }
.imk-study p { margin: 0; max-width: 72ch }
.imk-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap }

/* Barra de precios: la franja de la mitad de los modelos y el precio típico, a escala entre el mínimo y el máximo */
.imk-study figure.imk-study-range { display: grid; gap: 10px; margin: 0; padding-block: 28px 4px; padding-inline: 0; border: 0; background: none; box-shadow: none !important }  /* Astra pone sombra a las figuras del post */
.imk-study-figures { display: flex; flex-wrap: wrap; gap: 6px 28px; font-size: .9rem; color: var(--imk-muted, #666) }
.imk-study-figures b { display: block; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; line-height: 1.15; color: var(--imk-ink, #222);
  font-variant-numeric: tabular-nums; white-space: nowrap }
.imk-study-track { position: relative; height: 14px; border-radius: 7px; background: var(--imk-line, #e5e5e5) }
.imk-study-band { position: absolute; top: 0; bottom: 0; border-radius: 7px; background: var(--imk-accent, #555) }
.imk-study-mark { position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1px; border-radius: 2px; background: var(--imk-ink, #222) }
.imk-study-ticks { display: flex; justify-content: space-between; font-size: .8rem; color: var(--imk-muted, #666); font-variant-numeric: tabular-nums }

.imk-study-section { display: grid; gap: 10px }
.imk-study-intro { display: grid; gap: 10px; padding-top: 22px }  /* introducción (1.23.2) */
.imk-study-intro p { line-height: 1.6 }
.imk-study-section p, .imk-study-method p { line-height: 1.6 }

/* Tablas */
.imk-study-scroll { overflow-x: auto }
.imk-single table.imk-study-table, table.imk-study-table { width: 100%; min-width: 560px; margin: 0; border-collapse: collapse; border: 0; font-size: .92rem }
.imk-study-table th, .imk-study-table td { padding: 12px; border: 0; border-bottom: 1px solid var(--imk-line, #e5e5e5); text-align: left; vertical-align: top; background: none }
.imk-study-table thead th { border-bottom: 2px solid var(--imk-ink, #222); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--imk-muted, #666) }
.imk-study-table .imk-num { text-align: right }
.imk-study-bandname { font-weight: 700; color: var(--imk-accent, inherit); white-space: nowrap }
.imk-study-bands tbody + tbody tr:first-child > * { border-top: 2px solid var(--imk-line, #e5e5e5) }
.imk-study-model-row { display: flex; align-items: flex-start; gap: 12px; min-width: 0 }  /* miniatura y datos (1.21.2) */
.imk-study-model-row .imk-guide-photo { width: 64px; height: 64px }
.imk-study-model-in { display: grid; gap: 5px; justify-items: start; min-width: 0 }
.imk-study-page .entry-content .imk-study a:not(.imk-study-guide) { text-decoration: none }  /* Astra subraya los enlaces del contenido */
.imk-home a.imk-study-name, a.imk-study-name { font-weight: 600; line-height: 1.3 }
.imk-home a.imk-study-name:hover { color: var(--imk-accent) }
.imk-study-badge { font-size: .72rem; font-weight: 700; color: var(--imk-accent, inherit); border: 1px solid currentColor; border-radius: 999px; padding: 1px 9px }
.imk-study-offer { font-size: .82rem; line-height: 1.4; color: var(--imk-muted, #666) }
.imk-study-tags { display: flex; flex-wrap: wrap; gap: 4px }
.imk-study-tags .imk-chip { font-size: .7rem }
.imk-study-price b { font-size: 1rem }
.imk-study-checked { margin-top: 10px; font-size: .78rem; color: var(--imk-muted, #666) }  /* fecha de los precios, una por tabla (1.23.3) */
.imk-study-links-in { display: grid; gap: 6px; justify-items: center; min-width: 140px }
.imk-home a.imk-btn.imk-study-deal { min-height: 38px; width: 100%; padding: 0 16px; font-size: .85rem }
.imk-home a.imk-study-guide, a.imk-study-guide { font-size: .78rem; color: var(--imk-muted, #666); text-decoration: underline; text-underline-offset: 3px }
.imk-home a.imk-study-guide:hover { color: var(--imk-accent) }

/* Preguntas frecuentes y método */
.imk-study-faq { display: grid; gap: 8px }
.imk-study-faq .imk-title { margin-bottom: 6px }
.imk-study-faq details { border: 1px solid var(--imk-line, #e5e5e5); border-radius: 10px; padding: 12px 16px }
.imk-study-faq summary { cursor: pointer; font-weight: 600; line-height: 1.35 }
.imk-study-faq details[open] summary { color: var(--imk-accent, inherit) }
.imk-study-faq details p { margin-top: 8px }
.imk-study-method { display: grid; gap: 6px; margin-top: 34px; padding-top: 18px !important; border-top: 1px solid var(--imk-line, #e5e5e5); font-size: .88rem; color: var(--imk-muted, #666) }
.imk-study .imk-study-method h2 { font-family: var(--imk-body, inherit); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase }

/* Listado */
.imk-study-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px }
.imk-study-card { display: grid; gap: 8px; align-content: start; min-width: 0; padding: 18px 20px; border: 1px solid var(--imk-line); border-radius: 10px; background: var(--imk-surface) }
.imk-study-card .imk-eyebrow { color: var(--imk-accent) }
.imk-study-card-title { font-family: var(--imk-display); font-weight: 500; font-size: 1.2rem; line-height: 1.2; text-wrap: balance }
.imk-study-card:hover { border-color: var(--imk-accent) }
.imk-study-card:hover .imk-study-card-title { color: var(--imk-accent) }
.imk-study-card-figures { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .82rem; color: var(--imk-muted) }
.imk-study-card-figures b { display: block; font-size: 1.1rem; color: var(--imk-ink); font-variant-numeric: tabular-nums; white-space: nowrap }

@media (max-width: 860px) {
  .imk-study-cards { grid-template-columns: repeat(2, minmax(0, 1fr)) }
}
@media (max-width: 700px) {
  .imk-study-cards { grid-template-columns: minmax(0, 1fr) }
  /* Modelos por presupuesto en tarjetas: cada modelo en su bloque, con la franja encima del primero */
  .imk-study-bands { min-width: 0 !important }
  .imk-study-bands thead { display: none }
  .imk-study-bands, .imk-study-bands tbody, .imk-study-bands tr, .imk-study-bands th, .imk-study-bands td { display: block; width: 100% }
  .imk-study-bands tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 14px 0; border-bottom: 1px solid var(--imk-line, #e5e5e5) }
  .imk-study-bands th, .imk-study-bands td { padding: 0 !important; border: 0 !important }
  .imk-study-bandname { grid-column: 1 / -1; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase }
  .imk-study-model { grid-column: 1 / -1 }
  .imk-study-bands .imk-study-price { text-align: left }
  .imk-study-links-in { min-width: 0; justify-items: end }
  .imk-home a.imk-btn.imk-study-deal { width: auto }
}

/* Estudio combinado (1.23.0, template-parts/study/kit.php): dos tablas con casillas que recalculan, total con lo marcado,
   barra de dónde se va el dinero y qué ganas pagando más. En móvil, una ficha por pieza con sus tres precios en fila. */
.imk-kit-head { display: grid; gap: 4px; margin-bottom: 12px }
.imk-kit-head p { color: var(--imk-muted, #666); font-size: .88rem }
.imk-single table.imk-kit-table, table.imk-kit-table { width: 100%; margin: 0; border-collapse: collapse; border: 0; font-size: .92rem; table-layout: fixed }
.imk-kit-table th, .imk-kit-table td { padding: 10px 8px; border: 0; border-bottom: 1px solid var(--imk-line, #e5e5e5); text-align: left; vertical-align: top; background: none }
.imk-kit-table thead th { border-bottom: 2px solid var(--imk-ink, #222); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--imk-muted, #666) }
.imk-kit-table .imk-num { width: 22%; text-align: left; white-space: normal }  /* precio del nivel con la foto y el nombre debajo (1.23.3) */
.imk-kit-table td small { display: block; font-size: .75rem; line-height: 1.35; color: var(--imk-muted, #666); margin-top: 2px }
.imk-kit-pick { width: 36px }
.imk-kit-pick input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--imk-accent, #555); cursor: pointer }
.imk-kit-price { font-weight: 700; font-size: .98rem; font-variant-numeric: tabular-nums; white-space: nowrap }
.imk-kit-piece.is-off td { color: var(--imk-muted, #999) }
.imk-kit-piece.is-off .imk-kit-price { text-decoration: line-through }
.imk-kit-included td, .imk-kit-nodata td { color: var(--imk-muted, #666); background: var(--imk-page, #f7f7f7) }
/* «Ver la guía» de cada pieza como botón de borde (Carlos: «para que tenga más peso»); el relleno queda para Amazon */
.imk-home a.imk-kit-guide, a.imk-kit-guide { display: inline-flex; align-items: center; min-height: 30px; margin-top: 8px; padding: 0 14px; border: 1.5px solid var(--imk-ink, #222); border-radius: 999px; color: var(--imk-ink, #222); font-size: .78rem; font-weight: 600; text-decoration: none; white-space: nowrap }
.imk-home a.imk-kit-guide:hover, a.imk-kit-guide:hover { background: var(--imk-ink, #222); color: var(--imk-surface, #fff) }
.imk-home a.imk-kit-model, a.imk-kit-model { display: flex; align-items: center; gap: 8px; margin-top: 6px; min-width: 0; color: inherit; text-decoration: none }
.imk-kit-thumb { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--imk-line, #e5e5e5); border-radius: 8px; background: #fff; overflow: hidden }
.imk-kit-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; box-shadow: none !important }
.imk-kit-model-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-width: 0; font-size: .78rem; font-weight: 600; line-height: 1.3 }
.imk-kit-model-name i { font-style: normal; font-weight: 400; color: var(--imk-muted, #666); white-space: nowrap }
a.imk-kit-model:hover .imk-kit-model-name { color: var(--imk-accent) }
.imk-kit-piece.is-off .imk-kit-model { opacity: .45 }
.imk-kit-table tfoot td { font-weight: 700; border-top: 2px solid var(--imk-ink, #222); border-bottom: 0 }
.imk-kit-sum { font-size: 1.05rem; font-variant-numeric: tabular-nums; white-space: nowrap }
.imk-kit-grand { margin-top: 30px; padding: 8px 0 !important; border-radius: 12px; background: var(--imk-accent-soft, #f5f5f5) }
.imk-kit-grand h2 { margin: 0; font-size: 1.15rem !important }
.imk-kit-table.imk-kit-tiers tr, .imk-kit-table.imk-kit-tiers td { border: 0 !important; vertical-align: bottom }
.imk-kit-table.imk-kit-tiers td:nth-child(2) { vertical-align: middle }
.imk-kit-grand h2 { max-width: 20ch; line-height: 1.25; text-wrap: balance }
.imk-kit-tiers span { display: block; font-size: .78rem; color: var(--imk-muted, #666) }
.imk-kit-tiers b { font-size: clamp(1.4rem, 3vw, 1.9rem); font-variant-numeric: tabular-nums; white-space: nowrap }
.imk-kit-bar { display: flex; gap: 2px; height: 56px; border-radius: 10px; overflow: hidden }
.imk-kit-seg { display: grid; align-content: center; min-width: 0; padding: 0 8px; overflow: hidden; background: color-mix(in srgb, var(--imk-accent, #888) 22%, var(--imk-surface, #fff)); color: var(--imk-ink, #222) }
.imk-kit-seg-1 { background: var(--imk-accent, #888); color: var(--imk-accent-ink, #fff) }
.imk-kit-seg-2 { background: color-mix(in srgb, var(--imk-accent, #888) 72%, var(--imk-surface, #fff)); color: var(--imk-accent-ink, #fff) }
.imk-kit-seg-3 { background: color-mix(in srgb, var(--imk-accent, #888) 45%, var(--imk-surface, #fff)) }
.imk-kit-seg b { font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.imk-kit-seg i { font-style: normal; font-size: .72rem }
.imk-kit-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px }
.imk-kit-card { display: grid; gap: 10px; align-content: start; padding: 16px; border: 1px solid var(--imk-line, #e5e5e5); border-radius: 12px }
.imk-study .imk-kit-card h3 { margin: 0; font-family: var(--imk-display, inherit); font-weight: 600; font-size: 1.1rem }
.imk-kit-pair { display: flex; gap: 18px }
.imk-kit-pair span { display: grid }
.imk-kit-pair i { font-style: normal; font-size: .75rem; color: var(--imk-muted, #666) }
.imk-kit-pair b { font-size: 1.25rem; font-variant-numeric: tabular-nums; white-space: nowrap }
.imk-kit-card p { font-size: .9rem }
@media (max-width: 700px) {
  .imk-kit-cards { grid-template-columns: minmax(0, 1fr) }
  .imk-kit-table thead { display: none }
  .imk-kit-table, .imk-kit-table tbody, .imk-kit-table tfoot, .imk-kit-table tr, .imk-kit-table td { display: block; width: 100% }
  .imk-kit-table tr { display: grid; grid-template-columns: 30px repeat(3, minmax(0, 1fr)); gap: 4px 8px; padding: 12px 0; border-bottom: 1px solid var(--imk-line, #e5e5e5) }
  .imk-kit-table td { padding: 0 !important; border: 0 !important; background: none }
  .imk-kit-table .imk-num { width: auto }
  .imk-kit-grand h2 { max-width: none }
  .imk-kit-table td:nth-child(2) { grid-column: 2 / -1 }
  .imk-kit-table td.imk-num { grid-row: 2; text-align: left }
  .imk-kit-table td.imk-num:nth-child(3) { grid-column: 2 } .imk-kit-table td.imk-num:nth-child(4) { grid-column: 3 } .imk-kit-table td.imk-num:nth-child(5) { grid-column: 4 }
  .imk-kit-table td[data-label]::before { content: attr(data-label); display: block; font-size: .7rem; color: var(--imk-muted, #666) }
  .imk-kit-table td[colspan] { display: none }
  .imk-kit-table tfoot tr { border-top: 2px solid var(--imk-ink, #222); border-bottom: 0 }
  .imk-home a.imk-kit-model, a.imk-kit-model { flex-direction: column; align-items: flex-start; gap: 4px }
  .imk-kit-model-name { font-size: .72rem }
}
