/* Dealer Finder – layered on Bootstrap 5. Colours come from the theme's CSS variables. */

.dfnd {
	--dfnd-gap: 1.25rem;
}

/* Controls ------------------------------------------------------------ */

.dfnd-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 1.5rem;
	align-items: center;
	margin-bottom: 0.75rem;
}

.dfnd-search {
	flex: 1 1 18rem;
	max-width: 28rem;
}

.dfnd-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.dfnd-filter-label {
	margin-right: 0.25rem;
	color: var(--bs-secondary-color, #6c757d);
}

.dfnd-filter .btn {
	--bs-btn-padding-y: 0.35rem;
	--bs-btn-padding-x: 0.9rem;
}

.dfnd-count {
	color: var(--bs-secondary-color, #6c757d);
	font-size: 0.9375rem;
	margin-bottom: 1.25rem;
}

/* Grid ---------------------------------------------------------------- */

.dfnd-grid {
	display: grid;
	gap: var(--dfnd-gap);
	grid-template-columns: 1fr;
}

@media (min-width: 576px) {
	.dfnd-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 992px) {
	.dfnd-grid-2 { grid-template-columns: repeat(2, 1fr); }
	.dfnd-grid-3 { grid-template-columns: repeat(3, 1fr); }
	.dfnd-grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Cards --------------------------------------------------------------- */

.dfnd-card {
	height: 100%;
}

.dfnd-card[hidden] {
	display: none;
}

.dfnd-card .card-body {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.dfnd-card-title {
	margin: 0;
}

.dfnd-card-category {
	font-size: 0.8125rem;
	color: var(--bs-secondary-color, #6c757d);
}

.dfnd-card-address {
	margin: 0;
	font-style: normal;
	line-height: 1.45;
}

.dfnd-card-links {
	margin: auto 0 0;
	padding-top: 0.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.dfnd-card-links a {
	word-break: break-word;
}

/* States -------------------------------------------------------------- */

.dfnd-empty,
.dfnd-empty-source {
	padding: 2rem 0;
	color: var(--bs-secondary-color, #6c757d);
}

.dfnd-empty[hidden] {
	display: none;
}
