
.autopark {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-top: -70px;
}
.car-list__spinner_wrapper {
  width: 90vw;
  height: 200px;
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
}
/* Search and Filters Section */
.main-form__wrapper {
  width: 100%;
  height: 125px;
}
.main-form {
    width: 100%;
    margin-top: -80px;
    position: relative;
    padding: 0 20px;
    transition: all 0.3s;
    z-index: 1;
}
.main-form .container {
  background-color: #ff3720;
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  width: 90vw;
}

.search-form {
    margin-bottom: 24px;
    display: flex;
}

.form-horizontal {
    width: 100%;
}

.form-row {
    display: flex;
    gap: 24px;
    align-items: center;
}
.form-group.pickup, .form-group.return {
  flex-grow: 1;
  width: 58%;
}
.form-group.date {
  width: 25%;
  flex-grow: 1;
}
.form-group.time {
  width: 15%;
}
.form-take-wrapper, .form-return-wrapper {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  flex-direction: row;
  flex-grow: 1;
  width: 50%;
}
.form-group.label {
  width: 100%;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  padding-bottom: 8px;
  letter-spacing: 0.02em;
}
.form-control {
  width: 100%;
  height: 48px;
  padding: 12px 12px 12px 10px;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: #1A1A1A;
  background: #FFFFFF;
  transition: all 0.2s;
  text-align: center;
  cursor: pointer;
}

.form-control:focus {
    border-color: #FF3720;
    outline: none;
    box-shadow: 0px 0px 20px 0px rgb(60 0 0 / 62%);
}

.form-control::placeholder {
    color: #999999;
}

.btn-primary {
    background: #FF3720;
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    padding: 12px 32px;
    height: 48px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background: #E8240D;
}

/* Form Layout Elements */
.form-date {
  width: 30%;
}

.form-time {
  width: 20%;
}

.form-city {
  width: 50%;
}

/* Form scroll styles */
.main-form.main-form__scrolled {
  position: fixed;
  top: 155px;
  z-index: 9999;
  height: auto;
}
.main-form.main-form__scrolled .container {
  flex-direction: row;
  justify-content: space-between;
  padding: 0 12px 12px 12px;
  background-color: #ff3720ed;
  padding-top: 0;
  border-radius: 0 0 18px 18px;
}
.main-form.main-form__scrolled .label {
  display: none;
}
.main-form.main-form__scrolled .pickup, .main-form.main-form__scrolled .return {
  display: none;
}
.main-form.main-form__scrolled .time {
  display: none;
}
.main-form.main-form__scrolled .form-group.date {
  width: 100%;
}
.main-form.main-form__scrolled .filter-group {
  gap: 4px;
}
.main-form.main-form__scrolled .form-row {
  flex-grow: 1;
  gap: 8px;
}
.main-form.main-form__scrolled .form-control {
  height: 32px;
} 
.main-form.main-form__scrolled .search-form {
  width: 20%;
  margin: 0;
}
.main-form.main-form__scrolled #dateTake, .main-form.main-form__scrolled #dateReturn {
  font-size: 16px;
}
.main-form.main-form__scrolled .filter-group input[type="radio"] + label {
  padding: 8px 10px;
  width: auto;
  height: auto;
  text-align: center;
  min-width: 0;
}
.main-form.main-form__scrolled .filters-section {
  gap: 12px;
}
.header__form-scrolled .t-container {
  border-radius: 12px 12px 0 0 !important;
}
.main-form.main-form__scrolled .filter-icon {
  display: none;
}

/* Filters Section */
.filters-section {
  display: flex;
  justify-content: space-between;
}
.filters-section-mobile {
  display: none;
}
.transmission-filters {
    margin-bottom: 0;
}
.filter-group {
  display: flex  ;
  flex-wrap: wrap;
  gap: 2px;
  border-radius: 8px;
}

/* Radio Buttons */
.filter-group input[type="radio"] {
    display: none;
}
.filter-group input[type="radio"]:checked + label {
  background: #ffffff;
  color: #FF3720;
}

.filter-group input[type="radio"]:checked + label img {
  opacity: 1;
  filter: invert(71%) sepia(100%) saturate(1500%) hue-rotate(3deg);
}
.filter__all-icon {
  width: 16px !important;
}

.filter-group label:hover {
    color: #FF3720 !important;
    background-color: #FFFFFF !important;
}
.filter-group label:hover img {
    opacity: 1;
    filter: invert(71%) sepia(100%) saturate(1500%) hue-rotate(3deg);
}

.filter-group input[type="radio"] + label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 8px 12px 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.04em;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: space-between;
  background-color: #ff5744;
  /*width: 110px;*/
  /* min-width: clamp(80px, calc(80px + (110 - 80) * (100vw - 1280px) / (1440 - 1280)), 110px); */
  min-width: clamp(50px, calc(50px + 0.05 * (100vw - 1200px)), 110px);
  height: 64px;
}

.filter__all-label {
  /* width: 60px !important; */
}

.filter-group img.filter-icon {
  width: 44px;
  opacity: 0.75;
}



/* Responsive Design */
@media only screen and (max-width: 1200px) {
    .form-row {
        flex-wrap: wrap;
    }

    .form-group {
    }

    .form-group.time {
        flex: 0 0 120px;
    }

    .form-group.submit {
        flex: 1 1 100%;
    }

    .btn-primary {
        width: 100%;
    }
    .filter-group input[type="radio"] + label {
        min-width: 50px;
        font-size: 10px;
    }
    .autopark__container {
      margin-top: 100px !important;
    }

}

@media only screen and (max-width: 768px) {
    .main-form {
        margin-top: 0;
        padding: 0;
        width: 95vw;
    }

    .form-group.pickup, .form-group.return {
    width: 100% !important;
    }

    .form-group.time {
        flex: 0 0 25%;
    }

    .filter-group {
        gap: 8px;
    }

    .filter-group input[type="radio"] + label {
        padding: 8px 16px;
        font-size: 13px;
    }

    .filters-section {
        padding: 16px;
    }

    .filters-section-mobile {
        display: flex;
        justify-content: space-between;
        gap: 8px;
    }
    .autopark__container {
      margin-top: 0 !important;
    }
}

.card__holder {
    width: 100%;
    margin: 55px auto 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-flow: dense;
    opacity: 1;
    gap: 18px;
}

.car__card {
    min-height: 350px;
    border: 0;
    padding: 12px;
    /* overflow: hidden; */
}

.card__wrapper {
    height: auto;
    border-radius: 3px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* ===================================
   Responsive Lazy Image Component
   Grid-based blur-to-sharp transition
   =================================== */

.responsive-lazy-image {
  /* Use CSS Grid to stack both <picture> elements in the same spot */
  display: grid;
  position: relative;
  width: 100%;
}

.responsive-lazy-image > picture {
  /* Make both pictures fill the same grid cell */
  grid-area: 1 / 1 / 2 / 2;
}

.responsive-lazy-image img {
  /* Ensure images are responsive and fill their container */
  width: 100%;
  height: auto;
  display: block;
}

/* The full-quality image starts as invisible */
.responsive-lazy-image .full-image {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

/* When the 'loaded' class is added, fade in the full-quality image */
.responsive-lazy-image.loaded .full-image {
  opacity: 1;
  z-index: 20;
}

/* Regular car card specific styling */
.card__image-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
    min-height: 200px;
    aspect-ratio: 1.37;
}

.card__image-wrapper .responsive-lazy-image {
  width: 100%;
  height: 100%;
}

.card__image-wrapper img {
  object-fit: contain;
}

.card__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.5s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    border-radius: 8px;
}

.card__image.main_car_image {
    opacity: 0;
}

.card__image.main_car_image.loaded {
    opacity: 1;
}

.card__image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px 0;
    object-fit: cover;
    border-radius: 8px;
    z-index: 1;
    display: none;
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

.card__image-placeholder.has-blurhash {
    display: block;
}

.card__title {
    font-size: 18px;
    display: inline-block;
    margin: 0;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
}

.car__card:hover .card__title {
    color: #ef3e2b;
}

.autopark__warning {
  display: none;
}

/* Car Stats */
.card__price_wrapper {
  display: flex;
  flex-direction: row;
  align-items: baseline;
}
.card__price_rub, .card__price_usd, .card__price_bit {
  display: none;
}

.card__stats {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0 8px;
}

.stats__line {
  position: relative;
  display: inline-block;
  color: #000000;
  font-weight: 700;
  font-size: 12px;
  padding-left: 16px;
  text-transform: capitalize;
}

.stats__line::after {
  position: absolute;
  top: 0;
  left: -3px;
  width: 15px;
  height: 15px;
  content: '';
}

.stats__line.stats__line_year {
  padding: 0px;
}

/* Icon Styles for Stats */
.stats__line_transmission::after {
  background: url(../icons/car/transmission.svg) no-repeat;
  background-size: contain;
}

.stats__line_capacity::after {
  background: url(../icons/car/engine.svg) no-repeat;
  background-size: contain;
}

.stats__line_seat::after {
  background: url(../icons/car/seats.svg) no-repeat;
  background-size: contain;
}

.stats__line_doors::after {
  background: url(../icons/car/doors.svg) no-repeat;
  background-size: contain;
}

.stats__line_condition::after {
  background: url(../icons/car/conditioner.svg) no-repeat;
  background-size: contain;
}

/* Pricing */
.card__price {
  font-size: 16px;
  margin-top: 20px;
  margin-left: 4px;
  cursor: pointer;
  transition: all 150ms ease;
  display: flex;
  flex-grow: 1;
  text-align: left;
  flex-direction: row;
  align-items: baseline;
}

.card__price_2, .card__price_3, .card__price_4 {
  display: none;
}

.card__price_value {
    font-size: 24px;
    font-weight: 700;
  font-size: 24px;
}

.card__price_text {
  text-align: left;
  margin-left: 4px;
}

/* Price Tooltip */
.card__price_tooltip {
  font-size: 16px;
  position: absolute;
  z-index: 1;
  bottom: 40px;
  right: 15px;
  width: 160px;
  padding: 16px;
  text-align: center;
  border-radius: 12px;
  background-color: #fff;
  box-shadow: 0px 9px 20px 0px rgb(0 0 0 / 11%);
  transition: all 0.3s ease-out;
  opacity: 0;
}

.card__price_tooltip p {
  margin: 0;
}

.card__price_tooltip_icon {
  opacity: 1;
  width: 12px;
  height: 15px;
  cursor: pointer;
  margin: 0 0 0 5px;
  background: url(../icons/question.svg) center no-repeat;
  background-size: contain;
  background-clip: border-box;
  background-origin: padding-box;
}

.card__wrapper:hover .card__price_tooltip_icon {
  bottom: 22px;
}

.card__price_tooltip_icon:hover + .card__price_tooltip {
  opacity: 1;
  bottom: 60px;
}

/* Action Button */
.card__button {
  margin-top: 18px;
  margin-right: 5px;
  padding: 12px 24px;
  color: #fff;
  background-color: #252525;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  font-size: 16px;
}

.card__button:hover {
  background-color: #ef3e2b;
}


.car-type-filters-mobile {
    width: 50%;
}

.transmission-filters-mobile {
    width: 50%;
}


.car__card-messengers-wrapper {
  padding: 32px 32px 10px 0;
  margin-top: 10px;
  min-height: 350px;
  border: 0;
}

.car__card-messengers {
    width: 100%;
    height: 100%;
    color: #000000;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.car__card-messengers-text {
    font-size: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

a.car__card-messengers-button {
    width: 52px;
    height: 52px;
    background-color: #252525;
    margin-top: 4px;
    border-radius: 10px;
    /* display: flex; */
    /* justify-content: center; */
    /* align-items: center; */
    padding: 14px;
}

div.car__card-messengers-text span.headline {
    font-size: 62px;
    line-height: 60px;
    font-weight: 800;
}
div.car__card-messengers-text span#car-tomorrow {
  display: none;
}

.car__card-messengers-button-wrapper {
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin-top: 12px;
}

.car__card-messengers-button img {}

.t-wa.car__card-messengers-button img {
}

.t-tgm.car__card-messengers-button img {
}

a.t-wa.car__card-messengers-button:hover img {
    filter: invert(50%) sepia(93%) saturate(1500%) hue-rotate(87deg);
}

a.t-tgm.car__card-messengers-button:hover img {
    filter: invert(50%) sepia(93%) saturate(1500%) hue-rotate(185deg);
}

.car__card_promo_l {
    min-height: 350px;
    border: 0;
    grid-column: span 2;
    border-radius: 24px;
    padding: 24px 24px 12px 12px;
    cursor: pointer;
    position: relative;
    /* overflow: hidden; */
}
.car__card_promo_l:hover, .car__card_promo_m:hover{
  z-index: 99;
}
.car__card_promo_m {
    min-height: 350px;
    border: 0;
    grid-column: span 1;
    border-radius: 24px;
    padding: 24px 24px 12px 12px;
    cursor: pointer;
    position: relative;
    /* overflow: hidden; */
}
.car__card_promo_l .card__wrapper, .car__card_promo_m .card__wrapper {
  background-color: transparent;
  align-items: end;
  justify-content: space-between;
  height: 100%;
  gap: 8px;
  position: relative;
  z-index: 9;
}
.car__card_promo_l .card__title{
  color: #ffffff !important;
  font-size: 60px;
  line-height: 100%;
}
.car__card_promo_m .card__title{
  color: #ffffff !important;
  font-size: 40px;
  line-height: 100%;
  text-align: right;
}
.car__card_promo_l .card__title:hover {
  color: #ffffff;
}
.car__card_promo_m .card__title:hover {
  color: #ffffff;
}
.car__card_promo_l .stats__line {
  color: #fff;
  font-size: 16px;
}
.car__card_promo_m .stats__line {
  color: #fff;
  font-size: 16px;
}
.car__card_promo_l .col {
  justify-content: end;
  flex-grow: 1;
  margin: 0;
}
.car__card_promo_m .col {
  justify-content: end;
  flex-grow: 1;
  margin: 0;
}
.car__card_promo_l .stats__line::after {
  filter: brightness(50);
  top: 2px;
  left: -1px;
}
.car__card_promo_m .stats__line::after {
  filter: brightness(50);
  top: 2px;
  left: -1px;
}
.car__card_promo_l .card__stats {
  flex-direction: column;
  flex-grow: 1;
  width: 100%;
  align-items: start;
}
.car__card_promo_m .card__stats {
  flex-direction: column;
  flex-grow: 1;
  width: 100%;
  align-items: start;
}
.car__card_promo_l .card__price {
  flex-grow: 0;
  color: #fff;
  font-size: 20px;
}
.car__card_promo_m .card__price {
  flex-grow: 0;
  color: #fff;
  font-size: 20px;
}
.car__card_promo_l .card__price_value {
  font-size: 44px;
}
.car__card_promo_m .card__price_value {
  font-size: 44px;
}
.car__card_promo_l .card__button {
  background-color: #F33A24;
  margin-top: 6px;
  font-size: 20px;
}
.car__card_promo_m .card__button {
  background-color: #F33A24;
  margin-top: 6px;
  font-size: 20px;
}
/* Promo card background image - responsive picture element */
.car__promo-image {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  border-radius: 24px;
  overflow: hidden;
}

.car__promo-image picture {
  width: 100%;
  height: 100%;
  display: block;
}

.car__promo-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

/* Hover effects for promo card images */
.car__card_promo_l:hover .car__promo-image img,
.car__card_promo_m:hover .car__promo-image img {
  transform: scale(1.05);
}

/* Shadow overlay gradient - creates dark vignette effect */
.car__card_promo_l .car__car-back-shadow,
.car__card_promo_m .car__car-back-shadow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  background: linear-gradient(180deg, rgba(7, 15, 43, 0) 0%, rgb(7 15 43 / 40%) 40.63%, #070f2bd4 100%);
  pointer-events: none;
  border-radius: 24px;
  opacity: 0;
  transition: opacity 0.3s ease, filter 0.3s ease;
  z-index: 0;
}

.car__card_promo_l:hover .car__car-back-shadow,
.car__card_promo_m:hover .car__car-back-shadow {
  filter: blur(24px) saturate(2) brightness(0.6);
  opacity: 1;
}

/* Additional overlay gradient for visual depth */
.car__card_promo_l .car__car-back-overlay,
.car__card_promo_m .car__car-back-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  background: linear-gradient(198.97deg, rgb(0 0 0 / 25%) 12.29%, rgba(0, 0, 0, 0) 31.1%, rgba(0, 0, 0, 0) 61.93%, rgba(0, 0, 0, 0.3) 84.33%);
  pointer-events: none;
  border-radius: 24px;
}

/* Responsive Design */
@media only screen and (max-width: 768px) {
  .filters-section {
    display: none;
  }
  .filters-section-mobile {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
  }
  .car__card, .car__card-messengers-wrapper {
    margin-left: 0;
    width: 100%;
    grid-column: 1;
  }
  .car__card_promo_l {
    min-height: 60vh;
    padding: 16px;
  }
  .car__card_promo_m {
    min-height: 40vh;
    padding: 12px;
  }
  .car__card_promo_l .card__title {
    font-size: 40px;
  }
  .car__card_promo_m .card__title {
    font-size: 24px;
  }
  .car__card_promo_m .card__price_value {
    font-size: 32px;
  }
  .car__card.car__card-messengers-wrapper {
    padding: 0 10px 34px 10px;
    min-height: unset;
  }
  div.car__card-messengers-text span.headline {
    font-size: 52px;
    line-height: 50px;
  }
  .car__card-messengers-text {
    gap: 4px;
  }
  .filter__holder:first-child {
    margin-left: 25%;
  }
  .card__price_tooltip {
    top: -68px;
  }
  .card__price_tooltip_icon {
    bottom: 7px !important;
    left: 68px !important;
  }
  .t-filter__wrapper {
    gap: 8px;
    padding: 12px;
  }
  .card__holder {
    padding: 0;
    grid-template-columns: repeat(1, 1fr);
  }
  .filter__holder{
    width: 50%;
  }
  .card__wrapper:hover .card__price_tooltip {
    bottom: 60px;
  }
  .card__price_tooltip_icon, .card__price_tooltip {
    display: none;
  }
  .autopark {
    margin-top: -90px;
  }
  .main-form__wrapper {
    height: auto;
    display: flex;
    justify-content: center;
  }
  .main-form.main-form__scrolled .container {flex-wrap: wrap;gap: 6px;width: 95vw;}
  .main-form.main-form__scrolled .search-form {
    width: 100%;
    margin: 0;
  }
  .form-take-wrapper, .form-return-wrapper {
    width: 48%;
  }
  .main-form.main-form__scrolled {
  top: 76px;
  }
  .main-form .container {
  width: 95vw;
  }
}

@media only screen and (min-width: 1180px) and (max-width: 1380px) {
  .main-form.main-form__scrolled .filter-group input[type="radio"] + label {
    padding: 8px 8px;
  }
  .main-form.main-form__scrolled #dateTake, .main-form.main-form__scrolled #dateReturn {
  font-size: 15px;
    padding: 8px;
  }
}

.placeholder img {
    filter: blur(21px);
    scale: 0.95;
}

picture.placeholder {
    z-index: 10;
}