/* B.C. dealer directory. Builds on /assets/css/site.css (cv- design system). */
.dd-finder .cv-row .cv-input { flex: 1; min-width: 0; }
.dd-finder .cv-row .cv-btn { padding: 14px 18px; }
.dd-toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.dd-toolbar .cv-chips { flex: 1; min-width: 0; }
.dd-chip-n, .cv-chip small { font-size: 11.5px; font-weight: 500; opacity: .6; margin-left: 4px; }
.dd-sort { flex: none; width: 190px; }

.dd-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dd-card {
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--cv-surface-2); border-radius: 18px;
}
.dd-card[hidden] { display: none; }
.dd-photo { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--cv-surface-2); overflow: hidden; }
.dd-photo-link { display: block; width: 100%; height: 100%; text-decoration: none; }
.dd-photo img, .dd-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.dd-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--cv-accent-tint); }
.dd-ph span { font-size: 64px; font-weight: 800; color: var(--cv-accent-soft); letter-spacing: -.04em; }
.dd-credit {
    position: absolute; right: 6px; bottom: 6px; max-width: calc(100% - 12px);
    padding: 2px 7px; border-radius: 6px; background: rgba(31,27,24,.55);
    font-size: 10.5px; line-height: 1.5; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dd-credit a { color: #fff !important; text-decoration: none; }
.dd-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.dd-body h3 a { color: var(--cv-ink); text-decoration: none; }
.dd-body h3 a:hover { color: var(--cv-accent); text-decoration: underline; }
.dd-tags { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.dd-tags .cv-tag { background: var(--cv-surface); }
.dd-dist { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--cv-accent); }
.dd-rating { font-size: 13px; color: var(--cv-ink-muted); }
.dd-rating b { color: var(--cv-ink); }
.dd-rating span { color: var(--cv-ink-faint); }
.dd-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.dd-btn { padding: 9px 12px; min-height: 38px; font-size: 13px; font-weight: 600; border-radius: 10px; flex: 1 1 auto; background: var(--cv-surface); }
.dd-actions--hero { margin-top: 6px; padding-top: 0; gap: 8px; }
.dd-more { display: flex; justify-content: center; margin-top: 18px; }
.dd-attrib { margin-top: 18px; }

.dd-hero-photo { position: relative; min-height: 260px; }
.dd-hero-photo img { position: absolute; inset: 0; }
.dd-hero-photo .dd-ph { position: absolute; inset: 0; }
.dd-map { min-height: 340px; display: flex; }
.dd-map iframe { border: 0; width: 100%; min-height: 340px; flex: 1; }
.dd-map-link {
    flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 28px;
    text-decoration: none; color: var(--cv-ink) !important;
    background: var(--cv-surface-2) radial-gradient(circle at 70% 35%, var(--cv-accent-soft) 0 18px, transparent 19px);
}
.cv-trim-list li.is-today { font-weight: 700; }
.dd-grid--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 1199px) {
    .dd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dd-sort { width: 170px; }
}
@media (max-width: 900px) {
    .dd-grid, .dd-grid--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .dd-toolbar { flex-direction: column; align-items: stretch; }
    .dd-sort { width: 100%; }
    .dd-grid, .dd-grid--compact { grid-template-columns: minmax(0, 1fr); }
    .dd-card { flex-direction: row; }
    .dd-photo { aspect-ratio: auto; width: 112px; flex: none; }
    .dd-ph span { font-size: 40px; }
    .dd-credit { display: none; }
    .dd-dealer .dd-credit { display: block; }
    .dd-body { padding: 12px 14px; }
}
