/* SKU选择相关样式增强 */
.sku-option.selected {
    border-color: #e94560 !important;
    background-color: #fff0f3;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.2);
}

.sku-option.selected img {
    border-color: #e94560;
}

.cart-item-sku {
    margin-top: 8px;
    padding: 4px 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
}

.sku-label {
    font-weight: 600;
    color: #333;
    margin-right: 5px;
}

.sku-name {
    color: #666;
}

.cart-item-original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 13px;
    margin-left: 8px;
}

#stockInfo {
    margin-top: 8px;
    font-size: 14px;
    color: #666;
}

#stockQuantity {
    font-weight: 600;
    color: #28a745;
}

/* 价格动画效果 */
.current-price {
    transition: all 0.3s ease;
}

.current-price.updating {
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); color: #e94560; }
}

/* SKU选择器增强 */
.sku-selector {
    margin: 20px 0;
}

.sku-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.sku-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sku-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    min-width: 100px;
    text-align: center;
}

.sku-option:hover:not(.selected) {
    border-color: #cbd5e1;
    background-color: #f8fafc;
    transform: translateY(-2px);
}

.sku-option img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.sku-option span:first-of-type {
    font-weight: 500;
    color: #333;
    font-size: 13px;
    line-height: 1.2;
}

.sku-price {
    font-weight: 600;
    color: #e94560;
    font-size: 14px;
}

/* 响应式SKU样式 */
@media (max-width: 768px) {
    .sku-options {
        gap: 8px;
    }
    
    .sku-option {
        min-width: 80px;
        padding: 8px 12px;
    }
    
    .sku-option img {
        width: 32px;
        height: 32px;
    }
    
    .sku-option span:first-of-type {
        font-size: 11px;
    }
    
    .sku-price {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .sku-options {
        gap: 6px;
    }
    
    .sku-option {
        min-width: 70px;
        padding: 6px 8px;
    }
    
    .sku-option img {
        width: 28px;
        height: 28px;
    }
    
    .sku-option span:first-of-type {
        font-size: 10px;
    }
    
    .sku-price {
        font-size: 11px;
    }
}

/* 购物车中的SKU显示 */
.cart-item-sku-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding: 6px 10px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 6px;
    border-left: 3px solid #e94560;
}

.cart-item-sku-info .sku-label {
    color: #666;
    font-size: 12px;
}

.cart-item-sku-info .sku-name {
    color: #333;
    font-weight: 500;
    font-size: 12px;
}

/* 库存状态样式 */
.stock-status-in {
    color: #28a745;
    font-weight: 600;
}

.stock-status-out {
    color: #dc3545;
    font-weight: 600;
}

.stock-status-low {
    color: #ffc107;
    font-weight: 600;
}

/* 折扣徽章样式 */
.discount-badge {
    background: linear-gradient(135deg, #e94560 0%, #c73652 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(233, 69, 96, 0.3);
}

/* 产品图片切换动画 */
.gallery-main img {
    transition: opacity 0.3s ease;
}

.gallery-main img.loading {
    opacity: 0.5;
}

/* 产品缩略图样式增强 */
.thumb {
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.thumb.active {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.4);
}

/* 加载状态 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #e94560;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* SKU选项禁用状态 */
.sku-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f8f9fa;
}

.sku-option.disabled:hover {
    transform: none;
    border-color: #e2e8f0;
}

/* 数量选择器增强 */
.quantity-selector {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.quantity-selector button {
    transition: all 0.2s ease;
}

.quantity-selector button:hover {
    background-color: #e94560;
    color: white;
}

.quantity-selector input:focus {
    outline: none;
    background-color: #f8f9fa;
}

.sku-option img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.sku-option span:first-of-type {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.sku-price {
    font-weight: 600;
    color: #e94560;
}

/* 购物车增强样式 */
.cart-item {
    transition: all 0.3s ease;
}

.cart-item:hover {
    background-color: #f8f9fa;
    transform: translateX(4px);
}

/* 响应式优化 */
@media (max-width: 768px) {
    .sku-option {
        min-width: 100%;
        padding: 10px;
    }
    
    .sku-option img {
        width: 40px;
        height: 40px;
    }
}

/* 无障碍支持 */
.sku-option:focus {
    outline: 2px solid #e94560;
    outline-offset: 2px;
}

#addToCartBtn:focus,
#addToCartBtn:hover:focus {
    outline: 2px solid #e94560;
    outline-offset: 2px;
}