Óbidos is the kind of town that looks invented, and it is easy to reach — an hour north of Lisbon on the A8, then a turn onto the old road that runs in beneath a long stone aqueduct. Park outside the walls, because inside there is barely room to turn a bicycle. The whole medieval town fits inside a ring of ramparts, a queen's wedding gift that has been kept whitewashed and intact for eight centuries.
You enter through the Porta da Vila, a bent gateway tiled in blue azulejos, and the main street unrolls ahead of you in whitewash and bougainvillea. Rua Direita runs the length of the town, lined with shops and small houses trimmed in the local blue and yellow. It is touristy, unashamedly so, but arrive before the coaches and you get the lanes to yourself, cats on the doorsteps and the smell of bread.
The thing to drink here is ginjinha, the sour-cherry liqueur poured into a little cup made of dark chocolate. You knock back the drink, then eat the cup. Stalls sell it the length of Rua Direita for a euro or two, and it is exactly as good and as silly as it sounds. Have one in the late morning; it is technically a lunch, if you decide it is.
Climb the ramparts and walk the full circuit of the walls, because that is what you came for. The path runs along the top with the town on one side and the plain on the other, and — this is the catch — there is no railing on the outer edge for most of it. The drop is real and the stone is worn smooth. Take it slowly, keep children close, and stop often to look out over the red roofs.
Down again, the castle at the top now houses a pousada, so you can sleep inside the walls if you book ahead. Otherwise, Óbidos is a half-day: the gate, the street, the ginjinha, the wall walk, and out. Collect the car from the lot below and rejoin the A8 — Nazaré and the coast are only another half hour north.