/**
 * =============================================================
 * MSD Product Slider - Surgical Isolation (v1.1.16)
 * Fixed: Removed '*' selector to prevent site-wide conflicts
 * =============================================================
*/

/* کانتینر اصلی - فقط اعمال تنظیمات روی خودش */
.msd-product-slider-wrapper {
    position: relative;
    direction: rtl;
    width: 100%;
    margin: 0 auto;
    font-family: "IRANSans", Tahoma, sans-serif !important;
    box-sizing: border-box;
}

/* برای اینکه مطمئن شویم فرزندان هم درست رفتار کنند، از انتخابگرهای مستقیم استفاده می‌کنیم */
.msd-product-slider-wrapper div,
.msd-product-slider-wrapper span,
.msd-product-slider-wrapper a,
.msd-product-slider-wrapper img {
    box-sizing: border-box;
}

/* ================== Header ================== */
.msd-product-slider-wrapper .msd-slider-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.msd-product-slider-wrapper .msd-product-slider__title {
    font-size: 19px;
    font-weight: 800;
    margin: 0;
}

.msd-product-slider-wrapper .msd-slider-more-link {
    font-size: 14px;
    font-weight: 700;
    color: #6F1E48;
    text-decoration: none;
}

/* ================== Swiper ================== */
.msd-product-slider-wrapper .msd-swiper-container,
.msd-product-slider-wrapper .swiper {
    width: 100%;
    overflow: hidden;
    padding-bottom: 40px;
}

.msd-product-slider-wrapper .swiper-wrapper {
    align-items: stretch;
}

/* ================== Card ================== */
.msd-product-slider-wrapper .msd-product-card {
    position: relative;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    padding: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
    transition: .3s ease;
}

.msd-product-slider-wrapper .msd-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
}

/* ================== Image ================== */
.msd-product-slider-wrapper .msd-product-image {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.msd-product-slider-wrapper .msd-product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ================== Title ================== */
.msd-product-slider-wrapper .msd-product-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 23px;
    margin: 4px 0 10px 0;
    height: 46px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #3f4044;
}

.msd-product-slider-wrapper .msd-product-title a {
    text-decoration: none;
    color: inherit;
}

/* ================== Price ================== */
.msd-product-slider-wrapper .msd-clean-price {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.msd-product-slider-wrapper .msd-clean-price del {
    font-size: 13px;
    color: #c0c2c5;
    margin-bottom: 5px;
}

.msd-product-slider-wrapper .msd-clean-price ins {
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    color: #3f4044;
    display: inline-flex !important;
    direction: ltr !important; 
    justify-content: center;
    gap: 5px;
}

/* ================== Badge ================== */
.msd-product-slider-wrapper .msd-sale-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: #6F1E48;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ================== Nav Arrows ================== */
.msd-product-slider-wrapper .swiper-button-next,
.msd-product-slider-wrapper .swiper-button-prev {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,.1);
    color: #333;
}

.msd-product-slider-wrapper .swiper-button-next::after,
.msd-product-slider-wrapper .swiper-button-prev::after {
    font-size: 16px;
}

/* ================== Pagination ================== */
.msd-product-slider-wrapper .swiper-pagination {
    bottom: 0 !important;
}

.msd-product-slider-wrapper .swiper-pagination-bullet {
    background: #cfcfcf;
    opacity: 1;
}

.msd-product-slider-wrapper .swiper-pagination-bullet-active {
    background: #ef394e;
    width: 18px;
    border-radius: 10px;
}

/* ================== Mobile ================== */
@media (max-width: 768px) {
    .msd-product-slider-wrapper .msd-product-image {
        height: 150px;
        margin-bottom: 6px;
    }

    .msd-product-slider-wrapper .msd-product-title {
        font-size: 14px;
        line-height: 22px;
        margin: 4px 0 8px 0;
        height: 44px;
    }

    .msd-product-slider-wrapper .swiper-button-next,
    .msd-product-slider-wrapper .swiper-button-prev {
        display: none !important;
    }
}

.msd-product-trust-slider {
    margin: 8px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    line-height: 1.2;
    width: 100%;
}

@media (max-width: 767px) {
    .msd-product-trust-slider {
        font-size:8px;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        transform: scale(0.92);
        transform-origin: center;
    }

    .msd-product-trust-slider * {
        font-size: inherit !important;
        line-height: inherit !important;
        white-space: inherit !important;
    }
}
