/* ==========================================================================
   DriveKaro — homepage (loaded only on the front page)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.dk-hero {
	background:
		linear-gradient(180deg, var(--dk-surface) 0%, var(--dk-paper) 100%);
	border-bottom: 1px solid var(--dk-line);
}

.dk-hero__inner {
	display: grid;
	gap: 32px;
	padding-top: 40px;
	padding-bottom: 40px;
}

@media (min-width: 1024px) {
	.dk-hero__inner {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
		align-items: center;
		gap: 56px;
		padding-top: 72px;
		padding-bottom: 72px;
	}
}

.dk-hero__title {
	margin: 0 0 20px;
	font-size: clamp(2.35rem, 1.3rem + 4.4vw, 4.4rem);
	font-weight: 800;
	font-stretch: var(--dk-wider);
	line-height: 1.02;
	letter-spacing: -0.02em;
	color: var(--dk-ink);
	text-wrap: balance;
}

.dk-hero__text {
	max-width: 34em;
	margin: 0 0 28px;
	color: var(--dk-ink-2);
	font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem);
	line-height: 1.55;
}

.dk-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 28px;
}

@media (max-width: 479px) {
	.dk-hero__actions .dk-btn { flex: 1 1 100%; }
}

.dk-hero__quick {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
}

.dk-hero__quick-label {
	margin: 0;
	color: var(--dk-muted);
	font-size: 0.9rem;
	font-weight: 600;
}

.dk-chip--hero { background: transparent; min-height: 36px; padding: 6px 12px; font-size: 0.875rem; }

.dk-hero__visual { min-width: 0; }

.dk-hero__img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 11;
	object-fit: cover;
	border-radius: var(--dk-radius-l);
}

/* Technical-drawing illustration */
.dk-blueprint {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 640 / 340;
	color: var(--dk-primary);
}

.dk-blueprint__bg { stroke: var(--dk-line); stroke-width: 1; }
.dk-blueprint__grid { stroke: var(--dk-surface-2); stroke-width: 1; }

.dk-blueprint__body {
	fill: var(--dk-paper);
	stroke: var(--dk-ink);
	stroke-width: 3;
}

.dk-blueprint__glass {
	fill: var(--dk-primary-tint);
	stroke: var(--dk-ink);
	stroke-width: 2;
}

.dk-blueprint__line { stroke: var(--dk-line-strong); stroke-width: 1.5; }

.dk-blueprint__wheel {
	fill: var(--dk-ink);
	stroke: var(--dk-ink);
	stroke-width: 3;
}

.dk-blueprint__hub {
	fill: var(--dk-surface-2);
	stroke: var(--dk-paper);
	stroke-width: 3;
}

.dk-blueprint__dims path {
	stroke: var(--dk-primary);
	stroke-width: 1.5;
	stroke-dasharray: none;
}

.dk-blueprint__dims .dk-blueprint__ground {
	stroke: var(--dk-ink);
	stroke-width: 2;
}

.dk-blueprint__marks circle { fill: var(--dk-cta); }

/* --------------------------------------------------------------------------
   Top picks
   -------------------------------------------------------------------------- */
.dk-section--picks { background: var(--dk-paper); }

.dk-grid--products { align-items: stretch; }

/* --------------------------------------------------------------------------
   Shop by category
   -------------------------------------------------------------------------- */
.dk-section--cats { background: var(--dk-surface); }

.dk-catgrid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 768px) {
	.dk-catgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
}

.dk-cat-card {
	display: flex;
	flex-direction: column;
	gap: 4px;
	height: 100%;
	padding: 16px;
	color: var(--dk-ink);
	background: var(--dk-paper);
	border: 1px solid var(--dk-line);
	border-radius: var(--dk-radius);
	text-decoration: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dk-cat-card:hover {
	border-color: var(--dk-primary);
	box-shadow: var(--dk-shadow-hover);
}

.dk-cat-card__visual {
	display: block;
	margin-bottom: 10px;
}

.dk-cat-card__img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: var(--dk-radius-s);
}

.dk-cat-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	color: var(--dk-primary);
	background: var(--dk-primary-tint);
	border-radius: var(--dk-radius);
}

.dk-cat-card__name {
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.25;
}

.dk-cat-card__count {
	color: var(--dk-muted);
	font-size: 0.85rem;
	font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Shop by vehicle
   -------------------------------------------------------------------------- */
.dk-vehicles {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 768px) {
	.dk-vehicles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
}

@media (min-width: 1200px) {
	.dk-vehicles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

.dk-vehicle {
	display: flex;
	flex-direction: column;
	padding: 14px;
	border: 1px solid var(--dk-line);
	border-radius: var(--dk-radius);
	background: var(--dk-paper);
}

.dk-vehicle__link {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	color: var(--dk-ink);
	text-decoration: none;
}

.dk-vehicle__link:hover .dk-vehicle__name { color: var(--dk-primary); text-decoration: underline; }

.dk-vehicle__visual {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 16 / 9;
	color: var(--dk-ink-2);
	background: var(--dk-surface);
	border-radius: var(--dk-radius-s);
	overflow: hidden;
}

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

.dk-vehicle__name {
	font-size: 1.05rem;
	font-weight: 800;
	font-stretch: var(--dk-wide);
}

.dk-vehicle__models {
	display: flex;
	flex-wrap: wrap;
	gap: 0 10px;
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.875rem;
}

.dk-vehicle__models a {
	display: inline-flex;
	min-height: 32px;
	align-items: center;
	color: var(--dk-ink-2);
}

/* --------------------------------------------------------------------------
   Solve a car problem
   -------------------------------------------------------------------------- */
.dk-section--problems { background: var(--dk-surface); }

.dk-problems {
	display: grid;
	gap: 16px;
}

@media (min-width: 768px) {
	.dk-problems { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
}

.dk-problem {
	padding: 20px;
	background: var(--dk-paper);
	border: 1px solid var(--dk-line);
	border-top: 4px solid var(--dk-primary);
	border-radius: var(--dk-radius);
}

.dk-problem__title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 12px;
	font-size: 1.2rem;
	font-stretch: var(--dk-wide);
}

.dk-problem__title a { color: var(--dk-ink); text-decoration: none; }
.dk-problem__title a:hover { color: var(--dk-primary); text-decoration: underline; }

.dk-problem__icon {
	display: inline-flex;
	color: var(--dk-primary);
}

.dk-problem__links {
	margin: 0;
	padding: 0;
	list-style: none;
}

.dk-problem__links li { border-top: 1px solid var(--dk-line); }

.dk-problem__links a {
	display: flex;
	align-items: center;
	min-height: 44px;
	color: var(--dk-ink-2);
	font-weight: 600;
	text-decoration: none;
}

.dk-problem__links a:hover { color: var(--dk-primary); text-decoration: underline; }

/* --------------------------------------------------------------------------
   Buying guides
   -------------------------------------------------------------------------- */
.dk-grid--guides { grid-template-columns: minmax(0, 1fr); gap: 20px; }

@media (min-width: 900px) {
	.dk-grid--guides {
		grid-template-columns: 1.3fr 1fr;
		grid-auto-rows: auto;
		gap: 20px 40px;
	}

	.dk-grid--guides .dk-card--feature { grid-row: span 5; }
}

.dk-grid--guides .dk-card--compact {
	padding-bottom: 16px;
	border-bottom: 1px solid var(--dk-line);
}

/* --------------------------------------------------------------------------
   Popular
   -------------------------------------------------------------------------- */
.dk-popular {
	display: grid;
	gap: 0 40px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: dk-pop;
}

@media (min-width: 900px) {
	.dk-popular { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.dk-popular__item {
	counter-increment: dk-pop;
	border-bottom: 1px solid var(--dk-line);
}

.dk-popular__link {
	display: grid;
	grid-template-columns: 2.2rem 72px minmax(0, 1fr);
	align-items: center;
	gap: 14px;
	padding: 14px 0;
	color: var(--dk-ink);
	text-decoration: none;
}

.dk-popular__link::before {
	content: counter(dk-pop);
	color: var(--dk-primary);
	font-size: 1.6rem;
	font-weight: 800;
	font-stretch: var(--dk-wider);
	font-variant-numeric: tabular-nums;
}

.dk-popular__thumb {
	display: block;
	width: 72px;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: var(--dk-radius-s);
	background: var(--dk-surface);
}

.dk-popular__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dk-popular__thumb .dk-card__placeholder svg { width: 24px; height: 24px; }

.dk-popular__title {
	display: block;
	font-weight: 700;
	line-height: 1.35;
}

.dk-popular__link:hover .dk-popular__title { color: var(--dk-primary); text-decoration: underline; }

.dk-popular__cat {
	display: block;
	margin-top: 2px;
	color: var(--dk-muted);
	font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   Latest / intro / newsletter
   -------------------------------------------------------------------------- */
.dk-section--latest { border-top: 1px solid var(--dk-line); }
.dk-section--intro .dk-content { max-width: 820px; }
.dk-section--newsletter { padding-top: 16px; }

/* The default illustration is decorative: on small phones, content comes first. */
@media (max-width: 639px) {
	.dk-hero__visual .dk-blueprint { display: none; }
	.dk-hero:not(.dk-hero--finder) .dk-hero__visual:not(:has(img)) { display: none; }
}


/* --------------------------------------------------------------------------
   v2 hero: headline + finder panel + three entry points
   -------------------------------------------------------------------------- */
.dk-hero--finder .dk-hero__inner {
	grid-template-areas: "copy" "finder" "entries";
	padding-top: 32px;
	padding-bottom: 32px;
	gap: 24px;
}

.dk-hero--finder .dk-hero__copy { grid-area: copy; }
.dk-hero--finder .dk-hero__visual { grid-area: finder; }
.dk-hero--finder .dk-entries { grid-area: entries; }
.dk-hero--finder .dk-hero__text { margin-bottom: 0; }

@media (min-width: 1024px) {
	.dk-hero--finder .dk-hero__inner {
		grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
		grid-template-areas: "copy finder" "entries finder";
		align-items: start;
		row-gap: 36px;
		column-gap: 64px;
		padding-top: 64px;
		padding-bottom: 64px;
	}

	.dk-hero--finder .dk-hero__copy { align-self: end; }
	.dk-hero--finder .dk-hero__visual { align-self: center; }
}

.dk-hero--finder .dk-hero__title { font-size: clamp(2.3rem, 1.2rem + 4.2vw, 4.2rem); }

.dk-entries {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 640px) {
	.dk-entries { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
}

.dk-entry {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 2px 12px;
	height: 100%;
	padding: 14px 16px;
	color: var(--dk-ink);
	background: var(--dk-paper);
	border: 1px solid var(--dk-line-strong);
	border-radius: var(--dk-radius);
	text-decoration: none;
	transition: border-color 0.15s ease;
}

@media (min-width: 640px) {
	.dk-entry { grid-template-columns: 1fr; align-content: start; gap: 8px; padding: 16px; }
}

.dk-entry:hover { border-color: var(--dk-ink); }
.dk-entry:hover .dk-entry__title { text-decoration: underline; }

.dk-entry__icon {
	grid-row: span 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	color: var(--dk-primary);
	background: var(--dk-primary-tint);
	border-radius: var(--dk-radius-s);
}

@media (min-width: 640px) {
	.dk-entry__icon { grid-row: auto; }
}

.dk-entry__title { font-weight: 800; font-stretch: var(--dk-wide); line-height: 1.2; }
.dk-entry__text { color: var(--dk-ink-2); font-size: 0.9rem; line-height: 1.4; }

/* --------------------------------------------------------------------------
   Shop by Vehicle: make tiles
   -------------------------------------------------------------------------- */
.dk-section--makes { background: var(--dk-surface); }

.dk-makes {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 640px) { .dk-makes { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .dk-makes { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; } }

.dk-make {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 64px;
	padding: 10px 14px;
	background: var(--dk-paper);
	border: 1px solid var(--dk-line);
	border-left: 3px solid var(--dk-ink);
	border-radius: var(--dk-radius-s);
	color: var(--dk-ink);
	text-decoration: none;
}

.dk-make:hover { border-color: var(--dk-primary); border-left-color: var(--dk-primary); }
.dk-make:hover .dk-make__name { text-decoration: underline; }
.dk-make__name { font-weight: 800; font-stretch: var(--dk-wide); line-height: 1.2; }
.dk-make__count { color: var(--dk-muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }

/* Solve a Car Problem: tiles */
.dk-problem-tiles {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 768px) { .dk-problem-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; } }

.dk-problem-tile {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 100%;
	min-height: 64px;
	padding: 12px 14px;
	background: var(--dk-paper);
	border: 1px solid var(--dk-line);
	border-radius: var(--dk-radius);
	color: var(--dk-ink);
	font-weight: 700;
	line-height: 1.25;
	text-decoration: none;
}

.dk-problem-tile:hover { border-color: var(--dk-primary); }
.dk-problem-tile:hover .dk-problem-tile__title { text-decoration: underline; }
.dk-problem-tile__icon { display: inline-flex; color: var(--dk-bad); flex-shrink: 0; }

/* Gear shelves (Emergency, EV & Charging) */
.dk-section--gear { background: var(--dk-paper); }
.dk-section--premium { background: var(--dk-ink); color: #dfe6ec; }
.dk-section--premium .dk-section__title { color: #fff; }
.dk-section--premium .dk-section__intro { color: #c9d2da; }
.dk-section--premium .dk-section__more { color: #fff; }
.dk-section--premium .dk-product { border-color: transparent; color: var(--dk-ink); }
.dk-section--premium :focus-visible { box-shadow: 0 0 0 2px var(--dk-ink), 0 0 0 4px #fff; }

.dk-section--popular-vehicles { background: var(--dk-surface); }
.dk-section--shelf { border-top: 1px solid var(--dk-line); }

.dk-shelf { display: grid; gap: 24px; }

@media (min-width: 1024px) {
	.dk-shelf--split { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; align-items: start; }
	.dk-shelf--split .dk-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.dk-shelf__guides .dk-subhead { margin-top: 0; }
