.bau-product-carousel {
    --bau-carousel-columns: 4;
    min-width: 0;
}

.bau-product-carousel[data-columns="5"] {
    --bau-carousel-columns: 5;
}

.bau-product-carousel[data-columns="6"] {
    --bau-carousel-columns: 6;
}

.bau-product-carousel__controls {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-block-end: 0.75rem;
}

.bau-product-carousel__controls[hidden] {
    display: none;
}

.bau-product-carousel .bau-product-carousel__controls button {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1px solid #24241f;
    border-radius: 0;
    background: transparent;
    color: #24241f;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.bau-product-carousel__controls button:disabled {
    opacity: 0.35;
    cursor: default;
}

.bau-product-carousel__controls button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.bau-product-carousel__controls:dir(rtl) span {
    transform: scaleX(-1);
}

.bau-product-carousel[data-bau-product-carousel] .woocommerce ul.products {
    --bau-carousel-gap: clamp(1rem, 2.4vw, 2.5rem);
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - (var(--bau-carousel-columns) - 1) * var(--bau-carousel-gap)) / var(--bau-carousel-columns));
    gap: var(--bau-carousel-gap);
    margin: 0;
    padding: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.bau-product-carousel[data-bau-product-carousel] .woocommerce ul.products::-webkit-scrollbar {
    display: none;
}

.bau-product-carousel__viewport {
    position: relative;
    min-width: 0;
    overflow: hidden;
    overflow: clip;
    touch-action: pan-y;
}

.bau-product-carousel__notification {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    pointer-events: none;
}

.bau-product-carousel[data-bau-product-carousel] .woocommerce ul.bau-product-carousel__track {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
    gap: 0;
    overflow: visible;
    scroll-snap-type: none;
    transition-property: transform;
    transition-timing-function: ease;
}

.bau-product-carousel[data-bau-product-carousel] ul.bau-product-carousel__track > .bau-product-carousel__slide {
    position: relative;
    flex: 0 0 auto;
    scroll-snap-align: none;
}

.bau-product-carousel[data-bau-product-carousel] .woocommerce ul.products::before,
.bau-product-carousel[data-bau-product-carousel] .woocommerce ul.products::after {
    display: none;
}

.bau-product-carousel[data-bau-product-carousel] .woocommerce ul.products > li.product {
    float: none;
    clear: none;
    width: 100%;
    min-width: 0;
    margin: 0;
    scroll-snap-align: start;
}

@media (max-width: 900px) {
    .bau-product-carousel[data-bau-product-carousel] .woocommerce ul.products {
        grid-auto-columns: calc((100% - 2 * var(--bau-carousel-gap)) / 3);
    }
}

@media (max-width: 640px) {
    .bau-product-carousel[data-bau-product-carousel] .woocommerce ul.products {
        grid-auto-columns: calc((100% - var(--bau-carousel-gap)) / 2);
    }
}
