/* 前端CSS */
.sps-product-showcase {
    margin: 20px 0;
}

/* 优化分类筛选样式 */
.sps-filter-container {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.sps-filter-btn {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    white-space: nowrap;
}

.sps-filter-btn:hover, .sps-filter-btn.active {
    background: #000;
    color: white;
    border-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.sps-product-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    margin: 0 -8px;
}

.sps-product-item {
    width: calc(25% - 12px);
    border-radius: 12px;
    border: 1px solid #e0e6ed;
    overflow: hidden;
    margin: 8px 6px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-height: 400px;
    position: relative;
    transition: all 0.3s ease;
}

.sps-product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 新增悬停特效 */
.sps-product-item:hover .sps-product-cover {
    height: 100px;
}

.sps-product-item:hover .sps-product-image {
    opacity: 0.3;
    transform: scale(0.8);
}

.sps-product-item:hover .sps-product-description {
    -webkit-line-clamp: unset;
    height: auto;
    overflow: visible;
}

.sps-product-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(66,90,239,0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 2;
}

/* 优化移动端布局 */
@media screen and (max-width: 1200px) {
    .sps-product-item {
        width: calc(50% - 12px);
    }
}

@media screen and (max-width: 768px) {
    .sps-product-item {
        width: 100%;
        margin: 8px 0;
    }
    
    .sps-filter-container {
        position: relative;
        padding: 0;
        background: transparent;
    }
    
    .sps-filter-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        background: #f8f9fa;
        padding: 12px 15px;
        border-radius: 8px;
        margin-bottom: 10px;
        cursor: pointer;
        font-weight: bold;
        color: #425AEF;
    }
    
    .sps-filter-toggle:after {
        content: "▼";
        font-size: 12px;
        transition: transform 0.3s ease;
    }
    
    .sps-filter-container.expanded .sps-filter-toggle:after {
        transform: rotate(180deg);
    }
    
    .sps-filter-btn-container {
        display: none;
        width: 100%;
        flex-direction: column;
        background: #f8f9fa;
        padding: 10px;
        border-radius: 8px;
        margin-top: -10px;
    }
    
    .sps-filter-container.expanded .sps-filter-btn-container {
        display: flex;
    }
    
    .sps-filter-btn {
        width: 100%;
        margin-bottom: 5px;
        text-align: center;
        padding: 10px;
        border-radius: 8px;
    }
    
    /* 移动端禁用悬停效果 */
    .sps-product-item:hover .sps-product-cover {
        height: 200px;
    }
    
    .sps-product-item:hover .sps-product-image {
        opacity: 1;
        transform: scale(1);
    }
    
    .sps-product-item:hover .sps-product-description {
        -webkit-line-clamp: 3;
        height: 60px;
        overflow: hidden;
    }
}

.sps-product-info {
    padding: 15px;
    margin-top: 12px;
}

.sps-product-name {
    font-size: 18px;
    font-weight: bold;
    line-height: 1.3;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    width: fit-content;
    color: #2c3e50;
}

.sps-product-name:hover {
    color: #425AEF;
}

.sps-product-description {
    line-height: 20px;
                        color: rgba(60, 60, 67, 0.8);
                        height: 60px;
                        display: -webkit-box;
                        overflow: hidden;
                        -webkit-line-clamp: 3;
                        -webkit-box-orient: vertical;
                        font-size: 14px;
    
    
    
    transition: all 0.3s ease;
}

.sps-product-cover {
    width: 100%;
    height: 200px;
    background: #f7f7f9;
    display: flex;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sps-product-image {
    object-fit: cover;
    height: 100%;
    transition: all 0.3s ease;
}

.sps-product-toolbar {
    display: flex;
    justify-content: space-between;
    position: absolute;
    bottom: 15px;
    left: 0;
    width: 100%;
    padding: 0 15px;
    z-index: 1;
}

.sps-button {
    background-color: #425AEF;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    width: 100%;
    text-align: center;
}

.sps-button:hover {
    background-color: #3347b8;
}

.sps-button-disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}