/* 自定义美化样式 */
body {
    background-color: #f5f7fa;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* 白色容器样式 */
.white-container {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    box-sizing: border-box;
}

/* Logo和收银台标题样式 */
.shop-header {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    padding: 3px 0;
}

.shop-logo {
    margin-right: 12px;
}

.shop-title {
    color: #4da6ff;
    font-weight: 600;
    font-size: 18px;
}

/* 订单金额区域美化 */
.order-amount12 {
    background-color: transparent;
    padding: 20px;
    margin-top: 15px;
}

.order-amount12-left li {
    margin-bottom: 15px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.order-amount12-left li:last-child {
    border-bottom: none;
}

.order-amount12-left span:first-child {
    color: #666;
    font-weight: 500;
    display: inline-block;
    width: 100px;
}

.order-amount12-left span:last-child {
    color: #333;
    font-weight: 500;
}

/* 商品信息布局 */
.product-info {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

/* 商品图片方形容器 */
.product-image {
    margin-right: 15px;
}

.product-image img {
    border-radius: 8px;
    border: 2px solid #e6f2ff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.product-image img:hover {
    transform: scale(1.05);
}

/* 商品模块美化 */
.product-info {
    background-color: transparent;
    border: none;
    padding: 10px 0;
    box-shadow: none;
}

/* 商品详情 */
.product-details {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin-top: -10px;
}

.product-name {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.product-price {
    color: #ff6b6b;
    font-size: 20px;
    font-weight: 700;
    margin-left: 15px;
    white-space: nowrap;
}

.product-quantity {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* 订单信息容器美化 */
.order-info-container {
    background-color: transparent;
    border: none;
    padding: 15px 0;
    margin-bottom: 15px;
}

.order-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #e0e0e0;
}

.order-info-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.order-info-item .label {
    color: #666;
    font-weight: 500;
    display: inline-block;
    width: 100px;
    font-size: 14px;
}

.order-info-item .value {
    color: #333;
    font-weight: 500;
    font-size: 14px;
    word-break: break-all;
}

/* 支付方式区域美化 */
.PayMethod12 {
    background-color: transparent;
    padding: 20px;
    margin-top: 15px;
    clear: both;
    overflow: hidden;
}

.PayMethod12 h2 {
    color: #333;
    font-weight: 600;
    border-left: 4px solid #4da6ff;
    padding-left: 12px;
    margin-bottom: 20px;
}

/* 支付方式容器 */
.payment-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* 支付方式按钮美化 */
.PayMethod12 ul {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    list-style: none !important;
    justify-content: center !important;
    max-height: none !important;
    transition: max-height 0.3s ease !important;
    width: 100% !important;
    overflow: visible !important;
}

.PayMethod12 ul.collapsed {
    max-height: 130px !important;
    overflow: hidden !important;
}

.PayMethod12 ul li {
    background-color: #ffffff !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 12px !important;
    padding: 15px !important;
    text-align: center !important;
    width: calc(33.33% - 10px) !important;
    aspect-ratio: 1 / 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    position: relative !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    min-width: 100px !important;
    height: auto !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
    float: none !important;
}

/* 确保清除外部CSS的影响 */
.PayMethod12 {
    width: auto !important;
    padding: 20px !important;
    margin-top: 15px !important;
}

.PayMethod12 ul li:hover {
    border-color: #4da6ff;
    transform: translateY(-2px);
    /* box-shadow: 0 6px 20px rgba(77, 166, 255, 0.15); */
}

.PayMethod12 ul li.active {
    border-color: #4da6ff;
    background-color: #f0f8ff;
    box-shadow: 0 4px 15px rgba(77, 166, 255, 0.2);
}

.PayMethod12 ul li .payment-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    height: 100% !important;
    justify-content: center !important;
}

.PayMethod12 ul li img {
    margin: 0 !important;
    display: block !important;
    width: 40px !important;
    height: 40px !important;
    transition: transform 0.3s ease !important;
    float: none !important;
    margin-right: 0 !important;
}

.PayMethod12 ul li:hover img {
    transform: scale(1.1) !important;
}

.PayMethod12 ul li span {
    color: #333 !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-height: 40px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    float: none !important;
    position: static !important;
}

/* 打勾样式 - 圆形，右上角 */
.PayMethod12 ul li .checkmark {
    width: 18px !important;
    height: 18px !important;
    border: 1px solid #ccc !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    top: 6px !important;
    right: 6px !important;
    background-color: white !important;
    opacity: 0 !important;
    transform: scale(0.8) !important;
}

.PayMethod12 ul li.active .checkmark {
    background-color: #ff7e00 !important;
    border-color: #ff7e00 !important;
    color: white !important;
    opacity: 1 !important;
    transform: scale(1) !important;
}

.PayMethod12 ul li.active .checkmark::after {
    content: "✓";
    font-size: 11px;
    font-weight: bold;
}

/* 移除选中时的背景动画 */
.PayMethod12 ul li::before {
    display: none;
}

/* 展开/收起按钮样式 */
.expand-toggle {
    margin-top: 15px;
    padding: 8px 16px;
    background-color: #f5f7fa;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    transition: all 0.3s ease;
}

.expand-toggle:hover {
    background-color: #e8f0fe;
    border-color: #4da6ff;
    color: #4da6ff;
}

.expand-toggle.collapsed #toggleIcon {
    transform: rotate(180deg);
}

/* 立即支付区域美化 */
.immediate-pay12 {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px 20px;
    margin-top: 25px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(5px);
}

.immediate-pay12-right {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
}

.immediate-pay12-right span strong {
    color: #ff6b6b;
    font-size: 22px;
}

/* 立即支付按钮美化 */
.immediate_pay {
    background: linear-gradient(135deg, #ff7e00, #ff5a00);
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(255, 126, 0, 0.3);
    color: white;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    height: 50px;
    line-height: 50px;
    transition: all 0.3s ease;
    width: 150px;
}

/* */

/* 底部样式 */
.footer12 {
    color: #999;
    margin-top: 40px;
}

/* 响应式设计调整 */
@media screen and (max-width: 768px) {
    .order-amount12,
    .PayMethod12 {
        padding: 15px;
        margin-bottom: 100px;
        box-sizing: border-box;
    }
    
    .w1080 {
        width: 100% !important;
        padding: 0 15px;
        box-sizing: border-box;
    }
    
    body {
        overflow-x: hidden;
    }
    
    .immediate-pay12 {
        padding: 20px 15px;
        box-sizing: border-box;
    }
    
    .order-amount12-left li {
        padding: 5px 0;
    }
    
    .order-amount12-left span:first-child {
        width: 70px;
    }
    
    /* 移动设备支付方式样式 - 确保三个一行 */
    .PayMethod12 ul {
        gap: 10px !important;
        justify-content: center !important;
    }
    
    .PayMethod12 ul li {
        width: calc(33.33% - 7px) !important;
        padding: 10px !important;
        aspect-ratio: 1 / 1 !important;
        min-width: 80px !important;
        height: auto !important;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
        float: none !important;
    }
    
    .PayMethod12 ul.collapsed {
        max-height: 140px !important;
    }
    
    .PayMethod12 ul li .payment-content {
        gap: 8px !important;
    }
    
    .PayMethod12 ul li img {
        width: 32px !important;
        height: 32px !important;
        margin-right: 0 !important;
        float: none !important;
    }
    
    .PayMethod12 ul li span {
        font-size: 11px !important;
        line-height: 1.2 !important;
        max-height: 35px !important;
        float: none !important;
        position: static !important;
    }
    
    /* 移动设备上的勾选标记 */
    .PayMethod12 ul li .checkmark {
        width: 20px;
        height: 20px;
        top: 6px;
        right: 6px;
    }
    
    .PayMethod12 ul li.active .checkmark::after {
        font-size: 11px;
    }
    
    /* 移动设备上的展开按钮 */
    .expand-toggle {
        margin-top: 10px;
        padding: 6px 12px;
        font-size: 13px;
    }
    
    /* 商品图片内边距调整 */
    .product-image {
        padding: 0;
    }
    
    .immediate_pay {
        min-width: 110px;
        height: 40px;
        line-height: 40px;
        font-size: 14px;
    }
    
    .immediate-pay12-right span strong {
        font-size: 18px;
    }
    
    /* 商品图片和名称优化 */
    .product-image img {
        width: 70px !important;
        height: 70px !important;
    }
    
    .product-name {
        font-size: 15px;
        flex-wrap: wrap;
    }
    
    .product-price {
        font-size: 16px !important;
        margin-left: 10px !important;
    }
    
    .product-quantity {
        font-size: 12px;
    }
    
    /* 导航栏优化 */
    .navBD12 {
        padding: 0 15px;
    }
    
    .nav12-left img {
        width: 80px;
    }
}

/* 确保所有元素使用box-sizing */
* {
    box-sizing: border-box;
}

/* 添加底部边距防止内容被固定按钮遮挡 */
.PayMethod12 {
    margin-bottom: 100px;
}