$1000 = PKR 1,50,000 and a few weeks in the past it was PKR 1,60,000. Even if you subtract that from the price of Altis X 1.8, it is 38.5, which is a better price for Elantra. If you subtract it from the lower trim i.e. Altis 1.6, then it should be around 32.5 - 33.5. An even better price, and also in line with the rest of the world.
Why 40.5 in Pakistan?
You said it in your example yourself. Elantra is priced lower in the US, it's true for most respectable markets in the world.
And again, Elantra is a very good car. But if they wanted to price it above Civic and Corolla, they should have brought the current generation of Elantra.