*,
*::before,
*::after {
    box-sizing: border-box;
}

.categories-preview {
    width: 100%;
    overflow: hidden;
    color: #202429;
    background: #ffffff;
}

.categories-container {
    width: min(100% - 56px, 1768px);
    margin-right: auto;
    margin-left: auto;
}

.categories-hero {
    padding: 48px 0 110px;
}

.categories-hero__header {
    margin-bottom: 48px;
    text-align: center;
}

.categories-hero__title {
    margin: 0 0 12px;
    color: #172026;
    font-size: 72px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.categories-hero__description {
    margin: 0;
    color: #5e646b;
    font-size: 24px;
    line-height: 1.45;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px 24px;
}

.category-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e8e5e2;
    border-radius: 10px;
}

.category-card__image {
    display: block;
    aspect-ratio: 1.3 / 1;
    overflow: hidden;
}

.category-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.category-card:hover .category-card__image img {
    transform: scale(1.03);
}

.category-card__content {
    display: flex;
    min-height: 168px;
    flex: 1;
    flex-direction: column;
    padding: 16px 18px 16px;
}

.category-card__title {
    min-height: 70px;
    margin: 0;
    color: #1e2328;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.35;
}

.category-card__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
    padding-top: 18px;
    color: #c50913;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    border-top: 1px solid #ece9e6;
    transition: color 0.2s ease;
}

.category-card__link:hover {
    color: #a10810;
}

.category-card__link svg {
    width: 28px;
    height: 22px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
}

.category-card__link:hover svg {
    transform: translateX(4px);
}

@media (max-width: 1600px) {
    .categories-container {
        width: min(100% - 40px, 1500px);
    }

    .categories-hero__title {
        font-size: 60px;
    }

    .categories-hero__description {
        font-size: 20px;
    }
}

@media (max-width: 1200px) {
    .categories-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .categories-hero__title {
        font-size: 52px;
    }
}

@media (max-width: 900px) {
    .categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .categories-hero {
        padding-top: 38px;
        padding-bottom: 80px;
    }

    .categories-hero__title {
        font-size: 42px;
    }

    .categories-hero__description {
        font-size: 18px;
    }
}

@media (max-width: 767px) {
    .categories-container {
        width: min(100% - 30px, 700px);
    }

    .categories-hero {
        padding: 32px 0 60px;
    }

    .categories-hero__header {
        margin-bottom: 28px;
    }

    .categories-hero__title {
        font-size: 34px;
    }

    .categories-hero__description {
        font-size: 16px;
        line-height: 1.5;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .category-card__content {
        min-height: 145px;
    }

    .category-card__title {
        min-height: 0;
        font-size: 18px;
    }
}

.linoplast-shop-categories .category-card__title {
    display: flex;
    align-items: flex-start;
}

.linoplast-shop-categories__empty {
    margin: 0;
    padding: 40px;
    color: #5e646b;
    font-size: 18px;
    text-align: center;
    background: #f7f8f8;
    border-radius: 8px;
}
