I think you know the answer. Any concern about the undergrad grades will be strongly mitigated by good performance in PhD level work.
That said, my experience with PhD metrics vs. undergrad was that they seemed like completely different classes . Granted, I was not mathematically prepared for the PhD level course. Make sure you understand implementation when you start doing empirical work.