/* ==========================================================================
   Home page categories (Components/HomepageCategories/Default.cshtml)
   --------------------------------------------------------------------------
   noon's «Home & Kitchen essentials» grid: four to a row on a phone, as many as fit at 120px or
   more on a wide screen (eight on a full-width page). Each tile is a square in a soft tint of the
   store's colour, the picture filling it - multiply blends a picture's white background into the
   tint, so a product shot on white reads as cut out, while a picture with its own background
   simply fills the tile instead of sitting in a frame of tint - and the name under it, two lines
   at most. No borders, no cards, no shadows. The title is the home rows' (category-tiles.css).
   The space around the section is the page's own, so the section brings none.
   ========================================================================== */

.tc-hcats {
    margin: 0;
    font-family: IRANYekanX, tahoma, sans-serif;
    --tc-hcats-tint: color-mix(in srgb, var(--ryan-primary, #EF4056) 7%, #FFFFFF);
}

.tc-hcats__title {
    margin: 0 0 24px;
    font-size: 18px;
    font-weight: 700;
    line-height: 28px;
    color: #292D32;
}

.tc-hcats__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 24px 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tc-hcats__item {
    min-width: 0;
    margin: 0;
    padding: 0;
}

.tc-hcats__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #0C0C0C;
    text-align: center;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.tc-hcats__link:hover,
.tc-hcats__link:focus {
    color: #0C0C0C;
    text-decoration: none;
}

.tc-hcats__tile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    box-sizing: border-box;
    border-radius: 16px;
    background: var(--tc-hcats-tint);
    overflow: hidden;
}

.tc-hcats__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: multiply;
    transition: transform .2s ease;
}

.tc-hcats__link:hover .tc-hcats__img {
    transform: scale(1.04);
}

.tc-hcats__initials {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: var(--ryan-primary, #EF4056);
    white-space: nowrap;
    user-select: none;
}

.tc-hcats__name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    width: 100%;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    overflow-wrap: anywhere;
}

/* a phone: four to a row, the gaps of noon's grid */
@media (max-width: 959.98px) {
    .tc-hcats__title {
        margin-bottom: 16px;
        font-size: 16px;
        line-height: 26px;
    }

    .tc-hcats__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px 8px;
    }

    .tc-hcats__link {
        gap: 8px;
    }

    .tc-hcats__tile {
        border-radius: 14px;
    }

    .tc-hcats__initials {
        font-size: 22px;
    }

    .tc-hcats__name {
        font-size: 12px;
        line-height: 18px;
    }
}
