.product-container, .tags-container {
    max-width: 1200px;
    margin: 20px auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.selected-tags {
    padding: 10px 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 1px solid #eaeaea;
}

.selected-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
    font-size: 14px;
}

.selected-tag-remove {
    margin-left: 5px;
    cursor: pointer;
    color: #999;
}

.selected-tag-remove:hover {
    color: #e74c3c;
}

.info-item {
    display: flex;
    border-bottom: 1px solid #eaeaea;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    width: 100px;
    font-weight: bold;
    color: #555;
    font-size: 14px;
    padding: 12px 0 12px 15px;
    border-right: 1px solid #eaeaea;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
}

.info-value {
    flex: 1;
    color: #222;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 15px;
    align-items: center;
    position: relative;
}

/* 产品类别特殊样式 */
.info-item:first-child .info-value {
    overflow: hidden !important;
    transition: max-height 0.3s ease;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 50px 10px 15px;
    line-height: 1.2;
}

/* 使用checkbox hack实现纯CSS展开/收缩 */
.info-item:first-child .info-value input[type="checkbox"] {
    display: none;
}

/* 当checkbox被选中时，切换max-height */
.info-item:first-child .info-value input[type="checkbox"]:checked ~ .content-wrapper {
    max-height: 100% !important;
    overflow: visible !important;
}

/* 内容包装器 */
.content-wrapper {
    max-height: 30px;
    overflow: hidden;
    transition: max-height 0.3s ease;
    width: 100%;
}

/* 展开/收缩按钮基础样式 */
.toggle-expand,
.toggle-collapse {
    position: absolute;
    top: 10px;
    right: 5px;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 2px 4px;
    font-size: 12px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-align: center;
    min-width: 40px;
    height: 24px;
    white-space: nowrap;
}

.toggle-expand:hover,
.toggle-collapse:hover {
    color: #333;
    border-color: #ccc;
}

/* 默认显示展开按钮，隐藏收缩按钮 */
.toggle-collapse {
    display: none;
}

/* 确保展开按钮默认使用flex布局 */
.toggle-expand {
    display: flex;
}

/* 当checkbox被选中时，隐藏展开按钮，显示收缩按钮 */
.info-item:first-child .info-value input[type="checkbox"]:checked ~ .toggle-expand {
    display: none;
}

.info-item:first-child .info-value input[type="checkbox"]:checked ~ .toggle-collapse {
    display: flex;
}

/* 渐变遮罩效果 */
.content-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 20px;
    background: linear-gradient(to right, transparent, #f5f5f5);
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.info-item:first-child .info-value input[type="checkbox"]:checked ~ .content-wrapper::after {
    opacity: 0;
    visibility: hidden;
}

.value-part {
    display: inline-flex;
    min-width: 10px;
    padding: 5px 12px;
    line-height: 1.5;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.value-part:hover {
    background-color: #f5f5f5;
    color: #e74c3c;
}

.highlight {
    color: #e74c3c;
    font-weight: bold;
}

.value-part span {
    font-size: 14px;
}

.selected-tag-name{
    color: #303133;
    font-weight: 700;
}

.selected-tag-values{
    color: rgba(46,145,246,0.8);
}

/* 响应式优化 */
@media (max-width: 768px) {
    .info-item:first-child .info-value {
        max-height: 30px !important;
    }
    
    .content-wrapper {
        max-height: 30px;
    }
    
    .toggle-expand {
        font-size: 10px;
        padding: 2px 4px;
        top: 5px;
        right: 3px;
        min-width: 30px;
        height: 18px;
    }
    
    .info-item:first-child .info-value::after {
        width: 30px;
        height: 12px;
    }
}