.turri-product-category-bar {
    --turri-category-bar-edge: var(--space-l, 4.5rem);
    --turri-category-control-size: var(--turri-header-control-size, 4.4rem);
    --turri-category-gap: var(--turri-header-space-compact, 0.8rem);
    --turri-category-shop-expanded: 102px;
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
    width: 100%;
}

.turri-product-category-bar__viewport {
    contain: inline-size paint;
    min-width: 0;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.turri-product-category-bar__list {
    align-items: center;
    display: flex;
    gap: var(--turri-category-gap);
    list-style: none;
    margin: 0;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    padding: 0;
    scroll-padding-inline: var(--turri-category-gap);
    width: 100%;
}

.turri-product-category-bar[data-enhanced="true"] .turri-product-category-bar__list {
    scrollbar-width: none;
}

.turri-product-category-bar[data-enhanced="true"] .turri-product-category-bar__list::-webkit-scrollbar {
    display: none;
}

.turri-product-category-bar__item {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
}

.turri-product-category-bar__item--shop {
    align-self: stretch;
    background: var(--neutral-ultra-light, #f0f2f4);
    flex: 0 0 var(--turri-category-control-size);
    left: 0;
    margin-inline-end: calc(var(--turri-category-shop-expanded) - var(--turri-category-control-size));
    max-width: var(--turri-category-control-size);
    min-width: var(--turri-category-control-size);
    position: sticky;
    width: var(--turri-category-control-size);
    z-index: 4;
}

.turri-product-category-bar[data-at-start="false"] .turri-product-category-bar__item--shop::after {
    background: var(--white, #fff);
    content: "";
    inset-block: 0;
    left: 100%;
    pointer-events: auto;
    position: absolute;
    width: calc(var(--turri-category-control-size) + var(--turri-category-gap));
    z-index: 0;
}

.turri-product-category-bar__chip {
    align-items: center;
    background: var(--white, #fff);
    border: 1px solid var(--neutral-light, #d3d7de);
    border-radius: var(--radius, 0.5rem);
    color: var(--neutral-ultra-dark, #16191d);
    display: inline-flex;
    font-size: var(--text-s, 1.4rem);
    font-weight: 600;
    justify-content: center;
    line-height: 1.2;
    min-height: var(--turri-category-control-size);
    padding: var(--turri-category-gap) var(--space-xs, 1.4rem);
    text-decoration: none;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease;
    white-space: nowrap;
}

.turri-product-category-bar__item--ancestor .turri-product-category-bar__chip {
    background: var(--white, #fff);
    border: 2px solid var(--primary, #1b4f9e);
    box-sizing: border-box;
    color: var(--primary, #1b4f9e);
}

.turri-product-category-bar__chip:hover {
    background: var(--primary-ultra-light, #e9f0fb);
    border-color: var(--primary, #1b4f9e);
    color: var(--primary-dark, #12376d);
}

.turri-product-category-bar__chip[aria-current="page"],
.turri-product-category-bar__chip[data-filter-active="true"] {
    background: var(--primary, #1b4f9e);
    border-color: var(--primary, #1b4f9e);
    color: var(--white, #fff);
}

.turri-product-category-bar__shop {
    border: 2px solid var(--primary, #1b4f9e);
    box-sizing: border-box;
    color: var(--primary, #1b4f9e);
    gap: 0.55rem;
    min-width: var(--turri-category-control-size);
    overflow: hidden;
    position: relative;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease,
        padding 160ms ease,
        width 160ms ease;
    width: var(--turri-category-shop-expanded);
    z-index: 1;
}

.turri-product-category-bar__shop-icon {
    color: currentColor;
    display: block;
    flex: 0 0 20px;
    height: 20px;
    width: 20px;
}

.turri-product-category-bar__shop[aria-current="page"] {
    background: var(--primary, #1b4f9e);
    border-color: var(--primary, #1b4f9e);
    color: var(--primary-ultra-light, #e9f0fb);
}

.turri-product-category-bar__shop-label {
    display: block;
    max-width: 5rem;
    opacity: 1;
    overflow: hidden;
    transition:
        max-width 160ms ease,
        opacity 120ms ease;
}

.turri-product-category-bar[data-at-start="false"] .turri-product-category-bar__shop {
    gap: 0;
    padding-inline: 0;
    width: var(--turri-category-control-size);
}

.turri-product-category-bar[data-at-start="false"] .turri-product-category-bar__shop-label {
    max-width: 0;
    opacity: 0;
}

.turri-product-category-bar__chip:focus-visible,
.turri-product-category-bar__control:focus-visible {
    outline: 3px solid var(--primary, #1b4f9e);
    outline-offset: 2px;
}

.turri-product-category-bar__item--back .turri-product-category-bar__chip {
    background: var(--neutral-ultra-light, #f0f2f4);
    color: var(--neutral-dark, #363e49);
}

.turri-product-category-bar__control {
    align-items: center;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(211, 215, 222, 0.72);
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(22, 25, 29, 0.12);
    color: rgba(22, 25, 29, 0.82);
    display: none;
    flex: 0 0 var(--turri-category-control-size);
    height: var(--turri-category-control-size);
    justify-content: center;
    padding: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: var(--turri-category-control-size);
    z-index: 5;
}

.turri-product-category-bar__control:hover {
    background: rgba(233, 240, 251, 0.94);
    color: var(--primary-dark, #12376d);
}

.turri-product-category-bar__control--previous {
    left: 0;
}

.turri-product-category-bar[data-at-start="false"] .turri-product-category-bar__control--previous {
    left: calc(var(--turri-category-control-size) + var(--turri-category-gap));
}

.turri-product-category-bar__control--previous svg {
    transform: rotate(180deg);
}

.turri-product-category-bar__control--next {
    right: 0;
}

.turri-product-category-bar::before,
.turri-product-category-bar::after {
    content: "";
    height: 100%;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    transition: opacity 120ms ease;
    width: var(--turri-category-bar-edge);
    z-index: 2;
}

.turri-product-category-bar::before {
    background: linear-gradient(to right, var(--white, #fff) 32%, transparent);
    left: 0;
}

.turri-product-category-bar::after {
    background: linear-gradient(to left, var(--white, #fff) 32%, transparent);
    right: 0;
}

.turri-product-category-bar[data-enhanced="true"][data-at-start="false"]::before,
.turri-product-category-bar[data-enhanced="true"][data-at-end="false"]::after {
    opacity: 1;
}

.turri-product-category-bar[data-enhanced="true"] .turri-product-category-bar__control:not([hidden]) {
    display: inline-flex;
}

@media (max-width: 767px) {
    .turri-product-category-bar {
        --turri-category-bar-edge: var(--space-m, 2.4rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .turri-product-category-bar__chip,
    .turri-product-category-bar__shop-label,
    .turri-product-category-bar::before,
    .turri-product-category-bar::after {
        transition: none;
    }

    .turri-product-category-bar__list {
        scroll-behavior: auto;
    }
}
