/* استایل کاروسل محصولات - فرانت‌اند */
.jnews-product-carousel {
    direction: rtl;
    padding: 30px 20px;
    background: #1a1a1a;
    border-radius: 12px;
    margin: 30px 0;
}

.jnews-product-carousel .carousel-title {
    color: #ff6b6b;
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 20px 0;
    text-align: right;
    padding: 0 10px;
}

.jnews-product-carousel .carousel-title::before {
    content: '◄';
    margin-left: 10px;
    color: #ff6b6b;
}

.jnews-product-carousel .product-carousel-container {
    position: relative;
    overflow: hidden;
}

/* Swiper Container */
.jnews-product-carousel .swiper-container {
    overflow: hidden;
    padding: 10px 0 30px 0;
}

/* Swiper Wrapper - برای محصولات کم */
.jnews-product-carousel .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

/* وقتی محصولات کم هستند، در وسط قرار بگیرند */
.jnews-product-carousel .swiper-container-initialized .swiper-slide {
    height: auto;
    display: flex;
}

/* Product Card */
.jnews-product-carousel .product-card {
    background: #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #333;
}

.jnews-product-carousel .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.2);
    border-color: #ff6b6b;
}

/* Product Image */
.jnews-product-carousel .product-image-wrapper {
    position: relative;
    background: white;
    padding: 20px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jnews-product-carousel .product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Discount Badge */
.jnews-product-carousel .discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff0844;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    z-index: 2;
}

/* Product Info */
.jnews-product-carousel .product-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.jnews-product-carousel .product-title {
    color: white;
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.5;
    min-height: 58px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Price Section */
.jnews-product-carousel .product-prices {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #333;
}

.jnews-product-carousel .old-price {
    color: #999;
    font-size: 12px;
    text-decoration: line-through;
    margin-bottom: 5px;
    direction: rtl;
}

.jnews-product-carousel .new-price {
    color: #4CAF50;
    font-size: 16px;
    font-weight: bold;
    direction: rtl;
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.jnews-product-carousel .price-number {
    font-family: 'Vazir', sans-serif;
}

.jnews-product-carousel .price-currency {
    font-size: 14px;
    color: #4CAF50;
}

/* Buy Button */
.jnews-product-carousel .product-buy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #ff6b6b;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    margin-top: 10px;
    transition: background 0.3s ease;
    text-align: center;
}

.jnews-product-carousel .product-buy-btn:hover {
    background: #ff5252;
    color: white;
}

.jnews-product-carousel .product-buy-btn i {
    font-size: 14px;
}

/* Swiper Navigation */
.jnews-product-carousel .swiper-button-next,
.jnews-product-carousel .swiper-button-prev {
    color: #ff6b6b;
    background: rgba(42, 42, 42, 0.9);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #ff6b6b;
}

.jnews-product-carousel .swiper-button-next::after,
.jnews-product-carousel .swiper-button-prev::after {
    font-size: 20px;
}

.jnews-product-carousel .swiper-button-next:hover,
.jnews-product-carousel .swiper-button-prev:hover {
    background: #ff6b6b;
    color: white;
}

/* Swiper Pagination */
.jnews-product-carousel .swiper-pagination-bullet {
    background: #666;
    opacity: 1;
}

.jnews-product-carousel .swiper-pagination-bullet-active {
    background: #ff6b6b;
}

/* Responsive */
@media (max-width: 1200px) {
    .jnews-product-carousel .product-card {
        /* 3 items on medium screens */
    }
}

@media (max-width: 768px) {
    .jnews-product-carousel {
        padding: 20px 10px;
    }
    
    .jnews-product-carousel .carousel-title {
        font-size: 20px;
    }
    
    .jnews-product-carousel .product-title {
        font-size: 12px;
        min-height: 54px;
    }
    
    .jnews-product-carousel .product-buy-btn {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .jnews-product-carousel .swiper-button-next,
    .jnews-product-carousel .swiper-button-prev {
        width: 35px;
        height: 35px;
    }
    
    .jnews-product-carousel .swiper-button-next::after,
    .jnews-product-carousel .swiper-button-prev::after {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .jnews-product-carousel .product-prices {
        text-align: center;
    }
    
    .jnews-product-carousel .old-price {
        font-size: 11px;
    }
    
    .jnews-product-carousel .new-price {
        font-size: 14px;
        justify-content: center;
    }
    
    .jnews-product-carousel .product-buy-btn {
        font-size: 11px;
        padding: 7px 10px;
    }
    
    .jnews-product-carousel .product-buy-btn i {
        font-size: 12px;
    }
}

