/* 商品相关样式 */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-box {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 500px;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
}

.filter-group {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

/* 商品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 220px;
    background-color: #f5f7fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #909399;
    font-size: 48px;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 15px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: #303133;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-description {
    font-size: 14px;
    color: #909399;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.price-current {
    font-size: 20px;
    font-weight: bold;
    color: #f56c6c;
}

.price-original {
    font-size: 14px;
    color: #909399;
    text-decoration: line-through;
}

.product-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    font-size: 12px;
    color: #909399;
}

.product-sales {
    color: #67c23a;
}

/* 商品详情 */
.product-detail {
    background: white;
    border-radius: 8px;
    padding: 30px;
}

.product-detail-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.product-detail-image {
    width: 400px;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    background-color: #f5f7fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #909399;
    font-size: 64px;
    flex-shrink: 0;
}

.product-detail-info {
    flex: 1;
}

.product-detail-title {
    font-size: 24px;
    font-weight: bold;
    color: #303133;
    margin-bottom: 15px;
}

.product-detail-price {
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 20px;
}

.product-detail-price-current {
    font-size: 32px;
    font-weight: bold;
    color: #f56c6c;
}

.product-detail-price-original {
    font-size: 18px;
    color: #909399;
    text-decoration: line-through;
}

.product-detail-meta {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    padding: 15px 0;
    border-top: 1px solid #ebeef5;
    border-bottom: 1px solid #ebeef5;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.meta-label {
    font-size: 14px;
    color: #909399;
}

.meta-value {
    font-size: 16px;
    color: #303133;
    font-weight: 600;
}

.product-detail-description {
    margin-top: 20px;
    line-height: 1.8;
    color: #606266;
}

/* 响应式 */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .product-detail-header {
        flex-direction: column;
    }
    
    .product-detail-image {
        width: 100%;
        height: 300px;
    }
}

