/* dmSearcher front-end styles */
.dmsearcher {
	--dms-border: #d8dde3;
	--dms-accent: #1f6feb;
	--dms-text: #1b2430;
	--dms-muted: #6b7684;
	--dms-bg: #ffffff;
	--dms-radius: 10px;
	max-width: 1100px;
	margin: 0 auto;
	color: var(--dms-text);
}

.dmsearcher__title {
	margin: 0 0 .25rem;
	font-size: 1.6rem;
}

.dmsearcher__subtitle {
	margin: 0 0 1.25rem;
	color: var(--dms-muted);
}

.dmsearcher__form {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1rem;
	padding: 1.25rem;
	background: var(--dms-bg);
	border: 1px solid var(--dms-border);
	border-radius: var(--dms-radius);
}

.dmsearcher__field {
	display: flex;
	flex-direction: column;
	gap: .35rem;
	min-width: 0;
}

.dmsearcher__field--wide {
	grid-column: span 2;
}

.dmsearcher__field label {
	font-size: .8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: var(--dms-muted);
}

.dmsearcher__field select,
.dmsearcher__field input {
	width: 100%;
	padding: .6rem .7rem;
	border: 1px solid var(--dms-border);
	border-radius: 8px;
	background: #fff;
	font-size: .95rem;
	color: var(--dms-text);
}

.dmsearcher__field select:disabled {
	opacity: .55;
	cursor: not-allowed;
}

.dmsearcher__field .dmsearcher__model-filter {
	padding: .45rem .6rem;
	font-size: .85rem;
}

.dmsearcher__field .dmsearcher__model-filter[hidden] {
	display: none;
}

.dmsearcher__actions {
	grid-column: 1 / -1;
	display: flex;
	gap: .75rem;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: center;
}

.dmsearcher__submit,
.dmsearcher__reset {
	/* The visual style comes from the theme's .btn / .btn-primary / .btn-outline. */
	min-width: 7.5rem;
	min-height: 48px;
	cursor: pointer;
}

.dmsearcher__results {
	margin-top: 1.5rem;
}

.dmsearcher__status {
	color: var(--dms-muted);
	margin: 0 0 1rem;
}

.dmsearcher__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1rem;
}

.dmsearcher__card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--dms-border);
	border-radius: var(--dms-radius);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: box-shadow .15s ease, transform .15s ease;
}

.dmsearcher__card:hover {
	box-shadow: 0 8px 22px rgba(20, 30, 45, .12);
	transform: translateY(-2px);
}

.dmsearcher__card-img {
	aspect-ratio: 1 / 1;
	background: #f4f6f8;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.dmsearcher__card-img img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.dmsearcher__card-body {
	padding: .8rem .9rem 1rem;
	display: flex;
	flex-direction: column;
	gap: .3rem;
}

.dmsearcher__card-brand {
	font-size: .72rem;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--dms-muted);
}

.dmsearcher__card-name {
	font-size: .92rem;
	font-weight: 600;
	line-height: 1.3;
}

.dmsearcher__card-sku {
	font-size: .78rem;
	color: var(--dms-muted);
}

.dmsearcher__card-price {
	margin-top: auto;
	font-weight: 700;
	font-size: .95rem;
}

.dmsearcher__pagination {
	display: flex;
	align-items: center;
	gap: 1rem;
	justify-content: center;
	margin-top: 1.5rem;
}

.dmsearcher__pagination button {
	padding: .55rem 1.1rem;
	border: 1.5px solid #e8e8e4;
	border-radius: 99px;
	background: #fff;
	color: #1a1a1a;
	font-family: "Oswald", sans-serif;
	font-size: .8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .5px;
	cursor: pointer;
	transition: background .15s, border-color .15s, color .15s;
}

.dmsearcher__pagination button:hover:not(:disabled) {
	background: #ffc314;
	border-color: #ffc314;
}

.dmsearcher__pagination button:disabled {
	opacity: .5;
	cursor: not-allowed;
}

@media (max-width: 820px) {
	.dmsearcher__form {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 520px) {
	.dmsearcher__form {
		grid-template-columns: 1fr;
	}
	.dmsearcher__field--wide {
		grid-column: span 1;
	}
}

/* Compact variant for the home hero card */
.dmsearcher--compact {
	max-width: none;
}

.dmsearcher--compact .dmsearcher__title {
	font-size: 1.15rem;
	margin: 0 0 .9rem;
}

.dmsearcher--compact .dmsearcher__subtitle {
	margin-bottom: .9rem;
	font-size: .9rem;
}

.dmsearcher--compact .dmsearcher__form {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: .75rem;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
}

.dmsearcher--compact .dmsearcher__field--wide {
	grid-column: span 2;
}

.dmsearcher--compact .dmsearcher__field label {
	font-size: .7rem;
}

.dmsearcher--compact .dmsearcher__field select,
.dmsearcher--compact .dmsearcher__field input {
	padding: .55rem .6rem;
	font-size: .88rem;
}

.dmsearcher--compact .dmsearcher__actions {
	grid-column: 1 / -1;
	margin-top: .15rem;
}

.dmsearcher--compact .dmsearcher__submit,
.dmsearcher--compact .dmsearcher__reset {
	min-width: 0;
}

/* Results host below the home hero */
.dms-home-results {
	display: none;
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 24px 56px;
	scroll-margin-top: 100px;
}

.dms-home-results.is-active {
	display: block;
}

.dms-home-results .dmsearcher__results {
	margin-top: 0;
}

@media (max-width: 520px) {
	.dmsearcher--compact .dmsearcher__form {
		grid-template-columns: 1fr;
	}
	.dmsearcher--compact .dmsearcher__field--wide {
		grid-column: span 1;
	}
}
