Which car do you want to drive?
{
const isDesktop = window.innerWidth >= 1024;
const el = document.getElementById((isDesktop ? 'expand-d-' : 'expand-m-') + '1');
if (!el) return;
// Keep scroll position stable after DOM reflow
if (window.scrollY !== startY) window.scrollTo(0, startY);
const rect = el.getBoundingClientRect();
const elTopAbs = rect.top + window.scrollY;
const viewportH = window.innerHeight;
let target;
if (isDesktop) {
// Vertically center expanded in viewport
target = elTopAbs + rect.height / 2 - viewportH / 2;
} else {
// Mobile: align top of expanded ~100px from viewport top
target = elTopAbs - 100;
}
const maxScroll = document.documentElement.scrollHeight - viewportH;
target = Math.max(0, Math.min(target, maxScroll));
const distance = target - startY;
if (Math.abs(distance) < 8) return;
// Gentle: pace ~1px per ms, clamped
const duration = Math.min(1800, Math.max(800, Math.abs(distance) * 1.3));
const startTime = performance.now();
const easeInOutSine = t => -(Math.cos(Math.PI * t) - 1) / 2;
const step = now => {
const elapsed = now - startTime;
const progress = Math.min(elapsed / duration, 1);
window.scrollTo(0, startY + distance * easeInOutSine(progress));
if (progress < 1) requestAnimationFrame(step);
};
requestAnimationFrame(step);
});
}
"
:class="selectedCar === 1 ? 'border-primary ring-2 ring-primary/20' : 'border-gray-200 hover:border-primary/50'"
class="bg-white rounded-2xl border-2 overflow-hidden cursor-pointer transition-all duration-200">
SUV AUTOMATIC
SUV AUTOMATIC
SEAT Arona
or Similar SUV
90 KM (€46)
/ per Day
5
Automatic
5 3
Unlimited Kilometers
No Deposit
{
const isDesktop = window.innerWidth >= 1024;
const el = document.getElementById((isDesktop ? 'expand-d-' : 'expand-m-') + '5');
if (!el) return;
// Keep scroll position stable after DOM reflow
if (window.scrollY !== startY) window.scrollTo(0, startY);
const rect = el.getBoundingClientRect();
const elTopAbs = rect.top + window.scrollY;
const viewportH = window.innerHeight;
let target;
if (isDesktop) {
// Vertically center expanded in viewport
target = elTopAbs + rect.height / 2 - viewportH / 2;
} else {
// Mobile: align top of expanded ~100px from viewport top
target = elTopAbs - 100;
}
const maxScroll = document.documentElement.scrollHeight - viewportH;
target = Math.max(0, Math.min(target, maxScroll));
const distance = target - startY;
if (Math.abs(distance) < 8) return;
// Gentle: pace ~1px per ms, clamped
const duration = Math.min(1800, Math.max(800, Math.abs(distance) * 1.3));
const startTime = performance.now();
const easeInOutSine = t => -(Math.cos(Math.PI * t) - 1) / 2;
const step = now => {
const elapsed = now - startTime;
const progress = Math.min(elapsed / duration, 1);
window.scrollTo(0, startY + distance * easeInOutSine(progress));
if (progress < 1) requestAnimationFrame(step);
};
requestAnimationFrame(step);
});
}
"
:class="selectedCar === 5 ? 'border-primary ring-2 ring-primary/20' : 'border-gray-200 hover:border-primary/50'"
class="bg-white rounded-2xl border-2 overflow-hidden cursor-pointer transition-all duration-200">
SUV AUTOMATIC
SUV AUTOMATIC
Volkswagen T-Roc
or Similar SUV
190 KM (€97)
/ per Day
5
Automatic
5 3
Unlimited Kilometers
No Deposit
{
const isDesktop = window.innerWidth >= 1024;
const el = document.getElementById((isDesktop ? 'expand-d-' : 'expand-m-') + '8');
if (!el) return;
// Keep scroll position stable after DOM reflow
if (window.scrollY !== startY) window.scrollTo(0, startY);
const rect = el.getBoundingClientRect();
const elTopAbs = rect.top + window.scrollY;
const viewportH = window.innerHeight;
let target;
if (isDesktop) {
// Vertically center expanded in viewport
target = elTopAbs + rect.height / 2 - viewportH / 2;
} else {
// Mobile: align top of expanded ~100px from viewport top
target = elTopAbs - 100;
}
const maxScroll = document.documentElement.scrollHeight - viewportH;
target = Math.max(0, Math.min(target, maxScroll));
const distance = target - startY;
if (Math.abs(distance) < 8) return;
// Gentle: pace ~1px per ms, clamped
const duration = Math.min(1800, Math.max(800, Math.abs(distance) * 1.3));
const startTime = performance.now();
const easeInOutSine = t => -(Math.cos(Math.PI * t) - 1) / 2;
const step = now => {
const elapsed = now - startTime;
const progress = Math.min(elapsed / duration, 1);
window.scrollTo(0, startY + distance * easeInOutSine(progress));
if (progress < 1) requestAnimationFrame(step);
};
requestAnimationFrame(step);
});
}
"
:class="selectedCar === 8 ? 'border-primary ring-2 ring-primary/20' : 'border-gray-200 hover:border-primary/50'"
class="bg-white rounded-2xl border-2 overflow-hidden cursor-pointer transition-all duration-200">
SUV AUTOMATIC
SUV AUTOMATIC
VW Tiguan
or Similar SUV
150 KM (€77)
/ per Day
5
Automatic
5 3
Unlimited Kilometers
No Deposit