.mat-app {
	--mat-primaria: #0b4f45;
	--mat-destaque: #3ccfa8;
	--mat-selecionado: #1f9d57;
	--mat-estado: #8a99a8;
	--mat-vazio: #d5dde4;
	--mat-texto: #1d2733;
	--mat-suave: #5f6b78;
	--mat-borda: #e6ebef;
	--mat-fundo: #f4f6f7;
	container: matapp / inline-size;
	color: var(--mat-texto);
	font-family: inherit;
	box-sizing: border-box;
}
.mat-wrap {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
	gap: 24px;
	align-items: start;
}
.mat-app--revenda .mat-wrap { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.mat-app *, .mat-app *::before, .mat-app *::after { box-sizing: border-box; }
.mat-oculto { display: none !important; }

/* ---------- Mapa ---------- */
.mat-mapa-box {
	background: #fff;
	border-radius: 28px;
	padding: 28px;
	box-shadow: 0 2px 18px rgba(20, 40, 60, .06);
	position: sticky;
	top: 24px;
}
.mat-mapa { position: relative; }
.mat-svg { display: block; width: 100%; height: auto; overflow: visible; }
.mat-uf {
	fill: var(--mat-vazio);
	stroke: #fff;
	stroke-width: 1.4;
	stroke-linejoin: round;
	cursor: pointer;
	transition: fill .2s ease, filter .2s ease;
	outline: none;
}
.mat-uf.mat-tem { fill: var(--mat-estado); }
.mat-uf:hover, .mat-uf:focus-visible { filter: brightness(.9); }
.mat-uf.mat-regiao { fill: var(--mat-destaque); }
.mat-uf.mat-sel { fill: var(--mat-selecionado); filter: none; }

.mat-tip {
	position: absolute;
	transform: translate(-50%, calc(-100% - 10px));
	background: #0f1f2b;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .02em;
	line-height: 1;
	padding: 8px 10px;
	border-radius: 7px;
	pointer-events: none;
	opacity: 0;
	transition: opacity .15s ease, left .2s ease, top .2s ease;
	white-space: nowrap;
	z-index: 2;
}
.mat-tip::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -5px;
	transform: translateX(-50%);
	border: 6px solid transparent;
	border-top-color: #0f1f2b;
	border-bottom: 0;
}
.mat-tip.mat-vis { opacity: 1; }

/* ---------- Busca ---------- */
.mat-lado { container: matlado / inline-size; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mat-busca {
	background: #fff;
	border-radius: 20px;
	padding: 18px 20px 16px;
	box-shadow: 0 2px 18px rgba(20, 40, 60, .06);
	margin: 0;
}
.mat-busca-titulo { font-size: 16px; font-weight: 700; margin: 0 0 10px; color: var(--mat-texto); }
.mat-filtros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.mat-filtro { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.mat-filtro > span { font-size: 12px; color: var(--mat-suave); }
.mat-app .mat-filtro select {
	appearance: none;
	-webkit-appearance: none;
	width: 100%;
	height: 42px;
	padding: 0 34px 0 12px;
	border: 1px solid var(--mat-borda);
	border-radius: 10px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%231d2733' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
	font: inherit;
	font-size: 13px;
	color: var(--mat-texto);
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.mat-app .mat-filtro select:focus { outline: 2px solid var(--mat-destaque); outline-offset: 1px; }
.mat-app .mat-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	height: 44px;
	border: 0;
	border-radius: 10px;
	background: var(--mat-primaria);
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: filter .2s ease;
}
.mat-app .mat-btn:hover { filter: brightness(1.15); }
.mat-contagem { font-size: 13px; color: var(--mat-texto); margin: 12px 0 0; min-height: 1em; }
.mat-contagem:empty { display: none; }

/* ---------- Resultados ---------- */
.mat-lista {
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-height: 640px;
	overflow-y: auto;
	padding: 2px 4px 4px 2px;
	scrollbar-width: thin;
}
.mat-aviso {
	background: #fff;
	border: 1px dashed var(--mat-borda);
	border-radius: 16px;
	padding: 22px;
	text-align: center;
	color: var(--mat-suave);
	font-size: 14px;
}
.mat-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	background: #fff;
	border: 1px solid var(--mat-borda);
	border-radius: 16px;
	box-shadow: 0 2px 12px rgba(20, 40, 60, .05);
	animation: mat-entra .3s ease both;
}
@keyframes mat-entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.mat-card-info { padding: 16px 18px; min-width: 0; }
.mat-card-contato {
	padding: 16px 18px;
	border-left: 1px solid var(--mat-borda);
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 12px;
	min-width: 200px;
}
.mat-selo {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: #e3f7ec;
	color: var(--mat-selecionado);
	font-size: 12px;
	font-weight: 600;
	padding: 3px 9px 3px 6px;
	border-radius: 999px;
	margin-bottom: 6px;
}
.mat-selo svg { width: 13px; height: 13px; }
.mat-app .mat-nome { font-size: 19px; font-weight: 700; margin: 0 0 4px; line-height: 1.25; color: var(--mat-texto); }
.mat-cidade, .mat-end { display: flex; gap: 8px; margin: 0 0 4px; font-size: 14px; line-height: 1.35; }
.mat-cidade svg { width: 17px; height: 17px; flex: none; color: var(--mat-selecionado); }
.mat-end { color: var(--mat-suave); font-size: 13px; }
.mat-end svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.mat-app .mat-contato {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--mat-texto);
	text-decoration: none;
	font-size: 15px;
	font-weight: 500;
	white-space: nowrap;
}
.mat-contato svg { width: 19px; height: 19px; color: var(--mat-primaria); flex: none; }
.mat-whats svg { color: #1f9d57; }
.mat-app .mat-email { font-size: 13px; color: var(--mat-suave); white-space: normal; word-break: break-all; }
.mat-app .mat-contato:hover { color: var(--mat-primaria); }
.mat-app .mat-ver {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	align-self: center;
	color: var(--mat-primaria);
	font-size: 13px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.mat-ver svg { width: 14px; height: 14px; }

/* ---------- Revendas e concessionárias ---------- */
.mat-lista--grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-content: start; }
.mat-lista--grade .mat-aviso { grid-column: 1 / -1; }
.mat-rcard {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--mat-borda);
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 2px 14px rgba(20, 40, 60, .06);
	animation: mat-entra .3s ease both;
	padding: 8px;
	container: matcard / inline-size;
}
.mat-rcard-foto { aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: var(--mat-primaria); }
.mat-rcard-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mat-rcard-semfoto { width: 100%; height: 100%; display: grid; place-items: center; background: radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.12), transparent 60%), var(--mat-primaria); }
.mat-rcard-semfoto img { width: 46%; height: auto; opacity: .9; object-fit: contain; }
.mat-rcard-corpo { padding: 14px 10px 8px; display: flex; flex-direction: column; flex: 1; }
.mat-selo-rev { align-self: flex-start; background: #d9f6ec; color: var(--mat-primaria); }
.mat-selo-rev svg { color: var(--mat-selecionado); }
.mat-rcard .mat-nome { font-size: 18px; }
.mat-rcard .mat-cidade svg { color: var(--mat-texto); fill: none; }
.mat-rcard .mat-end strong { color: var(--mat-texto); font-weight: 500; }
.mat-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding-top: 12px; border-top: 1px solid var(--mat-borda); }
.mat-tags span { background: #eef2f6; color: var(--mat-texto); font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 999px; }
.mat-rcard-botoes { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; margin-top: auto; padding-top: 14px; }
.mat-app .mat-rbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 40px;
	padding: 0 12px;
	border-radius: 10px;
	background: var(--mat-primaria);
	border: 1px solid var(--mat-primaria);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: filter .2s ease;
}
.mat-app .mat-rbtn:hover { filter: brightness(1.15); color: #fff; }
.mat-app .mat-rbtn svg { width: 16px; height: 16px; flex: none; }
.mat-app .mat-rbtn-sec { background: #fff; color: var(--mat-texto); border-color: var(--mat-borda); }
.mat-app .mat-rbtn-sec:hover { filter: none; background: #f4f8f7; color: var(--mat-texto); }
.mat-app .mat-rbtn-sec svg { color: var(--mat-selecionado); }

/* ---------- Responsivo (pelo espaço que o mapa ocupa na página) ---------- */
@container matapp (max-width: 820px) {
	.mat-wrap, .mat-app--revenda .mat-wrap { grid-template-columns: 1fr; }
	.mat-mapa-box { position: static; padding: 16px; border-radius: 20px; }
	.mat-lista { max-height: none; overflow: visible; }
}
@container matlado (max-width: 600px) {
	.mat-card { grid-template-columns: 1fr; }
	.mat-card-contato { border-left: 0; border-top: 1px solid var(--mat-borda); min-width: 0; }
	.mat-app .mat-ver { align-self: flex-start; }
}
@container matlado (max-width: 560px) {
	.mat-filtros { grid-template-columns: 1fr; }
}
@container matlado (max-width: 500px) {
	.mat-lista--grade { grid-template-columns: 1fr; }
}
@container matcard (max-width: 330px) {
	.mat-rcard-botoes { grid-template-columns: 1fr; }
}
