.categorylisthome {
    margin: 2rem 0;
}

.categorylisthome .section-title--stacked {
    margin-block-end: 96px;
}

.categorylisthome__list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid #e8e8e8;
}

.categorylisthome__item {
    border-bottom: 1px solid #e8e8e8;
}

.categorylisthome__link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    min-height: 5.5rem;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s ease;
}

.categorylisthome__title {
    flex: 0 1 auto;
    margin: 0;
    font-size: clamp(3.2rem, 4vw, 4rem);
    font-weight: 300;
    line-height: 1.15;
    text-align: center;
    color: var(--title-dark-color, #1d1d1b);
    transition: color 0.2s ease, font-weight 0.2s ease;
}

.categorylisthome__side {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.5rem;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-width 0.25s ease, opacity 0.2s ease;
}

.categorylisthome__thumb {
    display: block;
    width: 4rem;
    height: 4rem;
    object-fit: cover;
    border-radius: 2px;
    background: #dedede;
}

/* Active row: hover, focus, current category, or tap (JS) */
.categorylisthome__item:hover .categorylisthome__link,
.categorylisthome__item:focus-within .categorylisthome__link,
.categorylisthome__item.is-current .categorylisthome__link,
.categorylisthome__item.is-active .categorylisthome__link {
    background-color: #F8F8F8;
}

.categorylisthome__item:hover .categorylisthome__title,
.categorylisthome__item:focus-within .categorylisthome__title,
.categorylisthome__item.is-current .categorylisthome__title,
.categorylisthome__item.is-active .categorylisthome__title {
    color: var(--main-color, #ec6707);
}

.categorylisthome__item:hover .categorylisthome__side,
.categorylisthome__item:focus-within .categorylisthome__side,
.categorylisthome__item.is-current .categorylisthome__side,
.categorylisthome__item.is-active .categorylisthome__side {
    max-width: 15rem;
    opacity: 1;
}

@media (max-width: 767px) {
    .categorylisthome__link {
        gap: 0.75rem;
        padding: 0.875rem 0.75rem;
        min-height: 4.5rem;
        overflow: hidden;
    }

    .categorylisthome__thumb {
        width: 2.5rem;
        height: 2.5rem;
    }

    .categorylisthome__title {
        font-size: 30px;
    }

    .categorylisthome__item:hover .categorylisthome__side,
    .categorylisthome__item:focus-within .categorylisthome__side,
    .categorylisthome__item.is-current .categorylisthome__side,
    .categorylisthome__item.is-active .categorylisthome__side {
        max-width: 11rem;
        flex-wrap: wrap;
        flex-direction: column;
        flex: auto;
        justify-content: center;
    }
}

@media (max-width: 500px) {
    .categorylisthome__item:hover .categorylisthome__title,
    .categorylisthome__item:focus-within .categorylisthome__title,
    .categorylisthome__item.is-current .categorylisthome__title,
    .categorylisthome__item.is-active .categorylisthome__title {
        max-width: 235px;
    }
}
