Shabby upside-down top and old hat worn by a detective (11)
I believe the answer is:
dilapidated
'shabby' is the definition.
(I've seen this before)
'upside-down top and old hat worn by a detective' is the wordplay.
'upside-down top' becomes 'dil' (I am not sure about this - if you are sure you should believe this answer much more).
'and' means one lot of letters go next to another.
'old hat' becomes 'dated' ('old hat' can mean dated or old-fashioned).
'worn by' is an insertion indicator (outside letters are worn by those on the inside).
'detective' becomes 'PI' (private eye).
'dil'+'dated'='dildated'
'a'+'pi'='api'
'dildated' going around 'api' is 'DILAPIDATED'.
Can you help me to learn more?
(Other definitions for dilapidated that I've seen before include "Worn-out" , "shabby" , "Run-down, neglected" , "uncared for" , "Broken-down" .)