/* ===== Home Swiper — cats centered + product sliders (RTL) ===== */

/* دسته‌بندی وسط‌چین */
.cats-centered {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 12px;
    text-align: center;
    margin: 18px 0;
}

    .cats-centered .cat {
        flex: 0 1 128px;
        max-width: 148px;
        min-width: 104px;
        background: var(--gray);
        border-radius: 16px;
        padding: 16px 8px;
        font-size: 13px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        transition: .2s;
    }

        .cats-centered .cat:hover {
            background: #ffe8eb;
            transform: translateY(-3px);
        }

        .cats-centered .cat img {
            width: 72px !important;
            height: 72px !important;
            object-fit: cover;
            border-radius: 50%;
            margin: 0 auto;
        }

        .cats-centered .cat span {
            line-height: 1.9;
        }

/* ===== اسلایدر تمام‌عرض بالای دسته‌بندی ===== */
.hero-swiper {
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    margin: 16px 0 6px;
}

    .hero-swiper .swiper-slide a {
        display: block;
        width: 100%;
    }

    .hero-swiper .swiper-slide img {
        width: 100%;
        height: 340px;
        object-fit: cover;
        display: block;
    }

@media(max-width:640px) {
    .hero-swiper .swiper-slide img {
        height: 170px;
    }
}

/* سوایپر محصولات */
.product-swiper {
    position: relative;
    padding: 6px 2px 34px;
    overflow: hidden;
}

    .product-swiper .swiper-wrapper {
        align-items: stretch;
    }

    .product-swiper .swiper-slide {
        height: auto;
        display: flex;
    }
    /* فیکس هم‌ترازی: همه کارت‌ها هم‌ارتفاع، دکمه همیشه ته باکس */
    .product-swiper .card {
        width: 100%;
        height: 100%;
        display: flex !important;
        flex-direction: column !important;
    }

        .product-swiper .card .pimg {
            height: 170px !important;
            min-height: 170px !important;
            font-size: 70px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        /* فاصله متن‌ها — دیگر به هم نمی‌چسبند */
        .product-swiper .card h3 {
            min-height: 56px;
            line-height: 2.1;
            margin: 12px 0 8px;
            font-size: 13.5px;
        }

        .product-swiper .card .old {
            min-height: 24px;
            line-height: 24px;
            margin: 0 0 4px;
            display: block;
        }

        .product-swiper .card .old-empty {
            visibility: hidden;
        }

        .product-swiper .card .price {
            line-height: 2;
            margin: 2px 0 10px;
        }

        .product-swiper .card .add {
            margin-top: auto;
        }

/* دکمه‌ها */
.swiper-button-next, .swiper-button-prev {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #eee;
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
    color: var(--dark);
}

    .swiper-button-next::after, .swiper-button-prev::after {
        font-size: 16px;
        font-weight: 900;
    }

.swiper-pagination-bullet-active {
    background: var(--red);
}

/* موبایل: نمایش 1.2 اسلاید برای حس سوایپ */
@media(max-width:640px) {
    .cats-centered .cat {
        flex: 0 1 calc(25% - 12px);
        min-width: 0;
        padding: 12px 4px;
        font-size: 12px;
    }

        .cats-centered .cat img {
            width: 56px !important;
            height: 56px !important;
        }
}
