/* ФИЛЬТРЫ ФИЛЬТРЫ ФИЛЬТРЫ ФИЛЬТРЫ ФИЛЬТРЫ ФИЛЬТРЫ  */

.filters__container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 30px 0;
}

.filters__btn {
  display: flex;
  padding: 10px 30px;
  align-items: center;
  gap: 10px;
  border-radius: 97px;
  border: 1px solid #171717;
  color: #171717;
  font-family: "SegoeUIWeb";
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.filters__btn:hover {
  background-color: rgba(23, 23, 23, 0.05);
}

/* Адаптив панели фильтров для мобильных */
@media (max-width: 768px) {
  /* На мобильных панель фильтра на всю ширину */
  #filter-panel {
    width: 100vw !important;
    max-width: 100vw !important;
    border-radius: 0 !important;
  }

  .card__name,
  .card__price {
    padding-inline: 0;
  }

  .card__price {
    display: block;
  }

  section.catalog {
    margin: 0;
  }
}

@media (max-width: 480px) {
  .filters__btn {
    display: flex;
    padding: 10px 30px;
    align-items: center;
    gap: 10px;
    border-radius: 97px;
    border: 1px solid #171717;
    color: #171717;
    font-family: "SegoeUIWeb";
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
  }

  .filters__container {
    margin: 60px 0;
  }
}

/* Каталог Каталог Каталог Каталог Каталог  */

.catalog-empty {
  grid-column: 1 / -1;
  max-width: 720px;
  width: 100%;
  margin: 40px auto 0;
  padding: 48px 24px;
  border: 1px solid rgba(23, 23, 23, 0.12);
  border-radius: 32px;
  text-align: center;
  background: rgba(23, 23, 23, 0.03);
}

.catalog-empty__title {
  color: var(--TextColor, #171717);
  font-family: "SegoeUIWeb";
  font-size: clamp(28px, 4vw, 44px);
  font-style: normal;
  font-weight: 350;
  line-height: 1.05;
}

.catalog-empty__text {
  max-width: 520px;
  margin: 16px auto 0;
  color: rgba(23, 23, 23, 0.7);
  font-family: "SegoeUIWeb";
  font-size: 18px;
  font-style: normal;
  font-weight: 350;
  line-height: 1.45;
}

.catalog-empty--landing .catalog-empty__title {
  text-transform: uppercase;
}

.catalog__container {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-content: stretch;
  column-gap: 25px;
  row-gap: 62px;
}

.catalog__item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 290px;
  justify-self: center;
  box-sizing: border-box;
}

.card__img {
  width: 100%;
  height: 400px;
  border-radius: 25px;
  object-fit: cover;
  object-position: top;
}

.card__name {
  color: var(--TextColor, #171717);
  font-family: "SegoeUIWeb";
  font-size: 20px;
  font-style: normal;
  font-weight: 350;
  line-height: normal;
}

.card__price {
  color: rgba(23, 23, 23, 0.7);
  font-family: "SegoeUIWeb";
  font-size: 18px;
  font-style: normal;
  font-weight: 350;
  line-height: normal;
}

@media (max-width: 1280px) {
  .catalog__container {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
  }
}

@media (max-width: 980px) {
  .catalog__container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px 15px;
    justify-content: stretch;
  }
}

/* === Каталог: карточки фиксированной ширины 290px (как в рекомендациях)
   и выравнивание по краям с хлебными крошками. На мобилке оставляем как было (блоки ниже 480px) */
@media (min-width: 981px) {
  body.post-type-archive-product section.catalog,
  body.tax-product_cat section.catalog {
    padding: 30px 0 50px;
  }

  /* Ширина сетки: 4 колонки по 290px + 3 гэпа по 25px = 1235px.
     Крошки ниже привязаны к той же величине -> ровные края. */
  body.post-type-archive-product .catalog__container,
  body.tax-product_cat .catalog__container {
    grid-template-columns: repeat(auto-fill, 290px);
    column-gap: 25px;
    row-gap: 62px;
    justify-content: start;
    max-width: 1235px;
    margin: 0 auto;
  }

  body.post-type-archive-product .catalog__item,
  body.tax-product_cat .catalog__item {
    width: 290px;
    max-width: 290px;
    justify-self: stretch;
  }

  /* Серая плашка крошек — ровно по сетке карточек */
  body.post-type-archive-product .breadcrumbs__container,
  body.tax-product_cat .breadcrumbs__container {
    max-width: 1235px;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .catalog-empty {
    margin-top: 24px;
    padding: 32px 18px;
    border-radius: 20px;
  }

  .catalog-empty__text {
    font-size: 16px;
  }

  body.post-type-archive-product .catalog,
  body.tax-product_cat .catalog {
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow-x: hidden !important;
  }

  body.post-type-archive-product .catalog__container,
  body.tax-product_cat .catalog__container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
    gap: 24px 12px !important;
    box-sizing: border-box !important;
  }

  body.post-type-archive-product .catalog__item,
  body.tax-product_cat .catalog__item,
  body.post-type-archive-product .card__link,
  body.post-type-archive-product .card__media,
  body.tax-product_cat .card__link,
  body.tax-product_cat .card__media {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    justify-self: stretch !important;
  }

  body.post-type-archive-product .card__img,
  body.tax-product_cat .card__img {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 2 / 3 !important;
    object-fit: cover !important;
    margin: 0 auto !important;
    border-radius: 16px !important;
  }

  body.post-type-archive-product .card__caption,
  body.tax-product_cat .card__caption {
    align-items: center !important;
    text-align: center !important;
    gap: 4px !important;
    padding: 0 !important;
  }
}
