Polarization diversity has proved to be a useful tool for radar detection, especially when discrimination by Doppler effect is not possible. In this paper, we address the problem of improving the performance of polarimetric detectors for targets in heavy inhomogeneous clutter. First, we introduce a new polarimetric radar model that includes the realistic dependence of the clutter reflections on the transmitted signal. Then, we develop a polarimetric detection test that is robust to inhomogeneous clutter. We run this polarimetric test against synthetic and real data to assess its performance in comparison with existing polarimetric detectors. Finally, we propose a polarimetric waveform-design algorithm to further improve the target-detection performance. A numerical analysis is presented to demonstrate the potential performance improvement that can be achieved with this algorithm.