/**
 * Hi Car Match v158 — Korea-registered marketplace home.
 *
 * The home discovery surface prioritizes vehicle thumbnails and supported
 * search filters. Character artwork remains limited to the primary guidance.
 */

:root {
	--hicm-v158-ink: #15191f;
	--hicm-v158-muted: #677181;
	--hicm-v158-line: #dfe4ea;
	--hicm-v158-red: #dc2732;
	--hicm-v158-red-dark: #a91620;
	--hicm-v158-surface: #f5f7f9;
}

/* More makes remain discoverable even when a new installation has few listings. */
.gab-page-home .gab-hx-makes-grid {
	max-height: 176px;
}

.gab-page-home .gab-hx-make:focus-visible,
.gab-page-home .gab-mkpick-brand:focus-visible,
.gab-page-home .gab-mkpick-model:focus-visible {
	position: relative;
	z-index: 2;
	outline: 3px solid rgba(220, 39, 50, .42);
	outline-offset: -3px;
}

.gab-page-home .gab-mkpick-brands {
	max-height: 560px;
}

.gab-page-home .gab-mkpick {
	min-height: 470px;
}

/* Model cards now read as vehicle thumbnails rather than generic icon tiles. */
.gab-page-home .gab-mkpick-grid {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
}

.gab-page-home .gab-mkpick-model {
	align-items: stretch;
	padding: 0 0 12px;
	overflow: hidden;
	text-align: start;
}

.gab-page-home .gab-mkpick-mico {
	width: 100%;
	height: auto;
	margin: 0 0 9px;
	aspect-ratio: 3 / 2;
	object-fit: contain;
	background:
		radial-gradient(circle at 50% 92%, rgba(22, 28, 36, .13), transparent 35%),
		linear-gradient(145deg, #eef1f4, #fff);
}

.gab-page-home .gab-mkpick-model b,
.gab-page-home .gab-mkpick-model > span {
	padding-inline: 11px;
}

.gab-page-home .gab-mkpick-model b {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* --------------------------------------------------------------------------
 * Vehicle type visual finder
 * ----------------------------------------------------------------------- */

.hicm-type-market {
	padding: 72px 0 78px;
	overflow: hidden;
	border-block: 1px solid #e8ecf1;
	background:
		radial-gradient(circle at 7% 7%, rgba(220, 39, 50, .08), transparent 27%),
		linear-gradient(180deg, #fff, var(--hicm-v158-surface));
}

.hicm-type-market-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 28px;
	margin-bottom: 24px;
}

.hicm-type-market-head > div {
	max-width: 790px;
}

.hicm-type-market-head > div > span {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-bottom: 9px;
	color: var(--hicm-v158-red-dark);
	font-size: 12px;
	font-weight: 900;
	letter-spacing: .1em;
}

.hicm-type-market-head h2 {
	margin: 0;
	color: var(--hicm-v158-ink);
	font-size: clamp(28px, 3vw, 42px);
	font-weight: 900;
	line-height: 1.16;
	letter-spacing: -.045em;
}

.hicm-type-market-head p {
	margin: 11px 0 0;
	color: var(--hicm-v158-muted);
	font-size: 15px;
	line-height: 1.65;
}

.hicm-type-market-head > a {
	display: inline-flex;
	flex: 0 0 auto;
	min-height: 46px;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 0 17px;
	border: 1px solid #d8dde4;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(20, 26, 34, .06);
	color: #a91b24;
	font-size: 13px;
	font-weight: 850;
	text-decoration: none;
	transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.hicm-type-market-head > a:hover,
.hicm-type-market-head > a:focus-visible {
	border-color: rgba(220, 39, 50, .48);
	box-shadow: 0 12px 30px rgba(20, 26, 34, .1);
	transform: translateY(-2px);
	outline: none;
}

.hicm-type-market-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 12px;
}

.hicm-type-market-card {
	position: relative;
	display: flex;
	min-width: 0;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--hicm-v158-line);
	border-radius: 17px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(24, 31, 42, .055);
	color: var(--hicm-v158-ink);
	text-decoration: none;
	transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.hicm-type-market-card:hover,
.hicm-type-market-card:focus-visible {
	z-index: 2;
	border-color: rgba(220, 39, 50, .46);
	box-shadow: 0 16px 34px rgba(24, 31, 42, .13);
	transform: translateY(-4px);
	outline: none;
}

.hicm-type-market-card:focus-visible {
	box-shadow:
		0 0 0 3px rgba(220, 39, 50, .2),
		0 16px 34px rgba(24, 31, 42, .13);
}

.hicm-type-market-media {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 3 / 2;
	background:
		radial-gradient(circle at 50% 90%, rgba(19, 26, 35, .15), transparent 36%),
		linear-gradient(145deg, #edf1f5, #fff);
}

.hicm-type-market-media::after {
	position: absolute;
	inset: auto 13% 6px;
	height: 9px;
	border-radius: 50%;
	background: rgba(17, 23, 31, .13);
	filter: blur(7px);
	content: "";
}

.hicm-type-market-media img {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	transition: transform .24s ease;
}

.hicm-type-market-card:hover .hicm-type-market-media img,
.hicm-type-market-card:focus-visible .hicm-type-market-media img {
	transform: scale(1.035);
}

.hicm-type-market-icon {
	position: absolute;
	z-index: 3;
	inset-block-start: 9px;
	inset-inline-start: 9px;
	display: grid;
	width: 34px;
	height: 34px;
	place-items: center;
	border: 1px solid rgba(255, 255, 255, .85);
	border-radius: 10px;
	background: rgba(20, 25, 32, .86);
	box-shadow: 0 5px 14px rgba(17, 22, 29, .18);
	color: #fff;
	font-size: 16px;
	backdrop-filter: blur(8px);
}

.hicm-type-market-card:nth-child(11) .hicm-type-market-icon,
.hicm-type-market-card:nth-child(12) .hicm-type-market-icon {
	background: var(--hicm-v158-red);
}

.hicm-type-market-copy {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: flex-start;
	padding: 13px 13px 14px;
}

[dir="rtl"] .hicm-type-market-copy,
[dir="rtl"] .hicm-type-market-head {
	text-align: right;
}

.hicm-type-market-copy > strong {
	color: var(--hicm-v158-ink);
	font-size: 16px;
	font-weight: 900;
	letter-spacing: -.025em;
	line-height: 1.22;
}

.hicm-type-market-copy > small {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 4px;
	margin-top: 7px;
	color: #717b8a;
	font-size: 11px;
	font-style: normal;
	line-height: 1.35;
}

.hicm-type-market-copy > small b {
	width: max-content;
	padding: 2px 6px;
	border-radius: 999px;
	background: #fff0f1;
	color: #a91b24;
	font-size: 9.5px;
	font-weight: 900;
	letter-spacing: .01em;
}

.hicm-type-market-copy > small span {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.hicm-type-market-copy > em {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-top: auto;
	padding-top: 12px;
	color: #a91b24;
	font-size: 11px;
	font-style: normal;
	font-weight: 850;
}

[dir="rtl"] .hicm-type-market-copy > em i,
[dir="rtl"] .hicm-type-market-head > a i {
	transform: scaleX(-1);
}

@media (max-width: 1180px) {
	.hicm-type-market-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 900px) {
	.gab-page-home .gab-mkpick-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.hicm-type-market-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 768px) {
	.gab-page-home .gab-hx-makes-grid {
		max-height: 188px;
	}

	.gab-page-home .gab-mkpick {
		min-height: 0;
	}

	.gab-page-home .gab-mkpick-brands {
		max-height: none;
	}

	.gab-page-home .gab-mkpick-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.hicm-type-market {
		padding: 48px 0 54px;
	}

	.hicm-type-market-head {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		gap: 15px;
		margin-bottom: 18px;
	}

	.hicm-type-market-head h2 {
		font-size: clamp(25px, 7vw, 34px);
	}

	.hicm-type-market-head p {
		font-size: 14px;
		line-height: 1.6;
	}

	.hicm-type-market-head > a {
		width: 100%;
	}

	.hicm-type-market-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 9px;
	}

	.hicm-type-market-card {
		border-radius: 15px;
	}

	.hicm-type-market-copy {
		padding: 11px 11px 12px;
	}

	.hicm-type-market-copy > strong {
		font-size: 15px;
	}
}

@media (max-width: 359px) {
	.hicm-type-market-grid {
		gap: 7px;
	}

	.hicm-type-market-icon {
		inset-block-start: 7px;
		inset-inline-start: 7px;
		width: 30px;
		height: 30px;
		border-radius: 9px;
		font-size: 14px;
	}

	.hicm-type-market-copy {
		padding: 10px 9px 11px;
	}

	.hicm-type-market-copy > strong {
		font-size: 14px;
	}

	.hicm-type-market-copy > small {
		font-size: 10px;
	}

	.hicm-type-market-copy > em {
		font-size: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hicm-type-market-card,
	.hicm-type-market-media img,
	.hicm-type-market-head > a {
		transition: none;
	}
}
