/* v3 fleet. Figma: Vehicle fleet 10320:5992 (1440, card grid), mobile 11307:11295 (430, carousel). */
.v3-fleet {
  --fl-dash: repeating-linear-gradient(180deg, var(--v3-gray-400) 0 3px, transparent 3px 5px);
  background: var(--v3-dark);
  color: var(--v3-white);
  overflow-x: clip;               /* clip, not hidden: keeps the page free of x-overflow without making a scroll container */
  isolation: isolate;
}

/* ---- background: noise 4% + dashed guide lines (5 on desktop, 2 on mobile) ---- */
.v3-fleet::before,
.v3-fleet::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.v3-fleet::before {
  max-width: var(--v3-container-max);
  margin-inline: auto;
  background:
    var(--fl-dash) 3.47% 0 / 1px 100% no-repeat,
    var(--fl-dash) 26.94% 0 / 1px 100% no-repeat,
    var(--fl-dash) 50% 0 / 1px 100% no-repeat,
    var(--fl-dash) 73.06% 0 / 1px 100% no-repeat,
    var(--fl-dash) 96.53% 0 / 1px 100% no-repeat;
}
.v3-fleet::after {
  opacity: 0.04;
  background: url("../../../images/v3/hero/noise.webp") 0 0 / 256px;
}

/* ---- header ---- */
.v3-fleet__head {
  display: grid;
  grid-template-columns: 320px minmax(0, 652px);
  column-gap: 12px;
  align-items: start;
  margin-bottom: 80px;
}
.v3-fleet__label {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  font-size: var(--v3-fs-caption);
  font-weight: 700;
  line-height: var(--v3-lh-tight);
  text-transform: uppercase;
}
.v3-fleet__label::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--v3-primary); }
.v3-fleet__title { color: var(--v3-gray-50); text-wrap: balance; }
.v3-fleet__muted { color: var(--v3-gray-100); }

/* ---- cards: grid on desktop ---- */
.v3-fleet__track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
}
.v3-fleet__track:focus-visible { outline: 2px solid var(--v3-primary); outline-offset: 4px; }

.v3-fleet__card { display: flex; flex-direction: column; min-width: 0; color: var(--v3-dark); }
.v3-fleet__photo {
  position: relative;
  aspect-ratio: 320 / 200;
  overflow: hidden;
  background: var(--v3-bg-light);
  border-radius: var(--v3-radius-md) var(--v3-radius-md) 0 0;
}
.v3-fleet__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.v3-fleet__badge {
  position: absolute;
  top: 15px;
  right: 15px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 25px;
  padding: 5px 8px;
  border: 0.5px solid var(--v3-primary);
  border-radius: 100px;
  background: var(--v3-primary-10);
  color: var(--v3-primary);
  font-size: 11px;
  font-weight: 500;
  line-height: var(--v3-lh-tight);
  white-space: nowrap;
}
.v3-fleet__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--v3-gray-50);
  border-top: 0;
  border-radius: 0 0 var(--v3-radius-md) var(--v3-radius-md);
  background: var(--v3-white);
}
.v3-fleet__card.is-featured .v3-fleet__body { background: var(--v3-primary-10); }
.v3-fleet__info { display: flex; flex-direction: column; gap: 8px; }
.v3-fleet__name { font-size: 16px; font-weight: 700; line-height: var(--v3-lh-body-m); }
.v3-fleet__gearbox { font-size: 12px; line-height: var(--v3-lh-tight); color: var(--v3-gray-200); }
.v3-fleet__specs { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; color: var(--v3-gray-200); }
.v3-fleet__specs li { display: flex; align-items: center; gap: 4px; font-size: 16px; line-height: var(--v3-lh-body-m); }
.v3-fleet__specs img { flex: none; }

.v3-fleet__foot {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 8px;
  margin-top: auto;
  padding-top: 24px;
}
.v3-fleet__foot::before {          /* dashed divider */
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--v3-gray-50) 0 3px, transparent 3px 5px);
}
.v3-fleet__price { display: flex; align-items: baseline; gap: 4px; min-width: 0; margin: 0; }
.v3-fleet__from,
.v3-fleet__sum { white-space: nowrap; }
.v3-fleet__from { font-size: 16px; font-weight: 500; line-height: var(--v3-lh-body-m); color: var(--v3-primary); margin-right: -4px; }
.v3-fleet__sum { font-size: 24px; font-weight: 700; line-height: var(--v3-lh-tight); }
.v3-fleet__card.is-featured .v3-fleet__sum { color: var(--v3-primary); }
.v3-fleet__unit { font-size: 12px; line-height: var(--v3-lh-tight); color: var(--v3-gray-200); white-space: nowrap; }
.v3-fleet__rent {
  --btn-bg: var(--v3-gray-400);
  flex: none;
  min-height: 42px;
  padding: 0 18px;
  border-radius: var(--v3-radius-sm);
  font-size: 14px;
  line-height: var(--v3-lh-tight);
}
.v3-fleet__card.is-featured .v3-fleet__rent { --btn-bg: var(--v3-dark); }

/* ---- stat block (home variant, .v3-fleet--stat): first grid column, cards take the rest. Figma 12104:27610 ---- */
.v3-fleet--stat .v3-fleet__main {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  column-gap: 12px;
  align-items: start;
}
.v3-fleet__stat { display: flex; flex-direction: column; gap: 22px; max-width: 224px; }
.v3-fleet__stat-top { display: flex; align-items: center; }
.v3-fleet__stat-photo,
.v3-fleet__stat-value {
  position: relative;   /* later circles paint over earlier ones */
  display: grid;
  flex: none;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--v3-white);
  box-shadow: 0 0 0 2px var(--v3-dark);   /* dark gap between overlapping circles (Figma: subtract shapes) */
  overflow: hidden;
}
.v3-fleet__stat-photo + .v3-fleet__stat-photo,
.v3-fleet__stat-photo + .v3-fleet__stat-value { margin-left: -16px; }
.v3-fleet__stat-img { width: 100%; height: 100%; object-fit: cover; }
.v3-fleet__stat-value { color: var(--v3-dark); font-size: 16px; font-weight: 700; line-height: var(--v3-lh-body-m); }
.v3-fleet__stat-label { margin: 0; max-width: 210px; font-size: 16px; font-weight: 600; line-height: var(--v3-lh-body-m); color: var(--v3-gray-100); }

/* ---- bike variant (.v3-fleet--bike, courier page). Figma 12172:28075 / mobile card 12233:32625 ---- */
.v3-fleet--bike .v3-fleet__photo { aspect-ratio: 320 / 220; background: linear-gradient(180deg, #f1f3f3, #dfdfe0); }
.v3-fleet--bike .v3-fleet__img { inset: 0; width: 246px; max-width: 100%; margin-inline: auto; object-fit: contain; mix-blend-mode: multiply; }   /* white-background bike shot blends into the grey gradient; 246px wide like the Figma bike */
.v3-fleet--bike .v3-fleet__badge { right: auto; left: 15px; }
.v3-fleet--bike .v3-fleet__specs { gap: 8px; color: var(--v3-gray-200); }
.v3-fleet--bike .v3-fleet__specs li { gap: 4px; font-size: 14px; line-height: var(--v3-lh-tight); }
.v3-fleet__spec-icon { display: grid; flex: none; place-items: center; width: 15px; height: 15px; }
.v3-fleet__spec-label { margin-right: 4px; }
.v3-fleet__spec-value { font-weight: 600; color: var(--v3-gray-500); }
.v3-fleet__promo { margin: 0; padding: 16px; border-radius: 6px; background: var(--v3-primary-light); color: var(--v3-gray-500); font-size: 12px; line-height: var(--v3-lh-tight); text-wrap: balance; }
.v3-fleet--bike .v3-fleet__foot { padding-top: 0; }
.v3-fleet--bike .v3-fleet__foot::before { display: none; }
.v3-fleet--bike .v3-fleet__unit { color: var(--v3-gray-200); }
.v3-fleet--bike .v3-fleet__rent { padding: 0 20px; }
@media (min-width: 769px) and (max-width: 1100px) {
  .v3-fleet--bike .v3-fleet__track { grid-template-columns: repeat(2, minmax(0, 1fr)); }   /* 2x2 instead of 3+1 */
}

/* carousel controls: mobile only */
.v3-fleet__nav { display: none; }

/* ---- more link ---- */
.v3-fleet__more {
  --btn-color: var(--v3-gray-100);
  display: flex;
  width: fit-content;
  margin: 24px 0 0 auto;
}
.v3-fleet__more-m { display: none; }

/* ---- CTA: text + Bitrix24 form (Figma: text 400px at x 62, form 652px at x 726, tops aligned) ---- */
.v3-fleet__cta {
  display: grid;
  grid-template-columns: minmax(0, 400px) minmax(0, 652px);
  justify-content: space-between;
  align-items: start;
  gap: 32px;
  margin-top: 52px;
}
.v3-fleet__cta-text { display: flex; flex-direction: column; gap: 24px; }
.v3-fleet__cta-title { color: var(--v3-gray-50); }
.v3-fleet__cta-text p { color: var(--v3-gray-100); }
.v3-fleet__form { min-width: 0; }

@media (max-width: 1024px) {
  .v3-fleet::before {
    background:
      repeating-linear-gradient(180deg, var(--v3-white-15) 0 3px, transparent 3px 5px) 16px 0 / 1px 100% no-repeat,
      repeating-linear-gradient(180deg, var(--v3-white-15) 0 3px, transparent 3px 5px) calc(100% - 16px) 0 / 1px 100% no-repeat;
    max-width: none;
  }
  .v3-fleet__head { grid-template-columns: minmax(0, 1fr); row-gap: 12px; margin-bottom: 48px; }
  .v3-fleet__label { height: 20px; }
  .v3-fleet--stat .v3-fleet__main { grid-template-columns: minmax(0, 1fr); row-gap: 32px; }
  .v3-fleet__cta { grid-template-columns: minmax(0, 1fr); justify-content: stretch; margin-top: 40px; }
}

@media (min-width: 769px) {
  .v3-fleet--stat .v3-fleet__more { margin-top: 48px; }   /* Figma home: 47px below the card row */
}

@media (max-width: 768px) {
  .v3-fleet__head { margin-bottom: 36px; }
  .v3-fleet__stat { display: none; }   /* Figma mobile frame has no stat block */

  .v3-fleet__track {
    display: flex;
    gap: 16px;
    margin-inline: calc(var(--v3-gutter) * -1);
    padding-inline: var(--v3-gutter);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--v3-gutter);
    scrollbar-width: none;
  }
  .v3-fleet__track::-webkit-scrollbar { display: none; }
  .v3-fleet__card { flex: 0 0 min(336px, calc(100vw - 2 * var(--v3-gutter) - 24px)); scroll-snap-align: start; }
  .v3-fleet__name { font-size: 20px; }
  .v3-fleet__gearbox,
  .v3-fleet__unit { font-size: 14px; }
  .v3-fleet__from { margin-right: 0; }

  .v3-fleet__nav { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 36px; }
  .v3-fleet__counter { margin: 0; font-size: 16px; line-height: var(--v3-lh-body-m); color: var(--v3-gray-50); }
  .v3-fleet__arrows { display: flex; gap: 12px; }
  .v3-fleet__arrow {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: var(--v3-gray-300);
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
  }
  .v3-fleet__arrow img { transform: rotate(90deg); }
  .v3-fleet__arrow--next img { transform: rotate(-90deg); }
  .v3-fleet__arrow:hover { background: var(--v3-primary); }
  .v3-fleet__arrow:focus-visible { outline: 2px solid var(--v3-primary); outline-offset: 3px; }
  .v3-fleet__arrow[aria-disabled="true"] { opacity: 0.4; cursor: default; background: var(--v3-gray-300); }

  .v3-fleet--bike .v3-fleet__name { font-size: 16px; }
  .v3-fleet--bike .v3-fleet__unit { font-size: 12px; }

  .v3-fleet__more { margin-top: 36px; }
  .v3-fleet__more-d { display: none; }
  .v3-fleet__more-m { display: inline; }
  .v3-fleet__cta { gap: 32px; margin-top: 36px; }
  .v3-fleet__cta-text { gap: 20px; }
}

@media (max-width: 400px) {
  .v3-fleet__body { padding: 20px; }
  .v3-fleet__foot { padding-top: 20px; }
  .v3-fleet__rent { padding: 0 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .v3-fleet__track { scroll-behavior: auto; }
  .v3-fleet__arrow { transition: none; }
}
