/* WRAPPER */
.category-wrapper {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 14px;

    width: 100%;
    margin: 24px 0;
}

/* CONTAINER */
.category-container {
    display: flex;
    align-items: flex-start;
    gap: 18px;

    width: 100%;
    max-width: 800px;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;

    /* supaya item pertama tidak kepotong */
    padding-inline: 12px;
    padding-block: 10px;

    box-sizing: border-box;

    scrollbar-width: none;
}

.category-container::-webkit-scrollbar {
    display: none;
}

/* ITEM */
.category-item {
    flex: 0 0 auto;
    width: 100px;

    text-align: center;
    text-decoration: none;
    color: inherit;

    scroll-snap-align: start;
}

/* CARD BULAT */
.category-card {
    width: 92px;
    height: 92px;

    margin: 0 auto;

    border-radius: 50%;
    background: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}

/* IMAGE */
.category-card img {
    width: 56px;
    height: 56px;

    object-fit: contain;

    transition: transform 0.25s ease;
}

/* TITLE */
.category-name {
    margin-top: 10px;

    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;

    color: #444;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;

    max-width: 95px;

    margin-left: auto;
    margin-right: auto;

    transition: color 0.25s ease;
}

/* HOVER */
.category-item:hover .category-card {
    transform: translateY(-5px);

    background: linear-gradient(135deg, #007bff, #00c6ff);

    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.15);
}

.category-item:hover .category-card img {
    transform: scale(1.08);
}

.category-item:hover .category-name {
    color: #007bff;
}

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

/* ARROW */
.arrow {
    flex-shrink: 0;

    width: 42px;
    height: 42px;

    border: none;
    border-radius: 50%;

    background: #fff;
    color: #333;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;
    font-weight: bold;

    cursor: pointer;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.arrow:hover {
    transform: scale(1.08);

    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.arrow:active {
    transform: scale(0.94);
}

/* HIDE */
.arrow.hidden {
    opacity: 0;
    pointer-events: none;
}

/* MOBILE */
@media (max-width: 768px) {

    .category-wrapper {
        gap: 8px;
    }

    .category-container {
        gap: 14px;
        padding-inline: 8px;
    }

    .category-item {
        width: 85px;
    }

    .category-card {
        width: 78px;
        height: 78px;
    }

    .category-card img {
        width: 46px;
        height: 46px;
    }

    .category-name {
        font-size: 12px;
        max-width: 80px;
    }

    .arrow {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }
}