/* ==========================================================================
   سکشن کاروسل دسته‌بندی محصولات - Emami Gold
   مسیر قرارگیری: assets/css/category-carousel.css در تم hello-elementor-child
   ========================================================================== */

.emami-cat-carousel-wrapper {
    direction: rtl;
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.emami-cat-swiper {
    width: 100%;
    padding-bottom: 8px;
}

.emami-cat-slide {
    width: auto;
}

.emami-cat-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
    padding: 10px 20px;
    border: 1px solid #e2e2e2;
    border-radius: 30px;
    background: #fff;
    transition: all 0.25s ease;
}

.emami-cat-item:hover {
    border-color: #d4af37; /* طلایی هماهنگ با برند */
    background: #2f4d3f;   /* سبز تیره هماهنگ با هدر سایت */
}

.emami-cat-item:hover .emami-cat-name {
    color: #fff;
}

/* آیکون اختیاری - فقط اگر برای دسته تصویری ست شده باشد رندر می‌شود */
.emami-cat-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: block;
}

.emami-cat-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.emami-cat-name {
    font-size: 14px;
    font-weight: 500;
    color: #2f4d3f; /* سبز تیره هماهنگ با هدر سایت */
    text-align: center;
    transition: color 0.25s ease;
}

/* دکمه‌های ناوبری */
.emami-cat-swiper-button-next,
.emami-cat-swiper-button-prev {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #2f4d3f;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: background 0.2s ease;
}

.emami-cat-swiper-button-next:hover,
.emami-cat-swiper-button-prev:hover {
    background: #d4af37;
}

.emami-cat-swiper-button-next::after,
.emami-cat-swiper-button-prev::after {
    font-family: swiper-icons;
    font-size: 12px;
}

/* چون سایت RTL هست، جای دکمه بعدی/قبلی برعکس می‌شود */
.emami-cat-swiper-button-next {
    left: 0;
    right: auto;
}

.emami-cat-swiper-button-prev {
    right: 0;
    left: auto;
}

.emami-cat-swiper-button-next::after {
    content: 'prev';
}

.emami-cat-swiper-button-prev::after {
    content: 'next';
}

/* پجینیشن (نقطه‌ها) - فقط موبایل */
.emami-cat-swiper-pagination {
    display: none;
    text-align: center;
    margin-top: 12px;
}

/* ==========================================================================
   ریسپانسیو
   ========================================================================== */

@media (max-width: 767px) {
    .emami-cat-carousel-wrapper {
        padding: 16px 12px;
    }

    .emami-cat-item {
        padding: 8px 14px;
    }

    .emami-cat-icon {
        width: 18px;
        height: 18px;
    }

    .emami-cat-name {
        font-size: 12px;
    }

    .emami-cat-swiper-button-next,
    .emami-cat-swiper-button-prev {
        width: 28px;
        height: 28px;
        display: none; /* در موبایل با اسوایپ لمسی جابجا می‌شود */
    }

    .emami-cat-swiper-pagination {
        display: block;
    }
}