/* 橙色模板商品名称显示优化 */

/* 覆盖 van-ellipsis 类的样式，允许商品名称显示多行并保持固定高度 */
.px-goods-card .content .name.van-ellipsis {
    overflow: visible !important;
    white-space: normal !important;
    display: block !important;
    vertical-align: baseline !important;
    max-width: 100% !important;
    
    /* 设置最大显示行数为2行 */
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    
    /* 设置固定高度以保持卡片一致性 */
    line-height: 1.4 !important;
    height: 2.8em !important; /* 固定高度为2行 */
    min-height: 2.8em !important; /* 最小高度也是2行 */
    
    /* 确保文本对齐 */
    text-align: left !important;
    word-wrap: break-word !important;
    word-break: break-all !important;
    /* 增加一点底部间距 */
    margin-bottom: 4px;
}

/* 确保推荐标签不影响文本换行 */
.px-goods-card .content .name.van-ellipsis span {
    display: inline;
    vertical-align: baseline;
}

/* 响应式设计 - 移动端优化 */
@media (max-width: 768px) {
    .px-goods-card .content .name.van-ellipsis {
        font-size: 14px !important;
        line-height: 1.3 !important;
        height: 2.6em !important;
        min-height: 2.6em !important;
    }
}

/* 响应式设计 - 小屏幕优化 */
@media (max-width: 480px) {
    .px-goods-card .content .name.van-ellipsis {
        font-size: 13px !important;
        line-height: 1.2 !important;
        height: 2.4em !important;
        min-height: 2.4em !important;
    }
}