/* Plugin styles with enhanced visual appeal and red theme */
.special-products-showcase-wrapper {
    padding: 40px 0;
    background: #f8f8f8; /* Lighter, more subtle background */
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    font-family: 'Vazirmatn', 'Tahoma', sans-serif; /* Persian friendly font */
    direction: rtl; /* Right-to-left for Persian */
    text-align: right;
    max-width: 1200px; /* Max width for the entire section */
    margin: 30px auto; /* Center the section */
    position: relative; /* For Swiper navigation */
}

.special-products-title {
    text-align: center;
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
    font-weight: 800;
}

.special-products-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #ff0000, #cc0000);
    border-radius: 2px;
}

.special-products-empty {
    width: 100%;
    text-align: center;
    color: #666;
    font-size: 1.2rem;
    padding: 20px;
}

/* Swiper Container */
.special-products-swiper {
    width: 100%;
    height: auto; /* Adjust height based on content */
    padding: 20px 0; /* Padding for pagination/navigation */
}

.swiper-slide.special-product {
    background: white;
    border: none;
    border-radius: 15px;
    padding: 20px; /* Slightly less padding to reduce height */
    width: 280px; /* Consistent width */
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: auto; /* Allow height to adjust */
    min-height: 450px; /* Minimum height for consistency */
    margin: 0 15px; /* Spacing between slides */
}

.swiper-slide.special-product::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #ff0000, #e60000);
    border-radius: 15px 15px 0 0;
}

.swiper-slide.special-product:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.special-product .product-link {
    text-decoration: none;
    color: inherit;
    display: block;
    flex-grow: 1;
}

.special-product .product-image {
    position: relative;
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 10px;
    height: 180px; /* Fixed height for images */
    display: flex;
    align-items: center;
    justify-content: center;
}

.special-product .product-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 10px;
    transition: transform 0.4s ease-in-out;
    object-fit: contain; /* Ensure image fits without cropping */
}

.special-product:hover .product-image img {
    transform: scale(1.1);
}

.special-product .sale-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff0000;
    color: white;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.special-product .product-title {
    color: #333;
    margin: 15px 0 10px;
    font-size: 1.2rem; /* Slightly smaller title */
    font-weight: bold;
    line-height: 1.4;
    transition: color 0.3s;
    min-height: 60px; /* Ensure consistent title height */
    display: flex;
    align-items: center;
    justify-content: center;
}

.special-product:hover .product-title {
    color: #ff0000;
}

.special-product .product-excerpt {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 15px;
    min-height: 60px; /* Ensure consistent excerpt height */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    -webkit-box-orient: vertical;
}

.special-product .product-prices {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.special-product .regular-price {
    color: #999;
    font-size: 0.9rem;
    text-decoration: line-through;
    margin-bottom: 5px;
}

.special-product .sale-price,
.special-product .current-price {
    font-weight: bold;
    color: #ff0000;
    font-size: 1.4rem; /* Slightly smaller price */
}

/* Remaining Stock Badge */
.remaining-stock-badge {
    background: #f0ad4e; /* Orange color for urgency */
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 10px;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Countdown Timer Styles */
.countdown-timer {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 8px 10px; /* Reduced padding */
    margin-top: 15px;
    margin-bottom: 15px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px; /* Reduced gap */
}

.countdown-timer .countdown-label {
    font-size: 0.85rem;
    color: #555;
    font-weight: 600;
}

.countdown-timer .countdown-values {
    display: flex;
    justify-content: center;
    gap: 8px; /* Reduced gap */
    direction: ltr; /* Force LTR for numbers */
}

.countdown-timer .countdown-values span {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 1.1rem; /* Slightly smaller font */
    font-weight: bold;
    color: #333;
    line-height: 1.2;
}

.countdown-timer .countdown-values small {
    font-size: 0.65rem; /* Slightly smaller font */
    font-weight: normal;
    color: #777;
    margin-top: 2px;
}

.countdown-timer .countdown-expired {
    color: #d9534f; /* Red for expired */
    font-weight: bold;
    font-size: 0.9rem;
}

.special-product .add-to-cart-button {
    display: inline-block;
    background: #ff0000;
    color: white;
    padding: 10px 20px; /* Reduced padding */
    border-radius: 8px;
    text-decoration: none;
    margin-top: 15px;
    font-size: 1rem; /* Slightly smaller font */
    font-weight: bold;
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 4px 10px rgba(255, 0, 0, 0.2);
}

.special-product .add-to-cart-button:hover {
    background: #cc0000;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.3);
}

/* Swiper Navigation and Pagination */
.special-products-swiper .swiper-button-next,
.special-products-swiper .swiper-button-prev {
    color: #ff0000;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.special-products-swiper .swiper-button-next:hover,
.special-products-swiper .swiper-button-prev:hover {
    background-color: #ff0000;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.special-products-swiper .swiper-button-next::after,
.special-products-swiper .swiper-button-prev::after {
    font-size: 1.2rem;
    font-weight: bold;
}

.special-products-swiper .swiper-button-prev {
    left: 10px;
}
.special-products-swiper .swiper-button-next {
    right: 10px;
}

.special-products-swiper .swiper-pagination-bullet {
    background: #ccc;
    opacity: 1;
    transition: background 0.3s;
}

.special-products-swiper .swiper-pagination-bullet-active {
    background: #ff0000;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .special-products-title {
        font-size: 2rem;
    }
    .swiper-slide.special-product {
        width: 250px;
        min-height: 420px;
    }
    .special-product .product-image {
        height: 160px;
    }
}

@media (max-width: 768px) {
    .special-products-showcase-wrapper {
        padding: 20px 0;
        margin: 20px auto;
    }
    .special-products-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    .swiper-slide.special-product {
        width: 90%; /* Full width on small screens */
        margin: 0 auto;
        min-height: 400px;
    }
    .special-product .product-image {
        height: 150px;
    }
    .special-products-swiper .swiper-button-next,
    .special-products-swiper .swiper-button-prev {
        display: none; /* Hide navigation buttons on small screens */
    }
}

@media (max-width: 480px) {
    .special-products-title {
        font-size: 1.5rem;
    }
    .swiper-slide.special-product {
        padding: 15px;
        min-height: 380px;
    }
    .special-product .product-image {
        height: 120px;
    }
    .special-product .product-title {
        font-size: 1.1rem;
        min-height: 50px;
    }
    .special-product .product-excerpt {
        font-size: 0.85rem;
        min-height: 50px;
    }
    .special-product .sale-price,
    .special-product .current-price {
        font-size: 1.2rem;
    }
    .special-product .add-to-cart-button {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}