/* ===== Пагинацияss ===== */
.page-pagination {
    padding: 30px 0;
    text-align: center;
}
.page-pagination .wrapper {
    display: flex;
    justify-content: center;
}
.page-pagination ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}
.page-pagination li {
    margin: 0 5px;
}
.page-pagination a,
.page-pagination span {
    display: block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    border-radius: 3px;
}
.page-pagination a:hover {
    background: #f5f5f5;
}
.page-pagination .current {
    background: #31B939;
    color: white;
    border-color: #31B939;
}
.page-pagination .prev,
.page-pagination .next {
    font-weight: bold;
}

/* ===== Общий блок ===== */
.portfolio {
    padding-bottom: inherit;
}

/* ===== Контейнер фильтров и карточек ===== */
.filters__content {
    display: flex;
    gap: 30px;
    flex-wrap: nowrap;
    align-items: flex-start;
}
..swiper-wrapper img {
    object-fit: inherit;
    transition: transform 0.4s ease;
}
/* ===== Фильтры ===== */
.filters__sidebar {
    width: 250px;
    margin-top: 1.3020833333vw;
    flex-shrink: 0;
    background: #ffffff;
    padding: 20px;
    border: 1px solid #eee;
}
form#catalog-filters {
    padding: 0;
}
form#catalog-filters label {
    display: block;
    color: black;
    margin-bottom: 10px;
    font-size: 0.9em;
}
form#catalog-filters h4 {
    color: black;
    padding: 10px 0 5px;
    font-weight: 600;
    margin-bottom: 5px;
}

/* ===== Контейнер карточек ===== */
.portfolio__container {
    flex-grow: 1;
    width: 100%;
}
/* ===== Грид карточек ===== */
#catalog-container {
    display: grid;
    gap: 0 20px;
    grid-template-columns: repeat(3, 1fr);
}

/* ≤1199px: 2 карточки */
@media (max-width: 1199px) {
    #catalog-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ≤767px: 1 карточка */
@media (max-width: 767px) {
    #catalog-container {
        grid-template-columns: 1fr;
    }
}

/* ===== Кнопка "Показать еще" ===== */
.load-more .btn {
    display: block;
    margin: 30px auto 0;
}

/* ===== Кнопка скрытия фильтров (скрыта на ПК) ===== */
.toggle-filters-btn {
    display: none;
    padding: 10px 20px;
    background: var(--main-color);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.95em;
    width: 100%;
}

/* ===== Скрытие фильтра ===== */
.filters__sidebar.hidden {
    display: none !important;
}

/* ===== Адаптация для планшетов ===== */
@media (max-width: 992px) {
    .filters__content {
        flex-direction: column;
    }

    .filters__sidebar {
        width: 100%;
        padding: 15px;
        border: none;
        background: #f5f5f5;
    }

    .portfolio__container {
        width: 100%;
    }

    .toggle-filters-btn {
        display: inline-block;
    }
}

/* ===== Адаптация для телефонов ===== */
@media (max-width: 768px) {

    .load-more .btn {
        width: 100% !important;
    }
    .load-more-btn {
        margin-top: 10px;
        width:100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .catalog__item .item-price {
        padding-top: 58.625vw!important;
    }
    .item-slider {
        position: absolute !important;
        top: 0;
        left: 0;
        height: 58.625vw!important;
    }
}
.catalog__item {
    /* width: inherit; */
    position: relative;
}
.catalog__item .item-price{
        padding-top: 12.041667vw;
}
.price-catalog {
    padding-top: 15.041667vw !important;
}
.item-portfolio {
        padding-top: 14.041667vw !important;
    }
.catalog__item .item-slider {
    height: 15.041667vw;
}
.img-portfolio{
        height: 15.041667vw;
}

@media only screen and (max-width: 768px) {
    .item-portfolio {
        padding-top: 58.625vw !important;
    }
    .swiper-wrapper img {
    min-height: inherit! important;
}
}
.item-slider {
    position: absolute !important;
    top: 0;
    left: 0;
    height: 12.041667vw;
}
.catalog__item .item-price {
    padding-top: 12.041667vw;
}
.catalog__item .item-order {
    margin-top: auto;}
.buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}
