/* =====================================================================
   FICHA DE PRODUCTO — "Propuesta A"
   Maqueta aprobada: propuestas/producto-a.html

   Todo cuelga de .ficha a proposito. Los nombres de la maqueta (.btn, .card,
   .form, .tag, .tabs...) son demasiado genericos para soltarlos en una hoja
   global junto a app.css, asi que se acotan al arbol de la ficha.

   La cabecera del tema es position:relative en todos los breakpoints
   (custom.css y nav-dropdown.css la fijan asi), de modo que los elementos
   pegajosos de aqui se anclan a top:0 y no hay que descontar su altura.
   ===================================================================== */

.ficha {
    --red: #fc0f10;
    --red-dark: #d10a0b;
    --ink: #1b1e22;
    --grey-1: #f6f7f8;
    --grey-2: #eceef0;
    --grey-3: #d8dcdf;
    --text: #3b4147;
    --muted: #7a838b;
    --r: 4px;
    --shadow: 0 1px 2px rgba(16, 20, 24, .05), 0 8px 24px -12px rgba(16, 20, 24, .18);

    color: var(--text);
    font-size: 16px;
    line-height: 1.65;
}

.ficha *,
.ficha *::before,
.ficha *::after {
    box-sizing: border-box;
}

.ficha img {
    display: block;
    max-width: 100%;
}

.ficha a {
    color: inherit;
    text-decoration: none;
}

.ficha h1,
.ficha h2,
.ficha h3,
.ficha h4 {
    color: var(--ink);
    font-weight: 700;
    line-height: 1.18;
    margin: 0;
}

.ficha__wrap {
    margin: 0 auto;
    max-width: 1240px;
    padding: 0 24px;
    width: 100%;
}

.ficha .eyebrow {
    color: var(--red);
    font: 700 11px/1 "Roboto Condensed", "Roboto", sans-serif;
    letter-spacing: .16em;
    margin: 0;
    text-transform: uppercase;
}

/* ---------- botones ---------- */
.ficha .btn {
    align-items: center;
    border: 1px solid transparent;
    border-radius: var(--r);
    cursor: pointer;
    display: inline-flex;
    font: 700 12.5px/1 "Roboto Condensed", "Roboto", sans-serif;
    gap: 9px;
    justify-content: center;
    letter-spacing: .11em;
    padding: 14px 22px;
    text-transform: uppercase;
    transition: background .18s, color .18s, border-color .18s, transform .12s;
}

.ficha .btn:active { transform: translateY(1px); }
.ficha .btn--red { background: var(--red); color: #fff; }
.ficha .btn--red:hover { background: var(--red-dark); color: #fff; }
.ficha .btn--dark { background: var(--ink); color: #fff; }
.ficha .btn--dark:hover { background: #000; color: #fff; }
.ficha .btn--ghost { background: #fff; border-color: var(--grey-3); color: var(--ink); }
.ficha .btn--ghost:hover { border-color: var(--ink); }
.ficha .btn--lg { font-size: 13.5px; padding: 17px 26px; }

/* ---------- migas ---------- */
.ficha .crumbs {
    background: var(--grey-1);
    border-bottom: 1px solid var(--grey-2);
    color: var(--muted);
    font-size: 12.5px;
}

.ficha .crumbs .ficha__wrap {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    min-height: 46px;
    padding-bottom: 8px;
    padding-top: 8px;
}

.ficha .crumbs a:hover { color: var(--red); }
.ficha .crumbs .sep { color: var(--grey-3); }
.ficha .crumbs__actual { color: var(--ink); font-weight: 500; }

/* ---------- bloque principal ---------- */
.ficha .product { padding: 44px 0 10px; }

.ficha .product__grid {
    align-items: start;
    display: grid;
    gap: 56px;
    grid-template-columns: minmax(0, 1fr) 430px;
}

.ficha .gallery__stage {
    align-items: center;
    aspect-ratio: 4 / 3;
    background: linear-gradient(160deg, #fbfbfc 0%, #eef0f2 100%);
    border: 1px solid var(--grey-2);
    border-radius: var(--r);
    display: grid;
    justify-items: center;
    overflow: hidden;
    padding: 44px;
    position: relative;
}

.ficha .gallery__stage::after {
    background: radial-gradient(60% 100% at 50% 100%, rgba(27, 30, 34, .10), transparent 70%);
    content: "";
    height: 38%;
    inset: auto 0 0 0;
    position: absolute;
}

.ficha .gallery__stage img {
    max-height: 100%;
    mix-blend-mode: multiply;
    object-fit: contain;
    position: relative;
    width: auto;
    z-index: 1;
}

.ficha .gallery__flag {
    background: var(--red);
    color: #fff;
    font: 700 10.5px/1 "Roboto Condensed", sans-serif;
    left: 0;
    letter-spacing: .14em;
    padding: 9px 14px;
    position: absolute;
    text-transform: uppercase;
    top: 0;
    z-index: 2;
}

.ficha .gallery__thumbs {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(5, 1fr);
    margin-top: 12px;
}

.ficha .gallery__thumbs button {
    align-items: center;
    aspect-ratio: 1;
    background: var(--grey-1);
    border: 1px solid var(--grey-2);
    border-radius: var(--r);
    cursor: pointer;
    display: grid;
    justify-items: center;
    padding: 8px;
    transition: border-color .16s;
}

.ficha .gallery__thumbs button:hover { border-color: var(--muted); }

.ficha .gallery__thumbs button[aria-current="true"] {
    border-color: var(--red);
    box-shadow: 0 0 0 1px var(--red);
}

.ficha .gallery__thumbs img {
    max-height: 100%;
    mix-blend-mode: multiply;
    object-fit: contain;
}

/* ---------- panel de accion ---------- */
.ficha .buy { position: sticky; top: 24px; }

.ficha .buy__brand {
    align-items: center;
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
}

.ficha .buy__brand img { filter: grayscale(1); height: 34px; opacity: .85; width: auto; }
.ficha .buy__brand .div { background: var(--grey-3); height: 26px; width: 1px; }
.ficha .buy__brand span { color: var(--muted); font-size: 12px; letter-spacing: .03em; }

.ficha .buy h1 {
    font-size: 32px;
    letter-spacing: -.015em;
    margin: 8px 0 14px;
}

.ficha .buy__ref {
    align-items: center;
    border-bottom: 1px solid var(--grey-2);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 18px;
}

.ficha .tag {
    align-items: center;
    background: var(--grey-1);
    border: 1px solid var(--grey-2);
    border-radius: 100px;
    color: var(--text);
    display: inline-flex;
    font-size: 12px;
    gap: 6px;
    padding: 6px 13px;
}

.ficha .tag b { color: var(--ink); font-weight: 500; }
.ficha .tag--mono b { font-family: "Roboto Condensed", monospace; letter-spacing: .06em; }

.ficha .buy__lead { font-size: 15.5px; line-height: 1.7; margin: 0 0 22px; }

.ficha .buy__highlights {
    display: grid;
    gap: 9px;
    list-style: none;
    margin: 0 0 26px;
    padding: 0;
}

.ficha .buy__highlights li {
    align-items: flex-start;
    display: flex;
    font-size: 14px;
    gap: 11px;
}

.ficha .buy__highlights svg { color: var(--red); flex: none; margin-top: 3px; }

.ficha .buy__actions { display: grid; gap: 10px; }
.ficha .buy__actions .btn { width: 100%; }
.ficha .buy__split { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.ficha .buy__note { color: var(--muted); font-size: 12.5px; margin: 14px 0 0; text-align: center; }

.ficha .buy__trust {
    background: var(--grey-1);
    border: 1px solid var(--grey-2);
    border-radius: var(--r);
    margin-top: 24px;
    padding: 18px 20px;
}

.ficha .buy__trust h4 {
    font: 700 11px/1 "Roboto Condensed", sans-serif;
    letter-spacing: .14em;
    margin: 0 0 13px;
    text-transform: uppercase;
}

.ficha .buy__trust ul { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.ficha .buy__trust li { align-items: flex-start; display: flex; font-size: 13.5px; gap: 10px; }
.ficha .buy__trust svg { color: var(--ink); flex: none; margin-top: 2px; }

/* ---------- pestañas ---------- */
.ficha .tabs {
    background: #fff;
    border-bottom: 1px solid var(--grey-2);
    border-top: 1px solid var(--grey-2);
    margin-top: 52px;
    position: sticky;
    top: 0;
    z-index: 40;
}

.ficha .tabs .ficha__wrap { display: flex; gap: 4px; overflow-x: auto; }

.ficha .tabs a {
    border-bottom: 3px solid transparent;
    color: var(--muted);
    font: 700 12.5px/1 "Roboto Condensed", sans-serif;
    letter-spacing: .12em;
    padding: 17px 20px;
    text-transform: uppercase;
    white-space: nowrap;
}

.ficha .tabs a:hover { color: var(--ink); }
.ficha .tabs a.is-active { border-bottom-color: var(--red); color: var(--ink); }
.ficha .tabs .tabs__cta { align-items: center; display: flex; margin-left: auto; padding: 9px 0; }
.ficha .tabs .tabs__cta a { color: #fff; }

/* ---------- secciones ---------- */
.ficha .sec { padding: 66px 0; scroll-margin-top: 70px; }

.ficha .sec--grey {
    background: var(--grey-1);
    border-bottom: 1px solid var(--grey-2);
    border-top: 1px solid var(--grey-2);
}

.ficha .sec__head { margin-bottom: 34px; max-width: 640px; }
.ficha .sec__head h2 { font-size: 26px; letter-spacing: -.01em; margin: 8px 0 10px; }
.ficha .sec__head p { color: var(--muted); font-size: 15px; margin: 0; }

.ficha .features {
    background: var(--grey-2);
    border: 1px solid var(--grey-2);
    border-radius: var(--r);
    display: grid;
    gap: 1px;
    grid-template-columns: repeat(2, 1fr);
    overflow: hidden;
}

.ficha .feature { background: #fff; padding: 30px 32px; }

.ficha .feature__n {
    color: var(--red);
    display: block;
    font: 700 12px/1 "Roboto Condensed", sans-serif;
    letter-spacing: .16em;
    margin-bottom: 12px;
}

.ficha .feature h3 { font-size: 16px; margin-bottom: 10px; }
.ficha .feature p { font-size: 14.5px; margin: 0; }
.ficha .feature ul { font-size: 14.5px; margin: 10px 0 0; padding-left: 18px; }
.ficha .feature li { margin: 5px 0; }
.ficha .feature li::marker { color: var(--red); }
/* La ultima ficha, si queda impar, ocupa las dos columnas */
.ficha .feature--ancha { grid-column: 1 / -1; }

/* Descripcion que no es una lista de puntos: se pinta como texto corrido */
.ficha .prosa { font-size: 15.5px; max-width: 70ch; }
.ficha .prosa p { margin: 0 0 1.1em; }
.ficha .prosa ul { padding-left: 20px; }
.ficha .prosa li { margin: .4em 0; }
.ficha .prosa li::marker { color: var(--red); }

/* Imagenes insertadas en la descripcion desde el editor de WordPress. El
   contenido migrado trae las clases clasicas (alignleft, alignright...) y hay
   que respetarlas, pero sin dejar que una foto de 660px reviente la columna. */
.ficha .prosa img {
    border-radius: var(--r);
    height: auto;
    max-width: 100%;
}

.ficha .prosa figure { margin: 0 0 1.4em; }
.ficha .prosa .aligncenter { display: block; margin: 0 auto 1.4em; }
.ficha .prosa .alignnone { margin: 0 0 1.4em; }

.ficha .prosa .alignleft {
    float: left;
    margin: .3em 1.6em 1.2em 0;
    max-width: 45%;
}

.ficha .prosa .alignright {
    float: right;
    margin: .3em 0 1.2em 1.6em;
    max-width: 45%;
}

/* Sin esto el bloque siguiente se sube al hueco que deja la foto flotada */
.ficha .prosa::after { clear: both; content: ""; display: table; }

/* Tablas de caracteristicas incrustadas en el texto migrado
   (<table class="table">, con su width="382" y su height en linea). Llegaban
   sin una sola regla: ni bordes, ni relleno, ni margen, asi que la ultima fila
   quedaba pegada a los bloques numerados de abajo. Se les da el mismo aspecto
   que a la tabla de Especificaciones para que la ficha no tenga dos estilos de
   tabla distintos. */
.ficha .prosa table {
    border-collapse: collapse;
    margin: 0 0 1.6em;
    width: 100%;
}

.ficha .prosa th,
.ficha .prosa td {
    border-bottom: 1px solid var(--grey-2);
    font-size: 14.5px;
    padding: 11px 14px 11px 0;
    text-align: left;
    vertical-align: top;
}

.ficha .prosa th {
    color: var(--muted);
    font-weight: 500;
}

/* Primera columna el concepto, segunda el valor: igual que .spec-row */
.ficha .prosa td:first-child { color: var(--muted); width: 45%; }
.ficha .prosa td + td { color: var(--ink); font-weight: 500; }
.ficha .prosa tr:last-child td { border-bottom: 0; }

/* El ultimo elemento no arrastra margen: el hueco lo pone el bloque siguiente */
.ficha .prosa > *:last-child { margin-bottom: 0; }

/* EL FALLO QUE SE VEIA: descripcion y bloques numerados iban pegados */
.ficha .prosa + .features { margin-top: 2.6em; }

.ficha .prosa .wp-caption { height: auto; max-width: 100%; }

.ficha .prosa .wp-caption-text {
    color: var(--muted);
    font-size: 13px;
    margin: .5em 0 0;
}

/* Videos de YouTube incrustados: en el contenido migrado hay unos cuantos */
.ficha .prosa iframe {
    aspect-ratio: 16 / 9;
    border: 0;
    height: auto;
    max-width: 100%;
    width: 100%;
}

@media only screen and (max-width: 600px) {
    /* En pantalla estrecha una foto flotada al 45% deja columnas de texto
       de tres palabras: mejor a todo el ancho */
    .ficha .prosa .alignleft,
    .ficha .prosa .alignright {
        float: none;
        margin: 0 0 1.4em;
        max-width: 100%;
    }

    /* Una tabla de dos columnas con valores tipo "230 VAC 1ph 50/60 Hz" no
       cabe en un movil. Se deja rodar en horizontal ella sola, en vez de
       empujar la pagina entera. */
    .ficha .prosa table {
        display: block;
        overflow-x: auto;
    }

    .ficha .prosa td:first-child { width: auto; }
}

/* ---------- especificaciones ---------- */
.ficha .specs { display: grid; gap: 0 48px; grid-template-columns: 1fr 1fr; }
.ficha .specs dl { margin: 0; }

.ficha .spec-row {
    border-bottom: 1px solid var(--grey-2);
    display: grid;
    font-size: 14.5px;
    gap: 20px;
    grid-template-columns: 190px 1fr;
    padding: 14px 0;
}

.ficha .spec-row dt { color: var(--muted); }
.ficha .spec-row dd { color: var(--ink); font-weight: 500; margin: 0; }

/* ---------- documentacion ---------- */
.ficha .docs { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }

.ficha .doc {
    align-items: center;
    background: #fff;
    border: 1px solid var(--grey-2);
    border-radius: var(--r);
    display: flex;
    gap: 16px;
    padding: 20px;
    transition: border-color .16s, box-shadow .16s;
}

.ficha .doc:hover { border-color: var(--ink); box-shadow: var(--shadow); }

.ficha .doc__icon {
    align-items: center;
    background: var(--ink);
    border-radius: 3px;
    color: #fff;
    display: grid;
    flex: none;
    font: 700 10px/1 "Roboto Condensed", sans-serif;
    height: 52px;
    justify-items: center;
    letter-spacing: .08em;
    width: 44px;
}

.ficha .doc--pdf .doc__icon { background: var(--red); }
.ficha .doc strong { color: var(--ink); display: block; font-size: 14.5px; font-weight: 500; }
.ficha .doc span { color: var(--muted); font-size: 12.5px; }

/* ---------- banda de servicio tecnico ---------- */
.ficha .service {
    background: var(--grey-1);
    border-bottom: 1px solid var(--grey-2);
    border-top: 1px solid var(--grey-2);
}

.ficha .service .ficha__wrap {
    align-items: center;
    display: grid;
    gap: 60px;
    grid-template-columns: 1.1fr 1fr;
    padding: 60px 24px;
}

.ficha .service h2 { font-size: 28px; letter-spacing: -.01em; margin: 8px 0 14px; }
.ficha .service p { font-size: 15.5px; margin: 0 0 26px; max-width: 46ch; }

.ficha .service__grid {
    background: var(--grey-2);
    border: 1px solid var(--grey-2);
    display: grid;
    gap: 1px;
    grid-template-columns: 1fr 1fr;
}

.ficha .service__item { background: #fff; padding: 24px 26px; }
.ficha .service__item--ancha { grid-column: 1 / -1; }
.ficha .service__item strong { color: var(--ink); display: block; font: 700 32px/1 "Roboto Condensed", sans-serif; }
.ficha .service__item span { color: var(--muted); display: block; font-size: 13px; margin-top: 6px; }

/* ---------- productos relacionados ---------- */
.ficha .cards { display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); list-style: none; margin: 0; padding: 0; }

.ficha .card {
    background: #fff;
    border: 1px solid var(--grey-2);
    border-radius: var(--r);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    transition: border-color .18s, box-shadow .18s, transform .18s;
}

.ficha .card:hover { border-color: var(--grey-3); box-shadow: var(--shadow); transform: translateY(-3px); }

.ficha .card__img {
    align-items: center;
    aspect-ratio: 4 / 3;
    background: var(--grey-1);
    border-bottom: 1px solid var(--grey-2);
    display: grid;
    justify-items: center;
    padding: 22px;
}

.ficha .card__img img { max-height: 100%; mix-blend-mode: multiply; object-fit: contain; }
.ficha .card__body { display: flex; flex: 1; flex-direction: column; padding: 18px 20px 22px; }

.ficha .card__cat {
    color: var(--muted);
    font: 700 10px/1 "Roboto Condensed", sans-serif;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.ficha .card h3 { flex: 1; font-size: 14.5px; font-weight: 500; line-height: 1.4; margin: 10px 0 14px; }

.ficha .card__more {
    align-items: center;
    color: var(--red);
    display: flex;
    font: 700 11.5px/1 "Roboto Condensed", sans-serif;
    gap: 7px;
    letter-spacing: .12em;
    text-transform: uppercase;
    transition: gap .18s;
}

.ficha .card:hover .card__more { gap: 11px; }

/* ---------- formulario de presupuesto ---------- */
.ficha .ask { background: #fff; border-top: 1px solid var(--grey-2); }
.ficha .ask .ficha__wrap { display: grid; gap: 70px; grid-template-columns: 1fr 1.1fr; padding: 66px 24px; }
.ficha .ask h2 { font-size: 27px; letter-spacing: -.01em; margin: 8px 0 14px; }
.ficha .ask p { margin: 0 0 24px; }
.ficha .ask__contact { display: grid; font-size: 14.5px; gap: 14px; }
.ficha .ask__contact div { align-items: flex-start; display: flex; gap: 12px; }
.ficha .ask__contact svg { color: var(--red); flex: none; margin-top: 3px; }
.ficha .ask__contact strong { color: var(--ink); }

.ficha .form {
    background: var(--grey-1);
    border: 1px solid var(--grey-2);
    border-radius: var(--r);
    display: grid;
    gap: 14px;
    padding: 30px;
}

.ficha .form label {
    color: var(--muted);
    display: block;
    font: 500 11.5px/1 "Roboto", sans-serif;
    letter-spacing: .08em;
    margin-bottom: 7px;
    text-transform: uppercase;
}

.ficha .form input,
.ficha .form textarea {
    background: #fff;
    border: 1px solid var(--grey-3);
    border-radius: var(--r);
    color: var(--ink);
    font: 400 14.5px/1.5 inherit;
    margin: 0;
    padding: 11px 13px;
    width: 100%;
}

.ficha .form input:focus,
.ficha .form textarea:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(252, 15, 16, .1);
    outline: none;
}

.ficha .form textarea { min-height: 96px; resize: vertical; }
.ficha .form .prefill { background: var(--grey-2); color: var(--muted); }
.ficha .form__row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }

.ficha .form__legal {
    align-items: flex-start;
    color: var(--muted);
    display: flex;
    font-size: 12px;
    gap: 9px;
    letter-spacing: normal;
    line-height: 1.5;
    margin-top: 2px;
    text-transform: none;
}

.ficha .form__legal input { margin: 2px 0 0; width: auto; }
.ficha .form__legal a { text-decoration: underline; }

/* Honeypot antispam: fuera de pantalla, igual que en page-contacto.php */
.ficha .form__hp { left: -9999px; position: absolute; }

.ficha .form__notice {
    border-radius: var(--r);
    font-size: 14px;
    margin: 0;
    padding: 12px 14px;
}

.ficha .form__notice--ok { background: #e8f5ec; border: 1px solid #b7ddc4; color: #1a6c39; }
.ficha .form__notice--error { background: #fdecec; border: 1px solid #f3bcbc; color: #a11b1b; }

/* ---------- responsive ---------- */
@media only screen and (max-width: 1080px) {
    .ficha .product__grid { gap: 36px; grid-template-columns: 1fr; }
    .ficha .buy { position: static; }
    .ficha .specs,
    .ficha .features,
    .ficha .service .ficha__wrap,
    .ficha .ask .ficha__wrap { grid-template-columns: 1fr; }
    .ficha .feature--ancha { grid-column: auto; }
    .ficha .cards { grid-template-columns: repeat(2, 1fr); }
    .ficha .docs { grid-template-columns: 1fr; }
}

@media only screen and (max-width: 760px) {
    .ficha .buy h1 { font-size: 26px; }
    .ficha .cards { grid-template-columns: repeat(2, 1fr); }
    .ficha .gallery__thumbs { grid-template-columns: repeat(4, 1fr); }
    .ficha .service__grid { grid-template-columns: 1fr; }
    .ficha .form__row { grid-template-columns: 1fr; }
    .ficha .spec-row { grid-template-columns: 1fr; gap: 2px; }
    .ficha .tabs { position: static; }
    .ficha .sec { padding: 44px 0; scroll-margin-top: 12px; }
}

/* En papel sobran el panel de compra, las pestañas y todo lo accionable */
@media print {
    .ficha .tabs,
    .ficha .buy__actions,
    .ficha .buy__note,
    .ficha .gallery__thumbs,
    .ficha .docs,
    .ficha .service,
    .ficha .ask,
    .ficha .cards { display: none; }
    .ficha .product__grid { grid-template-columns: 1fr 1fr; }
}
