/* 前端显示样式 */
.product-unit {
    font-size: 0.9em;
    color: #666;
    font-weight: normal;
}

.product-unit-display {
    margin: 10px 0;
    padding: 10px;
    background: #f8f8f8;
    border-left: 3px solid #0073aa;
    border-radius: 3px;
}

.wc-custom-attributes {
    margin: 20px 0;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
}

.custom-attribute-field {
    margin-bottom: 15px;
    padding: 0;
    border: none;
}

.custom-attribute-field:last-child {
    margin-bottom: 0;
}

.attribute-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
}

.attribute-label {
    min-width: 100px;
    flex-shrink: 0;
}

.attribute-label label {
    display: block;
    margin: 0;
    font-weight: 500;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
}

.attribute-options {
    flex: 1;
    min-width: 200px;
}

.custom-attribute-field .required {
    color: #dc3232;
    font-weight: bold;
}

.custom-attribute-select {
    width: 100%;
    max-width: 250px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    color: #666;
    transition: border-color 0.2s ease;
}

.custom-attribute-select:focus {
    border-color: #0073aa;
    outline: none;
}

.custom-attribute-select:hover {
    border-color: #0073aa;
}

.custom-attribute-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.custom-attribute-radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    transition: all 0.2s ease;
    margin: 0;
    font-size: 14px;
    white-space: nowrap;
    font-weight: 400;
    color: #666;
}

.custom-attribute-radio-label:hover {
    border-color: #0073aa;
    background: #f8f9fa;
}

.custom-attribute-radio-label input[type="radio"] {
    margin-right: 6px;
    margin-bottom: 0;
    width: 14px;
    height: 14px;
    accent-color: #0073aa;
}

.custom-attribute-radio-label input[type="radio"]:checked + .radio-text {
    font-weight: 500;
    color: #0073aa;
}

.custom-attribute-radio-label:has(input[type="radio"]:checked) {
    border-color: #0073aa;
    background: #fff;
    color: #0073aa;
}

.custom-attribute-radio-label:has(input[type="radio"]:checked) .radio-text {
    color: #0073aa;
    font-weight: 500;
}

.radio-text {
    font-size: 14px;
    user-select: none;
}

/* 购物车页面样式 */
.cart .woocommerce-cart-form .cart_item .product-name .wc-item-meta {
    margin-top: 5px;
}

.cart .woocommerce-cart-form .cart_item .product-name .wc-item-meta p {
    margin: 2px 0;
    font-size: 0.9em;
    color: #666;
}

/* 结账页面样式 */
.woocommerce-checkout .woocommerce-cart-form .cart_item .product-name .wc-item-meta {
    margin-top: 5px;
}

.woocommerce-checkout .woocommerce-cart-form .cart_item .product-name .wc-item-meta p {
    margin: 2px 0;
    font-size: 0.9em;
    color: #666;
}

/* 订单页面样式 */
.woocommerce-order .woocommerce-order-details .woocommerce-table--order-details .product-name .wc-item-meta {
    margin-top: 5px;
}

.woocommerce-order .woocommerce-order-details .woocommerce-table--order-details .product-name .wc-item-meta p {
    margin: 2px 0;
    font-size: 0.9em;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .attribute-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .attribute-label {
        min-width: auto;
        width: 100%;
    }
    
    .attribute-options {
        width: 100%;
        min-width: auto;
    }
    
    .custom-attribute-radio-group {
        gap: 6px;
    }
    
    .custom-attribute-radio-label {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .custom-attribute-select {
        max-width: 100%;
    }
}
