/* ============ 课程卡片 ============ */
.course-card {
    border: 1px solid #eef1f5;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    cursor: pointer;
}
.course-card:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    border-color: #165DFF;
}
.course-img {
    height: 140px;
    background-color: #f5f7fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #999;
    position: relative;
    overflow: hidden;
}
.course-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.seckill-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #ff4d4f;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(255,77,79,0.2);
}
.course-info {
    padding: 12px;
}

/* 🔥 核心修复1：标题最多显示1行，超长省略 */
.course-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
}

/* 🔥 核心修复2：Meta 区域强制不换行，编码自动截断 */
.course-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
}
.course-meta span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: 4px;
}
.course-meta .buy-count {
    color: #ff7d00;
    flex-shrink: 0;
}

.course-price {
    font-size: 16px;
    color: #e64340;
    font-weight: bold;
}
.course-price-original {
    text-decoration: line-through;
    font-size: 12px;
    color: #999;
    margin-left: 4px;
}
.course-price.free {
    color: #52c41a;
}

/* ============ 响应式网格 ============ */
#recommendCourses, #hotCourses, #vipCourses {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    #recommendCourses, #hotCourses, #vipCourses {
        grid-template-columns: repeat(2, 1fr);
    }
    .seckill-course-list .course-card {
        min-width: 150px;
    }
    .course-img {
        height: 120px;
    }
}