/* --- Contenedor Principal (Aislado) --- */
#project-comparator-wrapper {
    width: 100%;
    max-width: 1100px;
    margin: 40px auto;
    font-family: 'Manrope', Arial, sans-serif;
    color: #333;
    padding: 0 10px;
    box-sizing: border-box;
}

/* Reset para evitar conflictos con Bricks */
#project-comparator-wrapper * {
    box-sizing: border-box;
}

/* --- Selectores --- */
#project-comparator-wrapper .comparator-selectors {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Alineados abajo para que los selects queden parejos */
    margin-bottom: 30px;
    gap: 15px;
    flex-wrap: wrap;
}

#project-comparator-wrapper .selector-title {
    font-size: 18px;
    font-weight: 700;
    color: #444;
    text-align: center;
    width: 100%;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    #project-comparator-wrapper .selector-title {
        width: 20%;
        text-align: left;
        margin-bottom: 0;
        align-self: center;
    }
    #project-comparator-wrapper .project-selector-wrapper {
        width: 25%;
    }
}

#project-comparator-wrapper .project-selector-wrapper {
    flex: 1;
    min-width: 140px;
    text-align: center;
}

#project-comparator-wrapper .project-logo-preview {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    height: 120px; /* Altura fija para evitar saltos */
    width: 100%;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    overflow: hidden;
}

#project-comparator-wrapper .project-logo-preview img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

#project-comparator-wrapper select.project-selector {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fff;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    /* Forzar estilos sobre Bricks */
    height: auto !important; 
    line-height: normal !important;
}

/* --- Tabla --- */
#project-comparator-wrapper .comparator-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #eee;
}

#project-comparator-wrapper .comparator-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-spacing: 0; /* Fix para Bricks */
    margin: 0; /* Fix para Bricks */
}

#project-comparator-wrapper .comparator-table th, 
#project-comparator-wrapper .comparator-table td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
    border-right: 1px solid #eee;
    font-size: 15px;
    vertical-align: middle;
}

#project-comparator-wrapper .comparator-table th.first-col {
    text-align: left;
    background-color: #f9f9f9;
    font-weight: 600;
    color: #555;
    width: 25%;
}

#project-comparator-wrapper .comparator-table td {
    width: 25%;
    color: #666;
}

#project-comparator-wrapper .comparator-table td.comp-name {
    font-weight: 700;
    color: #000;
    font-size: 16px;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    #project-comparator-wrapper .comparator-selectors {
        gap: 10px;
    }
    
    #project-comparator-wrapper .project-logo-preview {
        height: 70px; /* Logo más pequeño en móvil */
    }

    #project-comparator-wrapper select.project-selector {
        padding: 8px 4px;
        font-size: 12px;
    }

    /* Transformar tabla en tarjetas para móvil si es necesario, 
       o mantener scroll horizontal simple como está configurado arriba */
    #project-comparator-wrapper .comparator-table th.first-col {
        font-size: 13px;
        padding: 10px;
    }
    #project-comparator-wrapper .comparator-table td {
        font-size: 13px;
        padding: 10px;
    }
}