.preview-category-cards-container {
    text-decoration: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
    margin: 0 auto;
    max-width: calc((20vw + 8px) * 3 + 32px * 2); /* 3 карточки + 2 gap */
}

.preview-category-card { /* 3 в ряд, сохраняем размеры */
    width: calc(20vw + 8px); /* увеличиваем на 8px */
    background: #F0F8FF;
    border-radius: 12px;
    border: 1px solid #0B123C;
    box-shadow: 0 6px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
    transition: transform 0.2s ease-in-out;
    text-align: stratch;
    flex: 0 0 calc(20vw + 8px); /* фиксированная ширина, не растягивается */
    max-width: calc(20vw + 8px); /* максимальная ширина */
}

.preview-category-card:hover {
    transform: scale(1.05);
}

.preview-category-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
}

@media (max-width: 1300px) {
    .preview-category-card {
        width: 40vw; /* 2 в ряд на средних экранах */
        flex: 0 0 40vw;
        max-width: 40vw;
    }
    .preview-category-cards-container {
        gap: 20px;
        margin: 0 auto;
        max-width: calc(40vw * 2 + 20px * 1); /* 2 карточки + 1 gap */
    }
}

@media (max-width: 900px) {
    .preview-category-card {
        width: 70vw; /* 1 в ряд на мобильных */
        flex: 0 0 70vw;
        max-width: 70vw;
    }
    .preview-category-cards-container {
        gap: 20px;
        margin: 0 auto;
        max-width: 70vw; /* 1 карточка */
    }
}

.preview-category-image {
    width: 100%;
    aspect-ratio: 3 / 2;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.preview-category-image img {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.preview-category-title {
    padding: 12px 8px 12px 8px;
    font-size: 1.5rem;
    font-weight: 300;
    color: #222;
    background: #F0F8FF;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    border-top: 1px solid #0B123C;
    display: flex;
    flex: 0 0 auto;
    text-align: center;
    justify-content: center;
    width: 100%;
}

