Sports-car maker takes hit to margins after disappointing reaction to electric models