/* New Way – Filter vozidiel
   Dizajn podľa zadania: Montserrat, #003767
--------------------------------------------------------------- */
.vf-filter,
.vf-chips-wrap,
.vf-sort-wrap,
.vf-pocet,
.vf-pagination,
.vf-mobile-toggle {
	--vf-blue: #003767;
	--vf-blue-10: rgba(0, 55, 103, 0.10);
	--vf-blue-25: rgba(0, 55, 103, 0.25);
	--vf-red: #d8273d;
	--vf-track: #d9dee5;
	font-family: 'Montserrat', sans-serif;
	color: var(--vf-blue);
}

/* ---------- formulár ---------- */
.vf-filter {
	background: #fff;
	border-radius: 16px;
	padding: 28px 24px;
	max-width: 420px;
	box-shadow: 0 8px 30px rgba(0, 55, 103, 0.08);
	box-sizing: border-box;
}
.vf-filter *,
.vf-filter *::before,
.vf-filter *::after { box-sizing: border-box; }

.vf-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 20px;
}
.vf-title {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	color: var(--vf-blue);
	font-family: inherit;
}
.vf-reset-link,
.vf-clear-all {
	font-size: 13px;
	font-weight: 500;
	color: var(--vf-blue);
	text-decoration: underline;
	text-underline-offset: 3px;
	white-space: nowrap;
}
.vf-reset-link:hover,
.vf-clear-all:hover { opacity: .75; color: var(--vf-blue); }

/* ---------- skupiny + labely ---------- */
.vf-group { margin-bottom: 22px; }
.vf-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 16px;
	font-weight: 700;
	margin-bottom: 12px;
	color: var(--vf-blue);
}
.vf-icon { display: inline-flex; line-height: 0; }
.vf-icon svg { width: 18px; height: 18px; }
.vf-icon svg path { fill: var(--vf-blue); }

/* ---------- checkboxy ---------- */
.vf-types,
.vf-checks-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px 10px;
	margin-bottom: 22px;
}
.vf-checks-row { margin-bottom: 0; }
.vf-check {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	color: var(--vf-blue);
	user-select: none;
}
.vf-check input { position: absolute; opacity: 0; pointer-events: none; }
.vf-check-box {
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	border: 2px solid var(--vf-blue);
	border-radius: 7px;
	background: #fff;
	position: relative;
	transition: background .15s ease;
}
.vf-check input:checked + .vf-check-box { background: var(--vf-blue); }
.vf-check input:checked + .vf-check-box::after {
	content: '';
	position: absolute;
	left: 7px;
	top: 3px;
	width: 5px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2.5px 2.5px 0;
	transform: rotate(45deg);
}
.vf-check input:focus-visible + .vf-check-box {
	outline: 2px solid var(--vf-blue);
	outline-offset: 2px;
}

/* ---------- selecty ---------- */
.vf-row { display: flex; gap: 12px; }
.vf-row .vf-select { flex: 1 1 0; min-width: 0; }
.vf-select {
	appearance: none;
	-webkit-appearance: none;
	width: auto;
	height: 46px;
	padding: 0 38px 0 18px;
	border: 1.5px solid var(--vf-blue);
	border-radius: 10px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23003767' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	color: var(--vf-blue);
	cursor: pointer;
}
.vf-select--full { width: 100%; }
.vf-select:focus-visible { outline: 2px solid var(--vf-blue); outline-offset: 2px; }

/* ---------- VIN vyhľadávanie ----------
   Vyššia špecificita, aby štýl neprebilo pravidlo témy typu input[type="text"]. */
.vf-filter input.vf-vin-input,
.vf-filter input.vf-vin-input[type="text"] {
	width: 100%;
	height: 46px;
	padding: 0 18px;
	border: 1.5px solid var(--vf-blue);
	border-radius: 10px;
	background: #fff;
	background-image: none;
	box-shadow: none;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 46px;
	color: var(--vf-blue);
	-webkit-appearance: none;
	appearance: none;
}
.vf-filter input.vf-vin-input::placeholder { color: var(--vf-blue); opacity: .55; }
.vf-filter input.vf-vin-input:focus,
.vf-filter input.vf-vin-input:focus-visible {
	border-color: var(--vf-blue);
	outline: 2px solid var(--vf-blue);
	outline-offset: 2px;
	box-shadow: none;
}
.vf-vin-group .vf-icon svg path,
.vf-vin-group .vf-icon svg circle { stroke: var(--vf-blue); fill: none; }

/* ---------- dual slider ---------- */
.vf-range { position: relative; height: 22px; margin-top: 14px; }
.vf-range-track {
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 3px;
	transform: translateY(-50%);
	background: var(--vf-track);
	border-radius: 3px;
}
.vf-range-fill {
	position: absolute;
	top: 0;
	bottom: 0;
	background: var(--vf-blue);
	border-radius: 3px;
}
.vf-range input[type="range"] {
	-webkit-appearance: none;
	appearance: none;
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 22px;
	margin: 0;
	background: none;
	pointer-events: none;
	outline: none;
}
.vf-range input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	pointer-events: auto;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--vf-blue);
	border: none;
	cursor: pointer;
	margin-top: 0;
}
.vf-range input[type="range"]::-moz-range-thumb {
	pointer-events: auto;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--vf-blue);
	border: none;
	cursor: pointer;
}
.vf-range input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--vf-blue); outline-offset: 2px; }
.vf-range-vals {
	display: flex;
	justify-content: space-between;
	margin-top: 8px;
	font-size: 13px;
	font-weight: 700;
	color: var(--vf-blue);
}

/* ---------- značky ---------- */
.vf-brands {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
}
.vf-brand { cursor: pointer; }
.vf-brand input { position: absolute; opacity: 0; pointer-events: none; }
.vf-brand--hidden { display: none; }
.vf-brands.vf-brands--open .vf-brand--hidden { display: block; }

/* ďalšie značky – textový zoznam pod tlačidlom */
.vf-brands-extra {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px 10px;
	margin-top: 16px;
}
.vf-brands-extra[hidden] { display: none; }
.vf-brand-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 64px;
	border: 1.5px solid transparent;
	border-radius: 12px;
	background: #fff;
	transition: border-color .15s ease;
	padding: 8px;
}
.vf-brand:hover .vf-brand-inner { border-color: var(--vf-blue-25); }
.vf-brand input:checked + .vf-brand-inner { border-color: var(--vf-blue); }
.vf-brand input:focus-visible + .vf-brand-inner { outline: 2px solid var(--vf-blue); outline-offset: 2px; }
.vf-brand-logo {
	max-width: 100%;
	max-height: 44px;
	width: auto;
	height: auto;
	object-fit: contain;
}
.vf-brand-name {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	text-align: center;
	color: var(--vf-blue);
}
.vf-more-brands {
	display: inline-block;
	margin-top: 12px;
	font-size: 13px;
	font-weight: 500;
	color: var(--vf-blue);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.vf-more-brands:hover { opacity: .75; color: var(--vf-blue); }

/* ---------- tlačidlá ---------- */
.vf-submit {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	padding: 16px 20px;
	margin-top: 6px;
	background: var(--vf-blue);
	color: #fff;
	border: none;
	border-radius: 14px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
	text-align: left;
	cursor: pointer;
	transition: opacity .15s ease;
}
.vf-submit:hover { opacity: .92; }
.vf-submit-text strong { font-weight: 700; }
.vf-submit-arrow {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #fff;
}
.vf-reset {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	padding: 16px 20px;
	margin-top: 14px;
	background: var(--vf-red);
	color: #fff;
	border: none;
	border-radius: 14px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity .15s ease;
}
.vf-reset:hover { opacity: .92; }

/* ---------- aktívne filtre (chips) ---------- */
.vf-chips-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}
.vf-chip {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 10px 18px;
	background: var(--vf-blue);
	color: #fff;
	border: none;
	border-radius: 999px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity .15s ease;
}
.vf-chip:hover { opacity: .9; }
.vf-chip-x { font-size: 16px; line-height: 1; }

/* ---------- zoradenie ---------- */
.vf-sort-wrap { display: inline-block; position: relative; }
.vf-sort {
	appearance: none;
	-webkit-appearance: none;
	height: 52px;
	padding: 0 48px 0 24px;
	border: none;
	border-radius: 999px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23003767' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 22px center;
	box-shadow: 0 6px 22px rgba(0, 55, 103, 0.10);
	font-family: 'Montserrat', sans-serif;
	font-size: 16px;
	font-weight: 600;
	color: #003767;
	cursor: pointer;
}
.vf-sort:focus-visible { outline: 2px solid #003767; outline-offset: 2px; }

/* ---------- počet ---------- */
.vf-pocet { font-weight: 600; }

/* ---------- loading stav gridu ---------- */
.vf-loading { opacity: .45; pointer-events: none; transition: opacity .15s ease; }

/* ---------- stránkovanie ---------- */
.vf-pagination {
	display: flex;
	align-items: center;
	gap: 16px;
	font-family: 'Montserrat', sans-serif;
	color: var(--vf-blue);
}
.vf-page-arrow {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--vf-blue);
	transition: opacity .15s ease;
}
.vf-page-arrow:hover { opacity: .88; }
.vf-page-arrow.is-disabled { opacity: .35; cursor: default; pointer-events: none; }
.vf-page-num {
	font-size: 16px;
	font-weight: 600;
	color: var(--vf-blue);
	text-decoration: none;
	padding: 2px 4px;
	transition: opacity .15s ease;
}
.vf-page-num:hover { opacity: .7; color: var(--vf-blue); }
.vf-page-num.is-current {
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 5px;
	text-decoration-thickness: 2px;
}
.vf-page-dots {
	font-size: 16px;
	font-weight: 600;
	color: var(--vf-blue);
	letter-spacing: 2px;
}

/* ---------- mobilný filter (tlačidlo + overlay) ---------- */
.vf-mobile-toggle {
	display: none;
	align-items: center;
	gap: 10px;
	padding: 14px 22px;
	background: var(--vf-blue);
	color: #fff;
	border: none;
	border-radius: 14px;
	font-family: 'Montserrat', sans-serif;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity .15s ease;
}
.vf-mobile-toggle:hover { opacity: .92; }
.vf-mobile-toggle .vf-icon svg { width: 18px; height: 18px; }
.vf-mobile-close { display: none; }

@media (max-width: 1024px) {
	.vf-mobile-toggle { display: inline-flex; }

	.vf-filter { display: none; }

	/* Nič vo filtri sa na mobile neprilepuje – ani hlavička, ani tlačidlá, ani Elementor sticky kontajner. */
	.vf-filter,
	.vf-filter .vf-head,
	.vf-filter .vf-actions {
		position: static !important;
		top: auto !important;
		bottom: auto !important;
	}
	.vf-unsticky,
	.vf-unsticky.elementor-sticky--active,
	.vf-unsticky.elementor-sticky--effects {
		position: static !important;
		top: auto !important;
		bottom: auto !important;
		width: auto !important;
		transform: none !important;
	}
	.vf-unsticky + .elementor-sticky__spacer { display: none !important; }

	/* Otvorený filter je bežný blok v toku stránky (nie fixed overlay) – scrolluje spolu so stránkou. */
	body.vf-filter-open .vf-filter {
		display: block;
		position: static;
		max-width: none;
		margin-top: 14px;
		padding: 22px 20px 28px;
	}
	body.vf-filter-open .vf-filter .vf-head {
		position: static;
		padding: 0 0 12px;
		margin-bottom: 14px;
	}

	.vf-mobile-close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		flex: 0 0 auto;
		width: 36px;
		height: 36px;
		margin-left: 4px;
		border: none;
		border-radius: 50%;
		background: var(--vf-blue-10);
		color: var(--vf-blue);
		font-size: 22px;
		line-height: 1;
		font-family: inherit;
		cursor: pointer;
	}
}

/* ---------- mobil ---------- */
@media (max-width: 480px) {
	body.vf-filter-open .vf-filter { padding: 20px 16px 24px; }
	.vf-brands { grid-template-columns: repeat(3, 1fr); gap: 10px; }
}

/* ---------- sticky akcie (desktop) ----------
   Vizuál tlačidiel sa nemení – iba sa "prilepia" na spodok filtra pri scrollovaní. */
@media (min-width: 1025px) {
	.vf-filter { overflow: visible; }

	.vf-actions {
		position: sticky;
		bottom: 0;
		z-index: 6;
		background: #fff;
		margin: 0 -24px -28px;
		padding: 0 24px 28px;
		border-radius: 0 0 16px 16px;
	}
	/* jemné prelínanie, aby obsah nad tlačidlom nekončil ostro */
	.vf-actions::before {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		bottom: 100%;
		height: 18px;
		pointer-events: none;
		background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
	}
	/* keď je filter celý viditeľný, tieň netreba */
	.vf-actions.vf-actions--pinned {
		box-shadow: 0 -10px 24px rgba(0, 55, 103, 0.06);
	}
}
