# Direction of magnetic field clarification

For a circular wire carrying current $I$ in the counterclockwise direction (in the xy-plane), the magnetic field points in the positive $z$ direction. I tried to understand this more by drawing out just a quarter of this loop.

The Biot-Siovart Law states: $$\mathbf{B}=\dfrac{\mu_0}{4\pi}\int \dfrac{\mathbf{I}\times\hat{\mathbf{r}}}{r^2}\ dl$$ so the general direction of the magnetic field can be calculated by just considering the cross product $\mathbf{I}\times\hat{\mathbf{r}}$. But from my drawing, it is clear that $\mathbf{I}\times\hat{\mathbf{r}}$ points in the negative $z$-direction? What is going on?

The position vector $\vec r$ is the position of $A$ where you want to find the magnetic field relative to the position of the current element at position $B$.