/* =========================================================
   Related Categories Section
   ========================================================= */

.related-categories {
    background: var(--color-bg-light);
    padding: 64px 120px;
}

.related-categories__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 56px;
}

.related-categories__title {
    font-family: var(--font-neo);
    font-size: 36px;
    line-height: 42px;
    letter-spacing: -1px;
    font-weight: 400;
    color: var(--color-black);
    margin: 0;
    text-align: center;
}

/* ----- Grid (desktop) ------------------------------------ */

.related-categories__track {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 24px;
}

/* ----- Card ---------------------------------------------- */

.related-categories__card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--color-white);
    text-decoration: none;
    color: var(--color-black);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.related-categories__card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
    transform: translateY(-4px);
}

.related-categories__card:hover .related-categories__card-title {
    color: var(--color-primary);
}

.related-categories__card-img {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
}

.related-categories__card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    max-width: none;
}

.related-categories__card-name {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.related-categories__card-title {
    font-family: var(--font-neo);
    font-size: 36px;
    line-height: 42px;
    letter-spacing: -1px;
    font-weight: 400;
    margin: 0;
    transition: color 0.2s ease;
}

.related-categories__card-sub {
    font-family: var(--font-inter);
    font-size: 19px;
    line-height: 30px;
    font-weight: 400;
    opacity: 0.7;
    margin: 0;
}

.related-categories__card-arrow {
    flex-shrink: 0;
    width: 20px;
    height: 40px;
    display: block;
    max-width: none;
}

/* Dots hidden on desktop */
.related-categories__dots {
    display: none;
}

/* ==========================================================
   Tablet  ≤ 1170 px
   ========================================================== */

@media (max-width: 1170px) {
    .related-categories {
        padding: 48px 40px;
    }

    .related-categories__card-title {
        font-size: 26px;
        line-height: 32px;
    }

    .related-categories__card-sub {
        font-size: 16px;
        line-height: 24px;
    }
}

/* ==========================================================
   Mobile  ≤ 640 px  — swipeable slider
   ========================================================== */

@media (max-width: 640px) {
    .related-categories {
        padding: 32px 0;
    }

    .related-categories__inner {
        gap: 24px;
    }

    .related-categories__title {
        font-size: 24px;
        line-height: 32px;
        font-weight: 500;
        letter-spacing: 0;
        padding: 0 24px;
    }

    .related-categories__slider {
        display: flex;
        flex-direction: column;
        gap: 24px;
        overflow: hidden;
    }

    /* Track becomes a flex row; JS will translate it */
    .related-categories__track {
        display: flex;
        flex-direction: row;
        gap: 0;
        transition: transform 0.35s ease;
        will-change: transform;
    }

    .related-categories__card {
        flex: 0 0 calc(100vw - 48px);
        width: calc(100vw - 48px);
        margin: 0 24px;
        gap: 12px;
        padding: 16px;
        box-sizing: border-box;
    }

    .related-categories__card-title {
        font-size: 24px;
        line-height: 28px;
        letter-spacing: 0;
    }

    .related-categories__card-sub {
        font-size: 14px;
        line-height: 22px;
    }

    .related-categories__card-arrow {
        width: 16px;
        height: 32px;
    }

    /* Dots */
    .related-categories__dots {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        padding: 0 24px;
    }

    .related-categories__dot {
        flex-shrink: 0;
        height: 4px;
        width: 44px;
        background: #d9d9d9;
        border: none;
        padding: 0;
        cursor: pointer;
        transition: background 0.2s ease, width 0.2s ease;
    }

    .related-categories__dot.is-active {
        width: 64px;
        background: var(--color-primary);
    }
}
