/* ============================================================
   Webkoob Products Carousel — CSS
   ============================================================ */

.webkoob-products-carousel {
    position: relative;
    width: 100%;
}

/* Swiper core */
.webkoob-products-carousel .swiper {
    overflow: hidden;
    width: 100%;
}

.webkoob-products-carousel .swiper-wrapper {
    display: flex;
    align-items: stretch;
    /* هیچ‌وقت transform رو override نکن — Swiper از transform استفاده می‌کنه */
}

.webkoob-products-carousel .swiper-slide {
    height: auto;
    display: flex;
    flex-shrink: 0;
    box-sizing: border-box;
}

.webkoob-products-carousel .webkoob-product-slide {
    width: 100%;
}

/* -------------------------------------------------------
   Navigation Buttons
   ------------------------------------------------------- */
.webkoob-products-carousel .swiper-button-next,
.webkoob-products-carousel .swiper-button-prev {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
    z-index: 20;
    top: 50%;
    transform: translateY(-50%);
}

.webkoob-products-carousel .swiper-button-next:after,
.webkoob-products-carousel .swiper-button-prev:after {
    font-family: swiper-icons !important;
    font-size: 14px !important;
    font-weight: 700;
    color: #222 !important;
}


.webkoob-products-carousel .swiper-button-next:after {
    content: 'prev' !important;
}

.webkoob-products-carousel .swiper-button-prev:after {
    content: 'next' !important;
}

/* RTL — موقعیت دکمه‌ها
   در RTL:
   - prev (→ به راست) باید در سمت راست container باشه
   - next (← به چپ)  باید در سمت چپ  container باشه
   Swiper وقتی dir=rtl داره، خودش آیکن داخل دکمه رو هم برعکس می‌کنه
*/
html[dir="rtl"] .webkoob-products-carousel .swiper-button-prev {
    right: 10px !important;
    left: auto !important;
}

html[dir="rtl"] .webkoob-products-carousel .swiper-button-next {
    left: 10px !important;
    right: auto !important;

}

.webkoob-products-carousel .swiper-button-disabled {
    opacity: .35;
    pointer-events: auto !important;
    cursor: pointer;
}

/* -------------------------------------------------------
   View All Card
   ------------------------------------------------------- */
.webkoob-view-all-slide {
    height: 100%;
}

.webkoob-view-all-card {
    width: 100%;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* border: 1px solid #e5e5e5; */
    border-radius: 12px;
    background: #fff;
    text-decoration: none;
    transition: transform .3s, box-shadow .3s;
}

/* .webkoob-view-all-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
} */

.webkoob-view-all-circle {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #111;
    font-size: 28px;
    margin-bottom: 15px;
}

.webkoob-view-all-text {
    font-size: 15px;
    font-weight: 700;
    color: #111;
}

/* -------------------------------------------------------
   Touch / Swipe hint — موبایل
   ------------------------------------------------------- */
@media (max-width: 767px) {

    /* دکمه‌های ناوبری در موبایل هم نمایش داده می‌شوند (طبق درخواست
       کارفرما، برای حالت گرید ۲×۲) — فقط کمی کوچک‌تر و نزدیک‌تر به لبه */
    .webkoob-products-carousel .swiper-button-next,
    .webkoob-products-carousel .swiper-button-prev {
        width: 32px;
        height: 32px;
    }

    .webkoob-products-carousel .swiper-button-next:after,
    .webkoob-products-carousel .swiper-button-prev:after {
        font-size: 11px !important;
    }

    /* اطمینان از touch-action درست */
    .webkoob-products-carousel .swiper {
        touch-action: pan-y;
    }

    .webkoob-view-all-card {
        min-height: 220px;
    }
}

/* -------------------------------------------------------
   Touch action — جلوگیری از تداخل با اسکرول عمودی
   ------------------------------------------------------- */
.webkoob-products-carousel .swiper {
    touch-action: pan-y;
}
