.car__grid {
  margin-top: 16px;
  display: grid;
  justify-content: center;
  grid-template-columns: repeat(auto-fit, 165px);
  grid-template-rows: repeat(1, 1fr);
  gap: 20px;
}

.car__card {
  border: 1px solid #d3d3d3;
  background-color: #ffffff;
  color: #000000;

  width: 165px;
  height: 309px;
  box-sizing: border-box;
  padding: 12px 8px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
}
.mileage__card {
  height: 329px;
}

.car__tags {
  margin-top: 9px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 4px 8px;
}
.car__tags span[tag] {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.car__tags span[tag] span {
  line-height: 0.7;
}
.car__tags span[tag][transmission] span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.car__tags span[tag] img {
  width: 12px;
  height: fit-content;

  @media (max-width: 1200px) {
    width: 8px;
  }
}

.car__card span[tag],
.car__card span[profit] {
  background: #efefef;
  border-radius: 999px;
  padding: 5px 8px;

  font-size: 10px;
  line-height: 12px;
  font-weight: 400;
}

.car__card span[profit] {
  padding: 2px 8px;
}

.car__card img {
  width: 100%;
  align-self: center;
}

.car__card p[title] {
  font-size: 16px;
  line-height: 20px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.car__card p[complect] {
  font-size: 12px;
  color: #00000080;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.car__card p[year] {
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
}

.price__wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.price__wrapper span {
  display: block;
  font-size: 12px;
  line-height: 105%;
  font-weight: 500;
}

.car__card p[price] {
  margin-top: 12px;
  font-size: 18px;
  line-height: 105%;
  font-weight: 500;
}

.car__buttons {
  width: 100%;
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mileage__buttons {
  margin-top: 20px;
}

.car__buttons button {
  font-size: 9px;
  font-weight: 500;
  background-color: #202020;
  border-radius: 999px;
  color: #ffffff;
  padding: 8px 4px;
}

.car__buttons button[offer] {
  background-color: #f90000;
}

.car__buttons button[credit] {
  display: none;
}

.car__data {
  width: 100%;
}

.main__show-all-wrapper {
  text-align: center;
  grid-column: 1 / -1;
}

.main__show-all-button {
  display: block;
  width: 100%;
  background: #202020;
  color: white;
  padding: 1rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

@media (min-width: 1200px) {
  .car__more-btn--wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .car__buttons button {
    font-size: 16px;
    padding: 12px 24px;
  }

  .car__buttons button[credit] {
    display: block;
  }

  .price__wrapper {
    display: contents;
  }

  .price__wrapper span {
    display: none;
  }

  .car__heading h3 {
    font-size: 35px;
  }

  .car__grid {
    margin-top: 36px;
    grid-template-columns: repeat(auto-fit, 273px);
  }

  .car__card {
    width: 273px;
    height: 480px;
    padding: 16px;
    border-radius: 25px;
  }

  .car__tags {
    margin-top: 12px;
    gap: 7px;
    width: 100%;
  }

  .car__card span[tag],
  .car__card span[profit] {
    padding: 4px 10px;
    font-size: 10px;
    line-height: 14px;
  }

  .car__card span[profit] {
    padding: 4px 12px;
  }

  .car__card img {
    width: 100%;
    align-self: center;
  }

  .car__card p[title] {
    font-size: 18px;
    line-height: 22px;
  }
  .car__card p[year] {
    font-size: 12px;
    line-height: 16px;
  }

  .car__card p[price] {
    margin-top: 20px;
    font-size: 18px;
    line-height: 105%;
    font-weight: 500;
  }

  .mileage__card p[price] {
    margin-top: 20px;
    font-size: 24px;
    line-height: 105%;
    font-weight: 500;
  }

  .car__more-btn {
    font-size: 16px;
    padding: 16px 24px;
  }
}

/* Mileage Car Slider */

.car-slider {
  position: relative;
  width: 100%;
  height: 160px;
  overflow: hidden;
  border-radius: 4px;
}
.car-slider[catalog] {
  height: fit-content !important;
}

@media (max-width: 768px) {
  .car-slider {
    height: 98px;
    margin-bottom: 4px;
  }
}

.car-slider .slider-track {
  display: flex;
  transition: transform 0.3s ease;
  pointer-events: none;
}

.car-slider .slider-track.flex {
  display: flex;
}

.car-slider .car-slide {
  flex-shrink: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.car-slider .slider__overflow-list {
  display: flex;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  pointer-events: all;
}

.car-slider .slider__overflow-list.flex {
  display: flex;
}

.car-slider .slider__overflow-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  height: 100%;
}

.car-slider .slider__overflow-item.relative {
  position: relative;
}

.car-slider .slider__overflow-item.overflow-hidden {
  overflow: hidden;
}

.car-slider .slider__overflow-item.cursor-pointer {
  cursor: pointer;
}

.car-slider .slider__overflow-item.transition-all {
  transition: all 0.3s;
}

.car-slider .slider__overflow-item.active-slide {
  border-bottom: 6px solid #f90000;
}

.car-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0 auto;
  pointer-events: none;
}

.car-slider img.w-full {
  width: 100%;
}

.car-slider img.h-full {
  height: 100%;
}

.car-slider img.object-cover {
  object-fit: cover;
}

.car-slider img.mx-auto {
  margin: 0 auto;
}

.car-slider .pointer-events-none {
  pointer-events: none;
}

.car-slider .pointer-events-all {
  pointer-events: all;
}

.car-slider .absolute {
  position: absolute;
}

.car-slider .z-10 {
  z-index: 10;
}

.car-slider .flex-shrink-0 {
  flex-shrink: 0;
}

.car-slider .w-full {
  width: 100%;
}

.car-slider .h-full {
  height: 100%;
}

.car-slider .inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.car-slider .transition-transform {
  transition: transform 0.3s;
}

.car-slider .duration-300 {
  transition-duration: 0.3s;
}

@media (max-width: 1279px) {
  .car-slider .slider-track {
    max-height: 214px;
  }
}

@media (min-width: 1280px) {
  .car-slider .slider-track {
    max-height: 270px;
  }
}
.no-image-fallback {
  width: 100%;
  height: 100%;
  background-color: #e5e7eb;
  border-radius: 12px 12px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
