.home-categories-grid-section {
    width: 100%;
    padding: 0 0 28px;
}

.home-categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    width: 100%;
}

.home-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 12px 20px;
    background: #f5f7fa;
    border-radius: 14px;
    text-decoration: none;
    color: #111;
    gap: 0px;
    transition: background 0.14s ease, transform 0.14s ease, box-shadow 0.14s ease;
}

.home-category-card:not(.home-category-card--photo):hover {
    background: #eef0f5;
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
}

.home-category-card__icon {
    width: 68px;
    height: 68px;
    color: #333;
    flex-shrink: 0;
}

.home-category-card__icon svg {
    width: 100%;
    height: 100%;
}

.home-category-card__name {
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    color: #111;
}

.home-category-card__count {
    font-size: 12px;
    font-weight: 400;
    color: #777;
    text-align: center;
}

@media (max-width: 1100px) {
    .home-categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}





/* ── Photo card variant ──────────────────────────────────────────────────── */
.home-category-card--photo {
    position: relative;
    background: #f3f1f4;
    padding: 0;
    overflow: hidden;
    justify-content: flex-end;
    align-items: flex-start;
    aspect-ratio: 3/4;
    isolation: isolate;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.home-category-card__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    z-index: 0;
}

.home-category-card--photo::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
}

.home-category-card--photo:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.home-category-card--photo .home-category-card__name,
.home-category-card--photo .home-category-card__count {
    position: relative;
    z-index: 1;
    color: black;
    text-align: left;
    padding: 0 12px;
    width: 100%;
    text-align-last: center;
}

.home-category-card--photo .home-category-card__name {
    padding-top: 0;
}

.home-category-card--photo .home-category-card__count {
    padding-bottom: 12px;
    opacity: 0.85;
}

.home-category-card--photo .home-category-card__icon {
    display: none;
}






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

    .home-category-card {
        padding: 18px 8px 4px;
    }

    .home-category-card__icon {
        width: 52px;
        height: 52px;
    }

    .home-category-card--photo .home-category-card__name,
    .home-category-card--photo .home-category-card__count {
    position: relative;
    z-index: 1;
    color: black;
    text-align: left;
    padding: 0 8px;
    width: 100%;
    text-align-last: center;
    font-size: 10px;
    margin-top: -3px;
    }

    
}




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