/* ==========================================
   VETTEZONE - Samochody na sprzedaz (homepage)
   Prefix: vzs  (VetteZone Sales)
   ========================================== */

/* Reset */
.vzs, .vzs *, .vzs *::before, .vzs *::after { box-sizing: border-box; }

.vzs {
  --vzs-gold: #f5c400;
  --vzs-gold-h: #ffd600;
  --vzs-blk: #0a0a0b;
  --vzs-card: #111113;
  --vzs-border: rgba(255,255,255,.06);
  --vzs-w: #ffffff;
  --vzs-g1: rgba(255,255,255,.85);
  --vzs-g2: rgba(255,255,255,.55);
  --vzs-g3: rgba(255,255,255,.35);
  --vzs-max: 1100px;

  position: relative;
  background: var(--vzs-blk);
  padding: 56px 0 48px;
  overflow: hidden;
}

/* Subtle gold glow */
.vzs::before {
  content: "";
  position: absolute;
  top: -40%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(245,196,0,.03) 0%, transparent 70%);
  pointer-events: none;
}

/* ---- Container ---- */
.vzs-wrap {
  position: relative;
  z-index: 1;
  max-width: var(--vzs-max);
  margin: 0 auto;
  padding: 0 36px;
}

/* ---- Header ---- */
.vzs-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 36px;
}

.vzs-badge {
  display: inline-block;
  padding: 5px 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--vzs-gold);
  background: rgba(245,196,0,.06);
  border: 1px solid rgba(245,196,0,.18);
  border-radius: 50px;
  margin-bottom: 16px;
  line-height: 1;
}

.vzs-title {
  font-family: 'Outfit', 'Poppins', sans-serif;
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--vzs-w);
  margin: 0 0 12px;
}

.vzs-accent { color: var(--vzs-gold); }

.vzs-sub {
  font-size: 14px;
  line-height: 1.7;
  color: var(--vzs-g2);
  margin: 0;
}

/* ---- Tiles Grid ---- */
.vzs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ---- Tile ---- */
.vzs-tile {
  display: block;
  text-decoration: none;
  background: var(--vzs-card);
  border: 1px solid var(--vzs-border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color .25s, transform .2s;
}

/* Single tile spans full width */
.vzs-tile:only-child {
  grid-column: 1 / -1;
  max-width: 600px;
  margin: 0 auto;
}

.vzs-tile:hover {
  border-color: rgba(245,196,0,.25);
  transform: translateY(-2px);
}

/* Tile image
   Zdjecie pozycjonowane absolutnie, zeby wypelnialo kafelek 3:2.
   Selektor .vzs .vzs-tile-img jest mocniejszy niz regula motywu
   ".elementor img { height: auto }" - bez tego pionowe zdjecia (np. Charger
   2252x4000) mialy naturalna wysokosc i na mobile bylo widac tylko niebo. */
.vzs .vzs-tile-img-wrap {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.vzs .vzs-tile-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 75%;
  transition: transform .4s ease;
}

.vzs-tile:hover .vzs-tile-img {
  transform: scale(1.04);
}

/* Tile body */
.vzs-tile-body {
  padding: 22px 24px 24px;
}

.vzs-tile-name {
  font-family: 'Outfit', 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--vzs-w);
  margin: 0 0 6px;
  line-height: 1.3;
}

.vzs-tile-desc {
  font-size: 13px;
  line-height: 1.65;
  color: var(--vzs-g2);
  margin: 0 0 14px;
}

.vzs-tile-desc strong {
  color: var(--vzs-g1);
  font-weight: 600;
}

/* Tile price row */
.vzs-tile-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}

.vzs-tile-price-old {
  font-size: 14px;
  font-weight: 600;
  color: var(--vzs-g3);
  text-decoration: line-through;
}

.vzs-tile-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--vzs-gold);
  line-height: 1;
}

/* Tile CTA */
.vzs-tile-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--vzs-blk);
  background: var(--vzs-gold);
  border-radius: 2px;
  transition: background .2s;
}

.vzs-tile:hover .vzs-tile-cta {
  background: var(--vzs-gold-h);
}

.vzs-tile-cta svg { transition: transform .2s; }
.vzs-tile:hover .vzs-tile-cta svg { transform: translateX(3px); }

/* ---- Sold section (samochody sprzedane) ---- */
.vzs--sold { padding-top: 8px; }

.vzs--sold::before { display: none; }

.vzs--sold .vzs-badge {
  color: var(--vzs-g2);
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.12);
}

.vzs--sold .vzs-tile-img {
  filter: grayscale(.45) brightness(.8);
  transition: transform .4s ease, filter .3s ease;
}

.vzs--sold .vzs-tile:hover .vzs-tile-img {
  filter: grayscale(0) brightness(1);
}

.vzs-sold-ribbon {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--vzs-blk);
  background: var(--vzs-gold);
  border-radius: 2px;
  line-height: 1;
}

.vzs-tile-status {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--vzs-g2);
}

.vzs--sold .vzs-tile-cta {
  color: var(--vzs-gold);
  background: transparent;
  border: 1px solid rgba(245,196,0,.4);
}

.vzs--sold .vzs-tile:hover .vzs-tile-cta {
  color: var(--vzs-blk);
  background: var(--vzs-gold);
}

/* ---- Footer ---- */
.vzs-footer {
  text-align: center;
  margin-top: 32px;
}

.vzs-footer-note {
  font-size: 12px;
  color: var(--vzs-g3);
  margin: 0;
  line-height: 1.5;
}

/* ---- Entrance animation ---- */
@keyframes vzs-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.vzs-header                { animation: vzs-in .6s ease both .1s; }
.vzs-tile:nth-child(1)     { animation: vzs-in .5s ease both .2s; }
.vzs-tile:nth-child(2)     { animation: vzs-in .5s ease both .28s; }
.vzs-tile:nth-child(3)     { animation: vzs-in .5s ease both .36s; }
.vzs-tile:nth-child(4)     { animation: vzs-in .5s ease both .44s; }
.vzs-footer                { animation: vzs-in .5s ease both .50s; }

/* ---- Responsive - 768px ---- */
@media (max-width: 768px) {
  .vzs { padding: 36px 0 32px; }
  .vzs--sold { padding-top: 4px; }
  .vzs-wrap { padding: 0 16px; }
  .vzs-header { margin-bottom: 24px; }
  .vzs-grid { grid-template-columns: 1fr; gap: 12px; }
  .vzs-tile-body { padding: 18px 18px 20px; }
  .vzs-tile-name { font-size: 15px; }
  .vzs-tile-desc { font-size: 12px; }
  .vzs-tile-price { font-size: 20px; }
  .vzs-tile-cta {
    width: 100%;
    justify-content: center;
    height: 42px;
  }
  .vzs-sub { font-size: 13px; }
  .vzs-footer { margin-top: 24px; }
}

/* ---- Responsive - 400px ---- */
@media (max-width: 400px) {
  .vzs { padding: 28px 0 24px; }
  .vzs--sold { padding-top: 0; }
  .vzs-wrap { padding: 0 10px; }
  .vzs-title { font-size: 20px; }
  .vzs-tile-body { padding: 14px 14px 16px; }
  .vzs-tile-name { font-size: 14px; }
  .vzs-tile-price { font-size: 18px; }
  .vzs-tile-cta { height: 40px; font-size: 10px; }
  .vzs-footer-note { font-size: 11px; }
}

/* ---- Accessibility ---- */
@media (prefers-reduced-motion: reduce) {
  .vzs-header, .vzs-tile, .vzs-footer { animation: none; }
  .vzs-tile, .vzs-tile-img, .vzs-tile-cta, .vzs-tile-cta svg { transition: none; }
  .vzs--sold .vzs-tile-img { transition: none; }
}

.vzs-tile:focus-visible {
  outline: 2px solid var(--vzs-gold);
  outline-offset: 2px;
}

/* ==========================================
   Modul vzcars - karuzela (3+ auta w sekcji)
   ========================================== */
.vzs-carousel { position: relative; }

.vzs-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 16px) / 2);
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 6px;
}
.vzs-track::-webkit-scrollbar { display: none; }
.vzs-track > .vzs-tile { scroll-snap-align: start; }
.vzs-track:focus-visible { outline: 2px solid var(--vzs-gold); outline-offset: 4px; }

.vzs-arrow {
  position: absolute;
  top: calc(50% - 22px);
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vzs-gold);
  background: rgba(10,10,11,.88);
  border: 1px solid rgba(245,196,0,.35);
  border-radius: 50%;
  cursor: pointer;
  transition: background .2s, color .2s, opacity .2s;
}
.vzs-arrow--prev { left: -22px; }
.vzs-arrow--next { right: -22px; }
.vzs-arrow:hover, .vzs-arrow:focus-visible { background: var(--vzs-gold); color: var(--vzs-blk); }
.vzs-arrow[disabled] { opacity: .25; cursor: default; pointer-events: none; }

/* Zarezerwowany - plakietka jak "sprzedana", zdjecie bez wyszarzenia */
.vzs-tile--reserved .vzs-sold-ribbon { background: #fff; }

@media (max-width: 768px) {
  .vzs-track { grid-auto-columns: 86%; gap: 12px; }
  .vzs-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .vzs-track { scroll-behavior: auto; }
}

/* ==========================================
   Modul vzcars - karuzela premium (od 2 aut)
   2 kafle obok siebie na komputerze, 1 + podglad nastepnego na telefonie
   ========================================== */
.vzs-carousel { padding-bottom: 6px; }

/* delikatne wygaszenie krawedzi, gdy jest wiecej aut niz miesci sie w widoku */
.vzs-carousel.has-more .vzs-track {
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent 100%);
          mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent 100%);
}
.vzs-carousel.has-more.is-scrolled .vzs-track {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
}
.vzs-carousel.at-end .vzs-track {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px);
          mask-image: linear-gradient(90deg, transparent 0, #000 28px);
}

/* Kafel w karuzeli */
.vzs-carousel .vzs-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #151517 0%, #0e0e10 100%);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  transition: transform .3s cubic-bezier(.2,.7,.2,1), border-color .3s, box-shadow .3s;
}
.vzs-carousel .vzs-tile::after { /* zlota linia u gory po najechaniu */
  content: "";
  position: absolute;
  left: 18px; right: 18px; top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--vzs-gold), transparent);
  opacity: 0;
  transition: opacity .3s;
}
.vzs-carousel .vzs-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(245,196,0,.35);
  box-shadow: 0 18px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(245,196,0,.08), 0 12px 40px -12px rgba(245,196,0,.25);
}
.vzs-carousel .vzs-tile:hover::after { opacity: 1; }

.vzs-carousel .vzs-tile-img-wrap { aspect-ratio: 16 / 10; }
.vzs-carousel .vzs-tile-img-wrap::after { /* gradient pod zdjeciem - plynne przejscie w karte */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(14,14,16,.85), transparent);
  pointer-events: none;
}
.vzs-carousel .vzs-tile:hover .vzs-tile-img { transform: scale(1.06); }

.vzs-tile-photos {
  position: absolute;
  z-index: 1;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: rgba(10,10,11,.55);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50px;
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}
.vzs-tile-photos svg { color: var(--vzs-gold); }
.vzs-grid .vzs-tile-photos { display: none; } /* tylko w karuzeli */

.vzs-carousel .vzs-sold-ribbon { z-index: 1; }
.vzs-carousel .vzs-tile-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 22px 22px;
}
.vzs-carousel .vzs-tile-name { font-size: 18px; letter-spacing: -.01em; }
.vzs-carousel .vzs-tile-desc { flex: 1; }
.vzs-carousel .vzs-tile-price-row {
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.vzs-carousel .vzs-tile-price { font-size: 24px; letter-spacing: -.01em; }
.vzs-carousel .vzs-tile-cta { align-self: flex-start; border-radius: 4px; }

/* Strzalki - szklane, poza karuzela na komputerze */
.vzs-carousel .vzs-arrow {
  top: calc(50% - 46px);
  width: 46px;
  height: 46px;
  background: rgba(17,17,19,.72);
  border-color: rgba(245,196,0,.4);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  box-shadow: 0 8px 22px rgba(0,0,0,.45);
}
.vzs-carousel.is-static .vzs-arrow { display: none; }

/* Kropki - aktywna wydluzona, zlota */
.vzs-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  min-height: 8px;
}
.vzs-carousel.is-static .vzs-dots { display: none; }
.vzs-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,.18);
  cursor: pointer;
  transition: width .35s cubic-bezier(.2,.7,.2,1), background .3s;
}
.vzs-dot:hover { background: rgba(245,196,0,.55); }
.vzs-dot.is-active { width: 28px; background: var(--vzs-gold); }
.vzs-dot:focus-visible { outline: 2px solid var(--vzs-gold); outline-offset: 3px; }

@media (max-width: 768px) {
  .vzs-carousel .vzs-tile-body { padding: 16px 16px 18px; }
  .vzs-carousel .vzs-tile-name { font-size: 16px; }
  .vzs-carousel .vzs-tile-price { font-size: 21px; }
  .vzs-carousel .vzs-tile-cta { align-self: stretch; }
  /* na telefonie widac fragment nastepnego auta - zacheta do przesuniecia */
  .vzs-carousel.is-static .vzs-dots { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  .vzs-carousel .vzs-tile, .vzs-dot { transition: none; }
}
