.jd-custom-related-products {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.jd-custom-related-products .jd-related-carousel {
    direction: rtl;
    min-width: 0;
}

.jd-custom-related-products .jd-related-carousel:not(.owl-loaded) {
    display: grid !important;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.jd-custom-related-products .owl-stage {
    display: flex;
    align-items: stretch;
}

.jd-custom-related-products .owl-item {
    box-sizing: border-box;
    display: flex;
}

.jd-custom-related-products .owl-item>li.product {
    width: 100%;
    max-width: 100%;
}

.jd-custom-related-products li.product .star-rating {
    display: none !important;
}

.jd-custom-related-products li.product {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0;
}

.jd-custom-related-products li.product .button {
    margin-top: auto !important;
}

.jd-custom-related-products .owl-nav {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 12px;
}

.jd-custom-related-products .owl-nav button {
    width: 34px;
    height: 34px;
    border: 1px solid #e1e8f4 !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #1d448e !important;
}

.jd-custom-related-products .owl-nav button:hover {
    background: #173970 !important;
    color: #fff !important;
}

@media (max-width:767px) {
    .jd-custom-related-products .jd-related-carousel:not(.owl-loaded) {
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 9px;
    }
    .jd-custom-related-products .owl-item {
        min-width: 0;
    }
    .jd-custom-related-products li.product {
        padding: 9px !important;
    }
    .jd-custom-related-products li.product a img {
        max-width: 100%;
        object-fit: contain;
    }
    .jd-custom-related-products .owl-nav {
        margin-top: 8px;
    }
}

.jd-custom-related-products > .sec-title {
    margin-bottom: 18px !important;
    color: #172b4d;
    font-size: clamp(20px, 2vw, 25px) !important;
    font-weight: 850 !important;
    line-height: 1.65 !important;
}

.jd-custom-related-products .owl-stage {
    align-items: stretch !important;
}

.jd-custom-related-products .owl-item {
    display: flex !important;
    align-items: stretch !important;
    height: auto;
}

.jd-custom-related-products .owl-item > li.product,
    .jd-custom-related-products .jd-related-carousel:not(.owl-loaded) > li.product {
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column !important;
    align-self: stretch;
    height: 100%;
    min-height: 100%;
    box-sizing: border-box;
}

.jd-custom-related-products li.product a.woocommerce-LoopProduct-link,
    .jd-custom-related-products li.product a.woocommerce-loop-product__link {
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column !important;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    text-align: center;
}

.jd-custom-related-products li.product a.woocommerce-LoopProduct-link img,
    .jd-custom-related-products li.product a.woocommerce-loop-product__link img {
    display: block;
    width: 100%;
    max-width: 100%;
    object-fit: contain;
}

.jd-custom-related-products li.product .woocommerce-loop-product__title {
    display: -webkit-box !important;
    flex: 0 0 auto;
    min-height: 3.25em;
    max-height: 3.25em;
    margin: 12px 0 8px !important;
    padding: 0 5px !important;
    overflow: hidden;
    color: #172b4d !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    line-height: 1.62 !important;
    text-align: center;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.jd-custom-related-products li.product .price {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 2.65em;
    margin: auto 0 0 !important;
    padding: 0 3px !important;
    line-height: 1.65 !important;
    text-align: center;
    white-space: normal;
}

.jd-custom-related-products li.product .button,
    .jd-custom-related-products li.product a.button,
    .jd-custom-related-products li.product .added_to_cart {
    display: flex !important;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    height: 44px;
    margin: 12px 0 0 !important;
    padding: 8px 9px !important;
    border-radius: 11px !important;
    box-sizing: border-box !important;
    font-size: 12.5px !important;
    font-weight: 800 !important;
    line-height: 1.45 !important;
    text-align: center;
    white-space: normal !important;
    overflow-wrap: anywhere;
}

@media (max-width: 767px) {
    .jd-custom-related-products > .sec-title {
        margin-bottom: 13px !important;
        font-size: 19px !important;
    }
    .jd-custom-related-products li.product .woocommerce-loop-product__title {
        min-height: 3.25em;
        max-height: 3.25em;
        margin-top: 9px !important;
        font-size: 13.5px !important;
        line-height: 1.62 !important;
    }
    .jd-custom-related-products li.product .button,
        .jd-custom-related-products li.product a.button,
        .jd-custom-related-products li.product .added_to_cart {
        min-height: 42px !important;
        height: 42px;
        margin-top: 9px !important;
        padding-inline: 6px !important;
        border-radius: 9px !important;
        font-size: 11.5px !important;
    }
}

body.single-product section.related.products.jd-custom-related-products ul.products li.product .woocommerce-loop-product__title {
    font-size: 16px !important;
}

@media (min-width: 768px) and (max-width: 1024px) {
    body.single-product section.related.products.jd-custom-related-products ul.products li.product .woocommerce-loop-product__title {
        font-size: 15px !important;
    }
}

@media (max-width: 767px) {
    body.single-product section.related.products.jd-custom-related-products ul.products li.product .woocommerce-loop-product__title {
        font-size: 14px !important;
    }
}

body.single-product section.related.products.jd-custom-related-products .owl-item > li.product,
    body.single-product section.related.products.jd-custom-related-products .jd-related-carousel:not(.owl-loaded) > li.product,
    body.single-product section.related.products.jd-custom-related-products ul.products > li.product {
    row-gap: 5px !important;
}

body.single-product section.related.products.jd-custom-related-products li.product a.woocommerce-LoopProduct-link,
    body.single-product section.related.products.jd-custom-related-products li.product a.woocommerce-loop-product__link {
    flex: 0 0 auto !important;
    row-gap: 5px !important;
}

body.single-product section.related.products.jd-custom-related-products li.product a.woocommerce-LoopProduct-link img,
    body.single-product section.related.products.jd-custom-related-products li.product a.woocommerce-loop-product__link img {
    margin: 0 !important;
}

body.single-product section.related.products.jd-custom-related-products li.product .woocommerce-loop-product__title {
    margin: 0 !important;
}

body.single-product section.related.products.jd-custom-related-products li.product .price {
    margin: 0 !important;
}

body.single-product section.related.products.jd-custom-related-products li.product .button,
    body.single-product section.related.products.jd-custom-related-products li.product a.button,
    body.single-product section.related.products.jd-custom-related-products li.product .added_to_cart {
    margin: 0 !important;
}
