/* Общая обёртка страницы */
.catalog-page {
  background-color: #fff;
  font-family: 'Poppins', sans-serif;
}

/* Хедер: заголовок и фильтры */
/* ----------- ОБЩАЯ ОБЁРТКА ------------ */
.catalog-header {
  background-color: #161A1C !important;
  padding: 48px 20px 32px !important;
  color: #fff !important;
  font-family: inherit !important;
}

/* ----------- ЗАГОЛОВОК ------------ */
.catalog-title {
  font-size: 36px !important;
  font-weight: 600 !important;
  margin-bottom: 24px !important;
  text-align: center !important;
}

/* ----------- КНОПКА НАЗАД ------------ */
.back-button {
  display: none !important;
}

/* ----------- ФОРМА ------------ */
.catalog-filters {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 20px !important;
  justify-content: flex-start !important;
  max-width: 1000px !important;   /* <== ДОБАВИТЬ */
  margin: 0 auto !important;      /* <== ДОБАВИТЬ */
}

/* ----------- ГРУППА ПОЛЯ ------------ */
.catalog-filters .filter-group {
  flex: 1 1 240px !important;     /* <== должно быть с ограничением */
  min-width: 100px !important;
  max-width: 100% !important;     /* <== ДОБАВИТЬ */
}

/* ----------- ПОЛЯ (select и input) ------------ */
.catalog-filters select,
.catalog-filters input[type="text"],
.catalog-filters input[list] {
  width: 100% !important;
  padding: 12px 16px !important;
  border: none !important;
  border-radius: 12px !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #FFFFFF !important;
  font-size: 16px !important;
  font-family: inherit !important;
  outline: none !important;
  box-sizing: border-box !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}

/* ----------- ПЛЕЙСХОЛДЕРЫ ------------ */
.catalog-filters input::placeholder {
  color: #B0B0B0 !important;
  font-weight: 400 !important;
}

/* ----------- АДАПТИВ ------------ */
@media (max-width: 767px) {
  .catalog-title {
    display: none !important;
  }

  .catalog-filters {
    flex-direction: column !important;
  }

  .catalog-filters .filter-group {
    flex: 1 1 100% !important;
  }

  .back-button {
    font-size: 24px !important;
    margin-bottom: 24px !important;
  }
}




/* Секция со списком карточек */
.catalog-listing {
  background-color: #F8F8F8;
  padding: 64px 20px;
}


.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  justify-items: center;
  padding: 48px 0;
  max-width: 1280px;
  margin: 0 auto;
}


.catalog-page h1 {
  color: #ffffff;
  font-size: 36px;
  font-weight: 600;
  margin-bottom: 32px;
}

.catalog-card {
  width: 455px;
  height: auto;           /* вместо фиксированной */
  min-height: 433px;
  background: #FFFFFF;
  box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.catalog-card__img {
  width: 100%;
  height: 252.78px;
  object-fit: cover;
}

.catalog-card__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  gap: 16px;
  height: auto;
  flex-grow: 1;
  box-sizing: border-box;
}

.catalog-card__title {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 18px!important;
  line-height: 140%;
  color: #161A1C;
  margin: 0;
}

.catalog-card__title a {
  color: inherit !important;
  text-decoration: none !important;
  display: inline-block;
  width: 100%;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 18px!important;
  line-height: 140%;
  color: #161A1C;
  margin: 0;
}

.catalog-card__services {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  line-height: 150%;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* ограничение строк */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
  line-height: 1.5;
  color: #323435;
  opacity: 0.6;
}

.catalog-card__location {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 150%;
  color: #21322A;
}


.catalog-filters {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 20px !important;
  justify-content: flex-start !important;
  max-width: 1000px !important;
  margin: 0 auto !important;
}

.catalog-filters .filter-group {
  flex: 1 1 30% !important;
  min-width: 240px !important;
  max-width: 100% !important;
}


.catalog-card__location img {
  width: 12px;
  height: 16px;
  object-fit: contain;
}


@media (max-width: 767px) {
  .catalog-card {
    width: 100%      !important;
    max-width: 455px !important;
  }
}

@media (max-width: 767px) {
  .catalog-filters {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  .catalog-filters .filter-group {
    order: unset;               /* сбросим order, если надо */
    min-width: 0 !important;    /* вот это главное */
    width: 100% !important;
  }

  .catalog-filters .back-button { order: 0; }
  .catalog-filters .filter-group:nth-child(4) { order: 1; }
  .catalog-filters .filter-group:nth-child(2) { order: 2; }
  .catalog-filters .filter-group:nth-child(3) { order: 3; }
}

