.catalog-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 36px 20px 56px;
}

.catalog-head {
    margin-bottom: 28px;
}

.catalog-head h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.1;
}

.catalog-head p {
    max-width: 760px;
    margin: 0;
    color: rgba(20, 34, 54, 0.72);
    font-size: 17px;
    line-height: 1.55;
}

.catalog-head__row {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
}

.catalog-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    color: rgba(20, 34, 54, 0.58);
    font-size: 14px;
}

.catalog-breadcrumbs a {
    color: inherit;
    text-decoration: none;
}

.catalog-breadcrumbs a:hover {
    color: #1f5d9c;
}

.catalog-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.catalog-category-card {
    display: flex;
    min-height: 170px;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    padding: 24px;
    border: 1px solid rgba(31, 93, 156, 0.16);
    border-radius: 22px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 12px 34px rgba(20, 34, 54, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.catalog-category-card:hover {
    transform: translateY(-3px);
    border-color: rgba(31, 93, 156, 0.38);
    box-shadow: 0 18px 44px rgba(20, 34, 54, 0.12);
}

.catalog-category-card__image {
    display: block;
    overflow: hidden;
    margin: -10px -10px 0;
    border-radius: 16px;
    background: rgba(31, 93, 156, 0.06);
}

.catalog-category-card__image img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.catalog-category-card__title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
}

.catalog-category-card__text {
    color: rgba(20, 34, 54, 0.68);
    line-height: 1.5;
}

.catalog-category-card__meta {
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(31, 93, 156, 0.08);
    color: #1f5d9c;
    font-size: 14px;
    font-weight: 600;
}

.catalog-view-switcher {
    display: inline-flex;
    overflow: hidden;
    flex: 0 0 auto;
    border: 1px solid rgba(31, 93, 156, 0.22);
    border-radius: 999px;
    background: #fff;
}

.catalog-view-switcher a {
    padding: 10px 16px;
    color: rgba(20, 34, 54, 0.78);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.catalog-view-switcher a.is-active {
    background: #1f5d9c;
    color: #fff;
}

.catalog-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.catalog-product-card {
    overflow: hidden;
    border: 1px solid rgba(31, 93, 156, 0.14);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(20, 34, 54, 0.06);
}

.catalog-product-card__image {
    display: flex;
    min-height: 190px;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(31, 93, 156, 0.05);
    color: rgba(20, 34, 54, 0.56);
    text-align: center;
    text-decoration: none;
    font-weight: 600;
}

.catalog-product-card__image img {
    display: block;
    max-width: 100%;
    max-height: 220px;
    object-fit: contain;
}

.catalog-product-card__image img.catalog-product-card__fallback-img {
    width: 100%;
    height: 220px;
    max-width: none;
    max-height: none;
    border-radius: 16px;
    object-fit: cover;
}

.catalog-product-card__body {
    padding: 20px;
}

.catalog-product-card h2 {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.25;
}

.catalog-product-card h2 a {
    color: inherit;
    text-decoration: none;
}

.catalog-product-card p {
    margin: 0 0 18px;
    color: rgba(20, 34, 54, 0.68);
    line-height: 1.5;
}

.catalog-product-card__bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    color: rgba(20, 34, 54, 0.68);
    font-size: 14px;
}

.catalog-product-card__bottom a,
.catalog-products-table a {
    color: #1f5d9c;
    font-weight: 700;
    text-decoration: none;
}

.catalog-products-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(31, 93, 156, 0.16);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(20, 34, 54, 0.06);
}

.catalog-products-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

.catalog-products-table th,
.catalog-products-table td {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(31, 93, 156, 0.12);
    text-align: left;
    vertical-align: middle;
}

.catalog-products-table th {
    background: rgba(31, 93, 156, 0.06);
    color: rgba(20, 34, 54, 0.72);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.catalog-products-table tr:last-child td {
    border-bottom: 0;
}

.catalog-products-table__action {
    width: 130px;
    text-align: right;
}

.catalog-empty {
    padding: 26px;
    border: 1px dashed rgba(31, 93, 156, 0.28);
    border-radius: 18px;
    background: rgba(31, 93, 156, 0.04);
    color: rgba(20, 34, 54, 0.7);
}

@media (max-width: 980px) {
    .catalog-category-grid,
    .catalog-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .catalog-head__row {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .catalog-page {
        padding: 26px 14px 42px;
    }

    .catalog-category-grid,
    .catalog-product-grid {
        grid-template-columns: 1fr;
    }

    .catalog-view-switcher {
        width: 100%;
    }

    .catalog-view-switcher a {
        flex: 1;
        text-align: center;
    }
}
