/**
 * کامپوننت کارت و کروسل محصول
 * منبع واحد برای:
 * - محصولات مرتبط در صفحه محصول
 * - محصولات مرتبط در صفحه سبد خرید
 *
 * نکته نسخه 0.1.394: «نیازت میشه» از این فایل جدا شده و فقط از
 * assets/css/woocommerce/single-need-carousel.css کنترل می‌شود.
 *
 * نکته: صفحه شاپ از این فایل استفاده نمی‌کند و کارت اختصاصی خودش را دارد.
 */

/* ==========================================================================
   01. متغیرهای کامپوننت
   ========================================================================== */
:root {
    --rp-product-carousel-gap: 16px;
    --rp-product-card-border: #eef1f4;
    --rp-product-card-bg: #fff;
    --rp-product-card-text: #111820;
    --rp-product-card-muted: #6b7280;
    --rp-product-card-red: #ff4d4f;
    --rp-product-card-plus: #ff5722;
    --rp-product-card-plus-disabled: #d7cecb;
    --rp-product-card-plus-loading: #ff5722;

    --rp-product-carousel-dot-size: 9px;
    --rp-product-carousel-dot-inactive-width: var(--rp-product-carousel-dot-size);
    --rp-product-carousel-dot-active-width: 18px;
    --rp-product-carousel-dot-container-height: 18px;
    --rp-product-carousel-dot-bg: #e1e7ed;
    --rp-product-carousel-dot-active-bg: #111820;
    --rp-product-carousel-dot-gap: 6px;
    --rp-product-carousel-dot-margin-top: 14px;
}

/* ==========================================================================
   02. بدنه مشترک کروسل
   ========================================================================== */
body.single-product .rp-product-carousel,
body.woocommerce-cart .rp-product-carousel,
body.single-product .rp-single-related-carousel,
body.woocommerce-cart .rp-cart-related-carousel {
    width: 100% !important;
    margin: 56px 0 0 !important;
    padding: 0 !important;
    direction: rtl !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}



body.woocommerce-cart .rp-product-carousel--cart-related,
body.woocommerce-cart .rp-cart-related-carousel {
    margin-top: 20px !important;
}

/* هدر کروسل */
body.single-product .rp-single-related-head,
body.woocommerce-cart .rp-cart-related-head,
body.woocommerce-cart .rp-single-related-head {
    margin: 0 0 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    direction: rtl !important;
}

body.single-product .rp-single-related-head h2,
body.woocommerce-cart .rp-cart-related-head h2,
body.woocommerce-cart .rp-single-related-head h2 {
    margin: 0 !important;
    color: var(--rp-product-card-text) !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    line-height: 1.8 !important;
    text-align: right !important;
}

/* پوسته و viewport */
body.single-product .rp-single-related-shell,
body.woocommerce-cart .rp-cart-related-shell,
body.woocommerce-cart .rp-single-related-shell {
    position: relative !important;
    width: 100% !important;
    direction: rtl !important;
}

body.single-product .rp-single-related-viewport,
body.woocommerce-cart .rp-cart-related-viewport,
body.woocommerce-cart .rp-single-related-viewport {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
    scrollbar-width: none !important;
    touch-action: pan-x pan-y !important;
    overscroll-behavior-x: contain !important;
    box-sizing: border-box !important;
}

body.single-product .rp-single-related-viewport::-webkit-scrollbar,
body.woocommerce-cart .rp-cart-related-viewport::-webkit-scrollbar,
body.woocommerce-cart .rp-single-related-viewport::-webkit-scrollbar {
    display: none !important;
}

/* track */
body.single-product .rp-single-related-track,
body.woocommerce-cart .rp-cart-related-track,
body.woocommerce-cart .rp-single-related-track {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 0 4px !important;
    list-style: none !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: var(--rp-product-carousel-gap) !important;
    direction: rtl !important;
    scroll-snap-type: x proximity !important;
    transform: none !important;
    transition: none !important;
}

/* آیتم‌های کروسل */
body.single-product .rp-single-related-track > li.product,
body.woocommerce-cart .rp-cart-related-track > li.product,
body.woocommerce-cart .rp-single-related-track > li.product {
    flex: 0 0 var(--rp-related-desktop-basis) !important;
    width: var(--rp-related-desktop-basis) !important;
    min-width: var(--rp-related-desktop-basis) !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    scroll-snap-align: start !important;
    direction: rtl !important;
}



/* فلش‌های کروسل */
body.single-product .rp-single-related-arrow,
body.woocommerce-cart .rp-cart-related-arrow,
body.woocommerce-cart .rp-single-related-arrow {
    position: absolute !important;
    top: 50% !important;
    z-index: 20 !important;
    width: 36px !important;
    height: 36px !important;
    border: 1px solid #e8ecef !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: var(--rp-product-card-text) !important;
    box-shadow: 0 10px 28px rgba(17, 24, 32, .08) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transform: translateY(-50%) !important;
}

body.single-product .rp-single-related-arrow-prev,
body.woocommerce-cart .rp-cart-related-arrow-prev {
    right: -18px !important;
}

body.single-product .rp-single-related-arrow-next,
body.woocommerce-cart .rp-cart-related-arrow-next {
    left: -18px !important;
}

/* pagination محصولات مرتبط؛ در دسکتاپ مخفی، در موبایل مثل «نیازت میشه» */
body.single-product .rp-single-related-dots,
body.woocommerce-cart .rp-cart-related-dots {
    display: none !important;
}

body.single-product .rp-single-related-dot,
body.woocommerce-cart .rp-cart-related-dot {
    -webkit-appearance: none !important;
    appearance: none !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-indent: -9999px !important;
    cursor: pointer !important;
}

body.single-product .rp-single-related-dot::before,
body.single-product .rp-single-related-dot::after,
body.woocommerce-cart .rp-cart-related-dot::before,
body.woocommerce-cart .rp-cart-related-dot::after {
    content: none !important;
    display: none !important;
}

@media (max-width: 900px) {
    body.single-product .rp-single-related-dots,
    body.woocommerce-cart .rp-cart-related-dots {
        width: 100% !important;
        min-height: var(--rp-product-carousel-dot-container-height) !important;
        height: var(--rp-product-carousel-dot-container-height) !important;
        margin: var(--rp-product-carousel-dot-margin-top) auto 0 !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: center !important;
        gap: var(--rp-product-carousel-dot-gap) !important;
        direction: rtl !important;
        text-align: center !important;
        line-height: 0 !important;
        font-size: 0 !important;
        overflow: visible !important;
        transform: none !important;
        box-sizing: border-box !important;
    }

    body.single-product .rp-single-related-dot,
    body.woocommerce-cart .rp-cart-related-dot {
        display: block !important;
        flex: 0 0 var(--rp-product-carousel-dot-inactive-width) !important;
        width: var(--rp-product-carousel-dot-inactive-width) !important;
        min-width: var(--rp-product-carousel-dot-inactive-width) !important;
        max-width: var(--rp-product-carousel-dot-inactive-width) !important;
        height: var(--rp-product-carousel-dot-size) !important;
        min-height: var(--rp-product-carousel-dot-size) !important;
        max-height: var(--rp-product-carousel-dot-size) !important;
        border-radius: 999px !important;
        background: var(--rp-product-carousel-dot-bg) !important;
        opacity: 1 !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        transform: none !important;
        transition: flex-basis .18s ease, width .18s ease, min-width .18s ease, max-width .18s ease, background-color .18s ease, opacity .18s ease !important;
    }

    body.single-product .rp-single-related-dot.is-active,
    body.single-product .rp-single-related-dot[aria-current="true"],
    body.woocommerce-cart .rp-cart-related-dot.is-active,
    body.woocommerce-cart .rp-cart-related-dot[aria-current="true"] {
        flex-basis: var(--rp-product-carousel-dot-active-width) !important;
        width: var(--rp-product-carousel-dot-active-width) !important;
        min-width: var(--rp-product-carousel-dot-active-width) !important;
        max-width: var(--rp-product-carousel-dot-active-width) !important;
        background: var(--rp-product-carousel-dot-active-bg) !important;
    }
}

/* ==========================================================================
   03. کارت محصول مشترک
   ========================================================================== */
body.single-product .rp-product-card-component,
body.woocommerce-cart .rp-product-card-component {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    list-style: none !important;
    direction: rtl !important;
    font-family: var(--rp-font, inherit) !important;
    box-sizing: border-box !important;
}

body.single-product .rp-product-card-component .rp-shop-card-mobile,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-mobile {
    display: none !important;
}

body.single-product .rp-product-card-component .rp-shop-card-desktop,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-desktop {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

body.single-product .rp-product-card-component .rp-shop-card-inner,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-inner {
    position: relative !important;
    width: 100% !important;
    min-height: 280px !important;
    height: auto !important;
    padding: 20px !important;
    border: 1px solid var(--rp-product-card-border) !important;
    border-radius: 14px !important;
    background: var(--rp-product-card-bg) !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    direction: rtl !important;
}

/* مواردی که در کارت کروسل نمایش نمی‌دهیم */
body.single-product .rp-product-card-component .onsale,
body.woocommerce-cart .rp-product-card-component .onsale,
body.single-product .rp-product-card-component .rp-card-compare,
body.woocommerce-cart .rp-product-card-component .rp-card-compare,
body.single-product .rp-product-card-component .rp-product-compare-btn,
body.woocommerce-cart .rp-product-card-component .rp-product-compare-btn {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* ==========================================================================
   04. تصویر، عنوان و لینک
   ========================================================================== */
body.single-product .rp-product-card-component .rp-shop-card-link,
body.single-product .rp-product-card-component .rp-card-link,
body.single-product .rp-product-card-component .woocommerce-LoopProduct-link,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-link,
body.woocommerce-cart .rp-product-card-component .rp-card-link,
body.woocommerce-cart .rp-product-card-component .woocommerce-LoopProduct-link {
    position: static !important;
    z-index: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    color: inherit !important;
    text-decoration: none !important;
    pointer-events: auto !important;
}

body.single-product .rp-product-card-component .rp-card-media,
body.single-product .rp-product-card-component .rp-mobile-card-media,
body.woocommerce-cart .rp-product-card-component .rp-card-media,
body.woocommerce-cart .rp-product-card-component .rp-mobile-card-media {
    width: 138px !important;
    min-width: 138px !important;
    height: 138px !important;
    min-height: 138px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: 0 !important;
    overflow: hidden !important;
}

body.single-product .rp-product-card-component .rp-card-media img,
body.single-product .rp-product-card-component .rp-mobile-card-media img,
body.woocommerce-cart .rp-product-card-component .rp-card-media img,
body.woocommerce-cart .rp-product-card-component .rp-mobile-card-media img {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 100% !important;
    object-fit: contain !important;
    margin: 0 auto !important;
}

body.single-product .rp-product-card-component .rp-card-title,
body.single-product .rp-product-card-component .woocommerce-loop-product__title,
body.woocommerce-cart .rp-product-card-component .rp-card-title,
body.woocommerce-cart .rp-product-card-component .woocommerce-loop-product__title {
    min-height: 42px !important;
    max-height: 42px !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    color: var(--rp-product-card-text) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1.75 !important;
    text-align: center !important;
    overflow: hidden !important;
}

/* ==========================================================================
   05. رنگ‌ها و دکمه افزودن
   ========================================================================== */
body.single-product .rp-product-card-component .rp-shop-card-actions,
body.single-product .rp-product-card-component .rp-card-actions,
body.single-product .rp-product-card-component .rp-mobile-card-actions,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-actions,
body.woocommerce-cart .rp-product-card-component .rp-card-actions,
body.woocommerce-cart .rp-product-card-component .rp-mobile-card-actions {
    position: relative !important;
    width: 100% !important;
    height: 30px !important;
    min-height: 30px !important;
    margin: auto 0 10px !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    direction: ltr !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    z-index: 8 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
}

body.single-product .rp-product-card-component .rp-card-actions--simple,
body.single-product .rp-product-card-component .rp-shop-card-actions--simple,
body.woocommerce-cart .rp-product-card-component .rp-card-actions--simple,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-actions--simple {
    justify-content: flex-end !important;
}

body.single-product .rp-product-card-component .rp-card-swatches,
body.single-product .rp-product-card-component .rp-shop-card-swatches,
body.woocommerce-cart .rp-product-card-component .rp-card-swatches,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-swatches {
    order: 1 !important;
    display: inline-flex !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    min-height: 30px !important;
    flex-wrap: nowrap !important;
    gap: 7px !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: flex-start !important;
    overflow: hidden !important;
}

body.single-product .rp-product-card-component .rp-card-swatch,
body.single-product .rp-product-card-component .rp-shop-swatch,
body.woocommerce-cart .rp-product-card-component .rp-card-swatch,
body.woocommerce-cart .rp-product-card-component .rp-shop-swatch {
    position: relative !important;
    width: 21px !important;
    min-width: 21px !important;
    height: 21px !important;
    min-height: 21px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    border: 2px solid var(--swatch-color, rgba(17, 24, 32, .22)) !important;
    outline: 0 !important;
    background-color: var(--swatch-color, #d6dadd) !important;
    background-image: var(--swatch-image, none) !important;
    background-size: cover !important;
    background-position: center !important;
    box-shadow: 0 0 0 2px #fff, 0 2px 7px rgba(17, 24, 32, .10) !important;
    overflow: hidden !important;
    cursor: pointer !important;
    z-index: 10 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
}

body.single-product .rp-product-card-component .rp-card-swatch.is-active,
body.single-product .rp-product-card-component .rp-shop-swatch.is-active,
body.single-product .rp-product-card-component .rp-card-swatch[aria-pressed="true"],
body.single-product .rp-product-card-component .rp-shop-swatch[aria-pressed="true"],
body.woocommerce-cart .rp-product-card-component .rp-card-swatch.is-active,
body.woocommerce-cart .rp-product-card-component .rp-shop-swatch.is-active,
body.woocommerce-cart .rp-product-card-component .rp-card-swatch[aria-pressed="true"],
body.woocommerce-cart .rp-product-card-component .rp-shop-swatch[aria-pressed="true"] {
    outline: 0 !important;
    border-color: var(--swatch-color, #111820) !important;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(17, 24, 32, .16) !important;
}

body.single-product .rp-product-card-component .rp-card-swatch.is-active::after,
body.single-product .rp-product-card-component .rp-shop-swatch.is-active::after,
body.single-product .rp-product-card-component .rp-card-swatch[aria-pressed="true"]::after,
body.single-product .rp-product-card-component .rp-shop-swatch[aria-pressed="true"]::after,
body.woocommerce-cart .rp-product-card-component .rp-card-swatch.is-active::after,
body.woocommerce-cart .rp-product-card-component .rp-shop-swatch.is-active::after,
body.woocommerce-cart .rp-product-card-component .rp-card-swatch[aria-pressed="true"]::after,
body.woocommerce-cart .rp-product-card-component .rp-shop-swatch[aria-pressed="true"]::after {
    content: "✓" !important;
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .65) !important;
    border-radius: 50% !important;
}

/* دکمه مثبت */
body.single-product .rp-product-card-component .rp-card-add,
body.single-product .rp-product-card-component .rp-product-quick-add,
body.woocommerce-cart .rp-product-card-component .rp-card-add,
body.woocommerce-cart .rp-product-card-component .rp-product-quick-add {
    order: 2 !important;
    position: relative !important;
    flex: 0 0 28px !important;
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: var(--rp-product-card-plus) !important;
    background-color: var(--rp-product-card-plus) !important;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 10 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    box-shadow: none !important;
}

body.single-product .rp-product-card-component .rp-card-add.is-needs-choice:not(.is-ready),
body.single-product .rp-product-card-component .rp-product-quick-add.is-needs-choice:not(.is-ready),
body.woocommerce-cart .rp-product-card-component .rp-card-add.is-needs-choice:not(.is-ready),
body.woocommerce-cart .rp-product-card-component .rp-product-quick-add.is-needs-choice:not(.is-ready) {
    background: var(--rp-product-card-plus-disabled) !important;
    background-color: var(--rp-product-card-plus-disabled) !important;
}

body.single-product .rp-product-card-component .rp-card-add span,
body.single-product .rp-product-card-component .rp-product-quick-add span,
body.woocommerce-cart .rp-product-card-component .rp-card-add span,
body.woocommerce-cart .rp-product-card-component .rp-product-quick-add span {
    color: #fff !important;
    font-size: 23px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    transform: translateY(2px) !important;
}

/* loading دکمه مثبت */
body.single-product .rp-product-card-component [data-rp-quick-add].is-loading,
body.single-product .rp-product-card-component [data-rp-quick-add][aria-busy="true"],
body.woocommerce-cart .rp-product-card-component [data-rp-quick-add].is-loading,
body.woocommerce-cart .rp-product-card-component [data-rp-quick-add][aria-busy="true"] {
    background: var(--rp-product-card-plus-loading) !important;
    background-color: var(--rp-product-card-plus-loading) !important;
    color: transparent !important;
}

body.single-product .rp-product-card-component [data-rp-quick-add].is-loading > span,
body.single-product .rp-product-card-component [data-rp-quick-add][aria-busy="true"] > span,
body.woocommerce-cart .rp-product-card-component [data-rp-quick-add].is-loading > span,
body.woocommerce-cart .rp-product-card-component [data-rp-quick-add][aria-busy="true"] > span {
    opacity: 0 !important;
}

body.single-product .rp-product-card-component [data-rp-quick-add].is-loading::after,
body.single-product .rp-product-card-component [data-rp-quick-add][aria-busy="true"]::after,
body.woocommerce-cart .rp-product-card-component [data-rp-quick-add].is-loading::after,
body.woocommerce-cart .rp-product-card-component [data-rp-quick-add][aria-busy="true"]::after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 12px !important;
    height: 12px !important;
    margin: -6px 0 0 -6px !important;
    border-radius: 50% !important;
    border: 2px solid rgba(255, 255, 255, .45) !important;
    border-top-color: #fff !important;
    background: transparent !important;
    animation: rpPlusButtonSpin .72s linear infinite !important;
}

/* ==========================================================================
   06. قیمت
   ========================================================================== */
body.single-product .rp-product-card-component .rp-shop-card-footer,
body.single-product .rp-product-card-component .rp-card-footer,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-footer,
body.woocommerce-cart .rp-product-card-component .rp-card-footer {
    width: 100% !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: flex-start !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 4 !important;
}

body.single-product .rp-product-card-component .rp-card-price-wrap,
body.single-product .rp-product-card-component .rp-shop-card-price-wrap,
body.woocommerce-cart .rp-product-card-component .rp-card-price-wrap,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-price-wrap {
    width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
    justify-content: flex-end !important;
    text-align: left !important;
}

body.single-product .rp-product-card-component .rp-card-price,
body.single-product .rp-product-card-component .rp-shop-card-price,
body.woocommerce-cart .rp-product-card-component .rp-card-price,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-price {
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    direction: rtl !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    text-align: left !important;
    flex-wrap: nowrap !important;
}

body.single-product .rp-product-card-component .rp-card-price-values,
body.single-product .rp-product-card-component .rp-shop-card-price-values,
body.woocommerce-cart .rp-product-card-component .rp-card-price-values,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-price-values {
    order: 1 !important;
    margin-right: auto !important;
    margin-left: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    direction: ltr !important;
    align-items: baseline !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    text-align: left !important;
    flex-wrap: nowrap !important;
}

body.single-product .rp-product-card-component .rp-card-price-final,
body.single-product .rp-product-card-component .rp-shop-card-price-final,
body.single-product .rp-product-card-component .rp-card-price-final .amount,
body.single-product .rp-product-card-component .rp-card-price-final bdi,
body.single-product .rp-product-card-component .rp-shop-card-price-final .amount,
body.single-product .rp-product-card-component .rp-shop-card-price-final bdi,
body.single-product .rp-product-card-component .rp-card-price-final *,
body.single-product .rp-product-card-component .rp-shop-card-price-final *,
body.woocommerce-cart .rp-product-card-component .rp-card-price-final,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-price-final,
body.woocommerce-cart .rp-product-card-component .rp-card-price-final .amount,
body.woocommerce-cart .rp-product-card-component .rp-card-price-final bdi,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-price-final .amount,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-price-final bdi,
body.woocommerce-cart .rp-product-card-component .rp-card-price-final *,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-price-final * {
    color: var(--rp-product-card-text) !important;
    font-size: 21px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
}

body.single-product .rp-product-card-component .rp-card-price-before,
body.single-product .rp-product-card-component .rp-shop-card-price-before,
body.single-product .rp-product-card-component .rp-shop-card-price-before-discount,
body.single-product .rp-product-card-component .rp-card-price-before *,
body.single-product .rp-product-card-component .rp-shop-card-price-before *,
body.single-product .rp-product-card-component .rp-shop-card-price-before-discount *,
body.woocommerce-cart .rp-product-card-component .rp-card-price-before,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-price-before,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-price-before-discount,
body.woocommerce-cart .rp-product-card-component .rp-card-price-before *,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-price-before *,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-price-before-discount * {
    color: var(--rp-product-card-red) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    text-decoration: line-through !important;
    text-decoration-color: var(--rp-product-card-red) !important;
    text-decoration-thickness: 1px !important;
}

body.single-product .rp-product-card-component .rp-card-currency,
body.single-product .rp-product-card-component .rp-shop-card-currency,
body.single-product .rp-product-card-component .woocommerce-Price-currencySymbol,
body.woocommerce-cart .rp-product-card-component .rp-card-currency,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-currency,
body.woocommerce-cart .rp-product-card-component .woocommerce-Price-currencySymbol {
    color: var(--rp-product-card-text) !important;
    font-size: 10px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
}

/* ==========================================================================
   07. موبایل
   ========================================================================== */
@media (max-width: 900px) {
    body.single-product .rp-single-related-track > li.product,
body.woocommerce-cart .rp-cart-related-track > li.product,
body.woocommerce-cart .rp-single-related-track > li.product {
        flex: 0 0 var(--rp-related-mobile-basis) !important;
        width: var(--rp-related-mobile-basis) !important;
        min-width: var(--rp-related-mobile-basis) !important;
        max-width: none !important;
    }

    

    

    body.single-product .rp-single-related-track,
body.woocommerce-cart .rp-cart-related-track,
body.woocommerce-cart .rp-single-related-track {
        direction: ltr !important;
        padding: 0 2px 10px !important;
    }

    body.single-product .rp-product-card-component .rp-shop-card-inner,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-inner {
        min-height: 300px !important;
        max-height: 325px !important;
        padding: 20px !important;
    }

    body.single-product .rp-product-card-component .rp-shop-card-actions,
body.single-product .rp-product-card-component .rp-card-actions,
body.single-product .rp-product-card-component .rp-mobile-card-actions,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-actions,
body.woocommerce-cart .rp-product-card-component .rp-card-actions,
body.woocommerce-cart .rp-product-card-component .rp-mobile-card-actions {
        position: absolute !important;
        right: 15px !important;
        left: 0 !important;
        bottom: 55px !important;
        width: 90% !important;
        height: 30px !important;
        min-height: 30px !important;
        margin: 0 !important;
    }

    body.single-product .rp-product-card-component .rp-shop-card-footer,
body.single-product .rp-product-card-component .rp-card-footer,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-footer,
body.woocommerce-cart .rp-product-card-component .rp-card-footer {
        position: absolute !important;
        right: 0 !important;
        left: 0 !important;
        bottom: 16px !important;
        height: 34px !important;
        min-height: 34px !important;
        padding: 0 20px !important;
    }

    body.single-product .rp-product-card-component .rp-card-add,
body.single-product .rp-product-card-component .rp-product-quick-add,
body.woocommerce-cart .rp-product-card-component .rp-card-add,
body.woocommerce-cart .rp-product-card-component .rp-product-quick-add {
        position: absolute !important;
        left: 178px !important;
        right: auto !important;
        bottom: 0 !important;
        flex: 0 0 25px !important;
        width: 25px !important;
        min-width: 25px !important;
        height: 25px !important;
        min-height: 25px !important;
    }

    body.single-product .rp-single-related-arrow,
body.woocommerce-cart .rp-cart-related-arrow,
body.woocommerce-cart .rp-single-related-arrow {
        display: none !important;
    }
}

/* ==========================================================================
   08. تبلت و دسکتاپ
   ========================================================================== */
@media (min-width: 901px) and (max-width: 1199px) {
    body.single-product .rp-single-related-track > li.product,
body.woocommerce-cart .rp-cart-related-track > li.product,
body.woocommerce-cart .rp-single-related-track > li.product {
        flex: 0 0 var(--rp-related-tablet-basis) !important;
        width: var(--rp-related-tablet-basis) !important;
        min-width: var(--rp-related-tablet-basis) !important;
    }
}

/* دسکتاپ: «نیازت میشه» داخل ستون کناری باید عرض کامل ستون را بگیرد. */


/* ==========================================================================
   10. ناوبری و اسکرول روان کروسل محصول
   --------------------------------------------------------------------------
   فلش‌های کروسل حذف می‌شوند و pagination خطی/نقطه‌ای مرجع کنترل است.
   حرکت کروسل بر پایه scroll native است تا flicker ناشی از transform حذف شود.
   ========================================================================== */

/* فلش‌ها در کامپوننت محصول استفاده نمی‌شوند. */
body.single-product .rp-product-carousel .rp-single-related-arrow,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-arrow,
body.woocommerce-cart .rp-product-carousel .rp-single-related-arrow,
body.single-product .rp-single-related-arrow,
body.woocommerce-cart .rp-cart-related-arrow {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* track باید با scroll حرکت کند، نه transform. */
body.single-product .rp-product-carousel .rp-single-related-track,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-track,
body.woocommerce-cart .rp-product-carousel .rp-single-related-track {
    transform: none !important;
    -webkit-transform: none !important;
    transition: none !important;
    will-change: scroll-position !important;
    backface-visibility: hidden !important;
}

/* viewport روان و بدون scrollbar نمایشی */
body.single-product .rp-product-carousel .rp-single-related-viewport,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-viewport,
body.woocommerce-cart .rp-product-carousel .rp-single-related-viewport {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-behavior: smooth !important;
    scroll-snap-type: x proximity !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-x: contain !important;
    contain: paint !important;
}

body.single-product .rp-product-carousel .rp-single-related-viewport::-webkit-scrollbar,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-viewport::-webkit-scrollbar,
body.woocommerce-cart .rp-product-carousel .rp-single-related-viewport::-webkit-scrollbar {
    display: none !important;
}

/* اسلایدها در scroll native ثابت و بدون shrink باشند. */
body.single-product .rp-product-carousel .rp-single-related-track > li.product,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-track > li.product,
body.woocommerce-cart .rp-product-carousel .rp-single-related-track > li.product {
    flex-shrink: 0 !important;
    scroll-snap-align: start !important;
    scroll-snap-stop: normal !important;
}

/* pagination نیازت میشه وسط‌چین */






/* دسکتاپ: viewport نیازت میشه هم برنامه‌ای scroll شود؛ فلش لازم نیست. */


/* ==========================================================================
   11. موبایل یکسان + فلش دسکتاپ روی hover
   --------------------------------------------------------------------------
   عرض کارت‌های موبایل برای نیازت میشه و محصولات مرتبط یکسان شد.
   در دسکتاپ فلش‌های کروسل فقط هنگام hover/focus نمایش داده می‌شوند.
   ========================================================================== */
:root {
    --rp-product-carousel-mobile-card-width: clamp(240px, 58vw, 340px);
}

/* موبایل: همه کروسل‌های محصول عرض یکسان بگیرند. */
@media (max-width: 900px) {
    body.single-product .rp-product-carousel,
body.woocommerce-cart .rp-product-carousel,
body.single-product .rp-single-related-carousel,
body.woocommerce-cart .rp-cart-related-carousel {
        width: 100% !important;
        max-width: 100% !important;
    }

    body.single-product .rp-product-carousel .rp-single-related-viewport,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-viewport,
body.woocommerce-cart .rp-product-carousel .rp-single-related-viewport {
        width: 100% !important;
        max-width: 100% !important;
        padding-inline: 0 !important;
    }

    body.single-product .rp-product-carousel .rp-single-related-track,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-track,
body.woocommerce-cart .rp-product-carousel .rp-single-related-track {
        width: max-content !important;
        min-width: 100% !important;
        max-width: none !important;
        gap: 16px !important;
        padding: 0 2px 10px !important;
        direction: ltr !important;
    }

    body.single-product .rp-product-carousel .rp-single-related-track > li.product,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-track > li.product,
body.woocommerce-cart .rp-product-carousel .rp-single-related-track > li.product {
        flex: 0 0 var(--rp-product-carousel-mobile-card-width) !important;
        width: var(--rp-product-carousel-mobile-card-width) !important;
        min-width: var(--rp-product-carousel-mobile-card-width) !important;
        max-width: var(--rp-product-carousel-mobile-card-width) !important;
        box-sizing: border-box !important;
        direction: rtl !important;
    }

    body.single-product .rp-product-carousel .rp-single-related-track > li.product.rp-product-card-component,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-track > li.product.rp-product-card-component,
body.woocommerce-cart .rp-product-carousel .rp-single-related-track > li.product.rp-product-card-component {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }

    

    

    
}

/* دسکتاپ: فلش‌ها فقط موقع hover/focus دیده شوند. */
@media (min-width: 901px) {
    body.single-product .rp-product-carousel,
body.woocommerce-cart .rp-product-carousel {
        position: relative !important;
    }

    body.single-product .rp-product-carousel .rp-single-related-arrow,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-arrow,
body.woocommerce-cart .rp-product-carousel .rp-single-related-arrow,
body.single-product .rp-single-related-arrow,
body.woocommerce-cart .rp-cart-related-arrow {
        position: absolute !important;
        top: 50% !important;
        z-index: 30 !important;
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
        border: 1px solid #e8ecef !important;
        border-radius: 50% !important;
        background: #fff !important;
        color: #111820 !important;
        box-shadow: 0 10px 28px rgba(17, 24, 32, .10) !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: translateY(-50%) scale(.96) !important;
        transition: opacity .18s ease, visibility .18s ease, transform .18s ease, background-color .18s ease, color .18s ease !important;
    }

    body.single-product .rp-product-carousel:hover .rp-single-related-arrow,
body.single-product .rp-product-carousel:focus-within .rp-single-related-arrow,
body.woocommerce-cart .rp-product-carousel:hover .rp-cart-related-arrow,
body.woocommerce-cart .rp-product-carousel:focus-within .rp-cart-related-arrow,
body.woocommerce-cart .rp-product-carousel:hover .rp-single-related-arrow,
body.woocommerce-cart .rp-product-carousel:focus-within .rp-single-related-arrow {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: translateY(-50%) scale(1) !important;
    }

    body.single-product .rp-product-carousel .rp-single-related-arrow:hover,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-arrow:hover,
body.woocommerce-cart .rp-product-carousel .rp-single-related-arrow:hover {
        background: #111820 !important;
        color: #fff !important;
    }

    body.single-product .rp-product-carousel .rp-single-related-arrow-prev,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-arrow-prev,
body.woocommerce-cart .rp-product-carousel .rp-single-related-arrow-prev {
        right: -18px !important;
        left: auto !important;
    }

    body.single-product .rp-product-carousel .rp-single-related-arrow-next,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-arrow-next,
body.woocommerce-cart .rp-product-carousel .rp-single-related-arrow-next {
        left: -18px !important;
        right: auto !important;
    }
}

/* ==========================================================================
   12. اصلاح عرض محصولات مرتبط موبایل
   --------------------------------------------------------------------------
   کارت «محصولات مرتبط» خودش li.product است؛ بنابراین نباید مثل کارت داخل
   اسلاید «نیازت میشه» width:100% بگیرد. اینجا عرض کارت مرتبط دوباره به
   مقدار کنترل‌شده کامپوننت برمی‌گردد.
   ========================================================================== */
@media (max-width: 900px) {
    body.single-product .rp-product-carousel .rp-single-related-track,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-track,
body.woocommerce-cart .rp-product-carousel .rp-single-related-track {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        gap: 16px !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    body.single-product .rp-product-carousel .rp-single-related-track > li.product,
body.single-product .rp-product-carousel .rp-single-related-track > li.product.rp-product-card-component,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-track > li.product,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-track > li.product.rp-product-card-component,
body.woocommerce-cart .rp-product-carousel .rp-single-related-track > li.product,
body.woocommerce-cart .rp-product-carousel .rp-single-related-track > li.product.rp-product-card-component {
        flex: 0 0 var(--rp-product-carousel-mobile-card-width) !important;
        width: var(--rp-product-carousel-mobile-card-width) !important;
        min-width: var(--rp-product-carousel-mobile-card-width) !important;
        max-width: var(--rp-product-carousel-mobile-card-width) !important;
        box-sizing: border-box !important;
    }

    body.single-product .rp-product-carousel .rp-single-related-track > li.product.rp-product-card-component .rp-shop-card-inner,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-track > li.product.rp-product-card-component .rp-shop-card-inner,
body.woocommerce-cart .rp-product-carousel .rp-single-related-track > li.product.rp-product-card-component .rp-shop-card-inner {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    body.single-product .rp-product-carousel .rp-single-related-viewport,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-viewport,
body.woocommerce-cart .rp-product-carousel .rp-single-related-viewport {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        box-sizing: border-box !important;
    }
}

/* ==========================================================================
   13. اصلاح فلش‌ها و رفتار کارت مرتبط
   --------------------------------------------------------------------------
   فلش‌های دسکتاپ باید آیکن داشته باشند؛ کارت محصولات مرتبط هم نباید
   از استایل اختصاصی «نیازت میشه» اثر بگیرد.
   ========================================================================== */
@media (min-width: 901px) {
    body.single-product .rp-product-carousel .rp-single-related-arrow,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-arrow,
body.woocommerce-cart .rp-product-carousel .rp-single-related-arrow {
        font-size: 0 !important;
        line-height: 1 !important;
        text-indent: 0 !important;
    }

    body.single-product .rp-product-carousel .rp-single-related-arrow::before,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-arrow::before,
body.woocommerce-cart .rp-product-carousel .rp-single-related-arrow::before {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: currentColor !important;
        font-size: 24px !important;
        font-weight: 900 !important;
        line-height: 1 !important;
        text-indent: 0 !important;
    }

    body.single-product .rp-product-carousel .rp-single-related-arrow-prev::before,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-arrow-prev::before,
body.woocommerce-cart .rp-product-carousel .rp-single-related-arrow-prev::before {
        content: "‹" !important;
    }

    body.single-product .rp-product-carousel .rp-single-related-arrow-next::before,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-arrow-next::before,
body.woocommerce-cart .rp-product-carousel .rp-single-related-arrow-next::before {
        content: "›" !important;
    }
}

/* کارت مرتبط: عرض کنترل‌شده، نه کش‌آمده. */
@media (max-width: 900px) {
    body.single-product .rp-product-carousel .rp-single-related-track > li.product.rp-product-card-component,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-track > li.product.rp-product-card-component,
body.woocommerce-cart .rp-product-carousel .rp-single-related-track > li.product.rp-product-card-component {
        flex-basis: var(--rp-product-carousel-mobile-card-width) !important;
        width: var(--rp-product-carousel-mobile-card-width) !important;
        min-width: var(--rp-product-carousel-mobile-card-width) !important;
        max-width: var(--rp-product-carousel-mobile-card-width) !important;
    }
}

/* ==========================================================================
   14. آیکن SVG دکمه‌های محصولات مرتبط
   --------------------------------------------------------------------------
   دکمه‌های ناوبری محصولات مرتبط از SVG اختصاصی استفاده می‌کنند.
   این بخش روی «نیازت میشه» اثر ندارد؛ آن بخش CSS مستقل خودش را دارد.
   ========================================================================== */
@media (min-width: 901px) {
    body.single-product .rp-product-carousel .rp-single-related-arrow::before,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-arrow::before,
body.woocommerce-cart .rp-product-carousel .rp-single-related-arrow::before {
        content: "" !important;
        width: 18px !important;
        height: 18px !important;
        min-width: 18px !important;
        min-height: 18px !important;
        display: inline-block !important;
        background-image: url("../../icons/related-carousel-arrow.svg") !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
        background-size: contain !important;
        color: transparent !important;
        font-size: 0 !important;
        line-height: 0 !important;
    }

    body.single-product .rp-product-carousel .rp-single-related-arrow-prev::before,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-arrow-prev::before,
body.woocommerce-cart .rp-product-carousel .rp-single-related-arrow-prev::before {
        transform: rotate(180deg) !important;
    }

    body.single-product .rp-product-carousel .rp-single-related-arrow-next::before,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-arrow-next::before,
body.woocommerce-cart .rp-product-carousel .rp-single-related-arrow-next::before {
        transform: rotate(0deg) !important;
    }

    body.single-product .rp-product-carousel .rp-single-related-arrow:hover::before,
body.woocommerce-cart .rp-product-carousel .rp-cart-related-arrow:hover::before,
body.woocommerce-cart .rp-product-carousel .rp-single-related-arrow:hover::before {
        filter: brightness(0) invert(1) !important;
    }
}

/* cart page final override: related carousel starts after the floated cart table and totals. */
body.woocommerce-cart .woocommerce::after {
    content: "" !important;
    display: table !important;
    clear: both !important;
}

body.woocommerce-cart #rp-cart-related-products,
body.woocommerce-cart .rp-product-carousel--cart-related,
body.woocommerce-cart .rp-cart-related-carousel,
body.woocommerce-cart .rp-single-related-carousel.rp-cart-related-carousel {
    clear: both !important;
    float: none !important;
    width: min(100%, 1440px) !important;
    max-width: 1440px !important;
    margin: 56px auto 0 !important;
    padding-right: 20px !important;
    padding-left: 20px !important;
    box-sizing: border-box !important;
}

body.woocommerce-cart #rp-cart-related-products .rp-cart-related-head,
body.woocommerce-cart #rp-cart-related-products .rp-single-related-head,
body.woocommerce-cart .rp-cart-related-head,
body.woocommerce-cart .rp-single-related-head {
    position: relative !important;
    z-index: 1 !important;
    margin-top: 0 !important;
    margin-bottom: 20px !important;
}


/* v0.1.416: موبایل صفحه سبد خرید؛ کروسل محصولات مرتبط باید از سمت راست شروع شود. */
@media (max-width: 900px) {
    body.woocommerce-cart #rp-cart-related-products,
    body.woocommerce-cart #rp-cart-related-products .rp-cart-related-shell,
    body.woocommerce-cart #rp-cart-related-products .rp-cart-related-viewport,
    body.woocommerce-cart #rp-cart-related-products .rp-cart-related-track,
    body.woocommerce-cart .rp-product-carousel--cart-related,
    body.woocommerce-cart .rp-cart-related-carousel,
    body.woocommerce-cart .rp-cart-related-shell,
    body.woocommerce-cart .rp-cart-related-viewport,
    body.woocommerce-cart .rp-cart-related-track {
        direction: rtl !important;
    }

    body.woocommerce-cart #rp-cart-related-products .rp-cart-related-track,
    body.woocommerce-cart .rp-cart-related-carousel .rp-cart-related-track {
        justify-content: flex-start !important;
    }

    body.woocommerce-cart #rp-cart-related-products .rp-cart-related-track > li.product,
    body.woocommerce-cart .rp-cart-related-carousel .rp-cart-related-track > li.product,
    body.woocommerce-cart .rp-cart-related-carousel .rp-cart-related-track > li.product.rp-product-card-component {
        direction: rtl !important;
        scroll-snap-align: start !important;
    }
}

/* v0.1.415: compact discount badge position for related/product carousel cards */
body.single-product .rp-product-card-component .rp-shop-card-discount-badge.rp-card-discount-badge,
body.single-product .rp-product-card-component .rp-card-discount-badge,
body.single-product .rp-product-carousel .rp-shop-card-discount-badge.rp-card-discount-badge,
body.single-product .rp-product-carousel .rp-card-discount-badge,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-discount-badge.rp-card-discount-badge,
body.woocommerce-cart .rp-product-card-component .rp-card-discount-badge,
body.woocommerce-cart .rp-product-carousel .rp-shop-card-discount-badge.rp-card-discount-badge,
body.woocommerce-cart .rp-product-carousel .rp-card-discount-badge {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    right: auto !important;
    width: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    text-align: center !important;
    height: 17px !important;
    min-height: 17px !important;
    max-height: 17px !important;
    padding: 0 7px !important;
    border-radius: 5px !important;
    background: #ff5a4f !important;
    background-color: #ff5a4f !important;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    z-index: 9 !important;
}

/* v0.1.415: ensure discount badge position is visible on single product related carousel cards */
body.single-product #rp-single-related-products .rp-product-card-component--single-related .rp-shop-card-discount-badge.rp-card-discount-badge,
body.single-product #rp-single-related-products .rp-product-card-component--single-related .rp-card-discount-badge,
body.single-product .rp-single-related-carousel .rp-product-card-component--single-related .rp-shop-card-discount-badge.rp-card-discount-badge,
body.single-product .rp-single-related-carousel .rp-product-card-component--single-related .rp-card-discount-badge {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    right: auto !important;
    width: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    text-align: center !important;
    height: 17px !important;
    min-height: 17px !important;
    max-height: 17px !important;
    padding: 0 7px !important;
    border-radius: 5px !important;
    background: #ff5a4f !important;
    background-color: #ff5a4f !important;
    color: #fff !important;
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    pointer-events: none !important;
    z-index: 9 !important;
}



/* ==========================================================================
   Shortcode product widgets reuse the related-products card component
   ========================================================================== */
/**
 * کامپوننت کارت و کروسل محصول
 * منبع واحد برای:
 * - محصولات مرتبط در صفحه محصول
 * - محصولات مرتبط در صفحه سبد خرید
 *
 * نکته نسخه 0.1.394: «نیازت میشه» از این فایل جدا شده و فقط از
 * assets/css/woocommerce/single-need-carousel.css کنترل می‌شود.
 *
 * نکته: صفحه شاپ از این فایل استفاده نمی‌کند و کارت اختصاصی خودش را دارد.
 */

/* ==========================================================================
   01. متغیرهای کامپوننت
   ========================================================================== */
:root {
    --rp-product-carousel-gap: 16px;
    --rp-product-card-border: #eef1f4;
    --rp-product-card-bg: #fff;
    --rp-product-card-text: #111820;
    --rp-product-card-muted: #6b7280;
    --rp-product-card-red: #ff4d4f;
    --rp-product-card-plus: #ff5722;
    --rp-product-card-plus-disabled: #d7cecb;
    --rp-product-card-plus-loading: #ff5722;

    --rp-product-carousel-dot-size: 9px;
    --rp-product-carousel-dot-inactive-width: var(--rp-product-carousel-dot-size);
    --rp-product-carousel-dot-active-width: 18px;
    --rp-product-carousel-dot-container-height: 18px;
    --rp-product-carousel-dot-bg: #e1e7ed;
    --rp-product-carousel-dot-active-bg: #111820;
    --rp-product-carousel-dot-gap: 6px;
    --rp-product-carousel-dot-margin-top: 14px;
}

/* ==========================================================================
   02. بدنه مشترک کروسل
   ========================================================================== */
.rp-widget-products .rp-product-carousel,
.rp-widget-products .rp-product-carousel,
.rp-widget-products .rp-single-related-carousel,
.rp-widget-products .rp-cart-related-carousel {
    width: 100% !important;
    margin: 56px 0 0 !important;
    padding: 0 !important;
    direction: rtl !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}



.rp-widget-products .rp-product-carousel--cart-related,
.rp-widget-products .rp-cart-related-carousel {
    margin-top: 20px !important;
}

/* هدر کروسل */
.rp-widget-products .rp-single-related-head,
.rp-widget-products .rp-cart-related-head,
.rp-widget-products .rp-single-related-head {
    margin: 0 0 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    direction: rtl !important;
}

.rp-widget-products .rp-single-related-head h2,
.rp-widget-products .rp-cart-related-head h2,
.rp-widget-products .rp-single-related-head h2 {
    margin: 0 !important;
    color: var(--rp-product-card-text) !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    line-height: 1.8 !important;
    text-align: right !important;
}

/* پوسته و viewport */
.rp-widget-products .rp-single-related-shell,
.rp-widget-products .rp-cart-related-shell,
.rp-widget-products .rp-single-related-shell {
    position: relative !important;
    width: 100% !important;
    direction: rtl !important;
}

.rp-widget-products .rp-single-related-viewport,
.rp-widget-products .rp-cart-related-viewport,
.rp-widget-products .rp-single-related-viewport {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
    scrollbar-width: none !important;
    touch-action: pan-x pan-y !important;
    overscroll-behavior-x: contain !important;
    box-sizing: border-box !important;
}

.rp-widget-products .rp-single-related-viewport::-webkit-scrollbar,
.rp-widget-products .rp-cart-related-viewport::-webkit-scrollbar,
.rp-widget-products .rp-single-related-viewport::-webkit-scrollbar {
    display: none !important;
}

/* track */
.rp-widget-products .rp-single-related-track,
.rp-widget-products .rp-cart-related-track,
.rp-widget-products .rp-single-related-track {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 0 4px !important;
    list-style: none !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: var(--rp-product-carousel-gap) !important;
    direction: rtl !important;
    scroll-snap-type: x proximity !important;
    transform: none !important;
    transition: none !important;
}

/* آیتم‌های کروسل */
.rp-widget-products .rp-single-related-track > li.product,
.rp-widget-products .rp-cart-related-track > li.product,
.rp-widget-products .rp-single-related-track > li.product {
    flex: 0 0 var(--rp-related-desktop-basis) !important;
    width: var(--rp-related-desktop-basis) !important;
    min-width: var(--rp-related-desktop-basis) !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    scroll-snap-align: start !important;
    direction: rtl !important;
}



/* فلش‌های کروسل */
.rp-widget-products .rp-single-related-arrow,
.rp-widget-products .rp-cart-related-arrow,
.rp-widget-products .rp-single-related-arrow {
    position: absolute !important;
    top: 50% !important;
    z-index: 20 !important;
    width: 36px !important;
    height: 36px !important;
    border: 1px solid #e8ecef !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: var(--rp-product-card-text) !important;
    box-shadow: 0 10px 28px rgba(17, 24, 32, .08) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transform: translateY(-50%) !important;
}

.rp-widget-products .rp-single-related-arrow-prev,
.rp-widget-products .rp-cart-related-arrow-prev {
    right: -18px !important;
}

.rp-widget-products .rp-single-related-arrow-next,
.rp-widget-products .rp-cart-related-arrow-next {
    left: -18px !important;
}

/* pagination محصولات مرتبط؛ در دسکتاپ مخفی، در موبایل مثل «نیازت میشه» */
.rp-widget-products .rp-single-related-dots,
.rp-widget-products .rp-cart-related-dots {
    display: none !important;
}

.rp-widget-products .rp-single-related-dot,
.rp-widget-products .rp-cart-related-dot {
    -webkit-appearance: none !important;
    appearance: none !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-indent: -9999px !important;
    cursor: pointer !important;
}

.rp-widget-products .rp-single-related-dot::before,
.rp-widget-products .rp-single-related-dot::after,
.rp-widget-products .rp-cart-related-dot::before,
.rp-widget-products .rp-cart-related-dot::after {
    content: none !important;
    display: none !important;
}

@media (max-width: 900px) {
    .rp-widget-products .rp-single-related-dots,
    .rp-widget-products .rp-cart-related-dots {
        width: 100% !important;
        min-height: var(--rp-product-carousel-dot-container-height) !important;
        height: var(--rp-product-carousel-dot-container-height) !important;
        margin: var(--rp-product-carousel-dot-margin-top) auto 0 !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: center !important;
        gap: var(--rp-product-carousel-dot-gap) !important;
        direction: rtl !important;
        text-align: center !important;
        line-height: 0 !important;
        font-size: 0 !important;
        overflow: visible !important;
        transform: none !important;
        box-sizing: border-box !important;
    }

    .rp-widget-products .rp-single-related-dot,
    .rp-widget-products .rp-cart-related-dot {
        display: block !important;
        flex: 0 0 var(--rp-product-carousel-dot-inactive-width) !important;
        width: var(--rp-product-carousel-dot-inactive-width) !important;
        min-width: var(--rp-product-carousel-dot-inactive-width) !important;
        max-width: var(--rp-product-carousel-dot-inactive-width) !important;
        height: var(--rp-product-carousel-dot-size) !important;
        min-height: var(--rp-product-carousel-dot-size) !important;
        max-height: var(--rp-product-carousel-dot-size) !important;
        border-radius: 999px !important;
        background: var(--rp-product-carousel-dot-bg) !important;
        opacity: 1 !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        transform: none !important;
        transition: flex-basis .18s ease, width .18s ease, min-width .18s ease, max-width .18s ease, background-color .18s ease, opacity .18s ease !important;
    }

    .rp-widget-products .rp-single-related-dot.is-active,
    .rp-widget-products .rp-single-related-dot[aria-current="true"],
    .rp-widget-products .rp-cart-related-dot.is-active,
    .rp-widget-products .rp-cart-related-dot[aria-current="true"] {
        flex-basis: var(--rp-product-carousel-dot-active-width) !important;
        width: var(--rp-product-carousel-dot-active-width) !important;
        min-width: var(--rp-product-carousel-dot-active-width) !important;
        max-width: var(--rp-product-carousel-dot-active-width) !important;
        background: var(--rp-product-carousel-dot-active-bg) !important;
    }
}

/* ==========================================================================
   03. کارت محصول مشترک
   ========================================================================== */
.rp-widget-products .rp-product-card-component,
.rp-widget-products .rp-product-card-component {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    list-style: none !important;
    direction: rtl !important;
    font-family: var(--rp-font, inherit) !important;
    box-sizing: border-box !important;
}

.rp-widget-products .rp-product-card-component :where(a, button, span, strong, small, bdi, del, ins, h1, h2, h3, h4, p) {
    font-family: inherit !important;
}

.rp-widget-products .rp-product-card-component .rp-shop-card-mobile,
.rp-widget-products .rp-product-card-component .rp-shop-card-mobile {
    display: none !important;
}

.rp-widget-products .rp-product-card-component .rp-shop-card-desktop,
.rp-widget-products .rp-product-card-component .rp-shop-card-desktop {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

.rp-widget-products .rp-product-card-component .rp-shop-card-inner,
.rp-widget-products .rp-product-card-component .rp-shop-card-inner {
    position: relative !important;
    width: 100% !important;
    min-height: 280px !important;
    height: auto !important;
    padding: 20px !important;
    border: 1px solid var(--rp-product-card-border) !important;
    border-radius: 14px !important;
    background: var(--rp-product-card-bg) !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    direction: rtl !important;
}

/* مواردی که در کارت کروسل نمایش نمی‌دهیم */
.rp-widget-products .rp-product-card-component .onsale,
.rp-widget-products .rp-product-card-component .onsale,
.rp-widget-products .rp-product-card-component .rp-card-compare,
.rp-widget-products .rp-product-card-component .rp-card-compare,
.rp-widget-products .rp-product-card-component .rp-product-compare-btn,
.rp-widget-products .rp-product-card-component .rp-product-compare-btn {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* ==========================================================================
   04. تصویر، عنوان و لینک
   ========================================================================== */
.rp-widget-products .rp-product-card-component .rp-shop-card-link,
.rp-widget-products .rp-product-card-component .rp-card-link,
.rp-widget-products .rp-product-card-component .woocommerce-LoopProduct-link,
.rp-widget-products .rp-product-card-component .rp-shop-card-link,
.rp-widget-products .rp-product-card-component .rp-card-link,
.rp-widget-products .rp-product-card-component .woocommerce-LoopProduct-link {
    position: static !important;
    z-index: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    color: inherit !important;
    text-decoration: none !important;
    pointer-events: auto !important;
}

.rp-widget-products .rp-product-card-component .rp-card-media,
.rp-widget-products .rp-product-card-component .rp-mobile-card-media,
.rp-widget-products .rp-product-card-component .rp-card-media,
.rp-widget-products .rp-product-card-component .rp-mobile-card-media {
    width: 138px !important;
    min-width: 138px !important;
    height: 138px !important;
    min-height: 138px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: 0 !important;
    overflow: hidden !important;
}

.rp-widget-products .rp-product-card-component .rp-card-media img,
.rp-widget-products .rp-product-card-component .rp-mobile-card-media img,
.rp-widget-products .rp-product-card-component .rp-card-media img,
.rp-widget-products .rp-product-card-component .rp-mobile-card-media img {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 100% !important;
    object-fit: contain !important;
    margin: 0 auto !important;
}

.rp-widget-products .rp-product-card-component .rp-card-title,
.rp-widget-products .rp-product-card-component .woocommerce-loop-product__title,
.rp-widget-products .rp-product-card-component .rp-card-title,
.rp-widget-products .rp-product-card-component .woocommerce-loop-product__title {
    min-height: 42px !important;
    max-height: 42px !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    color: var(--rp-product-card-text) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1.75 !important;
    text-align: center !important;
    overflow: hidden !important;
}

/* ==========================================================================
   05. رنگ‌ها و دکمه افزودن
   ========================================================================== */
.rp-widget-products .rp-product-card-component .rp-shop-card-actions,
.rp-widget-products .rp-product-card-component .rp-card-actions,
.rp-widget-products .rp-product-card-component .rp-mobile-card-actions,
.rp-widget-products .rp-product-card-component .rp-shop-card-actions,
.rp-widget-products .rp-product-card-component .rp-card-actions,
.rp-widget-products .rp-product-card-component .rp-mobile-card-actions {
    position: relative !important;
    width: 100% !important;
    height: 30px !important;
    min-height: 30px !important;
    margin: auto 0 10px !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    direction: ltr !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    z-index: 8 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
}

.rp-widget-products .rp-product-card-component .rp-card-actions--simple,
.rp-widget-products .rp-product-card-component .rp-shop-card-actions--simple,
.rp-widget-products .rp-product-card-component .rp-card-actions--simple,
.rp-widget-products .rp-product-card-component .rp-shop-card-actions--simple {
    justify-content: flex-end !important;
}

.rp-widget-products .rp-product-card-component .rp-card-swatches,
.rp-widget-products .rp-product-card-component .rp-shop-card-swatches,
.rp-widget-products .rp-product-card-component .rp-card-swatches,
.rp-widget-products .rp-product-card-component .rp-shop-card-swatches {
    order: 1 !important;
    display: inline-flex !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    min-height: 30px !important;
    flex-wrap: nowrap !important;
    gap: 7px !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: flex-start !important;
    overflow: hidden !important;
}

.rp-widget-products .rp-product-card-component .rp-card-swatch,
.rp-widget-products .rp-product-card-component .rp-shop-swatch,
.rp-widget-products .rp-product-card-component .rp-card-swatch,
.rp-widget-products .rp-product-card-component .rp-shop-swatch {
    position: relative !important;
    width: 21px !important;
    min-width: 21px !important;
    height: 21px !important;
    min-height: 21px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    border: 2px solid var(--swatch-color, rgba(17, 24, 32, .22)) !important;
    outline: 0 !important;
    background-color: var(--swatch-color, #d6dadd) !important;
    background-image: var(--swatch-image, none) !important;
    background-size: cover !important;
    background-position: center !important;
    box-shadow: 0 0 0 2px #fff, 0 2px 7px rgba(17, 24, 32, .10) !important;
    overflow: hidden !important;
    cursor: pointer !important;
    z-index: 10 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
}

.rp-widget-products .rp-product-card-component .rp-card-swatch.is-active,
.rp-widget-products .rp-product-card-component .rp-shop-swatch.is-active,
.rp-widget-products .rp-product-card-component .rp-card-swatch[aria-pressed="true"],
.rp-widget-products .rp-product-card-component .rp-shop-swatch[aria-pressed="true"],
.rp-widget-products .rp-product-card-component .rp-card-swatch.is-active,
.rp-widget-products .rp-product-card-component .rp-shop-swatch.is-active,
.rp-widget-products .rp-product-card-component .rp-card-swatch[aria-pressed="true"],
.rp-widget-products .rp-product-card-component .rp-shop-swatch[aria-pressed="true"] {
    outline: 0 !important;
    border-color: var(--swatch-color, #111820) !important;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(17, 24, 32, .16) !important;
}

.rp-widget-products .rp-product-card-component .rp-card-swatch.is-active::after,
.rp-widget-products .rp-product-card-component .rp-shop-swatch.is-active::after,
.rp-widget-products .rp-product-card-component .rp-card-swatch[aria-pressed="true"]::after,
.rp-widget-products .rp-product-card-component .rp-shop-swatch[aria-pressed="true"]::after,
.rp-widget-products .rp-product-card-component .rp-card-swatch.is-active::after,
.rp-widget-products .rp-product-card-component .rp-shop-swatch.is-active::after,
.rp-widget-products .rp-product-card-component .rp-card-swatch[aria-pressed="true"]::after,
.rp-widget-products .rp-product-card-component .rp-shop-swatch[aria-pressed="true"]::after {
    content: "✓" !important;
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .65) !important;
    border-radius: 50% !important;
}

/* دکمه مثبت */
.rp-widget-products .rp-product-card-component .rp-card-add,
.rp-widget-products .rp-product-card-component .rp-product-quick-add,
.rp-widget-products .rp-product-card-component .rp-card-add,
.rp-widget-products .rp-product-card-component .rp-product-quick-add {
    order: 2 !important;
    position: relative !important;
    flex: 0 0 28px !important;
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: var(--rp-product-card-plus) !important;
    background-color: var(--rp-product-card-plus) !important;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 10 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    box-shadow: none !important;
}

.rp-widget-products .rp-product-card-component .rp-card-add.is-needs-choice:not(.is-ready),
.rp-widget-products .rp-product-card-component .rp-product-quick-add.is-needs-choice:not(.is-ready),
.rp-widget-products .rp-product-card-component .rp-card-add.is-needs-choice:not(.is-ready),
.rp-widget-products .rp-product-card-component .rp-product-quick-add.is-needs-choice:not(.is-ready) {
    background: var(--rp-product-card-plus-disabled) !important;
    background-color: var(--rp-product-card-plus-disabled) !important;
}

.rp-widget-products .rp-product-card-component .rp-card-add span,
.rp-widget-products .rp-product-card-component .rp-product-quick-add span,
.rp-widget-products .rp-product-card-component .rp-card-add span,
.rp-widget-products .rp-product-card-component .rp-product-quick-add span {
    color: #fff !important;
    font-size: 23px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    transform: translateY(2px) !important;
}

/* loading دکمه مثبت */
.rp-widget-products .rp-product-card-component [data-rp-quick-add].is-loading,
.rp-widget-products .rp-product-card-component [data-rp-quick-add][aria-busy="true"],
.rp-widget-products .rp-product-card-component [data-rp-quick-add].is-loading,
.rp-widget-products .rp-product-card-component [data-rp-quick-add][aria-busy="true"] {
    background: var(--rp-product-card-plus-loading) !important;
    background-color: var(--rp-product-card-plus-loading) !important;
    color: transparent !important;
}

.rp-widget-products .rp-product-card-component [data-rp-quick-add].is-loading > span,
.rp-widget-products .rp-product-card-component [data-rp-quick-add][aria-busy="true"] > span,
.rp-widget-products .rp-product-card-component [data-rp-quick-add].is-loading > span,
.rp-widget-products .rp-product-card-component [data-rp-quick-add][aria-busy="true"] > span {
    opacity: 0 !important;
}

.rp-widget-products .rp-product-card-component [data-rp-quick-add].is-loading::after,
.rp-widget-products .rp-product-card-component [data-rp-quick-add][aria-busy="true"]::after,
.rp-widget-products .rp-product-card-component [data-rp-quick-add].is-loading::after,
.rp-widget-products .rp-product-card-component [data-rp-quick-add][aria-busy="true"]::after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 12px !important;
    height: 12px !important;
    margin: -6px 0 0 -6px !important;
    border-radius: 50% !important;
    border: 2px solid rgba(255, 255, 255, .45) !important;
    border-top-color: #fff !important;
    background: transparent !important;
    animation: rpPlusButtonSpin .72s linear infinite !important;
}

/* ==========================================================================
   06. قیمت
   ========================================================================== */
.rp-widget-products .rp-product-card-component .rp-shop-card-footer,
.rp-widget-products .rp-product-card-component .rp-card-footer,
.rp-widget-products .rp-product-card-component .rp-shop-card-footer,
.rp-widget-products .rp-product-card-component .rp-card-footer {
    width: 100% !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: flex-start !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 4 !important;
}

.rp-widget-products .rp-product-card-component .rp-card-price-wrap,
.rp-widget-products .rp-product-card-component .rp-shop-card-price-wrap,
.rp-widget-products .rp-product-card-component .rp-card-price-wrap,
.rp-widget-products .rp-product-card-component .rp-shop-card-price-wrap {
    width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
    justify-content: flex-end !important;
    text-align: left !important;
}

.rp-widget-products .rp-product-card-component .rp-card-price,
.rp-widget-products .rp-product-card-component .rp-shop-card-price,
.rp-widget-products .rp-product-card-component .rp-card-price,
.rp-widget-products .rp-product-card-component .rp-shop-card-price {
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    direction: rtl !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    text-align: left !important;
    flex-wrap: nowrap !important;
}

.rp-widget-products .rp-product-card-component .rp-card-price-values,
.rp-widget-products .rp-product-card-component .rp-shop-card-price-values,
.rp-widget-products .rp-product-card-component .rp-card-price-values,
.rp-widget-products .rp-product-card-component .rp-shop-card-price-values {
    order: 1 !important;
    margin-right: auto !important;
    margin-left: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    direction: ltr !important;
    align-items: baseline !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    text-align: left !important;
    flex-wrap: nowrap !important;
}

.rp-widget-products .rp-product-card-component .rp-card-price-final,
.rp-widget-products .rp-product-card-component .rp-shop-card-price-final,
.rp-widget-products .rp-product-card-component .rp-card-price-final .amount,
.rp-widget-products .rp-product-card-component .rp-card-price-final bdi,
.rp-widget-products .rp-product-card-component .rp-shop-card-price-final .amount,
.rp-widget-products .rp-product-card-component .rp-shop-card-price-final bdi,
.rp-widget-products .rp-product-card-component .rp-card-price-final *,
.rp-widget-products .rp-product-card-component .rp-shop-card-price-final *,
.rp-widget-products .rp-product-card-component .rp-card-price-final,
.rp-widget-products .rp-product-card-component .rp-shop-card-price-final,
.rp-widget-products .rp-product-card-component .rp-card-price-final .amount,
.rp-widget-products .rp-product-card-component .rp-card-price-final bdi,
.rp-widget-products .rp-product-card-component .rp-shop-card-price-final .amount,
.rp-widget-products .rp-product-card-component .rp-shop-card-price-final bdi,
.rp-widget-products .rp-product-card-component .rp-card-price-final *,
.rp-widget-products .rp-product-card-component .rp-shop-card-price-final * {
    color: var(--rp-product-card-text) !important;
    font-size: 21px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
}

.rp-widget-products .rp-product-card-component .rp-card-price-before,
.rp-widget-products .rp-product-card-component .rp-shop-card-price-before,
.rp-widget-products .rp-product-card-component .rp-shop-card-price-before-discount,
.rp-widget-products .rp-product-card-component .rp-card-price-before *,
.rp-widget-products .rp-product-card-component .rp-shop-card-price-before *,
.rp-widget-products .rp-product-card-component .rp-shop-card-price-before-discount *,
.rp-widget-products .rp-product-card-component .rp-card-price-before,
.rp-widget-products .rp-product-card-component .rp-shop-card-price-before,
.rp-widget-products .rp-product-card-component .rp-shop-card-price-before-discount,
.rp-widget-products .rp-product-card-component .rp-card-price-before *,
.rp-widget-products .rp-product-card-component .rp-shop-card-price-before *,
.rp-widget-products .rp-product-card-component .rp-shop-card-price-before-discount * {
    color: var(--rp-product-card-red) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    text-decoration: line-through !important;
    text-decoration-color: var(--rp-product-card-red) !important;
    text-decoration-thickness: 1px !important;
}

.rp-widget-products .rp-product-card-component .rp-card-currency,
.rp-widget-products .rp-product-card-component .rp-shop-card-currency,
.rp-widget-products .rp-product-card-component .woocommerce-Price-currencySymbol,
.rp-widget-products .rp-product-card-component .rp-card-currency,
.rp-widget-products .rp-product-card-component .rp-shop-card-currency,
.rp-widget-products .rp-product-card-component .woocommerce-Price-currencySymbol {
    color: var(--rp-product-card-text) !important;
    font-size: 10px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
}

/* ==========================================================================
   07. موبایل
   ========================================================================== */
@media (max-width: 900px) {
    .rp-widget-products .rp-single-related-track > li.product,
.rp-widget-products .rp-cart-related-track > li.product,
.rp-widget-products .rp-single-related-track > li.product {
        flex: 0 0 var(--rp-related-mobile-basis) !important;
        width: var(--rp-related-mobile-basis) !important;
        min-width: var(--rp-related-mobile-basis) !important;
        max-width: none !important;
    }

    

    

    .rp-widget-products .rp-single-related-track,
.rp-widget-products .rp-cart-related-track,
.rp-widget-products .rp-single-related-track {
        direction: ltr !important;
        padding: 0 2px 10px !important;
    }

    .rp-widget-products .rp-product-card-component .rp-shop-card-inner,
.rp-widget-products .rp-product-card-component .rp-shop-card-inner {
        min-height: 300px !important;
        max-height: 325px !important;
        padding: 20px !important;
    }

    .rp-widget-products .rp-product-card-component .rp-shop-card-actions,
.rp-widget-products .rp-product-card-component .rp-card-actions,
.rp-widget-products .rp-product-card-component .rp-mobile-card-actions,
.rp-widget-products .rp-product-card-component .rp-shop-card-actions,
.rp-widget-products .rp-product-card-component .rp-card-actions,
.rp-widget-products .rp-product-card-component .rp-mobile-card-actions {
        position: absolute !important;
        right: 15px !important;
        left: 0 !important;
        bottom: 55px !important;
        width: 90% !important;
        height: 30px !important;
        min-height: 30px !important;
        margin: 0 !important;
    }

    .rp-widget-products .rp-product-card-component .rp-shop-card-footer,
.rp-widget-products .rp-product-card-component .rp-card-footer,
.rp-widget-products .rp-product-card-component .rp-shop-card-footer,
.rp-widget-products .rp-product-card-component .rp-card-footer {
        position: absolute !important;
        right: 0 !important;
        left: 0 !important;
        bottom: 16px !important;
        height: 34px !important;
        min-height: 34px !important;
        padding: 0 20px !important;
    }

    .rp-widget-products .rp-product-card-component .rp-card-add,
.rp-widget-products .rp-product-card-component .rp-product-quick-add,
.rp-widget-products .rp-product-card-component .rp-card-add,
.rp-widget-products .rp-product-card-component .rp-product-quick-add {
        position: absolute !important;
        left: 178px !important;
        right: auto !important;
        bottom: 0 !important;
        flex: 0 0 25px !important;
        width: 25px !important;
        min-width: 25px !important;
        height: 25px !important;
        min-height: 25px !important;
    }

    .rp-widget-products .rp-single-related-arrow,
.rp-widget-products .rp-cart-related-arrow,
.rp-widget-products .rp-single-related-arrow {
        display: none !important;
    }
}

/* ==========================================================================
   08. تبلت و دسکتاپ
   ========================================================================== */
@media (min-width: 901px) and (max-width: 1199px) {
    .rp-widget-products .rp-single-related-track > li.product,
.rp-widget-products .rp-cart-related-track > li.product,
.rp-widget-products .rp-single-related-track > li.product {
        flex: 0 0 var(--rp-related-tablet-basis) !important;
        width: var(--rp-related-tablet-basis) !important;
        min-width: var(--rp-related-tablet-basis) !important;
    }
}

/* دسکتاپ: «نیازت میشه» داخل ستون کناری باید عرض کامل ستون را بگیرد. */


/* ==========================================================================
   10. ناوبری و اسکرول روان کروسل محصول
   --------------------------------------------------------------------------
   فلش‌های کروسل حذف می‌شوند و pagination خطی/نقطه‌ای مرجع کنترل است.
   حرکت کروسل بر پایه scroll native است تا flicker ناشی از transform حذف شود.
   ========================================================================== */

/* فلش‌ها در کامپوننت محصول استفاده نمی‌شوند. */
.rp-widget-products .rp-product-carousel .rp-single-related-arrow,
.rp-widget-products .rp-product-carousel .rp-cart-related-arrow,
.rp-widget-products .rp-product-carousel .rp-single-related-arrow,
.rp-widget-products .rp-single-related-arrow,
.rp-widget-products .rp-cart-related-arrow {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* track باید با scroll حرکت کند، نه transform. */
.rp-widget-products .rp-product-carousel .rp-single-related-track,
.rp-widget-products .rp-product-carousel .rp-cart-related-track,
.rp-widget-products .rp-product-carousel .rp-single-related-track {
    transform: none !important;
    -webkit-transform: none !important;
    transition: none !important;
    will-change: scroll-position !important;
    backface-visibility: hidden !important;
}

/* viewport روان و بدون scrollbar نمایشی */
.rp-widget-products .rp-product-carousel .rp-single-related-viewport,
.rp-widget-products .rp-product-carousel .rp-cart-related-viewport,
.rp-widget-products .rp-product-carousel .rp-single-related-viewport {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-behavior: smooth !important;
    scroll-snap-type: x proximity !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-x: contain !important;
    contain: paint !important;
}

.rp-widget-products .rp-product-carousel .rp-single-related-viewport::-webkit-scrollbar,
.rp-widget-products .rp-product-carousel .rp-cart-related-viewport::-webkit-scrollbar,
.rp-widget-products .rp-product-carousel .rp-single-related-viewport::-webkit-scrollbar {
    display: none !important;
}

/* اسلایدها در scroll native ثابت و بدون shrink باشند. */
.rp-widget-products .rp-product-carousel .rp-single-related-track > li.product,
.rp-widget-products .rp-product-carousel .rp-cart-related-track > li.product,
.rp-widget-products .rp-product-carousel .rp-single-related-track > li.product {
    flex-shrink: 0 !important;
    scroll-snap-align: start !important;
    scroll-snap-stop: normal !important;
}

/* pagination نیازت میشه وسط‌چین */






/* دسکتاپ: viewport نیازت میشه هم برنامه‌ای scroll شود؛ فلش لازم نیست. */


/* ==========================================================================
   11. موبایل یکسان + فلش دسکتاپ روی hover
   --------------------------------------------------------------------------
   عرض کارت‌های موبایل برای نیازت میشه و محصولات مرتبط یکسان شد.
   در دسکتاپ فلش‌های کروسل فقط هنگام hover/focus نمایش داده می‌شوند.
   ========================================================================== */
:root {
    --rp-product-carousel-mobile-card-width: clamp(240px, 58vw, 340px);
}

/* موبایل: همه کروسل‌های محصول عرض یکسان بگیرند. */
@media (max-width: 900px) {
    .rp-widget-products .rp-product-carousel,
.rp-widget-products .rp-product-carousel,
.rp-widget-products .rp-single-related-carousel,
.rp-widget-products .rp-cart-related-carousel {
        width: 100% !important;
        max-width: 100% !important;
    }

    .rp-widget-products .rp-product-carousel .rp-single-related-viewport,
.rp-widget-products .rp-product-carousel .rp-cart-related-viewport,
.rp-widget-products .rp-product-carousel .rp-single-related-viewport {
        width: 100% !important;
        max-width: 100% !important;
        padding-inline: 0 !important;
    }

    .rp-widget-products .rp-product-carousel .rp-single-related-track,
.rp-widget-products .rp-product-carousel .rp-cart-related-track,
.rp-widget-products .rp-product-carousel .rp-single-related-track {
        width: max-content !important;
        min-width: 100% !important;
        max-width: none !important;
        gap: 16px !important;
        padding: 0 2px 10px !important;
        direction: ltr !important;
    }

    .rp-widget-products .rp-product-carousel .rp-single-related-track > li.product,
.rp-widget-products .rp-product-carousel .rp-cart-related-track > li.product,
.rp-widget-products .rp-product-carousel .rp-single-related-track > li.product {
        flex: 0 0 var(--rp-product-carousel-mobile-card-width) !important;
        width: var(--rp-product-carousel-mobile-card-width) !important;
        min-width: var(--rp-product-carousel-mobile-card-width) !important;
        max-width: var(--rp-product-carousel-mobile-card-width) !important;
        box-sizing: border-box !important;
        direction: rtl !important;
    }

    .rp-widget-products .rp-product-carousel .rp-single-related-track > li.product.rp-product-card-component,
.rp-widget-products .rp-product-carousel .rp-cart-related-track > li.product.rp-product-card-component,
.rp-widget-products .rp-product-carousel .rp-single-related-track > li.product.rp-product-card-component {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }

    

    

    
}

/* دسکتاپ: فلش‌ها فقط موقع hover/focus دیده شوند. */
@media (min-width: 901px) {
    .rp-widget-products .rp-product-carousel,
.rp-widget-products .rp-product-carousel {
        position: relative !important;
    }

    .rp-widget-products .rp-product-carousel .rp-single-related-arrow,
.rp-widget-products .rp-product-carousel .rp-cart-related-arrow,
.rp-widget-products .rp-product-carousel .rp-single-related-arrow,
.rp-widget-products .rp-single-related-arrow,
.rp-widget-products .rp-cart-related-arrow {
        position: absolute !important;
        top: 50% !important;
        z-index: 30 !important;
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
        border: 1px solid #e8ecef !important;
        border-radius: 50% !important;
        background: #fff !important;
        color: #111820 !important;
        box-shadow: 0 10px 28px rgba(17, 24, 32, .10) !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: translateY(-50%) scale(.96) !important;
        transition: opacity .18s ease, visibility .18s ease, transform .18s ease, background-color .18s ease, color .18s ease !important;
    }

    .rp-widget-products .rp-product-carousel:hover .rp-single-related-arrow,
.rp-widget-products .rp-product-carousel:focus-within .rp-single-related-arrow,
.rp-widget-products .rp-product-carousel:hover .rp-cart-related-arrow,
.rp-widget-products .rp-product-carousel:focus-within .rp-cart-related-arrow,
.rp-widget-products .rp-product-carousel:hover .rp-single-related-arrow,
.rp-widget-products .rp-product-carousel:focus-within .rp-single-related-arrow {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: translateY(-50%) scale(1) !important;
    }

    .rp-widget-products .rp-product-carousel .rp-single-related-arrow:hover,
.rp-widget-products .rp-product-carousel .rp-cart-related-arrow:hover,
.rp-widget-products .rp-product-carousel .rp-single-related-arrow:hover {
        background: #111820 !important;
        color: #fff !important;
    }

    .rp-widget-products .rp-product-carousel .rp-single-related-arrow-prev,
.rp-widget-products .rp-product-carousel .rp-cart-related-arrow-prev,
.rp-widget-products .rp-product-carousel .rp-single-related-arrow-prev {
        right: -18px !important;
        left: auto !important;
    }

    .rp-widget-products .rp-product-carousel .rp-single-related-arrow-next,
.rp-widget-products .rp-product-carousel .rp-cart-related-arrow-next,
.rp-widget-products .rp-product-carousel .rp-single-related-arrow-next {
        left: -18px !important;
        right: auto !important;
    }
}

/* ==========================================================================
   12. اصلاح عرض محصولات مرتبط موبایل
   --------------------------------------------------------------------------
   کارت «محصولات مرتبط» خودش li.product است؛ بنابراین نباید مثل کارت داخل
   اسلاید «نیازت میشه» width:100% بگیرد. اینجا عرض کارت مرتبط دوباره به
   مقدار کنترل‌شده کامپوننت برمی‌گردد.
   ========================================================================== */
@media (max-width: 900px) {
    .rp-widget-products .rp-product-carousel .rp-single-related-track,
.rp-widget-products .rp-product-carousel .rp-cart-related-track,
.rp-widget-products .rp-product-carousel .rp-single-related-track {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        gap: 16px !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    .rp-widget-products .rp-product-carousel .rp-single-related-track > li.product,
.rp-widget-products .rp-product-carousel .rp-single-related-track > li.product.rp-product-card-component,
.rp-widget-products .rp-product-carousel .rp-cart-related-track > li.product,
.rp-widget-products .rp-product-carousel .rp-cart-related-track > li.product.rp-product-card-component,
.rp-widget-products .rp-product-carousel .rp-single-related-track > li.product,
.rp-widget-products .rp-product-carousel .rp-single-related-track > li.product.rp-product-card-component {
        flex: 0 0 var(--rp-product-carousel-mobile-card-width) !important;
        width: var(--rp-product-carousel-mobile-card-width) !important;
        min-width: var(--rp-product-carousel-mobile-card-width) !important;
        max-width: var(--rp-product-carousel-mobile-card-width) !important;
        box-sizing: border-box !important;
    }

    .rp-widget-products .rp-product-carousel .rp-single-related-track > li.product.rp-product-card-component .rp-shop-card-inner,
.rp-widget-products .rp-product-carousel .rp-cart-related-track > li.product.rp-product-card-component .rp-shop-card-inner,
.rp-widget-products .rp-product-carousel .rp-single-related-track > li.product.rp-product-card-component .rp-shop-card-inner {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .rp-widget-products .rp-product-carousel .rp-single-related-viewport,
.rp-widget-products .rp-product-carousel .rp-cart-related-viewport,
.rp-widget-products .rp-product-carousel .rp-single-related-viewport {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        box-sizing: border-box !important;
    }
}

/* ==========================================================================
   13. اصلاح فلش‌ها و رفتار کارت مرتبط
   --------------------------------------------------------------------------
   فلش‌های دسکتاپ باید آیکن داشته باشند؛ کارت محصولات مرتبط هم نباید
   از استایل اختصاصی «نیازت میشه» اثر بگیرد.
   ========================================================================== */
@media (min-width: 901px) {
    .rp-widget-products .rp-product-carousel .rp-single-related-arrow,
.rp-widget-products .rp-product-carousel .rp-cart-related-arrow,
.rp-widget-products .rp-product-carousel .rp-single-related-arrow {
        font-size: 0 !important;
        line-height: 1 !important;
        text-indent: 0 !important;
    }

    .rp-widget-products .rp-product-carousel .rp-single-related-arrow::before,
.rp-widget-products .rp-product-carousel .rp-cart-related-arrow::before,
.rp-widget-products .rp-product-carousel .rp-single-related-arrow::before {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: currentColor !important;
        font-size: 24px !important;
        font-weight: 900 !important;
        line-height: 1 !important;
        text-indent: 0 !important;
    }

    .rp-widget-products .rp-product-carousel .rp-single-related-arrow-prev::before,
.rp-widget-products .rp-product-carousel .rp-cart-related-arrow-prev::before,
.rp-widget-products .rp-product-carousel .rp-single-related-arrow-prev::before {
        content: "‹" !important;
    }

    .rp-widget-products .rp-product-carousel .rp-single-related-arrow-next::before,
.rp-widget-products .rp-product-carousel .rp-cart-related-arrow-next::before,
.rp-widget-products .rp-product-carousel .rp-single-related-arrow-next::before {
        content: "›" !important;
    }
}

/* کارت مرتبط: عرض کنترل‌شده، نه کش‌آمده. */
@media (max-width: 900px) {
    .rp-widget-products .rp-product-carousel .rp-single-related-track > li.product.rp-product-card-component,
.rp-widget-products .rp-product-carousel .rp-cart-related-track > li.product.rp-product-card-component,
.rp-widget-products .rp-product-carousel .rp-single-related-track > li.product.rp-product-card-component {
        flex-basis: var(--rp-product-carousel-mobile-card-width) !important;
        width: var(--rp-product-carousel-mobile-card-width) !important;
        min-width: var(--rp-product-carousel-mobile-card-width) !important;
        max-width: var(--rp-product-carousel-mobile-card-width) !important;
    }
}

/* ==========================================================================
   14. آیکن SVG دکمه‌های محصولات مرتبط
   --------------------------------------------------------------------------
   دکمه‌های ناوبری محصولات مرتبط از SVG اختصاصی استفاده می‌کنند.
   این بخش روی «نیازت میشه» اثر ندارد؛ آن بخش CSS مستقل خودش را دارد.
   ========================================================================== */
@media (min-width: 901px) {
    .rp-widget-products .rp-product-carousel .rp-single-related-arrow::before,
.rp-widget-products .rp-product-carousel .rp-cart-related-arrow::before,
.rp-widget-products .rp-product-carousel .rp-single-related-arrow::before {
        content: "" !important;
        width: 18px !important;
        height: 18px !important;
        min-width: 18px !important;
        min-height: 18px !important;
        display: inline-block !important;
        background-image: url("../../icons/related-carousel-arrow.svg") !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
        background-size: contain !important;
        color: transparent !important;
        font-size: 0 !important;
        line-height: 0 !important;
    }

    .rp-widget-products .rp-product-carousel .rp-single-related-arrow-prev::before,
.rp-widget-products .rp-product-carousel .rp-cart-related-arrow-prev::before,
.rp-widget-products .rp-product-carousel .rp-single-related-arrow-prev::before {
        transform: rotate(180deg) !important;
    }

    .rp-widget-products .rp-product-carousel .rp-single-related-arrow-next::before,
.rp-widget-products .rp-product-carousel .rp-cart-related-arrow-next::before,
.rp-widget-products .rp-product-carousel .rp-single-related-arrow-next::before {
        transform: rotate(0deg) !important;
    }

    .rp-widget-products .rp-product-carousel .rp-single-related-arrow:hover::before,
.rp-widget-products .rp-product-carousel .rp-cart-related-arrow:hover::before,
.rp-widget-products .rp-product-carousel .rp-single-related-arrow:hover::before {
        filter: brightness(0) invert(1) !important;
    }
}

/* cart page final override: related carousel starts after the floated cart table and totals. */
.rp-widget-products .woocommerce::after {
    content: "" !important;
    display: table !important;
    clear: both !important;
}

.rp-widget-products #rp-cart-related-products,
.rp-widget-products .rp-product-carousel--cart-related,
.rp-widget-products .rp-cart-related-carousel,
.rp-widget-products .rp-single-related-carousel.rp-cart-related-carousel {
    clear: both !important;
    float: none !important;
    width: min(100%, 1440px) !important;
    max-width: 1440px !important;
    margin: 56px auto 0 !important;
    padding-right: 20px !important;
    padding-left: 20px !important;
    box-sizing: border-box !important;
}

.rp-widget-products #rp-cart-related-products .rp-cart-related-head,
.rp-widget-products #rp-cart-related-products .rp-single-related-head,
.rp-widget-products .rp-cart-related-head,
.rp-widget-products .rp-single-related-head {
    position: relative !important;
    z-index: 1 !important;
    margin-top: 0 !important;
    margin-bottom: 20px !important;
}


/* v0.1.416: موبایل صفحه سبد خرید؛ کروسل محصولات مرتبط باید از سمت راست شروع شود. */
@media (max-width: 900px) {
    .rp-widget-products #rp-cart-related-products,
    .rp-widget-products #rp-cart-related-products .rp-cart-related-shell,
    .rp-widget-products #rp-cart-related-products .rp-cart-related-viewport,
    .rp-widget-products #rp-cart-related-products .rp-cart-related-track,
    .rp-widget-products .rp-product-carousel--cart-related,
    .rp-widget-products .rp-cart-related-carousel,
    .rp-widget-products .rp-cart-related-shell,
    .rp-widget-products .rp-cart-related-viewport,
    .rp-widget-products .rp-cart-related-track {
        direction: rtl !important;
    }

    .rp-widget-products #rp-cart-related-products .rp-cart-related-track,
    .rp-widget-products .rp-cart-related-carousel .rp-cart-related-track {
        justify-content: flex-start !important;
    }

    .rp-widget-products #rp-cart-related-products .rp-cart-related-track > li.product,
    .rp-widget-products .rp-cart-related-carousel .rp-cart-related-track > li.product,
    .rp-widget-products .rp-cart-related-carousel .rp-cart-related-track > li.product.rp-product-card-component {
        direction: rtl !important;
        scroll-snap-align: start !important;
    }
}

/* v0.1.415: compact discount badge position for related/product carousel cards */
.rp-widget-products .rp-product-card-component .rp-shop-card-discount-badge.rp-card-discount-badge,
.rp-widget-products .rp-product-card-component .rp-card-discount-badge,
.rp-widget-products .rp-product-carousel .rp-shop-card-discount-badge.rp-card-discount-badge,
.rp-widget-products .rp-product-carousel .rp-card-discount-badge,
.rp-widget-products .rp-product-card-component .rp-shop-card-discount-badge.rp-card-discount-badge,
.rp-widget-products .rp-product-card-component .rp-card-discount-badge,
.rp-widget-products .rp-product-carousel .rp-shop-card-discount-badge.rp-card-discount-badge,
.rp-widget-products .rp-product-carousel .rp-card-discount-badge {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    right: auto !important;
    width: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    text-align: center !important;
    height: 17px !important;
    min-height: 17px !important;
    max-height: 17px !important;
    padding: 0 7px !important;
    border-radius: 5px !important;
    background: #ff5a4f !important;
    background-color: #ff5a4f !important;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    z-index: 9 !important;
}

/* v0.1.415: ensure discount badge position is visible on single product related carousel cards */
.rp-widget-products #rp-single-related-products .rp-product-card-component--single-related .rp-shop-card-discount-badge.rp-card-discount-badge,
.rp-widget-products #rp-single-related-products .rp-product-card-component--single-related .rp-card-discount-badge,
.rp-widget-products .rp-single-related-carousel .rp-product-card-component--single-related .rp-shop-card-discount-badge.rp-card-discount-badge,
.rp-widget-products .rp-single-related-carousel .rp-product-card-component--single-related .rp-card-discount-badge {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    right: auto !important;
    width: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    text-align: center !important;
    height: 17px !important;
    min-height: 17px !important;
    max-height: 17px !important;
    padding: 0 7px !important;
    border-radius: 5px !important;
    background: #ff5a4f !important;
    background-color: #ff5a4f !important;
    color: #fff !important;
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    pointer-events: none !important;
    z-index: 9 !important;
}



/* v0.1.527 - Product shortcode widget part toggles */
.rp-widget-products.rp-widget-no-product_title .rp-card-title,
.rp-widget-products.rp-widget-no-product_title .rp-shop-card-mobile-title,
.rp-widget-products.rp-widget-no-product_title .woocommerce-loop-product__title { display: none !important; }
.rp-widget-products.rp-widget-no-product_image .rp-card-media,
.rp-widget-products.rp-widget-no-product_image .rp-shop-card-mobile-media,
.rp-widget-products.rp-widget-no-product_image .rp-shop-card-media { display: none !important; }
.rp-widget-products.rp-widget-no-product_price .rp-card-footer,
.rp-widget-products.rp-widget-no-product_price .rp-shop-card-footer,
.rp-widget-products.rp-widget-no-product_price .rp-card-price,
.rp-widget-products.rp-widget-no-product_price .rp-shop-card-price,
.rp-widget-products.rp-widget-no-product_price .rp-card-price-wrap,
.rp-widget-products.rp-widget-no-product_price .rp-shop-card-price-wrap { display: none !important; }
.rp-widget-products.rp-widget-no-regular_price .rp-card-price-before,
.rp-widget-products.rp-widget-no-regular_price .rp-shop-card-price-before,
.rp-widget-products.rp-widget-no-regular_price .rp-shop-card-price-before-discount { display: none !important; }
.rp-widget-products.rp-widget-no-sale_price .rp-card-price-final,
.rp-widget-products.rp-widget-no-sale_price .rp-shop-card-price-final { display: none !important; }
.rp-widget-products.rp-widget-no-discount_badge .rp-card-discount-badge,
.rp-widget-products.rp-widget-no-discount_badge .rp-shop-card-discount-badge { display: none !important; }
.rp-widget-products.rp-widget-no-quick_add .rp-card-add,
.rp-widget-products.rp-widget-no-quick_add .rp-product-quick-add { display: none !important; }
.rp-widget-products.rp-widget-no-product_swatches .rp-card-swatches,
.rp-widget-products.rp-widget-no-product_swatches .rp-shop-card-swatches { display: none !important; }
.rp-widget-products.rp-widget-no-product_border .rp-shop-card-inner { border-color: transparent !important; }
.rp-widget-products.rp-widget-no-product_compare .rp-card-compare,
.rp-widget-products.rp-widget-no-product_compare .rp-product-compare-btn { display: none !important; visibility: hidden !important; opacity: 0 !important; }
.rp-widget-products:not(.rp-widget-no-product_compare) .rp-card-compare,
.rp-widget-products:not(.rp-widget-no-product_compare) .rp-product-compare-btn { display: inline-flex !important; visibility: visible !important; opacity: 1 !important; }
.rp-widget-products .rp-product-card-component { list-style: none !important; }
.rp-widget-products .rp-widget-track.products { list-style: none !important; }

/* ========================================================================== 
   v0.1.536 - Shortcode product widget strict carousel width + per-part styles
   ========================================================================== */
.rp-widget-products.rp-product-carousel .rp-widget-track.is-carousel.products {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: var(--rpw-gap) !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    padding: 12px 0 20px !important;
    list-style: none !important;
    scrollbar-width: none !important;
    scroll-snap-type: x proximity;
}
.rp-widget-products.rp-product-carousel .rp-widget-track.is-carousel.products::-webkit-scrollbar {
    display: none !important;
}
.rp-widget-products.rp-product-carousel .rp-widget-track.is-carousel.products > li.product,
.rp-widget-products.rp-product-carousel .rp-widget-track.is-carousel.products > li.product.rp-product-card-component {
    flex: 0 0 calc((100% - (var(--rpw-gap) * (var(--rpw-visible-desktop) - 1))) / var(--rpw-visible-desktop)) !important;
    width: calc((100% - (var(--rpw-gap) * (var(--rpw-visible-desktop) - 1))) / var(--rpw-visible-desktop)) !important;
    min-width: calc((100% - (var(--rpw-gap) * (var(--rpw-visible-desktop) - 1))) / var(--rpw-visible-desktop)) !important;
    max-width: calc((100% - (var(--rpw-gap) * (var(--rpw-visible-desktop) - 1))) / var(--rpw-visible-desktop)) !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    list-style: none !important;
    scroll-snap-align: start !important;
}
.rp-widget-products.rp-product-carousel .rp-widget-track.is-grid.products {
    display: grid !important;
    grid-template-columns: repeat(var(--rpw-cols-desktop), minmax(0, 1fr)) !important;
    gap: var(--rpw-gap) !important;
}
.rp-widget-products.rp-product-carousel .rp-widget-track.is-grid.products > li.product,
.rp-widget-products.rp-product-carousel .rp-widget-track.is-grid.products > li.product.rp-product-card-component {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}
.rp-widget-products .rp-product-card-component .rp-card-title,
.rp-widget-products .rp-product-card-component .rp-shop-card-mobile-title,
.rp-widget-products .rp-product-card-component .woocommerce-loop-product__title {
    color: var(--rpw-product-title-color) !important;
    font-size: var(--rpw-product-title-size) !important;
    font-weight: var(--rpw-product-title-weight) !important;
    line-height: var(--rpw-product-title-line) !important;
    transition: color .2s ease !important;
}
.rp-widget-products .rp-product-card-component .rp-card-link:hover .rp-card-title,
.rp-widget-products .rp-product-card-component .rp-shop-card-mobile-title-link:hover .rp-shop-card-mobile-title,
.rp-widget-products .rp-product-card-component:hover .woocommerce-loop-product__title {
    color: var(--rpw-product-title-hover) !important;
}
.rp-widget-products .rp-product-card-component .rp-card-price,
.rp-widget-products .rp-product-card-component .rp-shop-card-price,
.rp-widget-products .rp-product-card-component .price,
.rp-widget-products .rp-product-card-component .amount {
    color: var(--rpw-product-price-color) !important;
    font-size: var(--rpw-product-price-size) !important;
    font-weight: var(--rpw-product-price-weight) !important;
    line-height: var(--rpw-product-price-line) !important;
    transition: color .2s ease !important;
}
.rp-widget-products .rp-product-card-component:hover .rp-card-price,
.rp-widget-products .rp-product-card-component:hover .rp-shop-card-price,
.rp-widget-products .rp-product-card-component:hover .price,
.rp-widget-products .rp-product-card-component:hover .amount {
    color: var(--rpw-product-price-hover) !important;
}
.rp-widget-products .rp-product-card-component .rp-card-price-before,
.rp-widget-products .rp-product-card-component .rp-shop-card-price-before,
.rp-widget-products .rp-product-card-component .rp-shop-card-price-before-discount,
.rp-widget-products .rp-product-card-component del,
.rp-widget-products .rp-product-card-component del .amount {
    color: var(--rpw-product-regular-color) !important;
    font-size: var(--rpw-product-regular-size) !important;
    font-weight: var(--rpw-product-regular-weight) !important;
    line-height: var(--rpw-product-regular-line) !important;
    transition: color .2s ease !important;
}
.rp-widget-products .rp-product-card-component:hover .rp-card-price-before,
.rp-widget-products .rp-product-card-component:hover .rp-shop-card-price-before,
.rp-widget-products .rp-product-card-component:hover .rp-shop-card-price-before-discount,
.rp-widget-products .rp-product-card-component:hover del,
.rp-widget-products .rp-product-card-component:hover del .amount {
    color: var(--rpw-product-regular-hover) !important;
}
.rp-widget-products .rp-product-card-component .rp-card-price-final,
.rp-widget-products .rp-product-card-component .rp-shop-card-price-final,
.rp-widget-products .rp-product-card-component ins,
.rp-widget-products .rp-product-card-component ins .amount {
    color: var(--rpw-product-sale-color) !important;
    font-size: var(--rpw-product-sale-size) !important;
    font-weight: var(--rpw-product-sale-weight) !important;
    line-height: var(--rpw-product-sale-line) !important;
    transition: color .2s ease !important;
}
.rp-widget-products .rp-product-card-component:hover .rp-card-price-final,
.rp-widget-products .rp-product-card-component:hover .rp-shop-card-price-final,
.rp-widget-products .rp-product-card-component:hover ins,
.rp-widget-products .rp-product-card-component:hover ins .amount {
    color: var(--rpw-product-sale-hover) !important;
}
.rp-widget-products .rp-product-card-component .rp-card-discount-badge,
.rp-widget-products .rp-product-card-component .rp-shop-card-discount-badge {
    background: var(--rpw-discount-bg) !important;
    background-color: var(--rpw-discount-bg) !important;
    color: var(--rpw-discount-color) !important;
    font-size: var(--rpw-discount-size) !important;
    font-weight: var(--rpw-discount-weight) !important;
    line-height: var(--rpw-discount-line) !important;
    transition: background-color .2s ease, color .2s ease !important;
}
.rp-widget-products .rp-product-card-component:hover .rp-card-discount-badge,
.rp-widget-products .rp-product-card-component:hover .rp-shop-card-discount-badge {
    background: var(--rpw-discount-hover-bg) !important;
    background-color: var(--rpw-discount-hover-bg) !important;
}
.rp-widget-products .rp-product-card-component .rp-card-add,
.rp-widget-products .rp-product-card-component .rp-product-quick-add {
    background: var(--rp-product-card-plus) !important;
    background-color: var(--rp-product-card-plus) !important;
}
.rp-widget-products .rp-product-card-component .rp-card-add:hover,
.rp-widget-products .rp-product-card-component .rp-product-quick-add:hover,
.rp-widget-products .rp-product-card-component .rp-card-add.is-ready:hover,
.rp-widget-products .rp-product-card-component .rp-product-quick-add.is-ready:hover {
    background: var(--rp-product-card-plus-hover) !important;
    background-color: var(--rp-product-card-plus-hover) !important;
}
.rp-widget-products .rp-product-card-component .rp-card-add span,
.rp-widget-products .rp-product-card-component .rp-product-quick-add span {
    font-size: var(--rpw-quick-size) !important;
    font-weight: var(--rpw-quick-weight) !important;
    line-height: var(--rpw-quick-line) !important;
}
.rp-widget-products .rp-product-card-component .rp-card-swatch,
.rp-widget-products .rp-product-card-component .rp-shop-swatch {
    border-color: var(--rpw-swatch-border) !important;
    transition: border-color .2s ease, box-shadow .2s ease !important;
}
.rp-widget-products .rp-product-card-component .rp-card-swatch:hover,
.rp-widget-products .rp-product-card-component .rp-shop-swatch:hover,
.rp-widget-products .rp-product-card-component .rp-card-swatch.is-active,
.rp-widget-products .rp-product-card-component .rp-shop-swatch.is-active,
.rp-widget-products .rp-product-card-component .rp-card-swatch[aria-pressed="true"],
.rp-widget-products .rp-product-card-component .rp-shop-swatch[aria-pressed="true"] {
    border-color: var(--rpw-swatch-hover) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--rpw-swatch-hover) 20%, transparent) !important;
}
.rp-widget-products .rp-product-card-component .rp-shop-card-inner {
    background: var(--rp-product-card-bg) !important;
    border-color: var(--rp-product-card-border) !important;
    transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .2s ease !important;
}
.rp-widget-products .rp-product-card-component:hover .rp-shop-card-inner {
    border-color: var(--rp-product-card-border-hover) !important;
}
.rp-widget-products.rp-widget-layout-carousel .rp-widget-arrow {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
.rp-widget-products.rp-widget-layout-carousel:hover .rp-widget-arrow,
.rp-widget-products.rp-widget-layout-carousel:focus-within .rp-widget-arrow {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}
@media (max-width: 1024px) {
    .rp-widget-products.rp-product-carousel .rp-widget-track.is-grid.products {
        grid-template-columns: repeat(var(--rpw-cols-tablet), minmax(0, 1fr)) !important;
    }
    .rp-widget-products.rp-product-carousel .rp-widget-track.is-carousel.products > li.product,
    .rp-widget-products.rp-product-carousel .rp-widget-track.is-carousel.products > li.product.rp-product-card-component {
        flex-basis: calc((100% - (var(--rpw-gap) * (var(--rpw-visible-tablet) - 1))) / var(--rpw-visible-tablet)) !important;
        width: calc((100% - (var(--rpw-gap) * (var(--rpw-visible-tablet) - 1))) / var(--rpw-visible-tablet)) !important;
        min-width: calc((100% - (var(--rpw-gap) * (var(--rpw-visible-tablet) - 1))) / var(--rpw-visible-tablet)) !important;
        max-width: calc((100% - (var(--rpw-gap) * (var(--rpw-visible-tablet) - 1))) / var(--rpw-visible-tablet)) !important;
    }
}
@media (max-width: 767px) {
    .rp-widget-products.rp-product-carousel .rp-widget-track.is-grid.products {
        grid-template-columns: repeat(var(--rpw-cols-mobile), minmax(0, 1fr)) !important;
    }
    .rp-widget-products.rp-product-carousel .rp-widget-track.is-carousel.products > li.product,
    .rp-widget-products.rp-product-carousel .rp-widget-track.is-carousel.products > li.product.rp-product-card-component {
        flex-basis: calc((100% - (var(--rpw-gap) * (var(--rpw-visible-mobile) - 1))) / var(--rpw-visible-mobile)) !important;
        width: calc((100% - (var(--rpw-gap) * (var(--rpw-visible-mobile) - 1))) / var(--rpw-visible-mobile)) !important;
        min-width: calc((100% - (var(--rpw-gap) * (var(--rpw-visible-mobile) - 1))) / var(--rpw-visible-mobile)) !important;
        max-width: calc((100% - (var(--rpw-gap) * (var(--rpw-visible-mobile) - 1))) / var(--rpw-visible-mobile)) !important;
    }
}

/* v0.1.538 - shortcode product-widget currency order */
.rp-widget-products .rp-product-card-component .woocommerce-Price-amount bdi {
    display: inline-flex !important;
    flex-direction: row-reverse !important;
    align-items: baseline !important;
    gap: 3px !important;
    direction: ltr !important;
    unicode-bidi: isolate !important;
}
.rp-widget-products .rp-product-card-component .woocommerce-Price-currencySymbol,
.rp-widget-products .rp-product-card-component .rp-shop-card-currency,
.rp-widget-products .rp-product-card-component .rp-card-currency {
    display: inline-flex !important;
    margin-inline: 0 !important;
    white-space: nowrap !important;
}


/* v0.1.630: صفحه محصول موبایل - محصولات مرتبط با رفتار native scroll صفحه سبد خرید */
@media (max-width: 900px) {
    body.single-product .rp-single-product-page .rp-single-related-carousel,
    body.single-product .rp-single-product-page .rp-single-related-shell,
    body.single-product .rp-single-product-page .rp-single-related-viewport,
    body.single-product .rp-single-product-page .rp-single-related-track {
        direction: rtl !important;
        transform: none !important;
        -webkit-transform: none !important;
    }

    body.single-product .rp-single-product-page .rp-single-related-carousel {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
    }

    body.single-product .rp-single-product-page .rp-single-related-shell {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
    }

    body.single-product .rp-single-product-page .rp-single-related-viewport {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
        scroll-snap-type: x proximity !important;
        scrollbar-width: none !important;
        touch-action: pan-x pan-y !important;
        overscroll-behavior-x: contain !important;
        contain: paint !important;
        cursor: grab !important;
        user-select: none !important;
    }

    body.single-product .rp-single-product-page .rp-single-related-viewport::-webkit-scrollbar {
        display: none !important;
    }

    body.single-product .rp-single-product-page .rp-single-related-track {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        gap: var(--rp-product-carousel-gap, 16px) !important;
        padding: 0 0 10px !important;
        margin: 0 !important;
        list-style: none !important;
        will-change: scroll-position !important;
    }

    body.single-product .rp-single-product-page .rp-single-related-track > li.product {
        flex: 0 0 var(--rp-related-mobile-basis) !important;
        width: var(--rp-related-mobile-basis) !important;
        min-width: var(--rp-related-mobile-basis) !important;
        max-width: none !important;
        flex-shrink: 0 !important;
        scroll-snap-align: start !important;
        scroll-snap-stop: normal !important;
        direction: rtl !important;
    }

    body.single-product .rp-single-product-page .rp-single-related-viewport.is-rp-dragging {
        cursor: grabbing !important;
        scroll-snap-type: none !important;
    }
}

/* v0.1.651 - related/need product cards final-price currency placement. */
body.single-product .rp-product-card-component .rp-card-price-final .woocommerce-Price-amount,
body.single-product .rp-product-card-component .rp-shop-card-price-final .woocommerce-Price-amount,
body.single-product .rp-product-card-component .rp-card-price-final bdi,
body.single-product .rp-product-card-component .rp-shop-card-price-final bdi,
body.woocommerce-cart .rp-product-card-component .rp-card-price-final .woocommerce-Price-amount,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-price-final .woocommerce-Price-amount,
body.woocommerce-cart .rp-product-card-component .rp-card-price-final bdi,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-price-final bdi,
.rp-widget-products .rp-product-card-component .rp-card-price-final .woocommerce-Price-amount,
.rp-widget-products .rp-product-card-component .rp-shop-card-price-final .woocommerce-Price-amount,
.rp-widget-products .rp-product-card-component .rp-card-price-final bdi,
.rp-widget-products .rp-product-card-component .rp-shop-card-price-final bdi {
  display: inline-flex !important;
  flex-direction: row !important;
  direction: rtl !important;
  unicode-bidi: isolate !important;
  align-items: baseline !important;
  gap: 3px !important;
  white-space: nowrap !important;
}

body.single-product .rp-product-card-component .rp-card-price-final .woocommerce-Price-currencySymbol,
body.single-product .rp-product-card-component .rp-shop-card-price-final .woocommerce-Price-currencySymbol,
body.woocommerce-cart .rp-product-card-component .rp-card-price-final .woocommerce-Price-currencySymbol,
body.woocommerce-cart .rp-product-card-component .rp-shop-card-price-final .woocommerce-Price-currencySymbol,
.rp-widget-products .rp-product-card-component .rp-card-price-final .woocommerce-Price-currencySymbol,
.rp-widget-products .rp-product-card-component .rp-shop-card-price-final .woocommerce-Price-currencySymbol {
  order: 2 !important;
  margin: 0 3px 0 0 !important;
  direction: rtl !important;
  unicode-bidi: isolate !important;
}

/* v0.1.696 - related product card title typography */
body.single-product .rp-product-card-component .rp-card-title,
body.single-product .rp-product-card-component .woocommerce-loop-product__title,
body.woocommerce-cart .rp-product-card-component .rp-card-title,
body.woocommerce-cart .rp-product-card-component .woocommerce-loop-product__title {
    min-height: 42px !important;
    max-height: 42px !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    color: var(--rp-product-card-text) !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.75 !important;
    text-align: center !important;
    overflow: hidden !important;
}

/* v0.1.709: accessible touch targets for carousel pagination without changing visual dot size. */
body.single-product .rp-single-related-dot,
.rp-widget-products .rp-single-related-dot {
    min-width: 44px !important;
    min-height: 44px !important;
    display: inline-grid !important;
    place-items: center !important;
    padding: 0 !important;
    background: transparent !important;
}

@media (max-width: 900px) {
    body.single-product .rp-single-related-dots,
    .rp-widget-products .rp-single-related-dots {
        gap: 0 !important;
        min-height: 44px !important;
        height: 44px !important;
    }

    body.single-product .rp-single-related-dot,
    body.single-product .rp-single-related-dot.is-active,
    body.single-product .rp-single-related-dot[aria-current="true"],
    .rp-widget-products .rp-single-related-dot,
    .rp-widget-products .rp-single-related-dot.is-active,
    .rp-widget-products .rp-single-related-dot[aria-current="true"] {
        position: relative !important;
        flex: 0 0 44px !important;
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;
        background: transparent !important;
        overflow: visible !important;
    }

    body.single-product .rp-single-related-dot::before,
    .rp-widget-products .rp-single-related-dot::before {
        content: "" !important;
        display: block !important;
        width: var(--rp-product-carousel-dot-inactive-width) !important;
        height: var(--rp-product-carousel-dot-size) !important;
        border-radius: 999px !important;
        background: var(--rp-product-carousel-dot-bg) !important;
    }

    body.single-product .rp-single-related-dot.is-active::before,
    body.single-product .rp-single-related-dot[aria-current="true"]::before,
    .rp-widget-products .rp-single-related-dot.is-active::before,
    .rp-widget-products .rp-single-related-dot[aria-current="true"]::before {
        width: var(--rp-product-carousel-dot-active-width) !important;
        background: var(--rp-product-carousel-dot-active-bg) !important;
    }
}

/* v0.1.736: align swatches and quick-add control in product widgets. */
.rp-widget-products
.rp-product-card-component
:is(
    .rp-shop-card-actions,
    .rp-card-actions,
    .rp-mobile-card-actions
) {
    position: absolute !important;
    right: 15px !important;
    left: auto !important;
    bottom: 55px !important;
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    width: calc(100% - 30px) !important;
    height: 30px !important;
    min-height: 30px !important;
    margin: 0 !important;
}

.rp-widget-products
.rp-product-card-component
:is(
    .rp-card-swatches,
    .rp-shop-card-swatches
) {
    order: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    min-height: 30px !important;
    flex-wrap: nowrap !important;
    gap: 7px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.rp-widget-products
.rp-product-card-component
:is(
    .rp-card-add,
    .rp-product-quick-add
) {
    order: 2 !important;
    position: unset !important;
    flex: 0 0 25px !important;
    width: 25px !important;
    min-width: 25px !important;
    height: 25px !important;
    min-height: 25px !important;
    margin: 0 0 0 auto !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: var(--rp-product-card-plus) !important;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 10 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    box-shadow: none !important;
}


/* v0.1.738: product widget card sizing/footer spacing and in-button AJAX spinner. */
.rp-widget-products .rp-product-card-component .rp-shop-card-footer,
.rp-widget-products .rp-product-card-component .rp-card-footer {
    width: 100% !important;
    min-height: 34px !important;
    margin: 30px 0 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: flex-start !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 4 !important;
}

.rp-widget-products .rp-product-card-component .rp-shop-card-inner {
    position: relative !important;
    width: 100% !important;
    min-height: 300px !important;
    height: auto !important;
    padding: 20px !important;
    border: 1px solid var(--rp-product-card-border) !important;
    border-radius: 14px !important;
    background: var(--rp-product-card-bg) !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    direction: rtl !important;
}

/* Keep the spinner inside the same 25px quick-add button even with position: unset. */
.rp-widget-products .rp-product-card-component
:is(.rp-card-add, .rp-product-quick-add).is-loading,
.rp-widget-products .rp-product-card-component
:is(.rp-card-add, .rp-product-quick-add)[aria-busy="true"] {
    pointer-events: none !important;
    cursor: wait !important;
    color: transparent !important;
}

.rp-widget-products .rp-product-card-component
:is(.rp-card-add, .rp-product-quick-add).is-loading > span,
.rp-widget-products .rp-product-card-component
:is(.rp-card-add, .rp-product-quick-add)[aria-busy="true"] > span {
    display: none !important;
    opacity: 0 !important;
}

.rp-widget-products .rp-product-card-component
:is(.rp-card-add, .rp-product-quick-add).is-loading::after,
.rp-widget-products .rp-product-card-component
:is(.rp-card-add, .rp-product-quick-add)[aria-busy="true"]::after {
    content: "" !important;
    position: static !important;
    display: block !important;
    flex: 0 0 12px !important;
    width: 12px !important;
    height: 12px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    border: 2px solid rgba(255, 255, 255, .45) !important;
    border-top-color: #fff !important;
    border-radius: 50% !important;
    background: transparent !important;
    animation: rpPlusButtonSpin .72s linear infinite !important;
}


/* v0.1.740: global favorite button on product cards */
.rp-product-card-component .rp-product-favorite-btn,
.rp-widget-products .rp-product-card-component .rp-product-favorite-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.94);
    color: #d9d6d6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease, color .18s ease;
    cursor: pointer;
    z-index: 32;
}
.rp-product-card-component:hover .rp-product-favorite-btn,
.rp-product-card-component:focus-within .rp-product-favorite-btn {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.rp-product-favorite-btn .rp-favorite-icon {
    width: 20px;
    height: 20px;
    display: block;
    background: currentColor;
    -webkit-mask: url("../../icons/account/favorite.svg") center / contain no-repeat;
    mask: url("../../icons/account/favorite.svg") center / contain no-repeat;
}

.rp-product-favorite-btn.is-active,
.rp-product-favorite-btn[aria-pressed="true"] {
    color: #ef3340 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

@media (max-width: 767px) {
    .rp-product-card-component .rp-product-favorite-btn,
    .rp-widget-products .rp-product-card-component .rp-product-favorite-btn {
        top: 10px !important;
        left: 10px !important;
        right: auto !important;
        width: 20px !important;
        min-width: 20px !important;
        max-width: 20px !important;
        height: 20px !important;
        min-height: 20px !important;
        max-height: 20px !important;
        border-radius: 50% !important;
        opacity: 1;
        visibility: visible;
        transform: none;
        z-index: 31 !important;
    }
}


/* v0.1.741: persistent selected favorite and mobile compare overlay */
.rp-product-favorite-btn.is-active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}
@media (max-width: 767px) {
    .rp-shop-card-mobile .rp-shop-card-mobile-compare.is-active,
    .rp-product-card-component .rp-shop-card-mobile-compare.is-active {
        top: -28px !important;
        left: 0 !important;
        right: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 35 !important;
    }
    .rp-shop-card-mobile:has(.rp-shop-card-mobile-compare.is-active) .rp-shop-card-mobile-favorite {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}

/* v0.1.742: favorite spinner and mobile compare selector visibility. */
.rp-product-card-component .rp-product-favorite-btn.is-loading .rp-favorite-icon,
.rp-widget-products .rp-product-card-component .rp-product-favorite-btn.is-loading .rp-favorite-icon {
    display: none !important;
}
.rp-product-card-component .rp-product-favorite-btn.is-loading::after,
.rp-widget-products .rp-product-card-component .rp-product-favorite-btn.is-loading::after {
    content: "";
    display: block;
    width: 14px;
    height: 14px;
    box-sizing: border-box;
    border: 2px solid rgba(34,34,34,.25);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: rpFavoriteSpin .72s linear infinite;
}
@media (max-width: 820px) {
    body.rp-compare-mode-active .rp-product-card-component .rp-shop-card-mobile-compare {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        top: -28px !important;
        left: 0 !important;
        right: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: none !important;
        z-index: 36 !important;
    }
    body.rp-compare-mode-active .rp-product-card-component .rp-shop-card-mobile-favorite {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}

/* v0.1.744: unified red favorite state and red in-button spinner. */
.rp-product-card-component .rp-product-favorite-btn.is-active,
.rp-widget-products .rp-product-card-component .rp-product-favorite-btn.is-active {
    color: #ef3340 !important;
}
.rp-product-card-component .rp-product-favorite-btn.is-active .rp-favorite-icon,
.rp-widget-products .rp-product-card-component .rp-product-favorite-btn.is-active .rp-favorite-icon {
    background-color: #ef3340 !important;
    background: #ef3340 !important;
}
.rp-product-card-component .rp-product-favorite-btn.is-loading,
.rp-widget-products .rp-product-card-component .rp-product-favorite-btn.is-loading {
    color: #ef3340 !important;
}
.rp-product-card-component .rp-product-favorite-btn.is-loading::after,
.rp-widget-products .rp-product-card-component .rp-product-favorite-btn.is-loading::after {
    border-color: rgba(239, 51, 64, .25) !important;
    border-top-color: #ef3340 !important;
}

/* v0.1.753: stable favorite position, permanent mobile visibility and red spinner. */
.rp-product-card-component .rp-product-favorite-btn,
.rp-widget-products .rp-product-card-component .rp-product-favorite-btn {
    box-sizing: border-box !important;
}

/* Active/loading state must never change the button coordinates or dimensions. */
.rp-product-card-component .rp-product-favorite-btn.is-active,
.rp-product-card-component .rp-product-favorite-btn.is-loading,
.rp-widget-products .rp-product-card-component .rp-product-favorite-btn.is-active,
.rp-widget-products .rp-product-card-component .rp-product-favorite-btn.is-loading {
    transform: translateY(0) !important;
    margin: 0 !important;
}

.rp-product-card-component .rp-product-favorite-btn.is-loading .rp-favorite-icon,
.rp-widget-products .rp-product-card-component .rp-product-favorite-btn.is-loading .rp-favorite-icon {
    display: none !important;
}
.rp-product-card-component .rp-product-favorite-btn.is-loading::after,
.rp-widget-products .rp-product-card-component .rp-product-favorite-btn.is-loading::after {
    content: "" !important;
    position: static !important;
    display: block !important;
    flex: 0 0 14px !important;
    width: 14px !important;
    height: 14px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    border: 2px solid rgba(239, 51, 64, .25) !important;
    border-top-color: #ef3340 !important;
    border-radius: 50% !important;
    background: transparent !important;
    animation: rpFavoriteSpin .72s linear infinite !important;
}

@media (max-width: 820px) {
    /* Mobile has no hover: every product-card heart remains visible by default. */
    .rp-product-card-component .rp-product-favorite-btn,
    .rp-widget-products .rp-product-card-component .rp-product-favorite-btn,
    .related.products .rp-product-card-component .rp-product-favorite-btn,
    .upsells.products .rp-product-card-component .rp-product-favorite-btn,
    .cross-sells .rp-product-card-component .rp-product-favorite-btn,
    body.woocommerce-cart .rp-product-card-component .rp-product-favorite-btn {
        position: absolute !important;
        top: 10px !important;
        left: 10px !important;
        right: auto !important;
        width: 20px !important;
        min-width: 20px !important;
        max-width: 20px !important;
        height: 20px !important;
        min-height: 20px !important;
        max-height: 20px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 50% !important;
        background: rgba(255,255,255,.94) !important;
        color: #d9d6d6 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: none !important;
        z-index: 42 !important;
    }

    .rp-product-card-component .rp-product-favorite-btn .rp-favorite-icon,
    .rp-widget-products .rp-product-card-component .rp-product-favorite-btn .rp-favorite-icon,
    .related.products .rp-product-card-component .rp-product-favorite-btn .rp-favorite-icon,
    .upsells.products .rp-product-card-component .rp-product-favorite-btn .rp-favorite-icon,
    .cross-sells .rp-product-card-component .rp-product-favorite-btn .rp-favorite-icon,
    body.woocommerce-cart .rp-product-card-component .rp-product-favorite-btn .rp-favorite-icon {
        width: 20px !important;
        height: 20px !important;
        background: currentColor !important;
    }

    .rp-product-card-component .rp-product-favorite-btn.is-active,
    .rp-widget-products .rp-product-card-component .rp-product-favorite-btn.is-active,
    .related.products .rp-product-card-component .rp-product-favorite-btn.is-active,
    .upsells.products .rp-product-card-component .rp-product-favorite-btn.is-active,
    .cross-sells .rp-product-card-component .rp-product-favorite-btn.is-active,
    body.woocommerce-cart .rp-product-card-component .rp-product-favorite-btn.is-active,
    .rp-product-card-component .rp-product-favorite-btn.is-loading {
        color: #ef3340 !important;
    }
}



