/* ============================
   商品详情页样式 - 新版
   参考西月网设计风格
   ============================ */

/* Breadcrumb */
.breadcrumb-bar {
    background: #f5f5f5;
    padding: 12px 0;
    font-size: 14px;
    color: #666;
}

.breadcrumb-bar a {
    color: #666;
    text-decoration: none;
}

.breadcrumb-bar a:hover {
    color: #ff4d4f;
}

.breadcrumb-bar .sep {
    margin: 0 8px;
    color: #999;
}

.breadcrumb-bar .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Product Detail Page */
.product-detail-page {
    padding: 30px 0 60px;
    background: #fff;
}

.product-detail-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Double Column Layout */
.product-detail-layout {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

/* Left: Product Gallery */
.product-gallery {
    flex: 0 0 50%;
    max-width: 50%;
}

.main-image {
    position: relative;
    width: 100%;
    height: 500px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.img-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.3);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-nav:hover {
    background: rgba(0,0,0,0.5);
}

.img-nav.prev {
    left: 10px;
}

.img-nav.next {
    right: 10px;
}

.thumbnail-list {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
}

.thumbnail-list .thumb {
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.thumbnail-list .thumb.active,
.thumbnail-list .thumb:hover {
    border-color: #ff4d4f;
}

.thumbnail-list .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Right: Product Info */
.product-info {
    flex: 1;
    padding-top: 10px;
}

.product-tags {
    margin-bottom: 12px;
}

.product-tags .tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 8px;
}

.product-tags .tag-hot {
    background: #fff0f0;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
}

.product-tags .tag-new {
    background: #f0fff0;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.product-tags .platform-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin-right: 8px;
}

.product-tags .platform-tag.ml {
    background: #fff7e6;
    color: #fa8c16;
    border: 1px solid #ffd591;
}

.product-tags .platform-tag.sh {
    background: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

.product-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    margin-bottom: 10px;
}

.product-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Price Section */
.price-section {
    background: #fff8f8;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.price-main {
    display: flex;
    align-items: baseline;
    margin-bottom: 8px;
}

.price-symbol {
    font-size: 18px;
    color: #ff4d4f;
    font-weight: 600;
}

.price-num {
    font-size: 32px;
    color: #ff4d4f;
    font-weight: 700;
    margin: 0 4px;
}

.price-unit {
    font-size: 14px;
    color: #999;
}

.moq-info {
    font-size: 14px;
    color: #666;
}

/* Spec Section */
.spec-section {
    margin-bottom: 25px;
}

.spec-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.spec-label {
    font-size: 14px;
    color: #666;
    margin-right: 15px;
    min-width: 50px;
}

.spec-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.spec-btn {
    padding: 8px 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.spec-btn:hover {
    border-color: #ff4d4f;
    color: #ff4d4f;
}

.spec-btn.active {
    border-color: #ff4d4f;
    background: #fff0f0;
    color: #ff4d4f;
    font-weight: 600;
}

/* Quantity Section */
.quantity-section {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

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

.qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

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

.quantity-selector input {
    width: 60px;
    height: 36px;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-size: 14px;
    outline: none;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.btn-buy {
    flex: 1;
    height: 50px;
    background: #ff4d4f;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-buy:hover {
    background: #ff3333;
}

.btn-inquiry {
    flex: 1;
    height: 50px;
    background: #fff;
    color: #ff4d4f;
    border: 2px solid #ff4d4f;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-inquiry:hover {
    background: #fff5f5;
}

/* Service Tags */
.service-tags {
    display: flex;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.service-tag {
    font-size: 13px;
    color: #666;
    padding: 6px 12px;
    background: #f9f9f9;
    border-radius: 4px;
}

/* Tabs Section */
.detail-tabs-section {
    margin-top: 40px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.tabs-header {
    display: flex;
    border-bottom: 2px solid #eee;
    background: #fafafa;
}

.tab-btn {
    padding: 15px 30px;
    border: none;
    background: none;
    font-size: 15px;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #ff4d4f;
}

.tab-btn.active {
    color: #ff4d4f;
    font-weight: 600;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #ff4d4f;
}

.tabs-content {
    padding: 30px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Description Content */
.description-content {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
}

.description-content p {
    margin-bottom: 15px;
}

/* Specs Table */
.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid #eee;
}

.specs-table td {
    padding: 12px 15px;
    font-size: 14px;
}

.specs-table td:first-child {
    width: 20%;
    background: #fafafa;
    color: #666;
    font-weight: 500;
}

.specs-table td:last-child {
    color: #333;
}

/* Features List */
.features-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #f9f9f9;
    border-radius: 6px;
}

.feature-dot {
    width: 8px;
    height: 8px;
    background: #ff4d4f;
    border-radius: 50%;
    flex-shrink: 0;
}

.feature-text {
    font-size: 14px;
    color: #333;
}

/* Related Products */
.related-products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.related-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

.related-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.related-card .card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-card .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-card .card-info {
    padding: 15px;
}

.related-card .card-name {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card .card-price {
    font-size: 18px;
    color: #ff4d4f;
    font-weight: 600;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-content h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
}

.modal-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.qr-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin: 0 auto 15px;
}

.modal-hint {
    font-size: 13px;
    color: #999;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: #999;
    padding: 40px 0 20px;
}

.footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-brand h3 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 10px;
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.6;
}

.footer-contact h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 10px;
}

.footer-contact p {
    font-size: 14px;
    line-height: 1.8;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    .product-detail-layout {
        flex-direction: column;
    }

    .product-gallery,
    .product-info {
        max-width: 100%;
        flex: 1;
    }

    .main-image {
        height: 350px;
    }

    .product-title {
        font-size: 20px;
    }

    .price-num {
        font-size: 26px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .features-list {
        grid-template-columns: 1fr;
    }

    .related-products {
        grid-template-columns: repeat(2, 1fr);
    }

    .tabs-header {
        overflow-x: auto;
    }

    .tab-btn {
        padding: 12px 20px;
        font-size: 14px;
        white-space: nowrap;
    }
}

/* ============================
   支付弹窗样式 - 新增
   ============================ */

/* Payment Modal Overlay */
.payment-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s;
    padding: 20px;
}

.payment-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Payment Modal Container */
.payment-modal {
    background: #fff;
    border-radius: 16px;
    width: 720px;
    max-width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.3s;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.payment-modal-overlay.active .payment-modal {
    transform: translateY(0) scale(1);
}

/* Modal Header */
.payment-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.payment-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.payment-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.payment-modal-close:hover {
    background: #eee;
    color: #666;
}

/* Modal Body */
.payment-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
}

/* Pay Section */
.pay-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.pay-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pay-section-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: #ff4d4f;
    border-radius: 2px;
}

/* Order Item */
.pay-order-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.pay-order-thumb {
    width: 80px;
    height: 80px;
    background: #eee;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 12px;
    overflow: hidden;
}

.pay-order-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pay-order-detail {
    flex: 1;
}

.pay-order-name {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    margin-bottom: 6px;
    line-height: 1.4;
}

.pay-order-spec {
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}

.pay-order-qty {
    font-size: 12px;
    color: #999;
}

.pay-order-price {
    text-align: right;
    flex-shrink: 0;
}

.pay-current-price {
    font-size: 18px;
    font-weight: 700;
    color: #ff4d4f;
}

/* Summary Rows */
.pay-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
    border-top: 1px dashed #ddd;
}

.pay-summary-row .pay-label {
    color: #666;
}

.pay-summary-row .pay-value {
    color: #333;
    font-weight: 500;
}

.pay-summary-row.pay-total {
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.pay-summary-row.pay-total .pay-label {
    font-size: 15px;
    color: #333;
}

.pay-summary-row.pay-total .pay-value {
    font-size: 24px;
    color: #ff4d4f;
    font-weight: 700;
}

.pay-discount {
    color: #ff4d4f !important;
}

/* Address Cards */
.pay-address-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pay-address-card {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    background: #fff;
}

.pay-address-card:hover {
    border-color: #ddd;
}

.pay-address-card.active {
    border-color: #ff4d4f;
    background: #fff5f5;
}

.pay-address-card.active::after {
    content: '\2713';
    position: absolute;
    top: 0;
    right: 0;
    width: 24px;
    height: 24px;
    background: #ff4d4f;
    border-radius: 0 10px 0 10px;
    color: #fff;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pay-addr-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.pay-addr-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.pay-addr-phone {
    color: #666;
    font-size: 13px;
}

.pay-addr-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    background: #fff2f0;
    color: #ff4d4f;
}

.pay-addr-detail {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.pay-add-address {
    border: 1px dashed #ddd;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.pay-add-address:hover {
    border-color: #ff4d4f;
    color: #ff4d4f;
    background: #fff5f5;
}

/* Payment Methods */
.pay-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pay-method {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid #eee;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.pay-method:hover {
    border-color: #ddd;
}

.pay-method.active {
    border-color: #ff4d4f;
    background: #fff5f5;
}

.pay-method-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pay-method.active .pay-method-radio {
    border-color: #ff4d4f;
    background: #ff4d4f;
}

.pay-method-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    display: none;
}

.pay-method.active .pay-method-radio::after {
    display: block;
}

.pay-method-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.pay-icon-wechat {
    background: #e6f7e6;
}

.pay-icon-alipay {
    background: #e6f4ff;
}

.pay-icon-bank {
    background: #fff7e6;
}

.pay-method-info {
    flex: 1;
}

.pay-method-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.pay-method-desc {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.pay-method-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    background: #fff2f0;
    color: #ff4d4f;
    flex-shrink: 0;
}

/* Order Note */
.pay-note-input {
    width: 100%;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.pay-note-input:focus {
    border-color: #ff4d4f;
}

/* Modal Footer */
.payment-modal-footer {
    padding: 16px 28px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    flex-shrink: 0;
}

.pay-footer-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.pay-footer-label {
    font-size: 14px;
    color: #666;
}

.pay-footer-value {
    font-size: 28px;
    font-weight: 700;
    color: #ff4d4f;
}

.pay-footer-currency {
    font-size: 18px;
}

.btn-pay-submit {
    background: #ff4d4f;
    color: #fff;
    border: none;
    padding: 14px 48px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-pay-submit:hover {
    background: #ff7875;
}

.btn-pay-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Toast */
.pay-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: #333;
    color: #fff;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 3000;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
}

.pay-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Payment Modal Responsive */
@media (max-width: 768px) {
    .payment-modal {
        width: 100%;
        max-height: 95vh;
        border-radius: 12px 12px 0 0;
    }

    .payment-modal-header {
        padding: 16px 20px;
    }

    .payment-modal-body {
        padding: 16px 20px;
    }

    .payment-modal-footer {
        padding: 12px 20px;
        flex-direction: column;
        gap: 12px;
    }

    .pay-footer-value {
        font-size: 22px;
    }

    .btn-pay-submit {
        width: 100%;
        padding: 14px 0;
    }

    .pay-order-item {
        flex-wrap: wrap;
    }

    .pay-order-price {
        width: 100%;
        text-align: left;
        margin-top: 8px;
    }
}
