/* ==========================================================================
   OMNIFOAM - BUSCADOR TÉCNICO CON PRIORIDAD COMERCIAL PE35 & PE45
   Diseño industrial B2B de conversión, paleta oficial y componentes UI
   ========================================================================== */

.block-asistente-tecnico {
    padding: 5.5rem 5%;
    background: #0b0d13;
    color: white;
    border-top: 1px solid #1c2230;
    border-bottom: 1px solid #1c2230;
    position: relative;
}

.asistente-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.asistente-header {
    text-align: center;
    max-width: 850px;
    margin: 0 auto 3rem;
}
.asistente-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(37,99,235,0.15);
    border: 1px solid rgba(37,99,235,0.4);
    color: #60a5fa;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}
.asistente-title {
    font-size: clamp(2rem, 3.5vw, 2.7rem);
    font-weight: 900;
    text-transform: uppercase;
    color: white;
    margin: 0 0 0.8rem;
    letter-spacing: -0.5px;
    line-height: 1.15;
}
.asistente-title span {
    color: var(--primary);
}
.asistente-desc {
    color: #94a3b8;
    font-size: 1.02rem;
    line-height: 1.6;
    margin: 0;
}

/* FASE 1: Formulario principal de búsqueda multipropósito */
.omni-search-main-card {
    background: #131722;
    border: 1.5px solid #232a3b;
    border-radius: 14px;
    padding: 2.5rem;
    max-width: 1000px;
    margin: 0 auto 3rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.35);
}

.os-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.os-main-full {
    grid-column: 1 / -1;
}

.os-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #cbd5e1;
    margin-bottom: 0.5rem;
}
.os-field label i {
    color: var(--primary);
    margin-right: 4px;
}
.os-field input, .os-field textarea {
    width: 100%;
    box-sizing: border-box;
    background: #0b0d13;
    border: 1px solid #283347;
    color: white;
    padding: 0.9rem 1.1rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s;
}
.os-field input:focus, .os-field textarea:focus {
    border-color: var(--primary);
}

/* Dropzone de subida de ficha técnica */
.os-dropzone-inline {
    border: 2px dashed #334155;
    background: #0b0d13;
    border-radius: 8px;
    padding: 1.5rem 1.2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}
.os-dropzone-inline:hover {
    border-color: var(--primary);
    background: rgba(37,99,235,0.05);
}
.os-dropzone-inline i {
    font-size: 2rem;
    color: var(--primary);
}
.os-dropzone-inline p {
    margin: 0;
    color: white;
    font-weight: 700;
    font-size: 0.92rem;
}
.os-dropzone-inline span {
    display: block;
    color: #64748b;
    font-size: 0.75rem;
}

.btn-start-tech-search {
    width: 100%;
    padding: 1.15rem;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    border: 1px solid #3b82f6;
    color: white;
    border-radius: 8px;
    font-weight: 900;
    font-size: 1rem;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    box-shadow: 0 4px 20px rgba(37,99,235,0.3);
}
.btn-start-tech-search:hover:not(:disabled) {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37,99,235,0.5);
}
.btn-start-tech-search:disabled {
    opacity: 0.6;
    cursor: wait;
}

.omni-fb-warn, .omni-fb-error, .omni-fb-success {
    margin-top: 1.2rem;
    padding: 1rem 1.4rem;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
}
.omni-fb-warn {
    background: rgba(245,158,11,0.15);
    border: 1px solid #f59e0b;
    color: #fde68a;
}
.omni-fb-error {
    background: rgba(239,68,68,0.15);
    border: 1px solid #ef4444;
    color: #fca5a5;
}
.omni-fb-success {
    background: rgba(16,185,129,0.15);
    border: 1px solid #10b981;
    color: #a7f3d0;
}

/* ==========================================================================
   RESULTADOS DE FASES: Alternativas PE35 / PE45 y Decisión Comercial
   ========================================================================== */
#omniCommercialResultsArea {
    margin-top: 3.5rem;
}

.omni-stage-banner {
    background: #131722;
    border: 1px solid #232a3b;
    border-left: 4px solid var(--primary);
    border-radius: 10px;
    padding: 1.6rem 2rem;
    margin-bottom: 2.5rem;
}
.osb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.osb-badge {
    background: rgba(37,99,235,0.15);
    color: #60a5fa;
    border: 1px solid rgba(37,99,235,0.3);
    font-size: 0.68rem;
    font-weight: 800;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 0.4rem;
}
.osb-title {
    color: white;
    font-size: 1.35rem;
    font-weight: 900;
    margin: 0 0 0.3rem;
}
.osb-title span {
    color: #38bdf8;
}
.osb-sub {
    color: #94a3b8;
    font-size: 0.85rem;
    margin: 0;
}
.osb-sub strong {
    color: #e2e8f0;
}
.osb-file-pill {
    background: #0b0d13;
    border: 1px solid #242c3c;
    color: #38bdf8;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.45rem 0.85rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* FASE 3: Presentar Alternativas PE */
.stage-alts-header {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 2.5rem;
}
.stage-alts-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    margin: 0 0 0.6rem;
}
.stage-alts-desc {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.omni-pe-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.omni-pe-card {
    background: #141824;
    border: 1.5px solid #232a3c;
    border-radius: 12px;
    padding: 2.2rem 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.omni-pe-card:hover {
    transform: translateY(-4px);
    border-color: #3b82f6;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.omni-pe-card.highlight-option {
    border-color: var(--primary);
    box-shadow: 0 10px 35px rgba(37,99,235,0.25);
    background: #161b29;
}

.pe-ribbon-tag {
    position: absolute;
    top: -12px;
    right: 20px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0b0f19;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 12px rgba(245,158,11,0.4);
}

.pe-card-top {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    margin-bottom: 1.4rem;
}
.pe-card-img-wrap {
    width: 100px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #0b0d13;
    border: 1px solid #232a3c;
    flex-shrink: 0;
}
.pe-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pe-card-heading {
    flex: 1;
}
.pe-code-pill {
    background: rgba(37,99,235,0.18);
    color: #60a5fa;
    border: 1px solid rgba(37,99,235,0.35);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 0.35rem;
}
.pe-title {
    color: white;
    font-size: 1.2rem;
    font-weight: 900;
    margin: 0 0 0.3rem;
    line-height: 1.25;
}
.pe-dens-tag {
    font-size: 0.8rem;
    color: #cbd5e1;
}
.pe-dens-tag strong {
    color: #38bdf8;
}

.pe-priority-reason {
    background: rgba(16,185,129,0.12);
    border: 1px solid rgba(16,185,129,0.3);
    color: #a7f3d0;
    padding: 0.7rem 0.9rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    line-height: 1.45;
}

.pe-block-sec {
    background: #0b0d13;
    border: 1px solid #1c2230;
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
    font-size: 0.83rem;
}
.pe-block-sec h5 {
    margin: 0 0 0.6rem;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pe-block-sec ul {
    margin: 0;
    padding-left: 1.2rem;
    color: #cbd5e1;
    line-height: 1.5;
}
.pe-block-sec li {
    margin-bottom: 0.35rem;
}
.pe-block-sec li:last-child {
    margin-bottom: 0;
}
.pe-block-sec.advantages { border-left: 3px solid #10b981; }
.pe-block-sec.differences { border-left: 3px solid #38bdf8; }

.pe-stock-strip {
    background: rgba(0,0,0,0.25);
    border-radius: 6px;
    padding: 0.65rem 0.9rem;
    font-size: 0.78rem;
    color: #94a3b8;
    margin-bottom: 1.4rem;
}
.pe-stock-strip strong {
    color: #34d399;
}

.btn-select-pe {
    width: 100%;
    padding: 0.95rem;
    background: var(--primary);
    border: 1px solid var(--primary);
    color: white;
    border-radius: 8px;
    font-weight: 900;
    font-size: 0.85rem;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    margin-top: auto;
}
.btn-select-pe:hover {
    background: var(--primary-dark);
    box-shadow: 0 6px 20px rgba(37,99,235,0.4);
}

/* FASE 4: Pregunta Comercial Directa */
.omni-commercial-decision-box {
    background: linear-gradient(135deg, #161b29 0%, #1e2638 100%);
    border: 2px solid #3b82f6;
    border-radius: 14px;
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    box-shadow: 0 10px 40px rgba(37,99,235,0.25);
}
.ocd-header h4 {
    font-size: 1.4rem;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    margin: 0 0 0.5rem;
}
.ocd-header p {
    color: #cbd5e1;
    font-size: 0.95rem;
    margin: 0 auto 1.8rem;
    max-width: 700px;
}
.ocd-btn-group {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}
.btn-decision-choice {
    padding: 1.1rem 1.8rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s;
    box-sizing: border-box;
}
.choice-pe35 {
    background: #2563eb;
    border: 1.5px solid #60a5fa;
    color: white;
    box-shadow: 0 4px 15px rgba(37,99,235,0.3);
}
.choice-pe35:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}
.choice-pe45 {
    background: #1e3a8a;
    border: 1.5px solid #38bdf8;
    color: white;
    box-shadow: 0 4px 15px rgba(56,189,248,0.25);
}
.choice-pe45:hover {
    background: #1e40af;
    transform: translateY(-2px);
}
.choice-exact {
    background: #0f1115;
    border: 1.5px solid #475569;
    color: #e2e8f0;
}
.choice-exact:hover {
    border-color: #94a3b8;
    color: white;
    background: #181d26;
    transform: translateY(-2px);
}

/* FASE 5: Referencia Exacta Bajo Pedido */
.omni-exact-ref-drawer {
    background: #0f121a;
    border: 1px dashed #334155;
    border-radius: 10px;
    padding: 1.5rem 2rem;
}
.btn-omni-exact-order {
    background: transparent;
    border: 1px solid #3b82f6;
    color: #60a5fa;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-omni-exact-order:hover {
    background: #2563eb;
    color: white;
}

/* Seguridad técnica (Bloque de Advertencia Normativa) */
.omni-security-block {
    background: #171216;
    border: 2px dashed #ef4444;
    border-radius: 12px;
    padding: 2.2rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    max-width: 900px;
    margin: 0 auto;
}
.osb-sec-icon {
    font-size: 2.8rem;
    color: #ef4444;
    flex-shrink: 0;
}

/* ==========================================================================
   FASE 7: MODAL DE FORMULARIO COMERCIAL COMPLETO
   ========================================================================== */
.omni-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.omni-modal-container {
    background: #131722;
    border: 1.5px solid #283347;
    border-radius: 14px;
    max-width: 780px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}
.omni-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.4rem;
    cursor: pointer;
    transition: color 0.2s;
}
.omni-modal-close:hover {
    color: white;
}

.omni-modal-head h3 {
    margin: 0 0 0.4rem;
    color: white;
    font-size: 1.4rem;
    font-weight: 900;
    text-transform: uppercase;
}
.omni-modal-head p {
    margin: 0 0 1.8rem;
    color: #94a3b8;
    font-size: 0.9rem;
}

.omni-modal-choice-badge {
    background: rgba(37,99,235,0.18);
    border: 1px solid rgba(37,99,235,0.4);
    border-radius: 8px;
    padding: 0.8rem 1.2rem;
    margin-bottom: 1.5rem;
    font-size: 0.88rem;
    color: #e2e8f0;
}
.omni-modal-choice-badge strong {
    color: #38bdf8;
}

.modal-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}
.mfg-full {
    grid-column: 1 / -1;
}
.mfg-field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #cbd5e1;
    margin-bottom: 0.35rem;
}
.mfg-field input, .mfg-field select, .mfg-field textarea {
    width: 100%;
    box-sizing: border-box;
    background: #0b0d13;
    border: 1px solid #283347;
    color: white;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}
.mfg-field input:focus, .mfg-field textarea:focus {
    border-color: var(--primary);
}

.btn-omni-com-primary {
    width: 100%;
    padding: 1.1rem;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    border: 1px solid #3b82f6;
    color: white;
    border-radius: 8px;
    font-weight: 900;
    font-size: 0.95rem;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
}
.btn-omni-com-primary:hover:not(:disabled) {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37,99,235,0.4);
}

@media (max-width: 768px) {
    .os-main-grid, .modal-form-grid {
        grid-template-columns: 1fr;
    }
    .ocd-btn-group {
        flex-direction: column;
    }
    .btn-decision-choice {
        width: 100%;
        justify-content: center;
    }
    .pe-card-top {
        flex-direction: column;
        align-items: flex-start;
    }
    .omni-modal-container {
        padding: 1.8rem 1.2rem;
    }
}
