/* ============================================================ */
/* ===== اسلایدر گرید محصولات - نسخه کامل نهایی ===== */
/* ============================================================ */

/* ===== ریست ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* ===== کانتینر اصلی ===== */
.test {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url(../../media/images/1.jpg) no-repeat center;
    background-size: cover;
    padding: 30px 0;
    overflow: hidden;
    width: 90%;
    margin: 0 auto;
    position: relative;
}

.containergrid {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== کانتینر سوییپر ===== */
.slider-wrapper {
    width: 100%;
    position: relative;
    overflow: hidden;
    padding: 0 50px;
}

/* ===== Swiper اصلی ===== */
.swiper {
    overflow: hidden;
    width: 100%;
    padding: 20px 0;
}

.swiper-wrapper {
    display: flex;
    align-items: stretch;
    width: 100%;
}

/* ============================================================ */
/* ===== اسلایدها - نمایش کامل 3 اسلاید ===== */
/* ============================================================ */
/* ============================================================ */
/* ===== اسلایدها - نمایش کامل 3 اسلاید ===== */
/* ============================================================ */

/* این خط رو عوض کن */
.swiper-slide {
    flex-shrink: 0;
    width: calc((100% - 40px) / 3) !important; /* از 60 به 40 کاهش دادم */
    height: auto;
    margin-right: 20px !important; /* از 30 به 20 کاهش دادم */
}

.swiper-slide:last-child {
    margin-right: 0 !important;
}

/* ===== حالت RTL (فارسی، عربی) ===== */
body[dir="rtl"] .swiper-slide {
    width: calc((100% - 40px) / 3) !important; /* از 60 به 40 کاهش دادم */
    margin-right: 0 !important;
    margin-left: 20px !important; /* از 30 به 20 کاهش دادم */
}

body[dir="rtl"] .swiper-slide:last-child {
    margin-left: 0 !important;
}

/* ============================================================ */
/* ===== کارت‌های محصول ===== */
/* ============================================================ */

.card-list .card-item {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    user-select: none;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    width: 100%;
    height: 100%;
    min-height: 340px;
    transition: transform 0.3s ease;
    position: relative;
}

.card-list .card-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.3);
}

/* ===== تصویر ===== */
.card-list .card-item .user-image {
    width: 210px;
    height: 210px;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 3px solid #fff;
    padding: 3px;
    object-fit: cover;
    flex-shrink: 0;
}

/* ===== عنوان ===== */
.card-item h2 {
    font-size: 1rem;
    color: white;
    font-weight: bold;
    text-align: center;
    margin: 3px 0;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 2px 0 #030728,
                 -2px 0 #030728,
                 0 2px #030728,
                 0 -2px #030728,
                 2px 2px #030728,
                 -2px -2px #030728,
                 2px -2px #030728,
                 -2px 2px #030728;
    line-height: 1.2;
    word-break: break-word;
}

/* ===== قیمت و توضیحات ===== */
.card-item p {
    margin-bottom: 5px;
    font-size: 0.95rem;
    color: cyan;
    font-weight: 700;
    text-align: center;
    min-height: 25px;
    text-shadow: 2px 0 #030728,
                 -2px 0 #030728,
                 0 2px #030728,
                 0 -2px #030728,
                 2px 2px #030728,
                 -2px -2px #030728,
                 2px -2px #030728,
                 -2px 2px #030728;
}

.card-list .card-item .user-pro {
    font-size: 0.95rem;
    color: #e3e3e3;
    font-weight: 500;
    margin: 5px 0 10px;
    text-align: center;
    width: 100%;
}

.card-item .off-price {
    font-size: 0.95rem;
    min-height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff6b6b;
}

/* ===== اطلاعات قیمت ===== */
.info-p-price {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.info-p-price p {
    margin: 0;
    font-size: 0.95rem;
}

.info-p-price del {
    color: #ff6b6b;
    opacity: 0.7;
}

.info-p-price ins {
    text-decoration: none;
    color: #4ecdc4;
}

.text-dec-none {
    text-decoration: none !important;
}

/* ===== دکمه ===== */
.card-list .card-item .message-button {
    font-size: 0.8rem;
    padding: 6px 15px;
    color: #030728;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    background: #fff;
    border: 1px solid transparent;
    transition: 0.2s ease;
    min-height: 32px;
    width: auto;
    white-space: nowrap;
    margin-top: 5px;
}

.card-list .card-item .message-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #fff;
    color: #fff;
}

/* ===== برچسب NEW ===== */
.card-item .new-title {
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    background-color: #ff0000;
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 1px 10px;
    border-radius: 8px 0 8px 0;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body[dir="rtl"] .card-item .new-title {
    left: auto;
    right: 8px;
    border-radius: 0 8px 0 8px;
}

/* ============================================================ */
/* ===== دکمه‌های ناوبری ===== */
/* ============================================================ */

.swiper-button-prev,
.swiper-button-next {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 45px !important;
    height: 45px !important;
    background: rgba(0, 0, 0, 0.6) !important;
    border-radius: 50% !important;
    color: white !important;
    z-index: 100 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    color: #4658ff !important;
    transform: translateY(-50%) scale(1.1) !important;
    border-color: #fff !important;
}

.swiper-button-prev::after,
.swiper-button-next::after {
    font-size: 18px !important;
    font-weight: bold !important;
}

/* ===== حالت LTR (انگلیسی) ===== */
.swiper-button-prev {
    left: 10px !important;
    right: auto !important;
}

.swiper-button-next {
    right: 10px !important;
    left: auto !important;
}

.swiper-button-prev::after {
    content: '←' !important;
}

.swiper-button-next::after {
    content: '→' !important;
}

/* ===== حالت RTL (فارسی، عربی) ===== */
body[dir="rtl"] .swiper-button-prev {
    right: 10px !important;
    left: auto !important;
}

body[dir="rtl"] .swiper-button-next {
    left: 10px !important;
    right: auto !important;
}

body[dir="rtl"] .swiper-button-prev::after {
    content: '→' !important;
}

body[dir="rtl"] .swiper-button-next::after {
    content: '←' !important;
}

/* ===== دکمه‌های غیرفعال ===== */
.slider-wrapper .swiper-button-disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* ============================================================ */
/* ===== Pagination ===== */
/* ============================================================ */

.slider-wrapper .swiper-pagination {
    position: relative !important;
    margin-top: 25px !important;
    bottom: auto !important;
}

.slider-wrapper .swiper-pagination-bullet {
    background: #fff !important;
    opacity: 0.5 !important;
    width: 10px !important;
    height: 10px !important;
}

.slider-wrapper .swiper-pagination-bullet-active {
    opacity: 1 !important;
    background: #fff !important;
}

/* ============================================================ */
/* ===== ریسپانسیو ===== */
/* ============================================================ */

/* ===== تبلت ===== */
@media (max-width: 1024px) {
    .slider-wrapper {
        padding: 0 40px;
    }
    
    .swiper-slide {
        width: calc((100% - 30px) / 2) !important;
        margin-right: 30px !important;
    }
    
    body[dir="rtl"] .swiper-slide {
        margin-right: 0 !important;
        margin-left: 30px !important;
    }
    
    .swiper-button-prev,
    .swiper-button-next {
        width: 40px !important;
        height: 40px !important;
    }
    
    .card-list .card-item {
        min-height: 320px;
        padding: 18px 10px;
    }
    
    .card-list .card-item .user-image {
        width: 90px;
        height: 90px;
    }
    
    .card-item h2 {
        font-size: 0.95rem;
        min-height: 35px;
    }
}

/* ===== موبایل بزرگ ===== */
@media (max-width: 768px) {
    .slider-wrapper {
        padding: 0 15px;
    }
    
    .swiper-slide {
        width: 100% !important;
        margin-right: 0 !important;
    }
    
    body[dir="rtl"] .swiper-slide {
        margin-left: 0 !important;
    }
    
    .swiper-button-prev,
    .swiper-button-next {
        display: none !important;
    }
    
    .card-list .card-item {
        min-height: 300px;
        padding: 15px 10px;
    }
    
    .card-list .card-item .user-image {
        width: 80px;
        height: 80px;
    }
    
    .card-item h2 {
        font-size: 0.9rem;
        min-height: 35px;
    }
    
    .card-item p {
        font-size: 0.85rem;
    }
    
    .card-list .card-item .message-button {
        font-size: 0.75rem;
        padding: 5px 12px;
        min-height: 28px;
    }
}

/* ===== موبایل کوچک ===== */
@media (max-width: 480px) {
    .test {
        min-height: 60vh;
        padding: 10px 0;
        width: 100%;
    }
    
    .slider-wrapper {
        padding: 0 10px;
    }
    
    .card-list .card-item {
        padding: 12px 8px;
        min-height: 280px;
    }
    
    .card-list .card-item .user-image {
        width: 70px;
        height: 70px;
        margin-bottom: 8px;
        border-width: 2px;
    }
    
    .card-item h2 {
        font-size: 0.85rem;
        min-height: 30px;
    }
    
    .card-item p {
        font-size: 0.8rem;
        min-height: 20px;
    }
    
    .card-list .card-item .user-pro {
        font-size: 0.8rem;
        margin: 3px 0 8px;
    }
    
    .card-list .card-item .message-button {
        font-size: 0.7rem;
        padding: 4px 10px;
        min-height: 25px;
    }
    
    .card-item .new-title {
        font-size: 0.6rem;
        top: 5px;
        left: 5px;
        padding: 1px 8px;
    }
    
    body[dir="rtl"] .card-item .new-title {
        left: auto;
        right: 5px;
    }
    
    .slider-wrapper .swiper-pagination-bullet {
        width: 8px !important;
        height: 8px !important;
    }
}