/*
 * Compact child-category navigation.
 * The physical version in the filename avoids the production server's
 * long-lived cache after query parameters have been stripped.
 */

.child-categories {
    min-width: 0;
    margin: 8px 0 18px;
}

.child-categories ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.child-categories ul li {
    min-width: 0;
    margin: 0;
}

.child-categories ul li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 11px;
    border: 0;
    border-radius: 999px;
    background: #f3f4f6;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition:
        color .2s ease,
        background-color .2s ease;
}

.child-categories ul li a:hover,
.child-categories ul li a:focus {
    border: 0;
    background: #f9eaf4;
    color: #b92189;
    text-decoration: none;
}

.child-categories ul li a:focus-visible {
    outline: 2px solid #b92189;
    outline-offset: 2px;
}

@media (max-width: 575px) {
    .child-categories {
        width: 100%;
        max-width: 100%;
        margin: 8px 0 16px;
        padding: 0 1px 2px;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-inline: contain;
        scroll-behavior: smooth;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .child-categories::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    .child-categories ul {
        width: max-content;
        min-width: max-content;
        max-width: none;
        flex-wrap: nowrap;
        gap: 6px;
    }

    .child-categories ul li {
        flex: 0 0 auto;
        scroll-snap-align: start;
        scroll-margin-inline: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .child-categories,
    .child-categories ul li a {
        scroll-behavior: auto;
        transition: none;
    }
}
