Light is an electromagnetic wave composed of electric and magnetic components.
I recently read that the velocity of light is in the direction $\mathbf{E}\times\mathbf{B}$ where $\mathbf{E}$ and $\mathbf{B}$ are the electric and magnetic field vectors.
Now, suppose at some point in space, the electric and magnetic fields are $\mathbf{E}$ and $\mathbf{B}$, which are both functions of time, suppose that we place a mirror there, perpendicular to the incident light, then, due to reflection from denser medium, there will be a phase difference of $\pi$ in the electric and magnetic field components of the wave. So, the electric and magnetic fields are $-\mathbf{E}, -\mathbf{B}$ after reflection. Hence, the direction of propagation of light after reflection is the same as the direction of $(\mathbf{-E})\times(\mathbf{-B})=\mathbf{E}\times\mathbf{B}$ which means that the light wave is still traveling in the same direction.
Where is the error in this?