﻿/* ==========================================================================
   支付页面样式 - 优化版
   ========================================================================== */

/* 基础容器样式 */
.paypage-container {
    width: 1200px;
    margin: 0 auto;
    padding: 0;
    background-color: #fff;
    margin-bottom: 50px;
    min-height: 50vh;
}

/* 头部区域 */
.paypage-header {
    width: 560px;
    height: 89px;
    text-align: center;
    padding-top: 55px;
    box-sizing: border-box;
}

.paypage-logo {
    display: inline-block;
}

/* 主要内容区域 */
.paypage-main {
    width: 100%;
    display: flex;
    gap: 82px;
    margin-top: 38px;
}

/* 左侧信息填写区域 */
.paypage-info-section {
    width: 560px;
    flex-shrink: 0;
}

/* 支付方式区域 */
.paypage-payment-section {
    margin-bottom: 65px;
}

/* 导航按钮区域 */
.paypage-nav-buttons {
    display: flex;
    gap: 11px;
    margin-top: 12px;
}

.paypage-nav-btn {
    width: 178px;
    border: 0;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    /* filter: grayscale(100%) brightness(0.7); */
    /* opacity: 0.6; */
    position: relative;
}

.paypage-nav-btn:hover {
    /* filter: grayscale(80%) brightness(0.8); */
    /* opacity: 0.8; */
    /* transform: translateY(-2px); */
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); */
}

.paypage-nav-btn.paypage-nav-selected {
    /* filter: grayscale(0%) brightness(1); */
    opacity: 1;
    /* transform: translateY(-1px); */
    /* box-shadow: 0 4px 16px rgba(16, 94, 140, 0.3); */
}

.paypage-nav-btn.paypage-nav-selected::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: #105E8C;
    border-radius: 2px;
}

/* 联系信息区域 */
.paypage-contact-section {
    margin-bottom: 48px;
}

.paypage-section-title {
    color: #105E8C;
    font-size: 24px;
    line-height: 31px;
    margin-bottom: 12px;
}

.paypage-contact-info {
    margin-bottom: 12px;
}

.paypage-email {
    color: #242424;
    font-size: 16px;
    line-height: 22px;
    margin-bottom: 0;
}

.paypage-logout {
    color: #767676;
    font-size: 16px;
    line-height: 30px;
}

/* 送货地址区域 */
.paypage-shipping-section .paypage-section-title {
    font-size: 25px;
    line-height: 32px;
}

.paypage-form-fields {
    margin-top: 15px;
    width: 100%;
}

/* 表单字段行 */
.paypage-field-row {
    width: 100%;
    height: 56px;
    margin: 15px 0;
    border: 1px solid #B5B5B5;
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    box-sizing: border-box;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.paypage-field-row:hover {
    border-color: #105E8C;
}

.paypage-field-row.paypage-field-active {
    border-color: #105E8C;
    box-shadow: 0 0 0 2px rgba(16, 94, 140, 0.1);
}

.paypage-field-content {
    flex: 1;
    color: #8F8F8F;
    pointer-events: none;
}

.paypage-field-label {
    font-size: 12px;
    line-height: 17px;
    color: #8F8F8F;
}

.paypage-field-value {
    font-size: 12px;
    line-height: 17px;
    color: #242424;
}

.paypage-selected-value {
    color: #242424;
    font-size: 12px;
}

.paypage-field-icon {
    width: 20px;
    text-align: center;
    margin-left: 10px;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.paypage-field-row.paypage-field-active .paypage-field-icon {
    transform: rotate(180deg);
}

/* 下拉列表样式 */
.paypage-dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #B5B5B5;
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.paypage-dropdown-list.paypage-dropdown-show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.paypage-dropdown-item {
    padding: 12px 15px;
    cursor: pointer;
    font-size: 12px;
    color: #242424;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

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

.paypage-dropdown-item:hover {
    background-color: #f8f9fa;
}

.paypage-dropdown-item.paypage-dropdown-selected {
    background-color: #105E8C;
    color: #fff;
}

.paypage-dropdown-item.paypage-dropdown-selected:hover {
    background-color: #0d4c73;
}

/* 滚动条样式 */
.paypage-dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.paypage-dropdown-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.paypage-dropdown-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.paypage-dropdown-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 姓名行 */
.paypage-name-row {
    display: flex;
    gap: 18px;
    margin: 15px 0;
}

.paypage-name-first,
.paypage-name-last {
    height: 56px;
    border: 1px solid #B5B5B5;
    border-radius: 10px;
    position: relative;
    box-sizing: border-box;
    flex: 1;
}

/* 单个字段 */
.paypage-field-single {
    width: 100%;
    height: 56px;
    margin: 15px 0;
    border: 1px solid #B5B5B5;
    border-radius: 10px;
    position: relative;
    box-sizing: border-box;
}

/* 输入框和选择框样式 */
.paypage-input {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    padding: 0 15px;
    font-size: 12px;
    color: #242424;
    box-sizing: border-box;
    outline: none;
}

.paypage-input::placeholder {
    color: #8F8F8F;
}

.paypage-select {
    max-width: 400px;
    padding: 0;
    margin: 0;
    font-size: 12px;
    border: none;
    background: transparent;
    outline: none;
}

/* 右侧订单信息区域 */
.paypage-order-section {
    width: 557px;
    flex-shrink: 0;
    margin-top: 119px;
}

/* 商品信息 */
.paypage-product-info {
    margin-bottom: 12px;
}

.paypage-product-item {
    display: flex;
    align-items: center;
    height: 79px;
    margin-bottom: 12px;
}

.paypage-product-quantity {
    width: 79px;
    height: 79px;
    border: 1px solid #242424;
    border-radius: 10px;
    position: relative;
    margin-right: 20px;
    background-size: cover;
    background-position: center;
}

.paypage-quantity-badge {
    width: 26px;
    height: 26px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    position: absolute;
    top: -13px;
    right: -13px;
}

.paypage-product-details {
    flex: 1;
    margin-right: 20px;  /* 添加右边距与价格区域分离 */
}

.paypage-product-name {
    color: #242424;
    font-size: 16px;
    line-height: 24px;
    margin-bottom: 0;
    /* 限制显示2行，超出使用省略号 */
    height: 48px; /* 固定高度为2行 */
    overflow: hidden;
    word-wrap: break-word;
}

.paypage-product-name a {
    color: inherit;
    text-decoration: none;
    /* 使用CSS的多行省略号 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 48px;
    line-height: 24px;
}

.paypage-product-variant {
    color: #767676;
    font-size: 16px;
    line-height: 25px;
}

.paypage-product-price {
    text-align: right;
}

.paypage-price {
    color: #242424;
    font-size: 16px;
    line-height: 28px;
}

/* 折扣代码区域 */
.paypage-discount-section {
    display: flex;
    gap: 11px;
    margin-bottom: 14px;
    align-items: center;
    justify-content: space-between;
}

.paypage-discount-input {
    height: 55px;
    border: 1px solid #B5B5B5;
    border-radius: 10px;
    position: relative;
    width: 100%;
}

.paypage-discount-apply {
    width: 73px;
    height: 55px;
}

.paypage-apply-btn {
    height: 100%;
    background-color: #F8F8F8;
    color: #8F8F8F;
    border: 1px solid #767676;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    padding: 10px;
}

/* 价格汇总 */
.paypage-price-summary {
    margin-bottom: 33px;
}

.paypage-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.paypage-price-row:not(:last-child) {
    margin-bottom: 0;
}

.paypage-total-row {
    margin-top: 10px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.paypage-price-label {
    color: #242424;
    font-size: 16px;
    line-height: 25px;
}

.paypage-price-value {
    color: #242424;
    font-size: 16px;
    line-height: 25px;
}

.paypage-calculated {
    color: #8F8F8F;
    font-size: 16px;
}

.paypage-total-label {
    font-size: 24px;
    font-weight: bold;
}

.paypage-total-value {
    color: #105E8C;
    font-size: 24px;
    font-weight: bold;
}

/* 底部操作区域 */
.paypage-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 61px;
    margin-top: 33px;
    width: 560px;
}

.paypage-back-section {
    width: 275px;
    text-align: left;
}

.paypage-back-link {
    color: #242424;
    font-size: 18px;
    line-height: 20px;
    cursor: pointer;
}

.paypage-submit-section {
    width: 286px;
    text-align: right;
}

.paypage-submit-btn {
    width: 232px;
    height: 61px;
    background-color: #105E8C;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    margin-left: 48px;
}

.paypage-submit-btn:hover {
    background-color: #0d4c73;
}

.m-paypage-back-link {
    display: none;
}

.paypage-discount-input-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 500px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .paypage-header {
        margin: 0 auto;
        width: 100%;
    }
    .paypage-container {
        width: 100%;
        padding: 0 20px;
        box-sizing: border-box;
        padding-bottom: 20px;
    }
    
    .paypage-main {
        flex-direction: column;
        gap: 20px;
        width: 100%;
        max-width: 560px;
        margin: 0 auto;
        margin-top: 38px;
    }
    
    .paypage-info-section,
    .paypage-order-section {
        width: 100%;
        margin-top: 0;
    }
    
    .paypage-order-section {
        margin-top: 20px;
    }

    .paypage-footer {
        margin: 0 auto;
        width: 100%;
        max-width: 560px;
    }
}

@media (max-width: 768px) {
    .paypage-nav-buttons {
        gap: 10px;
        align-items: center;
    }
    
    .paypage-nav-btn {
        width: 31%;
        max-width: 200px;
    }
    
    .paypage-nav-btn.paypage-nav-selected::after {
        bottom: -8px;
        height: 4px;
        width: 80%;
    }
    
    .paypage-name-row {
        gap: 15px;
    }
    
    .paypage-name-first,
    .paypage-name-last {
        width: 100%;
    }
    
    .paypage-field-row,
    .paypage-field-single {
        width: 100%;
        margin: 15px 0;
    }
    
    /* 移动端下拉列表样式 */
    .paypage-dropdown-list {
        max-height: 150px;
        border-radius: 0 0 8px 8px;
    }
    
    .paypage-dropdown-item {
        padding: 15px;
        font-size: 14px;
        min-height: 20px;
    }
    
    .paypage-field-row {
        min-height: 50px;
        padding: 0 12px;
    }
    
    .paypage-field-label,
    .paypage-field-value,
    .paypage-selected-value {
        font-size: 14px;
    }
    
    .paypage-discount-section {
        gap: 15px;
    }
    
    .paypage-discount-apply {
    }
    
    .paypage-footer {
        gap: 20px;
        height: auto;
        text-align: center;
        width: 100%;
    }
    
    .paypage-back-section,
    .paypage-submit-section {
    }
    
    .paypage-submit-btn {
        margin-left: 0;
    }
}

@media (max-width: 430px) {
    .paypage-back-link {
        display: none;
    }

    .m-paypage-back-link {
        display: block;
    }
}