/* =========================================================
   FARMAVITAE — "Fabrica con Nosotros" (maquila)
   Rediseño Parte 5 — sistema --fv-*. Mobile-first; en
   escritorio el contenido se centra en una columna.
   ========================================================= */

.mercado-main { max-width: 780px; }

/* ---- Hero (bloque oscuro) ---- */
.fcn-hero-maquila {
    background: linear-gradient(135deg, var(--fv-ink, #0B2545) 0%, #0F2D52 100%);
    border-radius: var(--fv-r-xl, 18px);
    padding: 26px var(--fv-s-4, 16px);
    margin: 0 0 var(--fv-s-6, 32px);
    color: #fff;
}
.fcn-hero-maquila-eyebrow {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--fv-teal, #4CE0D0);
    margin-bottom: 8px;
}
.fcn-hero-maquila h1 {
    font-family: var(--fv-font);
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 8px;
    color: #fff !important;
}
.fcn-hero-maquila > p {
    font-size: 13px;
    line-height: 1.55;
    color: rgba(255,255,255,.82) !important;
    margin: 0 0 18px;
}
.fcn-hero-maquila-datos {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
.fcn-hero-maquila-datos > div { min-width: 84px; }
.fcn-hero-maquila-datos strong {
    display: block;
    font-size: 17px;
    font-weight: 800;
    color: #fff;
}
.fcn-hero-maquila-datos span {
    display: block;
    font-size: 10.5px;
    font-weight: 600;
    color: #9DC4E8;
    margin-top: 1px;
}

/* ---- Bloques de sección ---- */
.fcn-bloque { margin: 0 0 var(--fv-s-6, 32px); }
.fcn-bloque-head { margin-bottom: var(--fv-s-4, 16px); }
.fcn-bloque-head h2 {
    font-family: var(--fv-font);
    font-size: 19px;
    font-weight: 800;
    color: var(--fv-ink, #0B2545);
    margin: 0;
}
.fcn-bloque-head p {
    margin: 4px 0 0;
    font-size: 12.5px;
    color: var(--fv-muted, #5A6B80);
}

/* ---- Formatos (grilla de 6) ---- */
.fcn-formatos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--fv-s-2, 8px);
}
.fcn-formato {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 5px;
    padding: 12px 6px;
    border: 1px solid var(--fv-border, #E9EEF3);
    border-radius: var(--fv-r-md, 12px);
    background: #fff;
}
.fcn-formato-ico {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--fv-surface, #F2F5F9);
    color: var(--fv-blue, #0B57A4);
    display: flex;
    align-items: center;
    justify-content: center;
}
.fcn-formato-ico svg { width: 20px; height: 20px; }
.fcn-formato strong { font-size: 11.5px; font-weight: 700; color: var(--fv-ink, #0B2545); line-height: 1.2; }
.fcn-formato span { font-size: 9.5px; color: var(--fv-soft, #8494A8); line-height: 1.2; }

/* ---- Cómo funciona (línea de tiempo vertical) ---- */
.fcn-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}
.fcn-timeline li {
    position: relative;
    display: flex;
    gap: 14px;
    padding-bottom: 20px;
}
.fcn-timeline li:last-child { padding-bottom: 0; }
.fcn-timeline li::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 34px;
    bottom: 0;
    width: 2px;
    background: var(--fv-border, #E9EEF3);
}
.fcn-timeline li:last-child::before { display: none; }
.fcn-timeline-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--fv-blue, #0B57A4);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
.fcn-timeline li > div { padding-top: 3px; }
.fcn-timeline strong { display: block; font-size: 14px; font-weight: 700; color: var(--fv-ink, #0B2545); }
.fcn-timeline p { margin: 3px 0 5px; font-size: 12px; line-height: 1.5; color: var(--fv-muted, #5A6B80); }
.fcn-timeline-tiempo {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--fv-blue, #0B57A4);
    background: var(--fv-surface, #F2F5F9);
    padding: 2px 9px;
    border-radius: var(--fv-r-pill, 999px);
}

/* ---- FAQ ---- */
.fcn-faq { display: flex; flex-direction: column; gap: 8px; }
.fcn-faq details {
    border: 1px solid var(--fv-border, #E9EEF3);
    border-radius: var(--fv-r-md, 12px);
    background: #fff;
    overflow: hidden;
}
.fcn-faq summary {
    list-style: none;
    cursor: pointer;
    padding: 13px 42px 13px 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--fv-ink, #0B2545);
    position: relative;
}
.fcn-faq summary::-webkit-details-marker { display: none; }
.fcn-faq-mas {
    position: absolute;
    right: 14px;
    top: 50%;
    width: 12px;
    height: 12px;
    transform: translateY(-50%);
}
.fcn-faq-mas::before,
.fcn-faq-mas::after {
    content: '';
    position: absolute;
    background: var(--fv-soft, #8494A8);
    transition: transform .2s ease;
}
.fcn-faq-mas::before { left: 0; right: 0; top: 5px; height: 2px; }
.fcn-faq-mas::after { top: 0; bottom: 0; left: 5px; width: 2px; }
.fcn-faq details[open] .fcn-faq-mas::after { transform: scaleY(0); }
.fcn-faq details p {
    margin: 0;
    padding: 0 14px 14px;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--fv-muted, #5A6B80);
}

/* ---- Formulario 3 pasos ----
   La tarjeta exterior va en gris (--fv-surface) para señalar "esta es la
   parte que llena el cliente"; el paso activo va en una tarjeta blanca
   dentro. Mismo tratamiento en celular y escritorio. */
.fcn-form-card {
    border: 1px solid var(--fv-border, #E9EEF3);
    border-radius: var(--fv-r-lg, 14px);
    background: var(--fv-surface, #F2F5F9);
    padding: var(--fv-s-3, 12px);
}
.fcn-form-intro {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
    padding-bottom: var(--fv-s-3, 12px);
    margin-bottom: var(--fv-s-3, 12px);
    border-bottom: 1px solid var(--fv-border, #E9EEF3);
}
.fcn-form-intro-etiqueta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--fv-blue, #0B57A4);
}
.fcn-form-intro-etiqueta::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--fv-blue, #0B57A4);
}
.fcn-paso-indicador {
    font-size: 12px;
    font-weight: 700;
    color: var(--fv-muted, #5A6B80);
}
.fcn-progreso { margin-bottom: var(--fv-s-4, 16px); }
.fcn-progreso.oculto { display: none; }
.fcn-progreso-barra {
    height: 4px;
    border-radius: var(--fv-r-pill, 999px);
    background: var(--fv-border, #E9EEF3);
    overflow: hidden;
}
.fcn-progreso-barra span {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--fv-blue, #0B57A4);
    transition: width .3s ease;
}
.fcn-progreso-pasos {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
}
.fcn-progreso-paso {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--fv-soft, #8494A8);
}
.fcn-progreso-paso.activo { color: var(--fv-blue, #0B57A4); }

.fcn-paso-form {
    background: #fff;
    border: 1px solid var(--fv-border, #E9EEF3);
    border-radius: var(--fv-r-md, 12px);
    padding: 14px;
}
.fcn-paso-form.oculto { display: none; }
.fcn-label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--fv-ink, #0B2545);
    margin: 14px 0 6px;
}
.fcn-paso-form > .fcn-label:first-child { margin-top: 0; }
.fcn-req { color: var(--fv-red, #E4462B); }
.fcn-opcional { font-weight: 500; color: var(--fv-soft, #8494A8); font-size: 11px; }

#form-maquila input[type="text"],
#form-maquila input[type="email"],
#form-maquila input[type="tel"],
#form-maquila textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--fv-border, #E9EEF3);
    border-radius: var(--fv-r-md, 12px);
    background: #fff;
    font-family: var(--fv-font);
    font-size: 14px;
    color: var(--fv-ink, #0B2545);
}
#form-maquila input:focus,
#form-maquila textarea:focus {
    outline: 2px solid var(--fv-blue, #0B57A4);
    outline-offset: 1px;
    border-color: var(--fv-blue, #0B57A4);
}
#form-maquila textarea { resize: vertical; }

/* Chips seleccionables (formato / formulación) */
.fcn-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fcn-chip {
    padding: 8px 14px;
    border-radius: var(--fv-r-pill, 999px);
    border: 1px solid var(--fv-border, #E9EEF3);
    background: #fff;
    color: var(--fv-body, #41566E);
    font-family: var(--fv-font);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}
.fcn-chip.activo { background: var(--fv-blue, #0B57A4); border-color: var(--fv-blue, #0B57A4); color: #fff; }

/* Slider de volumen */
.fcn-slider-wrap { display: flex; flex-direction: column; gap: 6px; }
.fcn-slider-wrap input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--fv-blue, #0B57A4) var(--fcn-slider-pct, 40%), var(--fv-border, #E9EEF3) var(--fcn-slider-pct, 40%));
}
.fcn-slider-wrap input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--fv-blue, #0B57A4);
    box-shadow: 0 2px 6px rgba(10,30,60,.2);
    cursor: pointer;
}
.fcn-slider-wrap input[type="range"]::-moz-range-thumb {
    width: 22px; height: 22px; border-radius: 50%;
    background: #fff; border: 2px solid var(--fv-blue, #0B57A4);
}
.fcn-slider-wrap output { font-size: 13px; font-weight: 800; color: var(--fv-ink, #0B2545); }
/* Aviso corto debajo de un campo — mismo tono que ya usan los
   placeholders/ayudas del formulario, sin ser tan grande como una
   descripción normal. */
.fcn-hint { font-size: 13px; color: var(--fv-muted, #6B7A90); margin: 4px 0 0; }

/* Zona de adjuntos */
.fcn-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px 14px;
    border: 1.5px dashed var(--fv-border, #E9EEF3);
    border-radius: var(--fv-r-md, 12px);
    background: var(--fv-surface, #F2F5F9);
    text-align: center;
    cursor: pointer;
}
.fcn-dropzone svg { width: 22px; height: 22px; color: var(--fv-blue, #0B57A4); }
.fcn-dropzone span { font-size: 11.5px; color: var(--fv-muted, #5A6B80); }
.fcn-adjuntos-lista { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.fcn-adjuntos-lista li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 11.5px;
    color: var(--fv-ink, #0B2545);
    background: var(--fv-surface, #F2F5F9);
    padding: 6px 10px;
    border-radius: 8px;
}
.fcn-adjuntos-lista li span { color: var(--fv-soft, #8494A8); flex-shrink: 0; }

/* Navegación entre pasos */
.fcn-form-nav {
    display: flex;
    gap: var(--fv-s-2, 8px);
    margin-top: var(--fv-s-4, 16px);
}
.fcn-form-nav .btn-mkt-primary,
.fcn-form-nav .btn-mkt-secundario { flex: 1; height: 46px; }
.fcn-form-nav .fcn-btn-atras { flex: 0 0 96px; }

/* Resumen (paso 3) */
.fcn-resumen { display: flex; flex-direction: column; gap: 8px; }
.fcn-resumen-fila {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    font-size: 12.5px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--fv-border, #E9EEF3);
}
.fcn-resumen-fila span { color: var(--fv-soft, #8494A8); flex-shrink: 0; }
.fcn-resumen-fila strong { color: var(--fv-ink, #0B2545); text-align: right; font-weight: 700; }
.fcn-resumen-desc { flex-direction: column; gap: 4px; }
.fcn-resumen-desc p { margin: 0; color: var(--fv-body, #41566E); line-height: 1.5; text-align: left; }
.fcn-respuesta-nota {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0 0;
    padding: 10px 12px;
    background: #EAF7F0;
    border-radius: var(--fv-r-md, 12px);
    font-size: 12px;
    color: var(--fv-green, #12A05C);
}
.fcn-respuesta-nota svg { width: 16px; height: 16px; flex-shrink: 0; }
.fcn-respuesta-nota strong { color: var(--fv-green, #12A05C); }

/* Confidencialidad + contacto directo */
.fcn-confidencial-franja {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin: var(--fv-s-4, 16px) 0 0;
    padding: 14px 16px;
    background: var(--fv-surface, #F2F5F9);
    border: 1px solid var(--fv-border, #E9EEF3);
    border-radius: var(--fv-r-md, 12px);
}
.fcn-confidencial-texto {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--fv-muted, #5A6B80);
}
.fcn-confidencial-texto svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; }
.fcn-confidencial-correo {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    height: 36px;
    padding: 0 14px;
    border-radius: var(--fv-r-pill, 999px);
    background: #fff;
    border: 1px solid var(--fv-border, #E9EEF3);
    color: var(--fv-blue, #0B57A4);
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
}
.fcn-confidencial-correo svg { width: 15px; height: 15px; flex-shrink: 0; }
.fcn-confidencial-correo:hover { border-color: var(--fv-blue, #0B57A4); }

/* Éxito */
.fcn-exito { text-align: center; padding: var(--fv-s-5, 22px) 0; }
.fcn-exito.oculto { display: none; }
.fcn-exito-icono {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: #EAF7F0;
    color: var(--fv-green, #12A05C);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto var(--fv-s-3, 12px);
}
.fcn-exito-icono svg { width: 26px; height: 26px; }
.fcn-exito h3 { font-family: var(--fv-font); font-size: 18px; font-weight: 800; color: var(--fv-ink, #0B2545); margin: 0 0 6px; }
.fcn-exito p { font-size: 13px; color: var(--fv-muted, #5A6B80); margin: 0; }

.mensaje.error.oculto { display: none !important; }
#maquila-error { margin: 12px 0 0; font-size: 12.5px; }

/* ---- CTA fijo (solo celular) ---- */
.fcn-cta-fija { display: none; }
@media (max-width: 640px) {
    .mercado-main { padding-bottom: 84px; }
    .fcn-cta-fija {
        display: flex;
        position: fixed;
        left: 0; right: 0;
        bottom: 62px;
        z-index: 41;
        gap: var(--fv-s-2, 8px);
        padding: 10px var(--fv-s-4, 16px) calc(10px + env(safe-area-inset-bottom));
        background: #fff;
        border-top: 1px solid var(--fv-border, #E9EEF3);
        box-shadow: 0 -8px 20px -8px rgba(10,30,60,.14);
    }
    .fcn-cta-fija .fcn-cta-cotizar {
        flex: 1;
        height: 46px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .fcn-cta-fija .fcn-cta-wa {
        flex: 0 0 46px;
        height: 46px;
        border-radius: var(--fv-r-md, 12px);
        background: #12A05C;
        color: #fff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .fcn-cta-fija .fcn-cta-wa svg { width: 22px; height: 22px; }

    /* La barra inferior de la app tapa el CTA fijo — se sube el CTA
       encima de ella; cuando el formulario ya está en pantalla, el CTA
       fijo se puede ocultar para no duplicar el botón de enviar. */
}

/* ---- Tablet / escritorio ---- */
@media (min-width: 641px) {
    .fcn-hero-maquila { padding: 40px 32px; }
    .fcn-hero-maquila h1 { font-size: 30px; }
    .fcn-hero-maquila > p { font-size: 15px; max-width: 60ch; }
    .fcn-formatos-grid { grid-template-columns: repeat(6, 1fr); }

    .fcn-bloque-head { text-align: center; }
    .fcn-bloque-head h2 { font-size: 24px; }
    .fcn-bloque-head p { font-size: 14px; max-width: 60ch; margin-inline: auto; }

    /* La tarjeta del formulario (gris con la blanca dentro) se centra y
       no se hace demasiado ancha. */
    #fcn-form-seccion { max-width: 660px; margin-inline: auto; }
    .fcn-form-card { padding: 24px; }
    .fcn-paso-form { padding: 22px; }

    /* La barra de progreso no se estira de borde a borde. */
    .fcn-progreso-pasos { max-width: 440px; margin-inline: auto; }
    .fcn-progreso-barra { max-width: 440px; margin-inline: auto; }

    .fcn-form-intro { border-bottom-color: color-mix(in srgb, var(--fv-blue) 20%, transparent); }
    .fcn-form-intro-etiqueta { font-size: 12px; }
    .fcn-paso-indicador { font-size: 13px; }
    .fcn-progreso-paso { font-size: 12px; }
}
