/* 购物车页面样式 */

/* 页面标题样式 */
.page-title {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6));
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-bottom: 60px;
}

.page-title h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-title .tagline {
    font-size: 1.5rem;
    font-style: italic;
    color: #f0f0f0;
}

/* 购物车内容样式 */
.cart-section {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.cart-container {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.cart-list {
    flex: 2;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.cart-summary {
    flex: 1;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.cart-list h2,
.cart-summary h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

/* 购物车商品样式 */
.cart-item {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

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

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 20px;
    flex-shrink: 0;
}

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

.cart-item-info {
    flex-grow: 1;
}

.cart-item-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.cart-item-spec {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin: -4px 0 8px;
}

.cart-item-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.quantity-control button {
    width: 35px;
    height: 35px;
    border: none;
    background-color: #f8f9fa;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.quantity-control button:hover {
    background-color: #e9ecef;
}

.quantity-control input {
    width: 50px;
    height: 35px;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-weight: bold;
}

.remove-btn {
    background-color: transparent;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px 10px;
    transition: var(--transition);
}

.remove-btn:hover {
    color: #c82333;
    background-color: rgba(220, 53, 69, 0.1);
    border-radius: 4px;
}

/* 空购物车样式 */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
}

.empty-cart-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    color: var(--gray-color);
}

.empty-cart h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.empty-cart p {
    color: #666;
    margin-bottom: 25px;
}

/* 订单摘要样式 */
.summary-content {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.total-row {
    font-weight: bold;
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #dee2e6;
}

#checkout-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.continue-shopping {
    text-align: center;
    margin-top: 20px;
}

.continue-shopping p {
    color: #666;
    margin-bottom: 15px;
}

.continue-shopping .btn {
    width: 100%;
    padding: 12px;
}

/* 结算模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    margin: 15px 20px 0;
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: #000;
}

.modal-header {
    padding: 0 30px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.modal-body {
    padding: 30px;
}

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

.checkout-section h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 95, 45, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* 支付方式样式 */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.payment-method {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.payment-method:hover {
    background-color: #f8f9fa;
}

.payment-method input[type="radio"] {
    margin-right: 15px;
    transform: scale(1.2);
}

.payment-icon {
    font-size: 1.5rem;
    margin-right: 10px;
}

.payment-name {
    font-size: 1.1rem;
    font-weight: 500;
}

/* 订单确认样式 */
#order-summary {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.order-summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.order-summary-total {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #dee2e6;
}

/* 支付成功页面样式 */
.success-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    background-color: #f8f9fa;
}

.success-content {
    background-color: white;
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin: 0 auto;
    max-width: 600px;
    width: 90%;
}

.success-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.success-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.success-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #555;
}

.order-info {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.order-info p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.order-info span {
    font-weight: bold;
    color: var(--secondary-color);
}

.success-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.success-actions .btn {
    padding: 12px 30px;
    font-size: 1.1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-title h1 {
        font-size: 2.5rem;
    }
    
    .page-title .tagline {
        font-size: 1.2rem;
    }
    
    .cart-container {
        flex-direction: column;
    }
    
    .cart-summary {
        position: static;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cart-item-image {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .cart-item-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .success-actions {
        flex-direction: column;
    }
    
    .success-actions .btn {
        width: 100%;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
/* P2 收款二维码块 */
.pay-qr-wrap { margin: 22px auto 6px; text-align: center; }
.pay-qr-title { font-size: 15px; color: #2c5f2d; font-weight: 600; margin-bottom: 14px; }
.pay-qr-images { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; }
.pay-qr-images figure { margin: 0; }
.pay-qr-images img { width: 150px; height: 150px; object-fit: cover; border: 1px solid #eee; border-radius: 10px; background: #fff; }
.pay-qr-images figcaption { font-size: 13px; color: #7f8c8d; margin-top: 8px; }
.pay-qr-bank { background: #f7f9f7; border-radius: 8px; padding: 14px 18px; font-size: 14px; color: #555; text-align: left; max-width: 420px; margin: 0 auto; line-height: 1.9; }
.pay-qr-service { margin-top: 18px; font-size: 13px; color: #95a5a6; }
.pay-qr-service img { width: 120px; height: 120px; border-radius: 8px; display: block; margin: 8px auto 0; border: 1px solid #eee; }
