In school we learn about optics and how rays of light reflect off of surfaces and travel through lenses. These trajectories depend 100% on the shape of the surface (convex, concave, angle of incidence, etc). But how does this work on a microscopic/quantum level? When a photon reaches an object, assuming it doesn't just pass through, it will hit some electron or maybe a proton or a neutron. But there's no concept of a "surface" there. That's a macroscopic phenomenon. Even more, any realistic surface will have plenty of imperfections - it will never be perfectly smooth. And yet all our optical devices work. How?
Added: There's a duplicate question that asks something very similar, but is tagged as classical-mechanics and thus the answer is also from a classical standpoint and doesn't consider quantum effects. My question is more from a quantum-mechanics standpoint, because light is fundamentally a quantum phenomenon and reflecting also happens in the quantum realm at a scale where indeed the concepts of "curvature" or even "plane" disappear. Or at least that's what my layman knowledge suggests.