/* پایه کاروسل */
.ecc-carousel-container {
    width: 100%;
    padding: 10px 0 50px;
    position: relative;
    overflow: hidden;
}

.ecc-carousel {
    overflow: hidden;
    width: 100%;
    padding: 0px 0px 10px 0px;
}

.swiper-wrapper {
    display: flex;
    flex-direction: row;
}

.swiper-slide {
    width: auto !important;  /* مهم: اجازه می‌دهد عرض اسلاید بر اساس محتوا تنظیم شود */
    height: auto;
    display: flex;
}

/* کارت - عرض بر اساس محتوا */
.ecc-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: fit-content;      /* عرض به اندازه محتوا */
    min-width: 200px;        /* حداقل عرض برای جلوگیری از خیلی کوچک شدن */
    height: 100%;
    box-sizing: border-box;
}

/* محتوای متنی (سمت چپ) */
.ecc-card-content {
    flex-shrink: 0;          /* جلوگیری از جمع شدن متن */
    padding: 20px;
    text-align: right;
    order: 2;
}

/* تصویر (سمت راست) */
.ecc-card-image {
    flex-shrink: 0;
    order: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.ecc-cat-image {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    max-height: 80px;
}

/* عنوان - هرگز دو خط نمی‌شود و باعث افزایش عرض کارت می‌شود */
.ecc-cat-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;     /* ممانعت از دو خطی شدن */
    overflow: visible;       /* اجازه می‌دهد متن خارج از باکس نرود تا کارت پهن شود */
}

/* تعداد محصولات - یک خط */
.ecc-cat-count {
    font-size: 13px;
    opacity: 0.7;
    white-space: nowrap;
}

/* حالت موبایل (مربع شکل) */
@media (max-width: 768px) {
    .swiper-slide {
        width: 45% !important;  /* در موبایل عرض نسبی بهتر است */
    }
    .ecc-card {
        flex-direction: column;
        width: 100%;
        min-width: auto;
    }
    .ecc-card-content {
        order: 2;
        padding: 12px;
        text-align: center;
        width: 100%;
    }
    .ecc-card-image {
        order: 1;
        width: 100%;
        padding: 10px;
    }
    .ecc-cat-image {
        max-height: 100px;
        object-fit: cover;
    }
    .ecc-cat-title {
        white-space: normal;   /* در موبایل می‌تواند دو خط شود تا از صفحه خارج نشود */
        font-size: 14px;
    }
    .ecc-cat-count {
        display: none;
    }
}

/* دکمه‌های ناوبری Swiper */
.swiper-button-prev,
.swiper-button-next {
    color: #333;
    background: rgba(255,255,255,0.8);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s;
}
.swiper-button-prev:after,
.swiper-button-next:after {
    font-size: 18px;
}
.swiper-pagination-bullet-active {
    background: #333;
}









/* استایل اسلایدر اصلی */
.ecc-main-slider {
    position: relative;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
}

.ecc-slider {
    width: 100%;
    height: 500px; /* ارتفاع پیش‌فرض - در responsive قابل تغییر */
}

.ecc-slider-slide {
    position: relative;
    width: 100%;
    height: 100%;
}

.ecc-slider-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ecc-slider-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ecc-slider-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.ecc-slider-content {
    position: absolute;
    bottom: 20%;
    left: 5%;
    right: 5%;
    z-index: 2;
    color: white;
    text-align: right;
    max-width: 600px;
    direction: rtl;
}

.ecc-slider-subtitle {
    font-size: 1rem;
    margin-bottom: 10px;
    opacity: 0.8;
}

.ecc-slider-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.3;
}

.ecc-slider-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s;
}

.ecc-slider-btn:hover {
    transform: scale(1.05);
    color: #fff;
}

.ecc-btn-svg svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
}

/* دات‌های ناوبری در گوشه پایین راست */
.ecc-slider-pagination {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10;
    text-align: left;
    width: auto !important;
    left: auto !important;
}

.ecc-slider-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #fff;
    opacity: 0.6;
    margin: 0 5px;
}

.ecc-slider-pagination .swiper-pagination-bullet-active {
    background: #ff6600;
    opacity: 1;
}

/* مربع‌های شناور SVG سمت چپ */
.ecc-floating-svgs {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 20;
}

.ecc-float-box {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    transition: all 0.3s;
    animation: floatMove 6s infinite ease-in-out;
}

@keyframes floatMove {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Responsive */
@media (max-width: 768px) {
    .ecc-slider {
        height: 400px;
    }
    .ecc-slider-title {
        font-size: 1.8rem;
    }
    .ecc-floating-svgs {
        display: none;
    }
}














