.categories-section {
    padding: 16px;
}

.categories-section__title {
    font-size: 25px;
    font-weight: 700;
    line-height: 100%;
    margin-bottom: 16px;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

.categories-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 920px;
    margin: 0 auto;
}

.category-card {
    display: block;
    position: relative;
    text-decoration: none;
    border-radius: var(--radius, 20px);
    overflow: hidden;
    aspect-ratio: 292 / 243;
    background: #E8E3DC;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:active {
    transform: scale(0.97);
}

/* Image */
.category-card__img-wrap {
    position: absolute;
    inset: 0;
}

.category-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Bottom gradient overlay */
.category-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
    border-radius: 0 0 var(--radius, 20px) var(--radius, 20px);
}

/* Recommended card */
.category-card--recommended {
    background: var(--primary-color, #F5A623);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px;
}

@media screen and (min-width: 375px) {
    .category-card--recommended {
        padding: 24px;
    }
}

@media screen and (min-width: 560px) {
    .category-card--recommended {
        padding: 36px;
    }
}

.category-card--recommended::after {
    display: none;
}

.category-card--recommended__icon {
    color: var(--color-primary, #332F2A);
    width: 24px;
    height: 24px;
}

.category-card--recommended__title {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-primary, #332F2A);
    text-align: start;
    line-height: 1.3;
}

@media screen and (min-width: 375px) {
    .category-card--recommended__icon {
        width: 32px;
        height: 32px;
    }
    .category-card--recommended__title {
        font-size: 14px;
    }
}

@media screen and (min-width: 560px) {
    .category-card--recommended__icon {
        width: 36px;
        height: 36px;
    }
    .category-card--recommended__title {
        font-size: 18px;
    }
}

@media screen and (min-width: 768px) {
    .category-card--recommended__icon {
        width: 48px;
        height: 48px;
    }
    .category-card--recommended__title {
        font-size: 25px;
    }
}

/* Placeholder icon */
.category-card__placeholder-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.3;
}

/* Title */
.category-card__title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    line-height: 1.3;
    z-index: 1;
}

/* 375px+ */
@media screen and (min-width: 375px) {
    .category-card__title {
        font-size: 15px;
        padding: 14px;
    }
}

/* 3 columns */
@media screen and (min-width: 560px) {
    .categories-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
    .category-card {
        aspect-ratio: 292 / 243;
    }
}

@media screen and (min-width: 768px) {
    .category-card__title {
        font-size: 16px;
    }
}

@media screen and (min-width: 968px) {
    .categories-section {
        padding: 24px;
    }
    .categories-list {
        gap: 24px;
    }
}
