/* 购物车页面样式 */
.cart-page {
    padding: 2rem 0;
    min-height: 60vh;
}

.page-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.cart-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.cart-item {
    display: grid;
    grid-template-columns: 120px 1fr auto auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 1rem;
    background: white;
}

.item-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-details h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.item-details p {
    color: #6c757d;
    margin-bottom: 0.3rem;
}

.item-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #e74c3c;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    width: 35px;
    height: 35px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.qty-btn:hover {
    background: #e9ecef;
}

.qty-input {
    width: 50px;
    height: 35px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.remove-item {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.remove-item:hover {
    background: #f8d7da;
}

.cart-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.empty-cart-icon {
    font-size: 4rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.cart-empty h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.cart-empty p {
    color: #6c757d;
    margin-bottom: 2rem;
}

.cart-summary {
    position: sticky;
    top: 100px;
}

.summary-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.summary-card h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

.summary-row.discount {
    color: #28a745;
}

.summary-row.total {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
    border-top: 2px solid #eee;
    padding-top: 1rem;
    margin-top: 1rem;
}

.coupon-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.coupon-section h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.coupon-input {
    display: flex;
    gap: 0.5rem;
}

.coupon-input input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.checkout-btn {
    width: 100%;
    margin-bottom: 1.5rem;
    padding: 1.2rem;
    font-size: 1.1rem;
}

.payment-methods {
    text-align: center;
}

.payment-methods p {
    margin-bottom: 1rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.payment-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 1.5rem;
    color: #6c757d;
}

.recommended-products {
    margin-top: 4rem;
    padding: 3rem 0;
    background: #f8f9fa;
}

/* 结账页面样式 */
.checkout-progress {
    background: #f8f9fa;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.progress-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    position: relative;
}

.step.completed,
.step.active {
    color: #e74c3c;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

.step.completed .step-number {
    background: #28a745;
    color: white;
}

.step.active .step-number {
    background: #e74c3c;
    color: white;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 100%;
    width: 2rem;
    height: 2px;
    background: #e9ecef;
    z-index: -1;
}

.step.completed:not(:last-child)::after {
    background: #28a745;
}

.checkout-page {
    padding: 2rem 0;
}

.checkout-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.form-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.form-section h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 0.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e74c3c;
}

.shipping-options,
.payment-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.shipping-option,
.payment-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shipping-option:hover,
.payment-option:hover {
    border-color: #e74c3c;
}

.shipping-option input:checked + .option-content,
.payment-option input:checked + .option-content {
    color: #e74c3c;
}

.option-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-left: 1rem;
}

.option-info h4 {
    margin-bottom: 0.3rem;
}

.option-info p {
    color: #6c757d;
    font-size: 0.9rem;
}

.option-price {
    font-weight: bold;
    color: #2c3e50;
}

.card-details {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.order-summary {
    position: sticky;
    top: 100px;
}

.order-items {
    margin-bottom: 2rem;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

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

.order-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.item-info {
    flex: 1;
}

.item-info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.item-info p {
    font-size: 0.8rem;
    color: #6c757d;
}

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

.summary-calculations {
    margin-bottom: 2rem;
}

.checkout-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.checkout-actions .btn-secondary,
.checkout-actions .btn-primary {
    flex: 1;
    text-align: center;
}

.security-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #28a745;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .cart-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 1rem;
    }

    .item-price,
    .quantity-controls,
    .remove-item {
        grid-column: 1 / -1;
        justify-self: start;
        margin-top: 1rem;
    }

    .quantity-controls {
        justify-self: center;
    }

    .remove-item {
        justify-self: end;
    }

    .checkout-content {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .progress-steps {
        gap: 1rem;
    }

    .step span {
        font-size: 0.8rem;
    }

    .checkout-actions {
        flex-direction: column;
    }

    .security-info {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}