I somehow pressed a key combination like Ctrl+Shift+., the zoom center switched to the object origin (I was in 3D view) and now when I press middle mouse button and try to navigate the whole view rotates around the object origin. It doesn't move either when I select vertices in edit mode and press . again.
How to turn it back to normal? I already tried some options in view panel but nothing worked so far.
Edit: It also says "View offset is locked" when I press Shift or Ctrl and scroll middle mouse button.