/* ============ استایل CSS (برای نمایش عمودی قیمت) ============ */
.ash-card-info {
    display: flex;
    flex-direction: column;
    gap: 7px;
    line-height: 1.7;
    padding: 0 10px 0 0;
    height: 100%;
    position: relative;
    min-height: 165px;
    direction: rtl;
    width: 100%;
}

.ash-card-info .ash-ci-row {
    margin: 0;
}

.ash-ci-teacher {
    color: #7a7a7a;
}

.ash-ci-dates {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 5px;
}

.ash-date-chip {
    display: inline-block;
    white-space: nowrap;
    color: #59ac77;
}

.ash-date-empty {
    color: #2196F3;
}

.ash-ci-row.ash-ci-count {
    gap: 5px;
    display: none;
}

.ash-ci-count strong {
    display: inline-block;
}

/* ✅ استایل بخش قیمت (عمودی) */
.ash-ci-row.ash-ci-price {
    margin-top: 0;
    color: #ff4e00;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: absolute;
    bottom: 0;
    right: 10px;
    width: 100%;
    transform: translateY(10px);
}

.ash-ci-price span.woocommerce-Price-amount.amount {
    font-weight: 700;
    font-size: 1.1em;
}

/* ✅ استایل قیمت عادی و خط‌خورده */
.ash-ci-price del {
    color: #7a7a7a;
    font-size: 0.9em;
    font-weight: 400;
    text-decoration: line-through;
    padding: 0;
    margin: 0 0 -10px 0;
}

/* ✅ استایل قیمت رایگان */
.ash-price-free {
    color: #4caf50;
    font-weight: 700;
    font-size: 1.2em;
}

.ash-ci-row.ash-ci-certificate {
    background: #f9c531;
    color: #34180a;
    padding: 0 10px;
    width: fit-content;
    border-radius: 10px 0 0 10px;
    transform: translate(30px, -40px);
    padding-right: 30px;
    position: absolute;
    bottom: 0;
}

.ash-ci-row.ash-ci-certificate span {
    font-size: 0.9em;
}

/* ✅ استایل قیمت فروش ویژه (Sale Price) */
.ash-ci-price .ash-price-sale .woocommerce-Price-amount {
    color: #ff4e00;
    font-weight: 700;
    font-size: 1.1em;
}

.ash-price-sale .ash-price-regular:not(del) .woocommerce-Price-amount {
    color: #ff4e00 !important;
}

.ash-ci-row.ash-ci-duration {
    color: #59ac77;
}

.ash-ci-row.ash-ci-lessons {
    color: #2196F3;
}

.ash-package-course-chip {
    color: #59ac77;
    display: inline-block;
    white-space: nowrap;
}

.ash-ci-package-courses {
    color: #59ac77;
    margin-bottom: 20px;
}

.ash-card-info,
.ash-ci-row.ash-ci-teacher,
.ash-ci-row.ash-ci-duration span,
.ash-ci-row.ash-ci-lessons span,
.ash-ci-row.ash-ci-price span,
.ash-ci-row.ash-ci-dates span,
.ash-ci-row.ci-count,
.ash-ci-row.ash-ci-certificate span,
.ash-ci-package-courses {
    font-size: calc(0.1vw + 0.8rem);
}

.ash-ci-package-courses {
    -webkit-line-clamp: 2;
    text-overflow: ellipsis;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

/* استایل تاریخ برای RTL/LTR */
.ash-date {
    display: inline-block;
}

.ash-date-sep {
    margin: 0 3px;
}

.ash-spc-card-body .ash-card-info {
    min-height: 160px;
}

@media (max-width: 768px) {
    .ash-card-info,
    .ash-ci-row.ash-ci-teacher,
    .ash-ci-row.ash-ci-duration span,
    .ash-ci-row.ash-ci-lessons span,
    .ash-ci-row.ash-ci-price span,
    .ash-ci-row.ash-ci-dates span,
    .ash-ci-row.ci-count,
    .ash-ci-row.ash-ci-certificate span {
        font-size: 1.1rem !important;
    }

    .ash-ci-row.ash-ci-dates {
        margin-bottom: 0 !important;
    }

    .ash-ci-package-courses {
        font-size: 0.9rem !important;
    }

    .ash-ca-card-body .ash-card-info {
        min-height: auto !important;
    }

    .ash-ca-card-body .ash-card-info,
    .ash-ca-card-body .ash-card-info .ash-ci-row.ash-ci-teacher,
    .ash-ca-card-body .ash-card-info .ash-ci-row.ash-ci-duration span,
    .ash-ca-card-body .ash-card-info .ash-ci-row.ash-ci-lessons span,
    .ash-ca-card-body .ash-card-info .ash-ci-row.ci-count {
        font-size: 0.9rem !important;
    }

    .ash-ca-card-body .ash-card-info .ash-ci-row.ash-ci-dates span {
        font-size: 0.8rem !important;
    }

    .ash-ca-card-body .ash-card-info .ash-ci-row.ash-ci-dates {
        margin-bottom: 7px !important;
        transform: translateY(-5px) !important;
    }

    .ash-ca-card-body .ash-card-info .ash-ci-row.ash-ci-price {
        transform: translate(20px, 15px) !important;
        position: relative !important;
    }

    .ash-ca-card-body .ash-card-info .ash-ci-row.ash-ci-price span {
        font-size: 0.9rem !important;
    }

    .ash-ca-card-body .ash-card-info .ash-ci-row.ash-ci-certificate {
        display: none !important;
    }
    .ash-spc-card-body .ash-card-info {
        min-height: 180px;
    }
}