/* === Страница категории === */
.category-page {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 var(--content-padding) 60px;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-sizing: border-box;
}

.category-page__block {
    width: 100%;
    background-color: #1A2F3D;
    border-radius: 10px;
    padding: 32px;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    margin-bottom: 40px;
}

.category-page__block:last-child {
    margin-bottom: 0;
}

/* === Блок 1: Фильтры === */
.category-filters {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    align-items: flex-end;
    width: 100%;
}

.category-filters__group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 140px;
}

.category-filters__label {
    font-family: var(--font-body);
    font-weight: var(--font-weight-thin);
    font-size: var(--fs-s);
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.category-filters__select,
.category-filters__input {
    background-color: #11212D;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 10px 14px;
    font-family: var(--font-body);
    font-weight: var(--font-weight-thin);
    font-size: var(--fs-m);
    color: #ffffff;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    width: 100%;
}

.category-filters__select:focus,
.category-filters__input:focus {
    border-color: rgba(255, 255, 255, 0.4);
}

.category-filters__select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='rgba(255, 255, 255, 0.5)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

.category-filters__select option {
    background-color: #11212D;
    color: #ffffff;
}

/* === Блок 2: Карточки === */
.category-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* === Блок 3: Пагинация === */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pagination__link {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-body);
    font-weight: var(--font-weight-thin);
    font-size: var(--fs-m);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    transition: color 0.2s, background-color 0.2s;
    line-height: 1;
    min-width: 36px;
    text-align: center;
    box-sizing: border-box;
}

.pagination__link:hover {
    color: #E85002;
    background-color: rgba(255, 255, 255, 0.04);
}

.pagination__link--prev,
.pagination__link--next {
    color: rgba(255, 255, 255, 0.5);
}

.pagination__link--prev:hover,
.pagination__link--next:hover {
    color: #E85002;
    background-color: rgba(255, 255, 255, 0.04);
}

.pagination__link--active {
    color: #E85002;
    background-color: rgba(232, 80, 2, 0.1);
}

.pagination__link--disabled {
    opacity: 0.3;
    pointer-events: none;
}

.pagination__link--disabled:hover {
    color: rgba(255, 255, 255, 0.5);
    background-color: transparent;
}

.pagination__pages {
    display: flex;
    gap: 4px;
}

/* Планшет */
@media (max-width: 768px) {
    .category-page {
        padding: 0 20px 40px;
    }

    .category-page__block {
        padding: 24px;
        border-radius: 8px;
        margin-bottom: 32px;
    }

    .category-filters {
        gap: 16px;
    }

    .category-filters__select,
    .category-filters__input {
        min-width: 120px;
    }

    .category-cards {
        gap: 16px;
    }
}

/* Телефон */
@media (max-width: 640px) {
    .category-page {
        padding: 0 12px 24px;
    }

    .category-page__block {
        padding: 16px;
        border-radius: 8px;
        margin-bottom: 24px;
    }

    .category-filters {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    }

    .category-filters__select,
    .category-filters__input {
        width: 100%;
        min-width: 0;
    }

    .category-cards {
        gap: 8px;
        flex-direction: column;
    }

    .pagination__link {
        font-size: var(--fs-s);
        padding: 6px 10px;
    }
}

/* === Адаптив === */
@media (max-width: 1024px) {
    .card {
        width: calc(33.333% - 14px);
    }
}

@media (max-width: 640px) {
    .card {
        width: 100%;
        padding: 16px;
        border-radius: 8px;
        display: flex;
        flex-direction: row;
        gap: 16px;
        align-items: stretch;
    }

    .card:hover {
        transform: none;
    }

    /* === Левый блок === */
    .card__header {
        flex: 1;
        min-width: 0;
        margin-bottom: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .card__header-left {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .card__title {
        font-size: var(--fs-m);
        margin: 0 0 8px 0;
        text-align: center;
    }

    .card__tags {
        height: auto;
        gap: 2px 6px;
        justify-content: flex-start;
        width: 100%;
    }

    .card__tag {
        font-size: var(--fs-xs);
    }

    /* === Правый блок === */
    .card__body {
        flex: 1;
        min-width: 0;
        gap: 8px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .card__info {
        min-height: auto;
        gap: 2px;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }

    .card__info-item {
        font-size: var(--fs-s);
        text-align: right;
    }

    .card__divider {
        display: none;
    }

    .card__section {
        display: none;
    }

    .card__links {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        width: 100%;
    }

    .card__link {
        font-size: var(--fs-s);
        padding: 2px 0;
        gap: 6px;
        justify-content: center;
    }
}

/* === Подкатегории === */
.category-page__block--subcategories {
    margin-bottom: 24px;
}

.subcategory-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.subcategory-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 10px;
    font-family: var(--font-body);
    font-weight: var(--font-weight-thin);
    font-size: var(--fs-s);
    color: #ffffff;
    text-decoration: none;
    background-color: #1A2F3D;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.2s;
    white-space: nowrap;
    min-height: 44px;
    cursor: pointer;
}

.subcategory-btn:hover {
    background-color: #253745;
    border-color: rgba(232, 80, 2, 0.5);
    color: #E85002;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.subcategory-btn--active {
    background-color: #E85002;
    border-color: #E85002;
    color: #ffffff;
    font-weight: var(--font-weight-regular);
}

.subcategory-btn--active:hover {
    background-color: #FF6A1A;
    border-color: #FF6A1A;
    color: #ffffff;
}

@media (max-width: 480px) {
    .subcategory-buttons {
        gap: 8px;
    }

    .subcategory-btn {
        padding: 8px 16px;
        font-size: 12px;
        min-height: 40px;
        border-radius: 8px;
    }
}

.category-description {
    font-family: var(--font-body);
    font-weight: var(--font-weight-thin);
    font-size: var(--fs-m);
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin: 0;
    text-align: center;
}

.category-page__block--description {
    margin-bottom: 24px;
}