/* عمومی */
.swiper-button-lock {
    display: none;
}
.wd-content-layout {
    padding-block: 0 !important;
}

/* استایل های اصلی کتگوری کاروسل */
.ms-category-carousel {
    padding: 15px 0;
}

.ms-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: transparent;
    border: none;
    border-radius: 0;
    text-decoration: none;
    transition: all 0.3s ease;
    height: 100%;
}

.ms-category-image {
    overflow: hidden;
    margin-bottom: 10px;
}

.ms-category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.ms-category-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ms-category-title {
    font-size: 14px;
    font-weight: 500;
    color: #192736;
    margin: 0;
    transition: color 0.3s ease;
    font-family: 'IRANSans', sans-serif;
}

.ms-category-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
}

.ms-category-carousel .swiper-slide > div {
    height: 100%;
}

/* فلش های ناوبری */
.ms-category-carousel .swiper-button-next,
.ms-category-carousel .swiper-button-prev {
    color: #111111;
    width: 22px;
    height: 22px;
    top: calc(50% + 12px);
    background: transparent;
}

.ms-category-carousel .swiper-button-next:after,
.ms-category-carousel .swiper-button-prev:after {
    font-size: 12px;
    font-weight: 600;
}

/* نقاط ناوبری - بهبود یافته برای Touch targets */
.ms-category-carousel .swiper-pagination {
    position: relative;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 8px;
}

.ms-category-carousel .swiper-pagination-bullet {
    background: #CCCCCC;
    opacity: 1;
    width: 44px;
    height: 44px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ms-category-carousel .swiper-pagination-bullet:after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.7;
}

.ms-category-carousel .swiper-pagination-bullet-active {
    background: #111111;
}

.ms-category-carousel .swiper-pagination-bullet-active:after {
    background: #ffffff;
    opacity: 1;
    width: 16px;
    height: 16px;
}

/* بهبود accessibility - focus state */
.ms-category-carousel .swiper-pagination-bullet:focus {
    outline: 2px solid #25A595;
    outline-offset: 2px;
}





@media (max-width: 767px) {
    .ms-category-carousel .swiper-pagination {
        margin-top: 15px;
        gap: 8px;
        padding: 6px;
    }
    
    .ms-category-carousel .swiper-pagination-bullet {
        width: 36px;
        height: 36px;
    }
    
    .ms-category-carousel .swiper-pagination-bullet:after {
        width: 10px;
        height: 10px;
    }
    
    .ms-category-carousel .swiper-pagination-bullet-active:after {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .ms-category-carousel .swiper-pagination {
        gap: 6px;
        padding: 4px;
    }
    
    .ms-category-carousel .swiper-pagination-bullet {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
    }
}

/* پیغام خالی */
.ms-empty-message {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-family: 'IRANSans', sans-serif;
    font-size: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 2px dashed #e5e7eb;
}

/* حالت Fallback برای وقتی Swiper لود نمی شود */
.ms-category-carousel.fallback .swiper-wrapper {
    display: grid !important;
    gap: 8px;
    margin: 0 !important;
    grid-template-columns: repeat(8, 1fr);
}

.ms-category-carousel.fallback .swiper-slide {
    padding: 0 !important;
    height: auto !important;
}

/* حالت Fallback - مخفی کردن فلش ها */
.ms-category-carousel.fallback .swiper-button-next,
.ms-category-carousel.fallback .swiper-button-prev {
    display: none !important;
}

/* ریسپانسیو برای حالت Fallback */
@media (max-width: 1024px) {
    .ms-category-carousel.fallback .swiper-wrapper {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

@media (max-width: 767px) {
    .ms-category-carousel.fallback .swiper-wrapper {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .ms-category-carousel.fallback .swiper-wrapper {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* -------------------- استایل های  تایمر -------------------------*/
.wd-countdown-timer .wd-timer-days {
    display: none !important;
}
.wd-countdown-timer .wd-timer > span {
    padding: 5px 30px;
    font-size: 15px;
}

.ms-brand-carousel-widget .ms-widget-header {
    margin-bottom: 0px;
}

/* استایل برای تبلت (عرض صفحه بین 768px تا 1024px) */
@media (max-width: 1024px) {
    .wd-countdown-timer .wd-timer > span {
        padding: 4px 10px;
        font-size: 14px;
    }
}

/* استایل برای موبایل (عرض صفحه کمتر از 768px) */
@media (max-width: 768px) {
    .wd-countdown-timer .wd-timer > span {
        padding: 3px 7px;
        font-size: 13px;
    }
}

/* استایل برای موبایل های کوچک (عرض صفحه کمتر از 480px) */
@media (max-width: 480px) {
    .wd-countdown-timer .wd-timer > span {
        padding: 2px 12px;
        font-size: 13px;
    }
}

/* -------------------- استایل های اسلایدر سفارشی -------------------------*/
.ms-custom-slider {
    position: relative;
    overflow: hidden;
    margin-bottom: 0 !important;
    width: 100%;
}

.ms-custom-slider.ms-auto-height {
    height: auto !important;
}

.ms-custom-slider.ms-auto-height .swiper-slide {
    height: auto;
}

.ms-custom-slider.ms-auto-height .ms-slide-image {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.ms-custom-slider.ms-custom-height .swiper-slide {
    height: 100%;
}

.ms-custom-slider.ms-custom-height .ms-slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ms-custom-slider .swiper-slide {
    position: relative;
}

.ms-slide-image {
    width: 100%;
    display: block;
}

.ms-slide-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* استایل های Swiper برای اسلایدر سفارشی */
.ms-custom-slider .swiper-button-next,
.ms-custom-slider .swiper-button-prev {
    color: #ffffff;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.ms-custom-slider .swiper-button-next:after,
.ms-custom-slider .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.ms-custom-slider .swiper-button-prev {
    right: 20px;
    left: auto;
}

.ms-custom-slider .swiper-button-next {
    left: 20px;
    right: auto;
}

/* نقاط ناوبری - بهبود یافته برای Touch targets */
.ms-custom-slider .swiper-pagination {
    position: absolute;
    bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 8px;
}

.ms-custom-slider .swiper-pagination-bullet {
    background: #CCCCCC;
    opacity: 1;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    margin: 0 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* نقطه فعال با ظاهری واضح تر */
.ms-custom-slider .swiper-pagination-bullet-active {
    background: #111111;
}

/* ایجاد دایره داخلی برای حفظ ظاهر قدیمی اما با منطقه کلیک بزرگتر */
.ms-custom-slider .swiper-pagination-bullet:after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.7;
}

.ms-custom-slider .swiper-pagination-bullet-active:after {
    background: #111111;
    opacity: 1;
}

/* بهبود accessibility - focus state */
.ms-custom-slider .swiper-pagination-bullet:focus {
}





/* ریسپانسیو برای نقاط ناوبری */
@media (max-width: 1024px) {
    .ms-custom-slider .swiper-button-next,
    .ms-custom-slider .swiper-button-prev {
        width: 40px;
        height: 40px;
    }
    
    .ms-custom-slider .swiper-button-next:after,
    .ms-custom-slider .swiper-button-prev:after {
        font-size: 16px;
    }
    
    .ms-custom-slider .swiper-pagination {
        bottom: 15px;
        gap: 10px;
    }
    
    .ms-custom-slider .swiper-pagination-bullet {
    }
}

@media (max-width: 767px) {
    .ms-custom-slider .swiper-button-next,
    .ms-custom-slider .swiper-button-prev {
        width: 36px;
        height: 36px;
        display: none;
    }
    
    .ms-custom-slider .swiper-button-next:after,
    .ms-custom-slider .swiper-button-prev:after {
        font-size: 14px;
    }
    
    .ms-custom-slider .swiper-pagination {
        bottom: 10px;
        gap: 8px;
        padding: 6px;
    }
    
    .ms-custom-slider .swiper-pagination-bullet {
    margin: 0 6px !important;
    }
    
    .ms-custom-slider .swiper-pagination-bullet:after {
        width: 10px;
        height: 10px;
    }
    
    .ms-custom-slider .swiper-pagination-bullet-active:after {

    }
}

@media (max-width: 480px) {
    .ms-custom-slider .swiper-pagination {
        bottom: 8px;
        gap: 6px;
        padding: 4px;
    }
    
    .ms-custom-slider .swiper-pagination-bullet {
    }
    
    .ms-custom-slider .swiper-pagination-bullet:after {
        width: 8px;
        height: 8px;
    }
    
    .ms-custom-slider .swiper-pagination-bullet-active:after {

    }
}

/* حالت Fallback */
.ms-custom-slider.fallback .swiper-wrapper {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
}

.ms-custom-slider.fallback .swiper-slide {
    display: block !important;
    width: 100% !important;
}

.ms-custom-slider.fallback .swiper-pagination,
.ms-custom-slider.fallback .swiper-button-next,
.ms-custom-slider.fallback .swiper-button-prev {
    display: none !important;
}

/* ریسپانسیو برای اسلایدر سفارشی */
@media (max-width: 1024px) {
    .ms-custom-slider .swiper-button-next,
    .ms-custom-slider .swiper-button-prev {
        width: 36px;
        height: 36px;
    }
    
    .ms-custom-slider .swiper-button-next:after,
    .ms-custom-slider .swiper-button-prev:after {
        font-size: 16px;
    }
    
    .ms-custom-slider .swiper-pagination {
        bottom: 15px;
    }
}

@media (max-width: 767px) {
    .ms-custom-slider .swiper-button-next,
    .ms-custom-slider .swiper-button-prev {
        width: 32px;
        height: 32px;
        display: none;
    }
    
    .ms-custom-slider .swiper-button-next:after,
    .ms-custom-slider .swiper-button-prev:after {
        font-size: 14px;
    }
    
    .ms-custom-slider .swiper-pagination {
        bottom: 10px;
    }
    
    /* نمایش اسلایدها در حالت Fallback برای موبایل */
    .ms-custom-slider.fallback .swiper-slide:not(:first-child) {
        display: none !important;
    }
}

/* بهبود نمایش در حالت ویرایشگر المنتور */
.elementor-editor-active .ms-custom-slider {
    min-height: 300px;
}

.elementor-editor-active .ms-custom-slider:before {
    content: "اسلایدر سفارشی - در حالت ویرایش";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-family: 'IRANSans';
    font-size: 14px;
    z-index: 1;
}

.elementor-editor-active .ms-custom-slider .swiper-slide {
    position: relative;
    z-index: 2;
}

/* انیمیشن برای اسلایدها */
.ms-custom-slider .swiper-slide {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.ms-custom-slider .swiper-slide-active {
    opacity: 1;
}

/* استایل برای تصاویر لود نشده */
.ms-slide-image:not([src]) {
    background: #f8f9fa;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ms-slide-image:not([src]):after {
    content: "تصویر اسلاید";
    color: #999;
    font-family: 'IRANSans';
    font-size: 14px;
}

/* پشتیبانی از حالت RTL */
.ms-custom-slider .swiper-rtl .swiper-button-next {
    right: auto;
    left: 20px;
}

.ms-custom-slider .swiper-rtl .swiper-button-prev {
    left: auto;
    right: 20px;
}

/* استایل برای حالت autoplay */
.ms-custom-slider .swiper-pagination-bullet {
    transition: all 0.3s ease;
}

/* بهبود عملکرد تاچ در موبایل */
.ms-custom-slider .swiper-wrapper {
    touch-action: pan-y;
}

/* استایل برای زمانی که اسلایدر در حال لودینگ است */
.ms-custom-slider.swiper-container-initialized .swiper-slide {
    opacity: 1;
}

/* پشتیبانی از افکت fade */
.ms-custom-slider .swiper-fade .swiper-slide {
    opacity: 0 !important;
}

.ms-custom-slider .swiper-fade .swiper-slide-active,
.ms-custom-slider .swiper-fade .swiper-slide-duplicate-active {
    opacity: 1 !important;
}

@media (min-width: 768px) {
    .ms-custom-slider .swiper {
        padding-bottom: 60px;
    }
}

/* استایل برای دسکتاپ های بزرگ */
@media (min-width: 1440px) {
    .ms-custom-slider .swiper-button-next,
    .ms-custom-slider .swiper-button-prev {
        width: 50px;
        height: 50px;
    }
    
    .ms-custom-slider .swiper-button-next:after,
    .ms-custom-slider .swiper-button-prev:after {
        font-size: 20px;
    }
}

/* استایل برای تبلت در حالت landscape */
@media (max-width: 1024px) and (orientation: landscape) {
    .ms-custom-slider.ms-auto-height .ms-slide-image {
        max-height: 80vh;
        object-fit: contain;
    }
}

/* پشتیبانی از حالت چاپ */
@media print {
    .ms-custom-slider .swiper-button-next,
    .ms-custom-slider .swiper-button-prev,
    .ms-custom-slider .swiper-pagination {
        display: none !important;
    }
    
    .ms-custom-slider .swiper-wrapper {
        display: block !important;
    }
    
    .ms-custom-slider .swiper-slide {
        display: block !important;
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
}

/* استایل های بهینه سازی LCP برای اسلایدر */
.ms-lcp-image {
    content-visibility: auto;
    will-change: transform;
}

.ms-custom-slider[data-lcp-optimized="true"] .swiper-slide-active img {
    animation: msLCPLoaded 0.3s ease-out;
}

@keyframes msLCPLoaded {
    0% { opacity: 0.9; transform: translateY(5px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* کاهش motion برای کاربرانی که ترجیح می دهند */
@media (prefers-reduced-motion: reduce) {
    .ms-custom-slider .swiper-slide,
    .ms-custom-slider .swiper-pagination-bullet,
    .ms-custom-slider .swiper-button-next,
    .ms-custom-slider .swiper-button-prev {
        transition: none !important;
    }
    
    @keyframes msLCPLoaded {
        0% { opacity: 1; }
        100% { opacity: 1; }
    }
}

/* بهبود accessibility برای اسکرین ریدرها */
.ms-custom-slider .swiper-pagination-bullet {
    position: relative;
}

.ms-custom-slider .swiper-pagination-bullet .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* اضافه کردن label برای accessibility */
.ms-custom-slider .swiper-pagination-bullet[aria-label] {
    cursor: pointer;
}

/* استایل focus برای keyboard navigation */
.ms-custom-slider .swiper-pagination-bullet:focus-visible {
    outline: 3px solid #25A595;
    outline-offset: 3px;
    box-shadow: 0 0 0 3px rgba(37, 165, 149, 0.3);
}

/* افزایش contrast برای accessibility */
.ms-custom-slider .swiper-pagination-bullet-active {
    background: #111111;
    box-shadow: 0 0 0 2px #ffffff;
}

@media (prefers-contrast: high) {
    .ms-custom-slider .swiper-pagination-bullet-active {
        background: #000000;
        box-shadow: 0 0 0 3px #ffffff;
    }
}

/*----------------------- استایل های زودمصرف ها ----------------------------*/
.ms-quick-consumption-widget {
    padding: 15px 0;
}

.ms-quick-consumption-grid {
    display: grid;
    gap: 10px;
    margin: 0;
}

.ms-quick-consumption-item {
    display: flex;
    justify-content: center;
}

.ms-quick-consumption-link {
    display: block;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

.ms-quick-consumption-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
}

.ms-quick-consumption-image img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ms-quick-consumption-discount {
    position: absolute;
    bottom: 10px;
    right: 0;
    background: #E11D48;
    color: #fff;
    font-family: 'IRANSans';
    font-size: 14px;
    border-radius: 50px;
    padding: 4px 8px;
    line-height: 1;
    z-index: 10;
    direction: ltr;
    font-weight: 500;
}

/* ریسپانسیو برای زودمصرف ها */
@media (max-width: 1024px) {
    .ms-quick-consumption-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 767px) {
    .ms-quick-consumption-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .ms-quick-consumption-discount {
        font-size: 12px;
        padding: 3px 6px;
        bottom: 8px;
    }
}

@media (max-width: 480px) {
    .ms-quick-consumption-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* بهبود نمایش در حالت ویرایشگر */
.elementor-editor-active .ms-quick-consumption-item {
    min-height: 100px;
}

/*--------------------------- استایل های بنر کاروسل --------------------------*/
.ms-banners-carousel {
    position: relative;
    padding: 15px 0;
}

.ms-banner-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ms-banner-link {
    display: block;
    width: 100%;
    text-decoration: none;
}

.ms-banner-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* فلش های ناوبری برای بنرها */
.ms-banners-carousel .swiper-button-next,
.ms-banners-carousel .swiper-button-prev {
    color: #111111;
    width: 22px;
    height: 22px;
    top: calc(50% + 12px);
    background: transparent;
}

.ms-banners-carousel .swiper-button-next:after,
.ms-banners-carousel .swiper-button-prev:after {
    font-size: 12px;
    font-weight: 600;
}

/* نقاط ناوبری - بهبود یافته برای Touch targets */
.ms-banners-carousel .swiper-pagination {
    position: relative;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 8px;
}

.ms-banners-carousel .swiper-pagination-bullet {
    background: #CCCCCC;
    opacity: 1;
    width: 44px;
    height: 44px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ms-banners-carousel .swiper-pagination-bullet:after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.7;
}

.ms-banners-carousel .swiper-pagination-bullet-active {
    background: #111111;
}

.ms-banners-carousel .swiper-pagination-bullet-active:after {
    background: #ffffff;
    opacity: 1;
    width: 16px;
    height: 16px;
}

/* بهبود accessibility - focus state */
.ms-banners-carousel .swiper-pagination-bullet:focus {
    outline: 2px solid #25A595;
    outline-offset: 2px;
}




@media (max-width: 767px) {
    .ms-banners-carousel .swiper-pagination {
        margin-top: 15px;
        gap: 8px;
        padding: 6px;
    }
    
    .ms-banners-carousel .swiper-pagination-bullet {
        width: 36px;
        height: 36px;
    }
    
    .ms-banners-carousel .swiper-pagination-bullet:after {
        width: 10px;
        height: 10px;
    }
    
    .ms-banners-carousel .swiper-pagination-bullet-active:after {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .ms-banners-carousel .swiper-pagination {
        gap: 6px;
        padding: 4px;
    }
    
    .ms-banners-carousel .swiper-pagination-bullet {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
    }
}

/* حالت Fallback */
.ms-banners-carousel.fallback .swiper-wrapper {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 0 !important;
}

.ms-banners-carousel.fallback .swiper-slide {
    padding: 0 !important;
}

@media (max-width: 1024px) {
    .ms-banners-carousel.fallback .swiper-wrapper {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 767px) {
    .ms-banners-carousel.fallback .swiper-wrapper {
        grid-template-columns: 1fr !important;
    }
    
    .ms-banners-carousel .swiper-pagination {
        margin-top: 15px;
    }
}

/* -------------------- استایل های برند کاروسل -------------------------*/
.ms-brand-carousel-widget {
    width: 100%;
}

.ms-brand-carousel {
    position: relative;
    padding: 0px;
}

.ms-brand-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ms-brand-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
}

.ms-brand-image {
    overflow: hidden;
    margin-bottom: 10px;
}

.ms-brand-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ms-brand-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ms-brand-title {
    font-size: 14px;
    font-weight: 400;
    color: #7a7a7a;
    margin: 0;
    transition: color 0.3s ease;
    font-family: 'IRANSans', sans-serif;
}

.ms-brand-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* استایل هدر برند */
.ms-brand-carousel-widget .ms-widget-header {
    margin-bottom: 0px;
}

.ms-brand-carousel-widget .ms-header-title {
    font-size: 16px;
    font-weight: 500;
    color: #192736;
    margin: 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #25A595;
    display: inline-block;
    font-family: 'IRANSans', sans-serif;
}

/* فلش های ناوبری برای برندها */
.ms-brand-carousel .swiper-button-next,
.ms-brand-carousel .swiper-button-prev {
    color: #111111;
    width: 22px;
    height: 22px;
    top: calc(50% + 12px);
    background: transparent;
}

.ms-brand-carousel .swiper-button-next:after,
.ms-brand-carousel .swiper-button-prev:after {
    font-size: 12px;
    font-weight: 600;
}

/* موقعیت فلش ها */
.ms-brand-carousel .swiper-button-prev {
    right: -8px;
}

.ms-brand-carousel .swiper-button-next {
    left: -8px;
}

/* نقاط ناوبری - بهبود یافته برای Touch targets */
.ms-brand-carousel .swiper-pagination {
    position: relative;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 8px;
}

.ms-brand-carousel .swiper-pagination-bullet {
    background: #CCCCCC;
    opacity: 1;
    width: 44px;
    height: 44px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ms-brand-carousel .swiper-pagination-bullet:after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.7;
}

.ms-brand-carousel .swiper-pagination-bullet-active {
    background: #111111;
}

.ms-brand-carousel .swiper-pagination-bullet-active:after {
    background: #ffffff;
    opacity: 1;
    width: 16px;
    height: 16px;
}

/* بهبود accessibility - focus state */
.ms-brand-carousel .swiper-pagination-bullet:focus {
    outline: 2px solid #25A595;
    outline-offset: 2px;
}




@media (max-width: 767px) {
    .ms-brand-carousel .swiper-pagination {
        margin-top: 15px;
        gap: 8px;
        padding: 6px;
    }
    
    .ms-brand-carousel .swiper-pagination-bullet {
        width: 36px;
        height: 36px;
    }
    
    .ms-brand-carousel .swiper-pagination-bullet:after {
        width: 10px;
        height: 10px;
    }
    
    .ms-brand-carousel .swiper-pagination-bullet-active:after {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .ms-brand-carousel .swiper-pagination {
        gap: 6px;
        padding: 4px;
    }
    
    .ms-brand-carousel .swiper-pagination-bullet {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
    }
}

/* حالت Fallback */
.ms-brand-carousel.fallback .swiper-wrapper {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin: 0 !important;
}

.ms-brand-carousel.fallback .swiper-slide {
    padding: 0 !important;
}

@media (max-width: 1024px) {
    .ms-brand-carousel.fallback .swiper-wrapper {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 767px) {
    .ms-brand-carousel.fallback .swiper-wrapper {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .ms-brand-carousel .swiper-pagination {
        margin-top: 15px;
    }
}

/* استایل های اصلی محصولات با بنر کناری */
.ms-side-banner-products-widget {
    width: 100%;
}

.ms-products-banner-container {
    display: flex;
    align-items: flex-start;
}

.ms-products-banner-container.right-layout {
    flex-direction: row;
    gap: 8px;
}

.ms-side-banner {
    flex-shrink: 0;
    max-width: 300px;
    width: auto;
}

.ms-products-container {
    flex: 1;
}

.ms-products-container.full-width {
    width: 100%;
}

.ms-banner-image {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
}

.ms-banner-link {
    display: block;
}

/* استایل های گرید */
.ms-products-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    margin: 0;
    gap: 8px;
}

.ms-product-item {
    display: flex;
}

/* استایل های اسلایدر */
.ms-products-slider {
    position: relative;
    padding: 0px;
}

.ms-products-slider .swiper-slide {
    height: auto;
}

.ms-product-slide-inner {
    padding: 0px;
}

/* فاصله بین محصولات در اسلایدر */
.ms-products-slider .swiper-wrapper {
    margin: 0 -4px;
}

.ms-product-slide {
    padding: 0px;
}

/* استایل کارت محصول */
.ms-product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: none;
    transform: none;
    transition: none;
}

.ms-product-image {
    position: relative;
    padding: 15px 15px 0px;
    text-align: center;
    flex-shrink: 0;
}

.ms-product-img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    transition: none;
}

.ms-product-link {
    display: block;
    text-decoration: none;
}

.ms-product-badges-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    min-height: 30px;
    margin-top: -13px;
    z-index: 2;
}

.ms-free-shipping,
.ms-old-price-badge {
    width: 80px;
    height: auto;
    flex-shrink: 0;
}

.ms-free-shipping img,
.ms-old-price-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ms-product-content {
    padding: 0 15px 5px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ms-product-title {
    margin-bottom: 5px;
    text-align: right;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 50px;
    align-items: center;
}

.ms-product-title a {
    font-family: "IRANSans";
    font-size: 13px;
    font-weight: 400;
    line-height: 25px;
    color: #192736;
    text-decoration: none;
    display: block;
    width: 100%;
    transition: color 0.3s ease;
}

.ms-product-price {
    text-align: left;
    direction: ltr;
    unicode-bidi: embed;
    min-height: 52px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.ms-product-price span.price {
    color: #192736 !important;
    font-family: "IRANSans_Medium";
    font-size: 16px;
    font-weight: 400;
    display: flex;
    flex-direction: column;
}
.ms-product-price span.price ins{
    color: #192736 !important;
    font-family: "IRANSans_Medium";
    font-size: 16px;
    font-weight: 400;
}
.ms-product-price span.price del{
    color: #7a7a7a;
    font-family: "IRANSans_Medium";
    font-size: 13px;
    font-weight: 400;
    text-decoration: line-through;
}

.ms-price-row {
    display: block;
    margin-bottom: 2px;
}

.ms-sale-price {
    color: #192736;
    font-family: "IRANSans_Medium";
    font-size: 16px;
    font-weight: 400;
}

.ms-regular-price {
    color: #7a7a7a;
    font-family: "IRANSans_Medium";
    font-size: 13px;
    font-weight: 400;
    text-decoration: line-through;
}
.ms-single-price {
    color: #192736;
    font-family: "IRANSans_Medium";
    font-size: 16px;
    font-weight: 400;
}

/* کلاس قیمت ثابت تخفیف */
.ms-fixed-discount-price {
    color: #7a7a7a !important;
    font-family: "IRANSans_Medium";
    font-size: 14px;
    font-weight: 400;
    text-decoration: line-through;
}

/* استایل نشان ها - نسخه جدید */
.ms-discount-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 2px;
    line-height: 1.2;
    direction: ltr;
    flex-direction: row;
}

.ms-discount-badge .ms-discount-percentage {
    background: #E11D48;
    color: #fff;
    font-family: 'IRANSans';
    font-size: 14px;
    font-weight: 500;
    border-radius: 15px;
    padding: 4px 12px;
    width: auto;
    height: auto;
    text-align: center;
}

.ms-discount-badge .ms-plus-sign {
    font-size: 13px;
    font-weight: 700;
    color: #000000;
    margin: 0;
    background: none;
}

.ms-discount-badge .ms-fixed-discount {
    background: #111111;
    color: #fff;
    font-family: 'IRANSans';
    font-size: 14px;
    font-weight: 500;
    border-radius: 15px;
    padding: 4px 12px;
    width: auto;
    height: auto;
    text-align: center;
}

.ms-outofstock-badge {
    position: absolute;
    top: -1px;
    right: -1px;
    background: #f0f0f0;
    color: #000000;
    font-family: 'IRANSans';
    font-size: 14px;
    font-weight: 400;
    border-radius: 0 8px 0 8px;
    padding: 5px 0;
    width: 70px;
    text-align: center;
    z-index: 10;
}

/* موقعیت جدید برای نشان هدیه و یک بخر دو تا ببر */
.ms-gift-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    z-index: 5;
}

.ms-buy-one-get-one {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    z-index: 5;
}

.ms-gift-badge img,
.ms-buy-one-get-one img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* استایل هدر */
.ms-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    margin-top: 10px;
}

.ms-header-title {
    font-family: IRANSans, sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #192736;
    margin: 0;
}

.ms-view-all-btn {
    font-family: "IRANSans";
    font-weight: 500;
    fill: #25a595;
    color: #25a595;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ms-view-all-arrow {
    display: flex;
    align-items: center;
}

.ms-view-all-arrow svg {
    width: 12px;
    height: 12px;
}

/* موقعیت فلش های ناوبری - حالت inside */
.ms-products-slider.arrows-position-inside .swiper-button-next,
.ms-products-slider.arrows-position-inside .swiper-button-prev {
    color: #111111;
    width: 22px;
    height: 22px;
    background: transparent;
    top: 50%;
    transform: translateY(-50%);
}

.ms-products-slider.arrows-position-inside .swiper-button-next:after,
.ms-products-slider.arrows-position-inside .swiper-button-prev:after {
    font-size: 12px;
    font-weight: 600;
}

.ms-products-slider.arrows-position-inside .swiper-button-prev {
    left: 10px;
}

.ms-products-slider.arrows-position-inside .swiper-button-next {
    right: 10px;
}

/* موقعیت فلش های ناوبری - حالت outside */
.ms-products-slider.arrows-position-outside {
    position: relative;
}

.ms-products-slider.arrows-position-outside .swiper-button-next,
.ms-products-slider.arrows-position-outside .swiper-button-prev {
    color: #111111;
    width: 22px;
    height: 22px;
    background: transparent;
    top: 50%;
    transform: translateY(-50%);
}

.ms-products-slider.arrows-position-outside .swiper-button-next:after,
.ms-products-slider.arrows-position-outside .swiper-button-prev:after {
    font-size: 12px;
    font-weight: 600;
}

.ms-products-slider.arrows-position-outside .swiper-button-prev {
    left: -25px;
}

.ms-products-slider.arrows-position-outside .swiper-button-next {
    right: -25px;
}

/* حالت Fallback برای اسلایدر */
.ms-products-slider.fallback .swiper-wrapper {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin: 0 !important;
}

.ms-products-slider.fallback .swiper-slide {
    padding: 0 !important;
}

.ms-product-price .amount {
    color: inherit !important;
    font-weight: inherit !important;
}

.ms-products-grid .ms-product-item {
    display: grid;
}

/* ریسپانسیو */
@media (max-width: 1024px) {
    .ms-products-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 8px;
    }
    
    .ms-side-banner {
        max-width: 300px;
    }
    
    .ms-products-slider.fallback .swiper-wrapper {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 767px) {
    .ms-products-banner-container {
        flex-direction: column !important;
        gap: 0;
    }
    
    .ms-side-banner {
        width: 100% !important;
        margin: 0 0 0 0 !important;
        order: 2;
        max-width: 100%;
    }
    
    .ms-products-container {
        width: 100% !important;
        order: 3;
    }
    
    .ms-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 4px;
    }
    
    .ms-products-slider.fallback .swiper-wrapper {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .ms-products-slider .swiper-wrapper {
        margin: 0 -2px;
    }
    
    .ms-product-slide {
        padding: 0px;
    }
    
    .ms-widget-header {
        flex-direction: row;
        align-items: center;
        order: 1;
    }
    
    .ms-discount-badge {
        gap: 1px;
    }
    
    .ms-discount-badge .ms-discount-percentage {
        font-size: 11px;
        padding: 4px 6px;
    }
    
    .ms-discount-badge .ms-plus-sign {
        font-size: 10px;
    }
    
    .ms-discount-badge .ms-fixed-discount {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .ms-free-shipping, .ms-old-price-badge {
        width: 50%;
    }
}

/* استایل های اصلی محصولات با بنر کناری - نسخه بهبود یافته */
.ms-side-banner-products-widget {
    width: 100%;
}

.ms-products-banner-container {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
}

.ms-side-banner-products-widget.banner-position-right .ms-products-banner-container {
    flex-direction: row;
}

.ms-side-banner-products-widget.banner-position-left .ms-products-banner-container {
    flex-direction: row-reverse;
}

.ms-side-banner {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.ms-side-banner-products-widget.banner-height-full .ms-side-banner {
    height: 100%;
    align-self: stretch;
}

.ms-side-banner-products-widget.banner-height-full .ms-banner-image {
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: cover;
}

.ms-side-banner-products-widget.banner-height-auto .ms-banner-image {
    width: 100%;
    height: auto;
}

.ms-side-banner-products-widget.banner-height-custom .ms-banner-image {
    width: 100%;
}

.ms-products-container.with-banner {
    flex: 1;
    min-width: 0;
}

.ms-products-container.full-width {
    width: 100%;
}

.ms-banner-link {
    display: block;
    height: 100%;
    width: 100%;
}

/* بهبود نمایش اسلایدر در حالت دارای بنر */
.ms-side-banner-products-widget.has-banner .ms-products-slider {
    width: 100%;
}

.ms-side-banner-products-widget.has-banner .ms-products-slider .swiper {
    width: 100%;
}

.ms-side-banner-products-widget.has-banner .ms-products-slider .swiper-wrapper {
    width: 100%;
}

/* حالت Fallback برای اسلایدر */
.ms-products-slider.fallback .swiper-wrapper {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin: 0 !important;
}

.ms-products-slider.fallback .swiper-slide {
    padding: 0 !important;
}

@media (max-width: 1024px) {
    .ms-products-slider.fallback .swiper-wrapper {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 767px) {
    .ms-products-slider.fallback .swiper-wrapper {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* استایل های اضافی برای سازگاری */
.ms-side-banner-products-widget.has-banner .ms-products-banner-container {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
}

.ms-side-banner-products-widget.banner-position-right .ms-products-banner-container {
    flex-direction: row-reverse;
}

.ms-side-banner-products-widget.banner-position-left .ms-products-banner-container {
    flex-direction: row-reverse;
}

.ms-side-banner {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.ms-side-banner-products-widget.banner-height-full .ms-side-banner {
    height: 100%;
}

.ms-side-banner-products-widget.banner-height-full .ms-banner-image {
    height: 100%;
    width: auto;
    max-width: 100%;
}

.ms-side-banner-products-widget.banner-height-auto .ms-banner-image {
    width: 100%;
    height: auto;
}

.ms-products-container.with-banner {
    flex: 1;
    min-width: 0;
}

.ms-products-container.full-width {
    width: 100%;
}

.ms-banner-link {
    display: block;
    height: 100%;
}

/* بهبود نمایش اسلایدر در حالت دارای بنر */
.ms-side-banner-products-widget.has-banner .ms-products-slider {
    width: 100%;
}

.ms-side-banner-products-widget.has-banner .ms-products-slider .swiper {
    width: 100%;
}

.ms-side-banner-products-widget.has-banner .ms-products-slider .swiper-wrapper {
    width: 100%;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 767px) {
    .ms-side-banner-products-widget.has-banner .ms-products-banner-container {
        flex-direction: column-reverse !important;
        gap: 0;
    }
    
    .ms-side-banner {
        width: 100% !important;
        margin: 0 0 15px 0 !important;
        order: 2;
    }
    
    .ms-side-banner-products-widget.banner-position-right .ms-side-banner {
        order: 3;
    }
    
    .ms-side-banner-products-widget.banner-position-left .ms-side-banner {
        order: 1;
    }
    
    .ms-products-container {
        width: 100% !important;
        order: 2;
    }
    
    .ms-side-banner-products-widget.banner-height-full .ms-banner-image,
    .ms-side-banner-products-widget.banner-height-custom .ms-banner-image {
        height: auto;
        width: 100%;
    }
}

/* استایل های Swiper */
.ms-products-slider .swiper {
    padding: 0 4px 0 0;
}

.ms-products-container.with-banner .ms-products-slider .swiper {
    padding: 0 4px 0 0;
}

@media (max-width: 480px) {
    .ms-free-shipping, .ms-old-price-badge {
        width: 50%;
    }
    .ms-products-slider .swiper{
        padding: 0 2px 0 0px;
    }
    .ms-products-container.with-banner .ms-products-slider .swiper {
        padding: 0 2px 0 0;
    }
}

.ms-side-banner-products-widget .swiper-wrapper {
    align-items: stretch;
}

.ms-side-banner-products-widget .ms-product-slide {
    height: auto;
    display: flex;
}

.ms-side-banner-products-widget .ms-product-slide-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ms-side-banner-products-widget .ms-product-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ms-side-banner-products-widget .ms-product-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0px !important;
}

/* استایل های آرشیو محصولات */
.ms-archive-products-widget {
    width: 100%;
}

.ms-archive-products-widget .ms-products-container {
    width: 100%;
}

.ms-archive-products-widget .ms-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 0;
    gap: 8px;
}

@media (max-width: 1024px) {
    .ms-archive-products-widget .ms-products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px;
    }
}

@media (max-width: 767px) {
    .ms-archive-products-widget .ms-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 4px;
    }
}

/* استایل های صفحه بندی آرشیو محصولات */
.ms-archive-pagination {
    margin: 40px 0 20px;
    text-align: center;
    direction: ltr;
}

.ms-pagination-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.ms-archive-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #6b7280;
    text-decoration: none;
    font-family: 'IRANSans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    line-height: 1;
}

.ms-archive-pagination .page-numbers.current {
    background: #25A595;
    border-color: #25A595;
    color: #ffffff;
}

.ms-archive-pagination .page-numbers.prev,
.ms-archive-pagination .page-numbers.next {
    background: #f8f9fa;
    border-color: #e5e7eb;
    color: #6b7280;
}

.ms-archive-pagination .page-numbers.dots {
    background: transparent;
    border-color: transparent;
    color: #6b7280;
}

/* ریسپانسیو برای صفحه بندی */
@media (max-width: 767px) {
    .ms-archive-pagination {
        margin: 30px 0 15px;
    }
    
    .ms-pagination-nav {
        gap: 6px;
    }
    
    .ms-archive-pagination .page-numbers {
        min-width: 40px;
        height: 40px;
        padding: 0 10px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .ms-archive-pagination .page-numbers {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
        font-size: 12px;
    }
    
    .ms-archive-pagination .page-numbers.prev,
    .ms-archive-pagination .page-numbers.next {
        display: none;
    }
}

/* بهبود نمایش برای صفحه خوان ها */
@media (prefers-reduced-motion: reduce) {
    .ms-archive-pagination .page-numbers {
        transition: none;
    }
}

/* پشتیبانی از حالت چاپ */
@media print {
    .ms-archive-pagination {
        display: none;
    }
}

/* استایل دو خط تخفیف  */
.ms-product-price .bfc-price-inline {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.ms-product-price .bfc-price-inline .bfc-price-item {
    font-family: "IRANSans_Medium";
}
.ms-product-price .bfc-price-inline .bfc-strike {
    color: #7A7A7A;
    text-decoration: line-through;
}
.ms-product-price .bfc-price-inline .bfc-strike:first-child {
    font-size: 14px;
    font-weight: 400;
}
.ms-product-price .bfc-price-inline .bfc-final {
    color: #192736;
    font-weight: 400;
    font-size: 16px;
}

/* استایل های بهینه سازی LCP عمومی */
img[loading="eager"] {
    content-visibility: auto;
}

.ms-lcp-image {
    content-visibility: auto;
    will-change: transform;
}

/* بهبود accessibility عمومی */
@media (prefers-reduced-motion: reduce) {
    .ms-category-carousel .swiper-pagination-bullet,
    .ms-banners-carousel .swiper-pagination-bullet,
    .ms-brand-carousel .swiper-pagination-bullet,
    .ms-custom-slider .swiper-pagination-bullet {
        transition: none !important;
    }
}

/* استایل focus برای keyboard navigation در همه نقاط ناوبری */
.swiper-pagination-bullet:focus-visible {
    outline: 3px solid #25A595 !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 3px rgba(37, 165, 149, 0.3) !important;
}

/* افزایش contrast برای accessibility در همه اسلایدرها */
@media (prefers-contrast: high) {
    .ms-category-carousel .swiper-pagination-bullet-active,
    .ms-banners-carousel .swiper-pagination-bullet-active,
    .ms-brand-carousel .swiper-pagination-bullet-active,
    .ms-custom-slider .swiper-pagination-bullet-active {
        background: #000000 !important;
        box-shadow: 0 0 0 3px #ffffff !important;
    }
}







/* استایل های محصولات مرتبط و سایر محصولات برند */
.ms-related-products-widget,
.ms-brand-products-widget {
    width: 100%;
    border: 2px solid #e7e7e7;
    border-radius: 12px;
}

.ms-related-products-widget .ms-products-container,
.ms-brand-products-widget .ms-products-container {
    width: 100%;
    padding: 15px;
}

.ms-related-products-widget .ms-products-grid,
.ms-brand-products-widget .ms-products-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    margin: 0;
    gap: 8px;
}

@media (max-width: 1024px) {
    .ms-related-products-widget .ms-products-grid,
    .ms-brand-products-widget .ms-products-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 8px;
    }
}

@media (max-width: 767px) {
    .ms-related-products-widget .ms-products-grid,
    .ms-brand-products-widget .ms-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 4px;
    }
}

/* استایل های هدر */
.ms-related-products-widget .ms-widget-header,
.ms-brand-products-widget .ms-widget-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
    margin-top: 0;
    padding: 20px;
    text-align: center;
    border-bottom: 2px solid #e7e7e7;
}

.ms-related-products-widget .ms-header-title,
.ms-brand-products-widget .ms-header-title {
    font-family: IRANSans, sans-serif;
    font-size: 18px;
    font-weight: bold;
    color: #192736;
    margin: 0;
}