/* ------------------------------------------------ */
/* --- استایل های اصلی --- */
/* ------------------------------------------------ */
body { 
    font-family: Tahoma, Arial, sans-serif; 
    margin: 20px; 
    background-color: #f4f4ff; 
    direction: rtl; 
}

/* ⭐️⭐️ افکت بارگذاری Fade-in (مورد ۲.الف) ⭐️⭐️ */
.custom-product-slider-wrapper[data-load-mode="fade"] {
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}
.custom-product-slider-wrapper.is-loaded {
    opacity: 1;
}

.custom-product-slider-wrapper { 
    max-width: 1300px; 
    margin: 0 auto; 
    position: relative; 
    /* Padding is set by Elementor on this wrapper (Ensures full shadow visibility) */
}


/* ⭐️ استایل کارت محصول (Product Card) */
.product-card {
    border: 1px solid transparent; 
    border-radius: 10px; /* Radius set by Elementor control */
    background-color: #fff;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    position: relative;
    display: flex; 
    flex-direction: column;
    height: auto; /* ارتفاع خودکار بر اساس محتوا */
    
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); 
}
.product-card:hover { 
    /* Glow effect is applied via Elementor selectors to override the default hover shadow */
    transform: translateY(-5px); 
}

/* ⭐️ استایل‌های افکت نئونی */

.product-image-area {
    position: relative;
    height: 180px;
    overflow: hidden;
    /* ⭐️ اصلاح: پیش‌فرض شفاف */
    border: 1px solid var(--image-border-color, transparent); 
    
    /* ⭐️ اصلاح فید بالا و پایین تصویر */
    mask-image: linear-gradient(
        to bottom, 
        rgba(0,0,0,0) 0%, /* فید از بالا */
        rgba(0,0,0,1) 15%, 
        rgba(0,0,0,1) 85%, 
        rgba(0,0,0,0) 100% /* فید از پایین */
    );
    -webkit-mask-image: linear-gradient(
        to bottom, 
        rgba(0,0,0,0) 0%, 
        rgba(0,0,0,1) 15%, 
        rgba(0,0,0,1) 85%, 
        rgba(0,0,0,0) 100%
    );
}
.product-image-area a {
    display: block;
    height: 100%;
    text-decoration: none;
}
/* 1. تنظیم ابعاد و مرکزیت تصویر */
.product-image-area img {
    width: 100%; 
    height: 100%; 
    object-fit: contain; 
    transition: transform 0.3s ease; 
    padding: 0;
    /* border-radius is applied to all four corners via Elementor control */
}
.product-card:hover .product-image-area img {
    transform: scale(1.05);
}

/* لیبل تخفیف */
.product-discount-label {
    position: absolute;
    top: 15px; 
    right: 15px; 
    background-color: #D32F2F; 
    color: #fff;
    padding: 4px 8px; 
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.8em;
    z-index: 10;
}
.woocommerce span.onsale {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    min-height: 0;
    min-width: 0;
    padding: 4px 8px; 
    font-size: 0.8em;
    border-radius: 5px;
    margin: 0;
}


/* ⭐️ اصلاح: چیدمان محتوا برای رفع فضای خالی */
.product-content {
    /* Padding set by Elementor control (card_inner_padding) */
    padding: 12px; 
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
}

.product-title {
    font-size: 1em; 
    font-weight: bold;
    color: #333;
    line-height: 1.6;
    margin-bottom: 6px; 
    height: 48px; 
    overflow: hidden;
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
}
.product-title a { 
    text-decoration: none; 
    color: inherit; 
    transition: color 0.2s ease;
}
.product-title a:hover {
    color: #D32F2F;
}

.course-meta-group {
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 6px 0; 
    margin-top: 8px; 
    margin-bottom: 8px; 
    display: flex;
    justify-content: space-between;
    font-size: 0.8em; 
    color: #666; 
}
.course-meta { display: flex; align-items: center; } /* ⭐️ اصلاح: align-items: center */
.course-meta svg { margin-left: 5px; width: 13px; height: 13px; fill: #999; } 


/* ⭐️ بخش قیمت (Footer) */
.product-footer-price {
    padding-top: 5px; 
    display: flex;
    justify-content: center; /* مرکزیت افقی */
    align-items: center;
}


/* استایل قیمت‌های ووکامرس */
.price-info { 
    display: flex; 
    flex-direction: column; 
    align-items: center; /* مرکزیت محتوای داخلی (مانند قیمت تخفیف) */
}

.price-info .price {
    font-size: 1.2em; 
    color: #333;
    font-weight: bold;
}
.price-info del {
    font-size: 0.85em;
    color: #999;
    margin-left: 0; 
    text-align: center;
}
.price-info ins {
    text-decoration: none; 
}
.price-info del, .price-info ins {
    display: block; 
    text-align: center;
}

/* ⭐️⭐️ استایل دکمه شرکت در دوره (مورد ۲) - تمام عرض ⭐️⭐️ */
.product-enroll-button {
    margin-top: auto; /* ⭐️ این دکمه را به پایین می‌چسباند */
    padding-top: 12px; /* ⭐️ افزایش فاصله از قیمت */
    text-align: center;
}
.product-enroll-button a {
    display: flex; /* ⭐️ تغییر به flex برای آیکون */
    justify-content: center; /* ⭐️ مرکزیت محتوا (آیکون + متن) */
    align-items: center; /* ⭐️ مرکزیت عمودی */
    width: 100%; /* ⭐️ تمام عرض */
    padding: 12px 16px; /* ⭐️ پدینگ پیش‌فرض سخاوتمندانه */
    font-size: 0.9em;
    font-weight: bold;
    color: #fff;
    background-color: #0050f0; /* ⭐️ رنگ پیش‌فرض آبی مدرن */
    border-radius: 8px; /* ⭐️ انحنای پیش‌فرض مدرن */
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.product-enroll-button a:hover {
    background-color: #003dbd; /* ⭐️ رنگ هاور پیش‌فرض */
    transform: translateY(-2px);
}

/* ⭐️ استایل آیکون داخل دکمه */
.product-enroll-button a .elementor-icon,
.product-enroll-button a i,
.product-enroll-button a svg {
    font-size: 0.9em; /* اندازه آیکون کمی کوچکتر از متن */
    margin-left: 8px; /* فاصله آیکون از متن (در RTL) */
}
.product-enroll-button a svg {
    width: 0.9em; /* اطمینان از هم‌اندازه بودن SVG */
    height: 0.9em;
    fill: currentColor; /* اطمینان از اینکه SVG رنگ متن را می‌گیرد */
}


/* ⭐️⭐️⭐️ استایل دکمه‌های ناوبری (فلش‌های اسلایدر) - حذف شدند ⭐️⭐️⭐️ */
.swiper-button-next.custom-nav-btn, 
.swiper-button-prev.custom-nav-btn { 
    display: none !important; /* حذف کامل */
}

/* Pagination Dots */
.swiper-pagination {
    display: none !important;
}

/* ------------------------------------------------ */
/* --- Media Query: اصلاح ریسپانسیو برای موبایل --- */
/* ------------------------------------------------ */
@media (max-width: 767px) {

    .price-info {
        width: auto;
        margin-bottom: 0;
    }
        
    .price-info .price { font-size: 1.1em; }
    .price-info del { font-size: 0.75em; }
}