/* ==========================================================================
   KOVČO – Vozni park
   1) Stranica /vozni-park/: svijetli "izložbeni prostor" s 3D galerijom
   2) Detaljni prikaz vozila (/vozni-park/naziv-vozila/)
   ========================================================================== */

/* ==========================================================================
   1) STRANICA VOZNI PARK – svijetla topla podloga, 3D galerija
   ========================================================================== */

.fleet--showroom {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding-block: clamp(3rem, 6vw, 5rem) clamp(3.5rem, 7vw, 6rem);
	background:
		radial-gradient(ellipse 70% 55% at 50% 58%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 70%),
		linear-gradient(180deg, var(--k-bg-light) 0%, var(--k-bg) 100%);
	color: var(--k-black);
}


/* Naslov ------------------------------------------------------------------ */

.fleet__head {
	text-align: center;
}

.fleet__title {
	position: relative;
	display: inline-block;
	margin: 0;
	padding-bottom: 0.4em;
	font-size: clamp(1.89rem, 3.6vw, 2.97rem);
	line-height: 1.05;
	letter-spacing: 0;
	color: var(--k-black);
}

.fleet__title::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 2.2em;
	height: 4px;
	background: var(--k-yellow);
	transform: translateX(-50%) skewX(-20deg);
}

.fleet__subtitle {
	margin: 1.1rem auto 0;
	font-size: clamp(1.0625rem, 1.4vw, 1.2rem);
	color: var(--k-grey);
}

.fleet__intro {
	max-width: 62ch;
	margin: 0.75rem auto 0;
	line-height: 1.7;
	color: var(--k-grey);
}

.fleet__intro p:last-child {
	margin-bottom: 0;
}

/* 3D pozornica ------------------------------------------------------------ */

.fleet-carousel {
	--card-w: 600px;
	--card-h: 360px;
	margin-top: clamp(0.5rem, 2vw, 1.5rem);
}

.fleet-stage {
	position: relative;
	height: calc(var(--card-h) + 2.5rem);
	overflow: hidden;
	perspective: 1500px;
	perspective-origin: 50% 45%;
	outline: none;
	touch-action: pan-y;
	user-select: none;
	-webkit-user-select: none;
	cursor: grab;
}

.fleet-stage.is-dragging {
	cursor: grabbing;
}

/* Diskretna linija "poda" izložbenog prostora, točno ispod vozila */
.fleet-stage::before {
	content: "";
	position: absolute;
	left: 50%;
	top: calc(1rem + var(--card-h) + 1px);
	width: min(92%, 1200px);
	height: 1px;
	transform: translateX(-50%);
	background: linear-gradient(90deg, rgba(14, 14, 14, 0), rgba(14, 14, 14, 0.12) 20%, rgba(14, 14, 14, 0.12) 80%, rgba(14, 14, 14, 0));
}

.fleet-stage:focus-visible {
	box-shadow: inset 0 0 0 2px var(--k-yellow);
	border-radius: 18px;
}

.fleet-ring {
	position: absolute;
	top: 1rem;
	left: 50%;
	width: var(--card-w);
	height: var(--card-h);
	margin: 0 0 0 calc(var(--card-w) / -2);
	padding: 0;
	list-style: none;
	transform-style: preserve-3d;
}

/* Svako vozilo je uvijek okrenuto prema gledatelju (bez zakretanja) –
   perspektiva ga samo smanjuje s udaljenošću, pa omjer ostaje točan. */
.fleet-item {
	position: absolute;
	inset: 0;
	transition:
		transform 0.85s cubic-bezier(0.22, 0.75, 0.2, 1),
		opacity 0.6s var(--k-ease);
	will-change: transform;
}

.fleet-stage.is-dragging .fleet-item {
	transition: none;
}

.fleet-item__card {
	position: relative;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.fleet-item.is-active .fleet-item__card {
	cursor: inherit;
}

.fleet-item__img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 100%;
	object-fit: contain;
	border-radius: 12px;
	pointer-events: none;
}

/* Vrlo blaga kontaktna sjena ispod vozila */
.fleet-item__card::after {
	content: "";
	position: absolute;
	left: 18%;
	right: 18%;
	bottom: -10px;
	height: 18px;
	z-index: -1;
	border-radius: 50%;
	background: radial-gradient(ellipse at center, rgba(14, 14, 14, 0.16), rgba(14, 14, 14, 0) 70%);
}

.fleet-item__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 80%;
	padding: 1.5rem;
	border: 1px solid var(--k-line);
	border-radius: 14px;
	background: #fff;
	color: var(--k-black);
	font-family: var(--k-font-display);
	font-size: 1.4rem;
	font-style: italic;
	font-weight: 900;
	text-align: center;
}

/* U JS načinu podaci se prikazuju u panelu ispod galerije */
.js .fleet-item__meta {
	display: none;
}

/* Bez JavaScripta: obični popis vozila s podacima */
html:not(.js) .fleet-stage {
	height: auto;
	overflow: visible;
	perspective: none;
	cursor: default;
}

html:not(.js) .fleet-ring {
	position: static;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 2.5rem;
	width: auto;
	height: auto;
	max-width: var(--k-container);
	margin: 0 auto;
	padding-inline: var(--k-gutter);
}

html:not(.js) .fleet-item {
	position: static;
}

html:not(.js) .fleet-item__card {
	height: 220px;
}

/* Kontrole ---------------------------------------------------------------- */

.fleet-controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(0.75rem, 2vw, 1.5rem);
	margin-top: 1.25rem;
}

.fleet-controls__arrow {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	padding: 0;
	border: 1.5px solid var(--k-black);
	border-radius: 50%;
	background: transparent;
	color: var(--k-black);
	cursor: pointer;
	transition: background-color 0.25s, color 0.25s, transform 0.25s var(--k-ease);
}

.fleet-controls__arrow .kovco-icon {
	width: 22px;
	height: 22px;
}

.fleet-controls__arrow:hover {
	background: var(--k-black);
	color: var(--k-yellow);
}

.fleet-controls__arrow:active {
	transform: scale(0.95);
}

.fleet-controls__dots {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	max-width: 50vw;
}

.fleet-dot {
	width: 9px;
	height: 9px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(14, 14, 14, 0.2);
	cursor: pointer;
	transition: width 0.35s var(--k-ease), background-color 0.35s;
}

.fleet-dot:hover {
	background: rgba(14, 14, 14, 0.45);
}

.fleet-dot.is-active {
	width: 28px;
	background: var(--k-black);
}

.fleet-controls__count {
	min-width: 4.5rem;
	margin: 0;
	font-family: var(--k-font-mono);
	font-size: 0.875rem;
	color: var(--k-grey);
	text-align: center;
}

.fleet-controls__count span {
	font-weight: 700;
	color: var(--k-black);
}

/* Podaci odabranog vozila ------------------------------------------------- */

.fleet-info {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 720px;
	min-height: 14rem;
	margin-top: clamp(1.75rem, 3vw, 2.5rem);
	text-align: center;
	transition: opacity 0.3s var(--k-ease), transform 0.3s var(--k-ease);
}

.fleet-info.is-changing {
	opacity: 0;
	transform: translateY(8px);
}

/* Oznaka namjene (koristi se i na stranici vozila) */
.fleet-info__purpose {
	display: inline-flex;
	margin: 0 0 0.9rem;
	padding: 0.35em 0.85em;
	border-radius: 4px;
	background: var(--k-yellow);
	color: var(--k-black);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.fleet-info__name {
	margin: 0;
	font-size: clamp(1.6rem, 2.8vw, 2.4rem);
	line-height: 1.1;
	color: var(--k-black);
}

.fleet-info__make {
	margin: 0.5rem 0 0;
	font-family: var(--k-font-mono);
	font-size: 0.95rem;
	letter-spacing: 0.03em;
	color: var(--k-grey);
}

.fleet-info__desc {
	max-width: 54ch;
	margin: 1rem 0 0;
	line-height: 1.65;
	color: var(--k-ink);
}

.fleet-info__btn {
	margin-top: 1.6rem;
}

/* Tamna podloga i postolje – samo za detaljni prikaz vozila ---------------- */

.vehicle-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: #0c0c0c;
	color: #fff;
}

.fleet__bg {
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background:
		radial-gradient(ellipse 45% 55% at 50% -5%, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0) 70%),
		radial-gradient(ellipse 60% 30% at 50% 88%, rgba(255, 196, 0, 0.1), rgba(255, 196, 0, 0) 70%),
		linear-gradient(180deg, #101010 0%, #161616 62%, #0b0b0b 100%);
}

.fleet-stage__podium {
	position: absolute;
	left: 50%;
	bottom: 6%;
	width: min(78%, 820px);
	aspect-ratio: 4.2 / 1;
	transform: translateX(-50%);
	border-radius: 50%;
	background:
		radial-gradient(ellipse at 50% 50%, rgba(255, 196, 0, 0.26) 0%, rgba(255, 196, 0, 0.08) 42%, rgba(255, 196, 0, 0) 70%),
		radial-gradient(ellipse at 50% 50%, #262626 0%, #151515 60%, rgba(10, 10, 10, 0) 72%);
	pointer-events: none;
}

.fleet-stage__podium span {
	position: absolute;
	inset: 18% 16%;
	border: 1px solid rgba(255, 196, 0, 0.45);
	border-radius: 50%;
	box-shadow: 0 0 24px rgba(255, 196, 0, 0.35), inset 0 0 24px rgba(255, 196, 0, 0.2);
}

/* ==========================================================================
   2) DETALJNI PRIKAZ VOZILA
   ========================================================================== */

.vehicle-hero {
	padding-block: clamp(2.5rem, 6vw, 5rem);
}

.vehicle-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: center;
}

.vehicle-hero__title {
	max-width: 14ch;
	margin: 0;
	font-size: clamp(2.16rem, 4.5vw, 3.96rem);
	line-height: 1;
	color: #fff;
}

.vehicle-hero__make {
	margin: 0.9rem 0 0;
	font-family: var(--k-font-mono);
	font-size: 1rem;
	color: rgba(255, 255, 255, 0.62);
}

.vehicle-hero__lead {
	max-width: 48ch;
	margin: 1.25rem 0 2rem;
	font-size: 1.0625rem;
	line-height: 1.65;
	color: rgba(255, 255, 255, 0.8);
}

.vehicle-hero__text .contact-buttons {
	margin-top: 2rem;
}

.vehicle-gallery__main {
	position: relative;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	min-height: clamp(260px, 34vw, 480px);
	padding-bottom: 8%;
}

.vehicle-gallery__main .fleet-stage__podium {
	bottom: 0;
	width: 96%;
}

.vehicle-gallery__img {
	position: relative;
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: clamp(240px, 32vw, 460px);
	border-radius: 14px;
	object-fit: contain;
	filter: drop-shadow(0 28px 26px rgba(0, 0, 0, 0.6));
	-webkit-box-reflect: below 4px linear-gradient(transparent 78%, rgba(255, 255, 255, 0.12));
	transition: opacity 0.3s var(--k-ease);
}

.vehicle-gallery__img.is-loading {
	opacity: 0.2;
}

.vehicle-gallery__thumbs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.6rem;
	margin: 1.5rem 0 0;
	padding: 0;
	list-style: none;
}

.vehicle-gallery__thumb {
	display: block;
	width: 76px;
	height: 76px;
	padding: 0;
	overflow: hidden;
	border: 2px solid rgba(255, 255, 255, 0.15);
	border-radius: 10px;
	background: #1a1a1a;
	cursor: pointer;
	opacity: 0.65;
	transition: border-color 0.25s, opacity 0.25s;
}

.vehicle-gallery__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.vehicle-gallery__thumb:hover {
	opacity: 1;
}

.vehicle-gallery__thumb.is-active {
	border-color: var(--k-yellow);
	opacity: 1;
}

.vehicle-block + .vehicle-block {
	margin-top: clamp(3rem, 6vw, 4.5rem);
}

.vehicle-specs {
	margin: 0;
	border-top: 1px solid var(--k-line);
}

.vehicle-specs__row {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	gap: 1rem;
	padding: 1rem 0;
	border-bottom: 1px solid var(--k-line);
}

.vehicle-specs dt {
	font-family: var(--k-font-mono);
	font-size: 0.875rem;
	letter-spacing: 0.04em;
	color: var(--k-grey);
}

.vehicle-specs dd {
	margin: 0;
	font-weight: 600;
}

.vehicle-aside__purpose {
	margin: 0 0 1.5rem;
	color: rgba(255, 255, 255, 0.7);
}

.vehicle-back {
	margin-top: 1.5rem;
}

.vehicle-back .kovco-icon {
	transition: transform 0.25s var(--k-ease);
}

.vehicle-back:hover .kovco-icon {
	transform: translateX(-4px);
}

.vehicle-others {
	padding-block: clamp(3.5rem, 6vw, 5.5rem);
	background: var(--k-bg-light);
}

.vehicle-others__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
	gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.vehicle-others__list a {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.9rem 0.5rem;
	align-items: center;
	text-decoration: none;
}

.vehicle-others__img {
	grid-column: 1 / -1;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 14px;
	background: var(--k-graphite);
}

.vehicle-others__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.8s var(--k-ease);
}

.vehicle-others__list a:hover img {
	transform: scale(1.05);
}

.vehicle-others__name {
	font-weight: 700;
}

.vehicle-others__list .kovco-icon {
	width: 20px;
	height: 20px;
	transition: transform 0.25s var(--k-ease);
}

.vehicle-others__list a:hover .kovco-icon {
	transform: translateX(4px);
}

/* Responzivno ------------------------------------------------------------- */

@media (max-width: 1100px) {
	.vehicle-hero__inner {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 700px) {
	.fleet-stage {
		perspective: 1100px;
	}

	.fleet-controls {
		gap: 0.6rem;
	}

	.fleet-controls__arrow {
		width: 46px;
		height: 46px;
	}

	.fleet-controls__dots {
		max-width: 40vw;
	}

	.fleet-info {
		min-height: 0;
	}

	.vehicle-specs__row {
		grid-template-columns: minmax(0, 1fr);
		gap: 0.25rem;
	}

	.vehicle-hero__text .contact-buttons {
		flex-direction: column;
	}

	.vehicle-hero__text .btn {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fleet-item {
		transition-duration: 0.01ms;
	}
}
