/* ============================================================
   FICHA DE COMPONENTE — relieve suave, el mismo lenguaje que
   comparador/soft-ui.css y el Modo Lista del configurador.

   Criterio (idéntico al del resto de la web):
     · ELEVADO  el panel de la ficha y lo que se pulsa (botones).
     · HUNDIDO  lo que contiene datos (foto, cifras destacadas).
     · PLANO    lo que solo está en reposo.

   Colores sólidos, sin superficies translúcidas: con el relieve, las
   transparencias ensucian el degradado de la sombra.
   ============================================================ */

body.ficha-ui {
    /* Una sola fuente de luz, arriba a la izquierda */
    /* Más marcadas que en soft-ui.css a propósito: aquí el relieve descansa
       sobre el fondo con textura de la web, no sobre un panel liso, y con
       sombras suaves no se leería. */
    --fic-luz:    rgba(255, 255, 255, 0.07);
    --fic-sombra: rgba(0, 0, 0, 0.75);
    --fic-radio:  16px;

    --fic-sup:    rgb(30, 30, 30);   /* superficie de las piezas elevadas: gris neutro, sin tinte */
    --fic-hueco:  rgb(20, 20, 20);   /* fondo de lo hundido: siempre más oscuro */
    --fic-linea:  rgba(255, 255, 255, 0.05);
    --fic-acc:    #ff7b3a;

    --fic-alto:  -5px -5px 12px var(--fic-luz), 7px 7px 20px var(--fic-sombra);
    --fic-hondo: inset 5px 5px 12px var(--fic-sombra), inset -4px -4px 10px var(--fic-luz);
    --fic-suave: -3px -3px 7px var(--fic-luz), 4px 4px 11px rgba(0, 0, 0, 0.6);
}
body.ficha-ui.light-theme {
    /* En claro la luz es más marcada y la sombra mucho más suave: copiar
       los valores del oscuro deja el relieve sucio. */
    --fic-luz:    rgba(255, 255, 255, 1);
    --fic-sombra: rgba(0, 0, 0, 0.16);
    --fic-sup:    rgb(240, 240, 240);
    --fic-hueco:  rgb(228, 228, 228);
    --fic-linea:  rgba(0, 0, 0, 0.06);
}

/* ── Migas ─────────────────────────────────────────────────── */
.cmp-migas { font-size: 13px; margin-bottom: 20px; color: var(--text-secondary); }
.cmp-migas a { color: var(--text-secondary); text-decoration: none; }
.cmp-migas a:hover { color: var(--fic-acc); }
.cmp-migas span { margin: 0 7px; opacity: .45; }
.cmp-migas strong { color: var(--text-primary); font-weight: 600; }

/* ── La ficha: UN solo panel ───────────────────────────────────
   Todo va dentro de la misma superficie elevada: cabecera,
   especificaciones, compatibilidad y preguntas. Las zonas se separan
   con una línea grabada en el propio panel, no con cajas sueltas.
   ─────────────────────────────────────────────────────────── */
.ficha-wrap { max-width: 1920px; }

/* Dos columnas: a la izquierda la cabecera (foto, cifras, botones y tiendas), que se
   queda fija al hacer scroll; a la derecha todo el contenido (.ficha-main). */
.ficha {
    display: grid;
    grid-template-columns: clamp(380px, 28vw, 560px) minmax(0, 1fr);
    column-gap: clamp(36px, 3.5vw, 64px);
    padding: 40px 44px 34px;
    border-radius: 22px;
    background: var(--fic-sup);
    box-shadow: var(--fic-alto);
    margin-bottom: 40px;
}
.ficha-main { min-width: 0; container-type: inline-size; }
.ficha-main > .ficha-zona:first-child { margin-top: 0; padding-top: 0; }
.ficha-main > .ficha-zona:first-child::before { display: none; }
/* Cabecera */
.ficha-cab {
    display: flex;
    flex-direction: column;
    gap: 28px;
    align-self: start;
}
/* La foto va en un hueco excavado en el panel */
.ficha-foto {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background: var(--fic-hueco);
    box-shadow: var(--fic-hondo);
}
.ficha-foto img {
    position: absolute;
    inset: 7%;
    width: 86%;
    height: 86%;
    object-fit: contain;
}
.ficha-foto i { font-size: 54px; color: var(--fic-acc); opacity: .45; }
.ficha-foto img + i { display: none; }   /* el icono solo se ve si no hay foto o no carga */

/* Fija solo si cabe entera en pantalla: más alta que la ventana, no dejaría ver las tiendas */
@media (min-width: 1000px) and (min-height: 1000px) {
    .ficha-cab { position: sticky; top: 90px; }
    .ficha-foto { width: min(100%, calc(100vh - 500px)); }   /* con la ventana baja, foto algo menor para que quepan las tiendas */
}
@media (max-width: 1000px) {
    .ficha { display: block; padding: 34px 30px 30px; }
    .ficha-cab { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 34px; align-items: center; }
    .ficha-foto { width: 260px; height: 260px; aspect-ratio: auto; }
    .ficha-main > .ficha-zona:first-child { margin-top: 32px; padding-top: 30px; }
    .ficha-main > .ficha-zona:first-child::before { display: block; }
}

.ficha-tipo {
    margin: 0 0 8px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--fic-acc);
}
.ficha-titulo h1 {
    margin: 0 0 18px;
    font-size: 30px;
    line-height: 1.18;
    letter-spacing: -.01em;
    color: var(--text-primary);
}

/* Cifras destacadas: huecos, porque contienen datos */
.ficha-destacados {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}
.ficha-destacados li {
    padding: 9px 15px;
    border-radius: 12px;
    background: var(--fic-hueco);
    box-shadow: var(--fic-hondo);
}
.ficha-destacados span {
    display: block;
    margin-bottom: 3px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--text-secondary);
}
.ficha-destacados strong { font-size: 15.5px; color: var(--text-primary); }

/* Botones: elevados sobre el panel, se hunden al pulsarlos */
.ficha-acciones { display: flex; flex-wrap: wrap; gap: 12px; }
.ficha-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 20px;
    border-radius: 13px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-primary);
    background: var(--fic-sup);
    box-shadow: var(--fic-suave);
    transition: box-shadow .16s, color .16s, transform .16s;
}
.ficha-btn:hover { color: var(--fic-acc); transform: translateY(-1px); box-shadow: var(--fic-alto); }
.ficha-btn:active { transform: none; box-shadow: var(--fic-hondo); }
.ficha-btn.primario { background: var(--fic-acc); color: #16171a; }
.ficha-btn.primario:hover { color: #16171a; filter: brightness(1.06); }

/* Zonas: separadas por una línea grabada (sombra encima, luz debajo) */
.ficha-zona { position: relative; margin-top: 32px; padding-top: 30px; }
.ficha-zona::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(var(--fic-sombra), var(--fic-sombra)) top / 100% 1px no-repeat,
                linear-gradient(var(--fic-luz), var(--fic-luz)) bottom / 100% 1px no-repeat;
}
.ficha-zona h2 {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0 0 20px;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--text-primary);
}
.ficha-zona h2 i { color: var(--fic-acc); font-size: 14px; }

/* Especificaciones: categorías en dos columnas, como el comparador */
.ficha-specs { columns: 2; column-gap: 44px; }
.ficha-cat {
    width: 100%;
    margin: 0 0 24px;
    border-collapse: collapse;
    font-size: 14px;
    break-inside: avoid;
}
.ficha-cat caption {
    caption-side: top;
    text-align: left;
    padding: 0 0 9px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--fic-acc);
}
.ficha-cat caption i { width: 18px; margin-right: 4px; opacity: .85; }
.ficha-cat th,
.ficha-cat td {
    padding: 9px 2px;
    border-bottom: 1px solid var(--fic-linea);
    vertical-align: top;
    text-align: left;
}
.ficha-cat th {
    width: 46%;
    padding-right: 16px;
    font-weight: 500;
    color: var(--text-secondary);
}
.ficha-cat th[title] { cursor: help; }
.ficha-cat td { font-weight: 600; color: var(--text-primary); overflow-wrap: anywhere; }
.ficha-cat tr:last-child th,
.ficha-cat tr:last-child td { border-bottom: 0; }

/* Conectores de las placas: panel trasero e internos, agrupados y con un
   icono por tipo de puerto (includes/placa_conectores.php) */
.con-sec { margin-bottom: 22px; }
.con-sec h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--fic-acc);
}
.con-sec h3 i { width: 16px; opacity: .85; }
/* Total de puertos del apartado / del grupo */
.con-sec h3 span,
.con-lbl span {
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--fic-hueco);
    color: var(--text-secondary);
    font-size: 10.5px;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}
/* Una fila por grupo, como una tabla: nombre a la izquierda (siempre
   alineado) y sus puertos en pastillas a la derecha. Sin huecos ni alturas
   desiguales, cada grupo ocupa justo su fila. */
.con-filas {
    padding: 4px 18px;
    border-radius: 16px;
    background: var(--fic-hueco);
    box-shadow: var(--fic-hondo);
}
.con-fila {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 16px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--fic-linea);
}
.con-fila:last-child { border-bottom: 0; }
.con-lbl {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text-secondary);
}
.con-lbl span { background: var(--fic-sup); }
/* Los puertos de un grupo van en una cuadrícula alineada, sin pastilla propia: solo icono, cantidad y nombre */
.con-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px 18px; list-style: none; margin: 0; padding: 0; }
.con-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    cursor: help;
}
.con-ico {
    width: 30px;
    height: 28px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--fic-hueco);
    color: var(--fic-acc);
}
.con-ico svg { width: 20px; height: 20px; }
.con-n { font-weight: 700; color: var(--fic-acc); font-variant-numeric: tabular-nums; }
.con-n.uno { color: var(--text-secondary); font-weight: 500; opacity: .75; }   /* el "1×" no compite con el "4×" */
.con-t { font-weight: 600; color: var(--text-primary); overflow-wrap: anywhere; }
@media (max-width: 720px) {
    .con-filas { padding: 2px 12px; }
    .con-fila { grid-template-columns: 1fr; gap: 8px; }
    .con-lbl { justify-content: flex-start; }
}

/* Compatibilidad: bloques sin caja, marcados con un filo a la izquierda */
.ficha-compat {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px 34px;
}
.ficha-bloque { padding-left: 16px; border-left: 2px solid var(--fic-acc); }
.ficha-bloque h3 {
    margin: 0 0 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--text-primary);
}
.ficha-bloque p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--text-secondary); }
.ficha-bloque strong { color: var(--text-primary); }
/* Lista larga (procesadores o placas compatibles): se ven 8 y el resto con scroll dentro,
   sin que la página se mueva al llegar al final de la lista */
.ficha-lista-scroll {
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--fic-acc) transparent;
}
.ficha-lista-scroll .ficha-enlaces { margin-top: 0; }
.ficha-enlaces { margin: 10px 0 0; padding: 0; list-style: none; font-size: 13.5px; }
.ficha-enlaces li { padding: 4px 0; }
.ficha-enlaces a { color: var(--text-secondary); text-decoration: none; }
.ficha-enlaces a::before { content: "\203A"; margin-right: 8px; color: var(--fic-acc); }
.ficha-enlaces a:hover { color: var(--fic-acc); }
.ficha-mas {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--fic-acc);
    text-decoration: none;
    transition: gap .16s;
}
.ficha-mas:hover { gap: 11px; }

/* Preguntas: filas del mismo panel, separadas por líneas */
.ficha-faq details { border-bottom: 1px solid var(--fic-linea); }
.ficha-faq details:last-child { border-bottom: 0; }
.ficha-faq summary {
    position: relative;
    padding: 15px 44px 15px 2px;
    cursor: pointer;
    list-style: none;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-primary);
}
.ficha-faq summary::-webkit-details-marker { display: none; }
.ficha-faq summary::after {
    content: "+";
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    line-height: 1;
    color: var(--fic-acc);
}
.ficha-faq details[open] summary::after { content: "\2212"; }
.ficha-faq summary:hover { color: var(--fic-acc); }
.ficha-faq p {
    margin: 0 0 16px;
    padding: 0 2px;
    font-size: 14px;
    line-height: 1.75;
    color: var(--text-secondary);
}

/* Nota de procedencia: texto pequeño, sin caja */
.ficha-nota {
    position: relative;
    padding-left: 22px;
    margin: 6px 0 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--text-secondary);
}
.ficha-nota i { position: absolute; left: 0; top: 3px;  color: var(--fic-acc); }
.ficha-nota a { color: var(--fic-acc); }

/* En el catálogo: una fila por cifra, con una regla hundida.
   La franja clara son las piezas con el mismo valor; el punto, dónde cae esta. */
.ficha-pos { margin: 0 0 4px; padding: 0; list-style: none; }
.ficha-pos li {
    display: grid;
    grid-template-columns: 150px 110px minmax(120px, 1fr) 290px;
    align-items: center;
    gap: 18px;
    padding: 11px 2px;
    border-bottom: 1px solid var(--fic-linea);
}
.ficha-pos li:last-child { border-bottom: 0; }
.pos-et { font-size: 14px; color: var(--text-secondary); }
.pos-val { font-size: 14.5px; color: var(--text-primary); white-space: nowrap; }
.pos-barra {
    position: relative;
    height: 12px;
    border-radius: 999px;
    background: var(--fic-hueco);
    box-shadow: inset 2px 2px 5px var(--fic-sombra), inset -2px -2px 4px var(--fic-luz);
}
.pos-igual {
    position: absolute;
    top: 3px;
    bottom: 3px;
    border-radius: 999px;
    background: var(--fic-acc);
    opacity: .28;
}
.pos-punto {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 50%;
    background: var(--fic-acc);
    box-shadow: 0 0 0 3px var(--fic-sup), 2px 2px 5px rgba(0, 0, 0, .5);
}
.pos-txt { font-size: 13px; line-height: 1.4; color: var(--text-primary); }
.pos-txt small { display: block; font-size: 11.5px; color: var(--text-secondary); }

/* Familia: tabla dentro del panel, filas con línea, la actual resaltada */
.ficha-fam-tit { margin: -6px 0 14px; font-size: 14px; color: var(--text-secondary); }
.ficha-fam-tit span {
    margin-left: 8px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--fic-acc);
    background: var(--fic-hueco);
    box-shadow: var(--fic-hondo);
}
/* Se ven unas 12 filas; el resto con scroll dentro de la caja, con la cabecera fija.
   Al llegar arriba o abajo de la caja el scroll sigue con la página (sin overscroll-behavior). */
.ficha-fam-scroll {
    max-height: 480px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--fic-acc) transparent;
}
.ficha-fam { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ficha-fam th,
.ficha-fam td {
    padding: 9px 12px 9px 2px;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid var(--fic-linea);
    color: var(--text-primary);
}
.ficha-fam thead th {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--fic-acc);
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--fic-sup);   /* opaco: las filas pasan por debajo */
}
.ficha-fam tbody th { font-weight: 500; white-space: normal; min-width: 220px; }
.ficha-fam tbody th a { color: var(--text-primary); text-decoration: none; }
.ficha-fam tbody th a:hover { color: var(--fic-acc); }
.ficha-fam tbody tr:last-child th,
.ficha-fam tbody tr:last-child td { border-bottom: 0; }
.ficha-fam tr.actual th,
.ficha-fam tr.actual td { background: var(--fic-hueco); font-weight: 700; }
.ficha-fam tr.actual th { box-shadow: inset 3px 0 0 var(--fic-acc); padding-left: 12px; }
.ficha-fam tr.actual em {
    margin-left: 6px;
    font-style: normal;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--fic-acc);
}

/* Según el ancho de la columna de contenido (.ficha-main), no el de la ventana: con la foto a la
   izquierda, la columna es bastante más estrecha que la pantalla */
@container (max-width: 780px) {
    .ficha-pos li { grid-template-columns: 1fr auto; gap: 8px 14px; }
    .pos-barra { grid-column: 1 / -1; }
    .pos-txt { grid-column: 1 / -1; }
}

/* ── Dónde comprar: una sola lista hundida, una fila por tienda (logo · precio · stock · flecha) ── */
.ficha-compra {
    display: flex;
    flex-direction: column;
    margin-top: 18px;
    padding: 4px 8px;
    border-radius: 14px;
    background: var(--fic-hueco);
    box-shadow: var(--fic-hondo);
}
.compra-tienda {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 6px;
    font-size: 13px;
    text-decoration: none;
    color: var(--text-primary);
    transition: color .15s;
}
.compra-tienda + .compra-tienda { border-top: 1px solid var(--fic-linea); }
.compra-tienda:hover { color: var(--fic-acc); }
.compra-tienda > i { margin-left: auto; font-size: 11px; opacity: .6; }
/* Logos de las tiendas, todos en una columna del mismo ancho. El de Coolmod es gris muy oscuro:
   va sobre una pastilla clara, igual que en el modal "Elegir tienda" de los comparadores. */
.compra-logo { flex: 0 0 104px; display: inline-flex; align-items: center; justify-content: center; height: 22px; }
.compra-logo img { height: 100%; width: auto; max-width: 96px; object-fit: contain; }
.compra-logo.chip { height: 26px; padding: 4px 8px; border-radius: 7px; background: #fff; box-sizing: border-box; }
.compra-precio { min-width: 74px; font-size: 15px; color: var(--fic-acc); }
.compra-precio-no { font-size: 12.5px; color: var(--text-secondary); }
.compra-stock { font-size: 11.5px; color: var(--text-secondary); }
.compra-stock.si { color: #4cc38a; }
.compra-stock.no { color: #e5534b; }

/* ── ¿Es compatible con…? ──────────────────────────────────── */
.cf { margin-bottom: 26px; }
.cf-pregunta { margin: -4px 0 12px; font-size: 15px; font-weight: 700; color: var(--text-primary); }
.cf-tipos { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cf-tipo {
    padding: 8px 14px;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-secondary);
    background: var(--fic-sup);
    box-shadow: var(--fic-suave);
    transition: color .15s, box-shadow .15s;
}
.cf-tipo:hover { color: var(--fic-acc); }
.cf-tipo.on { color: var(--fic-acc); background: var(--fic-hueco); box-shadow: var(--fic-hondo); }

.cf-buscador { position: relative; max-width: 620px; }
.cf-buscador > i {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    font-size: 13px; color: var(--text-secondary); pointer-events: none;
}
.cf-input {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 16px 13px 42px;
    border: 0;
    border-radius: 13px;
    font: inherit;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--fic-hueco);
    box-shadow: var(--fic-hondo);
    outline: none;
}
.cf-input:focus { box-shadow: var(--fic-hondo), 0 0 0 2px var(--fic-acc); }
.cf-sugerencias {
    position: absolute;
    z-index: 20;
    left: 0; right: 0; top: calc(100% + 8px);
    max-height: 320px;
    overflow-y: auto;
    margin: 0;
    padding: 6px;
    list-style: none;
    border-radius: 13px;
    background: var(--fic-sup);
    box-shadow: var(--fic-alto);
}
.cf-sugerencias li {
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 13.5px;
    cursor: pointer;
    color: var(--text-primary);
}
.cf-sugerencias li:hover,
.cf-sugerencias li.activa { color: var(--fic-acc); background: var(--fic-hueco); }
.cf-sugerencias li.cf-vacio { cursor: default; color: var(--text-secondary); background: none; }

.cf-resultado { margin-top: 18px; max-width: 820px; }
.cf-cargando { color: var(--text-secondary); font-size: 13.5px; }
.cf-veredicto {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 12px;
    padding: 8px 14px;
    border-radius: 11px;
    font-size: 14.5px;
    font-weight: 700;
    background: var(--fic-hueco);
    box-shadow: var(--fic-hondo);
}
.cf-veredicto::before { font-family: 'Font Awesome 6 Free'; font-weight: 900; }
.cf-veredicto.v-ok { color: #4cc38a; }
.cf-veredicto.v-ok::before { content: "\f00c"; }
.cf-veredicto.v-aviso { color: #e0a93b; }
.cf-veredicto.v-aviso::before { content: "\f071"; }
.cf-veredicto.v-no { color: #e5534b; }
.cf-veredicto.v-no::before { content: "\f00d"; }
.cf-veredicto.v-desconocido { color: var(--text-secondary); }
.cf-veredicto.v-desconocido::before { content: "\f128"; }

.cf-motivos { margin: 0 0 10px; padding: 0; list-style: none; }
.cf-motivos li {
    position: relative;
    padding: 9px 2px 9px 28px;
    border-bottom: 1px solid var(--fic-linea);
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text-secondary);
}
.cf-motivos li:last-child { border-bottom: 0; }
.cf-motivos li::before {
    position: absolute; left: 4px; top: 10px;
    font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 12px;
}
.cf-motivos li.e-ok::before { content: "\f00c"; color: #4cc38a; }
.cf-motivos li.e-aviso::before { content: "\f071"; color: #e0a93b; }
.cf-motivos li.e-no::before { content: "\f00d"; color: #e5534b; }
.cf-motivos li.e-info::before { content: "\f05a"; color: var(--text-secondary); }
.cf-que { font-weight: 700; color: var(--text-primary); margin-right: 4px; }
.cf-que::after { content: ":"; }

/* Familia: icono para comparar las dos */
.ficha-fam .fam-cmp { width: 30px; padding-right: 6px; text-align: center; }
.ficha-fam .fam-cmp a { color: var(--text-secondary); font-size: 12px; }
.ficha-fam .fam-cmp a:hover { color: var(--fic-acc); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 900px) {
    .ficha-specs { columns: 1; }
}
@media (max-width: 720px) {
    .ficha { padding: 22px 18px; border-radius: 18px; }
    .ficha-cab { grid-template-columns: 1fr; gap: 20px; }
    .ficha-foto { width: 100%; height: 200px; }
    .ficha-titulo h1 { font-size: 23px; }
    .ficha-cat th { width: 50%; }
}

/* ============================================================
   LISTADO DE UN TIPO (componentes_lista.php)
   Dos vistas: lista (por defecto) y cuadrícula de 4 columnas.
   ============================================================ */
.lst-wrap { max-width: 1180px; }

/* Cabecera: icono hundido + título, alineados a la izquierda */
.lst-cab { display: flex; align-items: center; gap: 18px; margin: 6px 0 22px; }
.lst-cab .hub-ico { width: 60px; height: 60px; font-size: 24px; }
.lst-cab h1 { margin: 0; font-size: 28px; color: var(--text-primary); letter-spacing: -.01em; }
.lst-cab h1 em { font-style: normal; color: var(--fic-acc); }
.lst-cab p { margin: 4px 0 0; font-size: 13.5px; color: var(--text-secondary); }

/* Barra de control: una sola superficie elevada */
.lst-barra {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 20px;
    padding: 14px 16px;
    border-radius: var(--fic-radio);
    background: var(--fic-sup);
    box-shadow: var(--fic-alto);
}
.lst-opciones { display: flex; flex-wrap: wrap; gap: 12px; margin-left: auto; }
/* Segmentado: un hueco con el botón activo en relieve encima */
.lst-seg {
    display: inline-flex; align-items: center; gap: 3px; padding: 4px;
    border-radius: 12px; background: var(--fic-hueco); box-shadow: var(--fic-hondo);
}
.lst-seg a {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 12px; border-radius: 9px;
    font-size: 12.5px; font-weight: 700; text-decoration: none;
    color: var(--text-secondary); transition: color .15s, background .15s, box-shadow .15s;
}
.lst-seg a:hover { color: var(--text-primary); }
.lst-seg a.on { color: var(--fic-acc); background: var(--fic-sup); box-shadow: var(--fic-suave); }
.lst-seg-et { padding: 0 6px 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-secondary); }

.lst-rango { margin: 18px 4px 14px; font-size: 13px; color: var(--text-secondary); }
.lst-rango strong { color: var(--text-primary); }

/* ── Los modelos ───────────────────────────────────────────── */
.lst-items { list-style: none; margin: 0 0 30px; padding: 0; display: grid; gap: 12px; }
.lst-item {
    display: flex; align-items: center; gap: 18px;
    height: 100%;
    padding: 14px 18px 14px 14px;
    border-radius: 14px; text-decoration: none;
    background: var(--fic-sup); box-shadow: var(--fic-suave);
    transition: box-shadow .16s, transform .16s;
}
.lst-item:hover { transform: translateY(-2px); box-shadow: var(--fic-alto); }
.lst-item:active { transform: none; box-shadow: var(--fic-hondo); }

/* La foto va en un hueco; si no hay foto, se ve el icono del tipo */
.lst-foto {
    position: relative; flex-shrink: 0;
    width: 84px; height: 84px;
    display: grid; place-items: center;
    border-radius: 12px; background: var(--fic-hueco); box-shadow: var(--fic-hondo);
    overflow: hidden;
}
.lst-foto i { font-size: 26px; color: var(--fic-acc); opacity: .5; }
.lst-foto img {
    position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px);
    object-fit: contain;
}
.lst-foto img + i { display: none; }

.lst-cuerpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.lst-marca { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--fic-acc); }
.lst-nombre { font-size: 15px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.lst-specs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.lst-specs span {
    padding: 4px 9px; border-radius: 8px;
    font-size: 11.5px; color: var(--text-secondary);
    background: var(--fic-hueco); box-shadow: var(--fic-hondo);
}
.lst-flecha { color: var(--text-secondary); font-size: 13px; transition: color .15s, transform .15s; }
.lst-item:hover .lst-flecha { color: var(--fic-acc); transform: translateX(3px); }

/* Vista lista: uno debajo de otro */
.lst-items.es-lista { grid-template-columns: 1fr; }

/* Vista cuadrícula: 4 por fila, la foto arriba */
.lst-items.es-cuadricula { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.es-cuadricula .lst-item { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px; }
.es-cuadricula .lst-foto { width: 100%; height: 150px; }
.es-cuadricula .lst-nombre { font-size: 14px; }
.es-cuadricula .lst-flecha { display: none; }
.es-cuadricula .lst-specs span:nth-child(n+4) { display: none; }   /* en tarjeta caben tres */

@media (max-width: 1100px) { .lst-items.es-cuadricula { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px)  { .lst-items.es-cuadricula { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px)  {
    .lst-items.es-cuadricula { grid-template-columns: 1fr; }
    .lst-foto { width: 64px; height: 64px; }
    .lst-seg a span { display: none; }
    .lst-opciones { margin-left: 0; }
}

/* ── Paginación ────────────────────────────────────────────── */
.lst-pag { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 10px 0 40px; flex-wrap: wrap; }
.lst-pag-btn {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 11px 20px; border-radius: 12px;
    font-size: 13.5px; font-weight: 700; text-decoration: none;
    color: var(--text-primary); background: var(--fic-sup); box-shadow: var(--fic-suave);
    transition: box-shadow .16s, color .16s;
}
a.lst-pag-btn:hover { color: var(--fic-acc); box-shadow: var(--fic-alto); }
a.lst-pag-btn:active { box-shadow: var(--fic-hondo); }
.lst-pag-btn.off { opacity: .35; cursor: default; }
.lst-pag-info {
    padding: 11px 18px; border-radius: 12px; font-size: 13px;
    color: var(--text-secondary); background: var(--fic-hueco); box-shadow: var(--fic-hondo);
}
.lst-pag-info strong { color: var(--fic-acc); }

/* ============================================================
   PÁGINA DE COMPONENTES (componentes.php): un acceso por tipo
   y, debajo, la metodología. Mismo relieve que las fichas.
   ============================================================ */
/* Tarjetas por tipo: filas de 3 (2 y 1 en pantallas estrechas); la última fila, si queda incompleta, va centrada */
.hub-tipos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin: 10px 0 34px;
}
.hub-tipos .hub-tipo { flex: 0 0 calc((100% - 32px) / 3); }
@media (max-width: 1000px) { .hub-tipos .hub-tipo { flex-basis: calc((100% - 16px) / 2); } }
@media (max-width: 640px)  { .hub-tipos .hub-tipo { flex-basis: 100%; } }
.hub-tipo,
.hub-metodo {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: var(--fic-radio);
    text-decoration: none;
    background: var(--fic-sup);
    box-shadow: var(--fic-alto);
    transition: transform .16s, box-shadow .16s;
}
.hub-tipo:hover,
.hub-metodo:hover { transform: translateY(-2px); }
.hub-tipo:active,
.hub-metodo:active { transform: none; box-shadow: var(--fic-hondo); }

/* El icono va hundido: es la "etiqueta" de la tarjeta */
.hub-ico {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--fic-hueco);
    box-shadow: var(--fic-hondo);
    color: var(--fic-acc);
    font-size: 20px;
}
/* Icono PNG teñido con el color de .hub-ico: el PNG hace de máscara */
.hub-png {
    width: 34px; height: 34px; background: currentColor;
    -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat;
}
.hub-txt { flex: 1; min-width: 0; }
.hub-txt strong { display: block; font-size: 15px; color: var(--text-primary); }
.hub-txt small { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.5; color: var(--text-secondary); }
.hub-n {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--fic-acc);
    background: var(--fic-hueco);
    box-shadow: var(--fic-hondo);
}
.hub-metodo { margin-bottom: 40px; }
.hub-flecha { color: var(--fic-acc); font-size: 16px; }

/* Resultados de la búsqueda global (componentes.php?q=) */
#hub-res.cargando { opacity: .5; transition: opacity .15s; }
.hub-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 14px; }
.hub-cab .lst-rango { margin: 0 4px; }
.hub-grupo { margin: 0 0 12px; }
.hub-grupo .lst-items { margin-bottom: 0; }
.hub-grupo-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 4px 12px; font-size: 15px; font-weight: 700; color: var(--text-primary); }
.hub-mas { padding: 22px 0; text-align: center; font-size: 13px; color: var(--text-secondary); }
.hub-mas i { margin-right: 6px; color: var(--fic-acc); }
.hub-grupo-cab i { color: var(--fic-acc); margin-right: 8px; }
.hub-grupo-cab small { font-weight: 400; color: var(--text-secondary); }
.hub-grupo-cab a { font-size: 12.5px; font-weight: 600; color: var(--fic-acc); text-decoration: none; }
.hub-grupo-cab a i { margin: 0 0 0 4px; }

/* Buscador del listado de componentes (componentes_lista.php) */
.lst-buscar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; }
.lst-buscar-campo {
    flex: 1 1 280px; display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 42px;
    border-radius: 12px; background: var(--fic-hueco); box-shadow: var(--fic-hondo); color: var(--text-secondary);
}
.lst-buscar-campo:focus-within { outline: 2px solid var(--fic-acc); outline-offset: 2px; }
.lst-buscar-campo i { font-size: 13px; }
.lst-buscar-campo input {
    flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text-primary);
    font: inherit; font-size: 14px; outline: none;
}
.lst-buscar-campo input::placeholder { color: var(--text-secondary); opacity: .7; }
.lst-buscar-btn {
    height: 42px; padding: 0 18px; border: 0; border-radius: 12px; cursor: pointer;
    font: inherit; font-size: 13px; font-weight: 700; color: var(--text-primary); background: var(--fic-sup); box-shadow: var(--fic-suave);
}
.lst-buscar-btn:hover { color: var(--fic-acc); }
.lst-buscar-borrar { font-size: 12.5px; color: var(--fic-acc); }

/* Números de página del listado (paginación numerada) */
.lst-pag { gap: 8px; }
.lst-pag-num {
    min-width: 34px; padding: 7px 9px; border-radius: 10px; text-align: center;
    font-size: 13px; font-weight: 700; color: var(--text-secondary); text-decoration: none;
    background: var(--fic-sup); box-shadow: var(--fic-suave);
}
.lst-pag-num:hover { text-decoration: none; }
a.lst-pag-num:hover { color: var(--fic-acc); box-shadow: var(--fic-alto); }
.lst-pag-num.on { color: var(--fic-acc); background: var(--fic-hueco); box-shadow: var(--fic-hondo); }
.lst-pag-sep { color: var(--text-secondary); opacity: .6; }
@media (max-width: 560px) {
    .lst-pag { gap: 8px; }
    .lst-pag-num { min-width: 32px; padding: 6px 8px; font-size: 12px; }
}

/* Filtros de marca / fabricante / chip: listas desplegables (<details>), no una pastilla por marca */
.lst-filtros { display: flex; flex-wrap: wrap; gap: 12px; }
.lst-desp { position: relative; }
.lst-desp[open] { z-index: 30; }
.lst-desp summary {
    display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 12px;
    list-style: none; cursor: pointer; font-size: 13px; color: var(--text-primary);
    background: var(--fic-sup); box-shadow: var(--fic-suave); transition: color .15s;
}
.lst-desp summary::-webkit-details-marker { display: none; }
.lst-desp summary:hover { color: var(--fic-acc); }
.lst-desp-et { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--text-secondary); }
.lst-desp summary strong { font-weight: 700; color: var(--fic-acc); }
.lst-desp summary i { font-size: 10px; opacity: .6; transition: transform .15s; }
.lst-desp[open] summary { background: var(--fic-hueco); box-shadow: var(--fic-hondo); }
.lst-desp[open] summary i { transform: rotate(180deg); }
.lst-desp-panel {
    position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px; max-width: 86vw; max-height: 340px; overflow-y: auto;
    padding: 6px; border-radius: 14px; background: var(--fic-sup); box-shadow: var(--fic-alto);
    scrollbar-width: thin; scrollbar-color: var(--fic-acc) transparent;
}
.lst-desp-panel a {
    display: flex; justify-content: space-between; gap: 18px; padding: 8px 12px; border-radius: 9px;
    font-size: 13px; text-decoration: none; color: var(--text-secondary);
}
.lst-desp-panel a:hover { color: var(--fic-acc); background: var(--fic-hueco); }
.lst-desp-panel a.on { color: var(--fic-acc); font-weight: 700; }
.lst-desp-panel a span { font-size: 11px; font-weight: 400; opacity: .6; }
/* Texto propio de cada listado */
.lst-intro { margin: 8px 0 40px; padding: 18px 20px; border-radius: var(--fic-radio); background: var(--fic-hueco); box-shadow: var(--fic-hondo); }
.lst-intro h2 { margin: 0 0 8px; font-size: 15px; color: var(--text-primary); }
.lst-intro p { margin: 0 0 8px; font-size: 13px; line-height: 1.65; color: var(--text-secondary); }
.lst-intro p:last-child { margin-bottom: 0; }

/* Resumen en prosa de la ficha */
.ficha-resumen p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--text-secondary); max-width: 78ch; }
