.catalogue_title {
  font-weight: 700;
  font-size: 5.5vh;
  line-height: 5.9vh;
}

.black_link {
  font-weight: 500;
  font-size: 1.8vh;
  line-height: 2.2vh;
  color: #fff;

  background-color: #000;
  border-radius: 1.3vh;
  padding: 1vh 0.5vw;
  margin: 4vh 0 0;
  cursor: pointer;

  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 4.2vw;

  svg {
    margin-left: 6px;
  }
}

.catalogue_data {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;

  p {
    font-weight: 500;
    font-size: 2.5vh;
    line-height: 2.7vh;
    color: #797979;
  }
}

.price_menu {
  display: none;
  position: absolute;
  background-color: #f8f8f8;
  border-radius: 1vh;
  margin-top: 1vh;
  padding: 1vh 0.5vw;
  width: 15vw;
  z-index: 1;

  > a {
    display: block;
    padding: 1vh 0.5vw;
    font-weight: 400;
    font-size: 1.8vh;
    line-height: 2vh;
    border-radius: 1vh;

    &:hover {
      background-color: #eaeaea;
    }
  }
}

.menu_active {
  background-color: #eaeaea;
}

.content {
  display: flex;
  justify-content: space-between;
}

.filter,
.filter_mobile {
  margin-top: 3vh;
  margin-left: 1vw;
  padding: 3vh 1vw;
  background-color: #f8f8f8;
  border-radius: 3vh;
  display: flex;
  flex-direction: column;
  height: fit-content;

  p {
    font-weight: 600;
    font-size: 3vh;
    line-height: 3.2vh;
    text-align: center;
  }

  label {
    font-weight: 500;
    font-size: 1.6vh;
    line-height: 1.8vh;
    margin-top: 2vh;
  }

  .select {
    font-weight: 400;
    font-size: 1.6vh;
    line-height: 1.8vh;
    color: #797979;
    border: 1px solid #dce0e7;
    border-radius: 1.2vh;

    margin: 0;
    margin-top: 1vh;
    padding: 0 0.5vw;
    height: 4.5vh;
    background-color: #f8f8f8;
    width: 10vw;

    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;

    > p {
      font-weight: 400;
      font-size: 1.6vh;
      line-height: 1.8vh;
      text-align: left;

      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 1;
      -webkit-box-orient: vertical;
    }

    &::placeholder {
      color: #797979;
    }
    &:last-child {
      margin-bottom: 0px;
    }
  }

  .active {
    border-bottom: none;
    border-radius: 1.2vh 1.2vh 0 0;
  }

  .filter_menu {
    margin: 0;
    padding: 1vh 0.5vw;
    width: 8.9vw;
    border: 1px solid #dce0e7;
    border-top: none;

    display: none;
    position: absolute;
    background-color: #f8f8f8;
    border-radius: 0 0 1.2vh 1.2vh;
    z-index: 1;

    .filter_item {
      display: block;
      padding: 1vh 0.5vw;
      font-weight: 400;
      font-size: 1.8vh;
      line-height: 2vh;
      border-radius: 1vh;
      color: #797979;

      &:hover {
        /* font-weight: 500; */
      }
    }

    .filter_active {
      font-weight: 500;
    }
  }

  .input {
    font-weight: 400;
    font-size: 1.6vh;
    line-height: 1.8vh;
    border: 1px solid #dce0e7;
    border-radius: 1.2vh;

    margin: 0;
    margin-top: 1vh;
    padding: 0 0.5vw;
    max-width: 9vw;
    height: 4.5vh;
    background-color: #f8f8f8;

    &::placeholder {
      color: #797979;
    }
    &:last-child {
      margin-bottom: 0px;
    }
  }

  .range {
    display: flex;

    input {
      max-width: 3.75vw;

      &:last-child {
        margin-left: 0.5vw;
      }
    }
  }
}

.filter_close {
  display: none;
}

.filter_mobile,
.filter_link {
  display: none;
}

.items_catalogue {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-gap: 3vh;
}

.item_catalogue {
  background-image: url("/autoimport/static/auto/img/car_item.png");
  background-repeat: no-repeat;
  background-size: contain;
  height: 371px;
  width: 295px;
  box-sizing: border-box;
  position: relative;

  margin-top: 3vh;
  padding: 3.2vh 1.3vw;

  > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #000;

    > img {
      object-fit: contain;
      max-width: 300px;
      height: 150px;
      border-radius: 2vh;
      margin: 0;
      margin-bottom: 11px;
    }

    .name {
      font-weight: 600;
      font-size: 2.8vh;
      line-height: 3vh;
      margin-bottom: 10px;
      height: 40px;
    }

    > div {
      display: flex;
      justify-content: center;
      width: 100%;

      > div {
        display: flex;
        flex-direction: column;
        align-items: center;
        height: fit-content;

        background-color: #fff;
        border-radius: 1.3vh;
        margin-right: 2%;
        padding: 10px;

        &:last-child {
          margin-right: 0px;
        }

        > p {
          text-wrap: nowrap;
          font-size: 80%;
          line-height: 16px;

          &:nth-child(1) {
            font-weight: 400;
            margin-bottom: 5px;
          }
          &:nth-child(2) {
            font-weight: 600;
            text-wrap: wrap;
            text-align: center;
          }
        }
      }
    }
  }

  .price {
    position: absolute;
    bottom: 25px;

    flex-direction: row;
    align-items: flex-start;
    font-weight: 300;
    font-size: 2.5vh;
    line-height: 2.8vh;

    p {
      font-weight: 600;
    }
  }

  .link_to_car {
    position: absolute;
    left: 235px;
    bottom: -5px;
    aspect-ratio: 1;

    > img {
      height: 42px;
    }
  }
}

@media only screen and (min-width: 2100px) {
  .item_catalogue {
    padding: 2vh 1.3vw;
    height: 450px;
    width: 350px;

    > div {
      > img {
        max-width: 290px;
        height: 190px;
      }

      .name {
        font-size: 2vh;
        line-height: 2.2vh;
        height: 60px;
      }
    }

    .link_to_car {
      left: 285px;
      bottom: 0px;

      > img {
        height: 50px;
      }
    }
  }
}

@media only screen and (min-width: 900px) and (max-width: 1300px) {
  .items_catalogue {
    grid-template-columns: 1fr 1fr;
    grid-gap: 3vh;
  }

  .item_catalogue {
    height: 300px;
    width: 200px;

    > div {
      > img {
        max-width: 190px;
        height: 100px;
        border-radius: 1vh;
      }

      .name {
        font-size: 2.2vh;
        line-height: 2.4vh;
        height: 30px;
      }

      > div {
        > div {
          border-radius: 1vh;
          margin-right: 2%;
          padding: 0.4vh 0.4vw;

          > p {
            font-size: 60%;
            line-height: 70%;
          }
        }
      }
    }

    .price {
      bottom: 55px;
    }

    .link_to_car {
      left: 165px;
      bottom: 40px;

      > img {
        height: 30px;
      }
    }
  }

  .filter {
    padding: 3vh 1.5vw;

    .select {
      width: 15vw;
    }

    .range input {
      max-width: 6.1vw;
    }

    .filter_menu {
      width: 13.85vw;
    }
  }
}

@media only screen and (max-width: 899px) {
  .catalogue_title {
    font-weight: 600;
    font-size: 3vh;
    line-height: 3.2vh;
    text-align: center;
    margin-top: 5vh;
  }

  .content {
    justify-content: center;
  }

  .catalogue_data {
    flex-direction: column;
    justify-content: center;

    > div {
      width: 100%;
    }

    p {
      display: none;
    }
  }

  .black_link {
    width: 100%;
    margin: 2vh 0 0;
    padding: 1.5vh 0.5vw;
  }

  .filter_link {
    display: block;
    width: 100%;
    font-weight: 500;
    font-size: 1.8vh;
    line-height: 2.2vh;

    background-color: #f8f8f8;
    border: none;
    border-radius: 1.3vh;
    padding: 1.5vh 0.5vw;
    margin: 2vh 0 0;
    text-align: center;
  }

  .price_menu {
    width: 73vw;
  }

  .items_catalogue {
    grid-template-columns: 1fr;
    grid-gap: 1vh;
  }

  .item_catalogue {
    height: 470px;
    width: 350px;
    padding: 3vh 5vw;

    > div {
      > img {
        max-width: 300px;
        height: 200px;
        border-radius: 2vh;
        margin-bottom: 2vh;
      }

      .name {
        font-size: 2.6vh;
        line-height: 2.8vh;
        height: 60px;
      }

      > div {
        justify-content: space-between;
        width: 100%;

        > div {
          margin-right: 6px;
        }
      }
    }

    .price {
      bottom: 45px;
    }

    .link_to_car {
      left: 285px;
      bottom: 15px;

      > img {
        height: 52px;
      }
    }
  }

  .filter {
    display: none;
  }

  .filter_mobile {
    display: block;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 99998;

    margin: 0;
    padding: 5vh 5vw;
    background-color: #fff;
    border-radius: 0;

    h1 {
      margin-top: 2vh;
      text-align: center;
    }

    .form-label {
      display: block;
      font-weight: 500;
      font-size: 1.6vh;
      line-height: 1.8vh;
      margin-top: 2vh;
      width: fit-content;
    }

    input {
      display: block;
      padding: 1.5vh 28px;
      width: 75vw;
      height: auto;
      background-color: #f8f8f8;
      margin: 0;
      margin-top: 1vh;
      border-radius: 1vh;
    }

    .couple {
      display: flex;
    }

    #id_year_from,
    #id_odometer_from {
      margin-right: 3vw;
    }

    #id_year_from,
    #id_year_to,
    #id_odometer_from,
    #id_odometer_to {
      text-align: center;
      width: 28.75vw;
    }
  }

  .filter_close {
    display: block;
    margin-left: auto;
    padding-right: 10vw;
  }

  .filter_mobile {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 99998;

    margin: 0;
    padding: 3vh 5vw;
    background-color: #fff;
    border-radius: 0;

    > div {
      margin-bottom: 2vh;
    }

    .select {
      padding: 3vh 3vw;
      background-color: #f8f8f8;
      width: 90vw;
    }

    .input {
      border-radius: 1.2vh;
      text-align: center;
      padding: 0;
      background-color: #f8f8f8;
    }

    .filter_save {
      width: 90vw;
    }

    .filter_menu {
      width: 90vw;
    }
  }
}
