/* 购物车样式 */
.cart-items-list {
    padding: 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background 0.3s;
}

.cart-item:hover {
    background: #f9f9f9;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    margin-right: 15px;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-item-price {
    color: #ff6b6b;
    font-size: 14px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    margin: 0 20px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    font-size: 16px;
    border-radius: 4px;
    transition: all 0.3s;
}

.qty-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.qty-value {
    padding: 0 15px;
    font-weight: 500;
}

.cart-item-subtotal {
    font-size: 18px;
    font-weight: 600;
    color: #ff6b6b;
    min-width: 100px;
    text-align: right;
}

.cart-item-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    margin-left: 15px;
    transition: all 0.3s;
}

.cart-item-remove:hover {
    background: #ff6b6b;
    color: white;
}

/* 购物车汇总 */
.cart-summary {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: white;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 16px;
}

.cart-summary-row.points-info {
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.3);
}

.cart-total {
    font-size: 24px;
    font-weight: 700;
}

.points-balance {
    font-size: 18px;
    font-weight: 600;
    color: #ffd700;
}

.cart-actions {
    margin-top: 20px;
}

.btn-checkout {
    width: 100%;
    padding: 15px;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 结算弹窗 */
.checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.checkout-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}

.checkout-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
}

.checkout-modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.modal-close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    color: #999;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close-btn:hover {
    background: #ff6b6b;
    color: white;
}

.checkout-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.checkout-section {
    margin-bottom: 30px;
}

.checkout-section h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.checkout-items {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
}

.checkout-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
    margin-bottom: 10px;
}

.checkout-item:last-child {
    margin-bottom: 0;
}

.checkout-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
}

.checkout-item-info {
    flex: 1;
}

.checkout-item-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
}

.checkout-item-detail {
    font-size: 14px;
    color: #666;
}

.checkout-item-subtotal {
    font-size: 18px;
    font-weight: 600;
    color: #ff6b6b;
}

/* 积分选择器 */
.points-selector {
    background: linear-gradient(135deg, #667eea20 0%, #764ba220 100%);
    border-radius: 8px;
    padding: 20px;
}

.points-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 15px;
}

.points-info-row .highlight {
    color: #667eea;
    font-weight: 600;
}

.points-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.points-input-row label {
    font-weight: 500;
}

.points-input-row input {
    flex: 1;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.points-input-row input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-use-all-points {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-use-all-points:hover {
    background: #764ba2;
    transform: translateY(-1px);
}

/* 费用明细 */
.checkout-summary {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 16px;
}

.summary-row.highlight {
    color: #67 #ff6b6b;
    font-weight: 500;
}

.summary-row.total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #ddd;
    font-size: 18px;
    font-weight: 600;
}

.price-large {
    font-size: 28px;
    color: #ff6b6b;
    font-weight: 700;
}

/* 奖励预览 */
.rewards-preview {
    background: linear-gradient(135deg, #f093fb20 0%, #f5576c20 100%);
    border-radius: 8px;
    padding: 20px;
}

.rewards-preview h3 {
    border-color: #f5576c;
}

.rewards-list {
    padding: 10px 0;
}

.reward-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 15px;
}

.reward-item:last-child {
    margin-bottom: 0;
}

.reward-icon {
    font-size: 24px;
    margin-right: 12px;
}

.reward-item strong {
    color: #f5576c;
}

/* 底部按钮 */
.checkout-modal-footer {
    display: flex;
    gap: 15px;
    padding: 20px 30px;
    border-top: 1px solid #eee;
}

.checkout-modal-footer button {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.btn-cancel:hover {
    background: #e0e0e0;
}

.btn-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .cart-item {
        flex-wrap: wrap;
    }

    .cart-item-image {
        width: 60px;
        height: 60px;
    }

    .cart-item-info {
        flex: 1 0 calc(100% - 80px);
        margin-bottom: 10px;
    }

    .cart-item-quantity {
        margin: 0 auto;
    }

    .checkout-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .checkout-modal-body {
        padding: 20px 15px;
    }

    .checkout-item {
        flex-wrap: wrap;
    }

    .checkout-item img {
        width: 50px;
        height: 50px;
    }

    .points-input-row {
        flex-wrap: wrap;
    }

    .points-input-row input {
        flex: 1 0 100%;
        margin: 10px 0;
    }
}
