.single-product.woocommerce .related.products ul.products {
    --related-gap: 24px;
    --related-card-width: calc((100% - var(--related-gap) - var(--related-gap)) / 3);
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    gap: var(--related-gap);
    margin: 0;
    padding: 4px 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
}

.single-product.woocommerce .related.products ul.products::before,
.single-product.woocommerce .related.products ul.products::after {
    content: none;
}

.single-product.woocommerce .related.products ul.products > li.product {
    flex: 0 0 var(--related-card-width);
    width: auto;
    min-width: 0;
    max-width: none;
    margin: 0;
    border: 0;
    scroll-snap-align: start;
}

.kokomonk-related-carousel {
    position: relative;
}

.kokomonk-related-carousel > ul.products {
    scrollbar-width: none;
}

.kokomonk-related-carousel > ul.products::-webkit-scrollbar {
    display: none;
}

.woocommerce .related.products .kokomonk-related-arrow {
    position: absolute;
    z-index: 2;
    inset-block-start: 50%;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
    border: 1px solid #dfd4ca;
    border-radius: 50%;
    background: #fff;
    color: #5f3817;
    box-shadow: 0 3px 12px rgba(71, 43, 23, 0.16);
    cursor: pointer;
}

.woocommerce .related.products .kokomonk-related-arrow[hidden] {
    display: none;
}

.woocommerce .related.products .kokomonk-related-arrow:hover {
    background: #f8f2eb;
}

.woocommerce .related.products .kokomonk-related-arrow:focus-visible,
.single-product.woocommerce .related.products ul.products:focus-visible {
    outline: 2px solid #5f3817;
    outline-offset: 2px;
}

.kokomonk-related-arrow[data-direction="previous"] {
    inset-inline-start: 4px;
}

.kokomonk-related-arrow[data-direction="next"] {
    inset-inline-end: 4px;
}

.kokomonk-related-arrow::before {
    content: "";
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateX(-2px) rotate(-45deg);
}

.kokomonk-related-arrow[data-direction="previous"]::before,
.kokomonk-related-arrow[data-direction="next"]:dir(rtl)::before {
    transform: translateX(2px) rotate(135deg);
}

.kokomonk-related-arrow[data-direction="previous"]:dir(rtl)::before {
    transform: translateX(-2px) rotate(-45deg);
}

@media (max-width: 768px) {
    .single-product.woocommerce .related.products ul.products {
        --related-gap: 14px;
        --related-card-width: calc((100% - var(--related-gap)) / 2);
    }
}
