/* ===== 详情页背景 ===== */
.product-page {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at top, rgba(255, 220, 180, 0.1) 0%, transparent 60%),
        linear-gradient(to bottom, #3d2614, #2a1a0d);
    color: #fff;
}

/* ===== 顶栏 ===== */
.product-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
}
.back-link {
    color: #ffd966;
    font-size: 14px;
    text-decoration: none;
    transition: opacity 0.2s;
}
.back-link:hover { opacity: 0.7; }

/* ===== 主体 ===== */
.product-main {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 20px 80px;
    display: grid;
    gap: 32px;
}

/* ===== 封面 ===== */
.product-cover-section {
    display: flex;
    justify-content: center;
}
.cover-box {
    position: relative;
    width: 240px;
    aspect-ratio: 2 / 3;
}
.cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 2px 6px 6px 2px;
    box-shadow:
        inset 6px 0 8px -4px rgba(0, 0, 0, 0.4),
        0 8px 16px rgba(0, 0, 0, 0.5),
        0 20px 30px rgba(0, 0, 0, 0.4);
}
.cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #555;
    color: #fff;
    padding: 16px;
    text-align: center;
}
.cover-spine {
    position: absolute;
    top: 2px;
    right: -4px;
    bottom: 2px;
    width: 4px;
    background: linear-gradient(to right, #ddd 0%, #fff 30%, #aaa 70%, #999 100%);
    border-radius: 0 3px 3px 0;
    box-shadow: 1px 0 2px rgba(0, 0, 0, 0.2);
}

/* ===== 商品信息 ===== */
.product-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}
.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 13px;
    opacity: 0.85;
}
.meta-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
}
.product-price {
    color: #ffd966;
    margin: 16px 0 24px;
}
.price-symbol {
    font-size: 18px;
    margin-right: 2px;
}
.price-value {
    font-size: 36px;
    font-weight: 700;
}

.product-description {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    line-height: 1.8;
    font-size: 14px;
}
.product-description p {
    margin-bottom: 12px;
}
.product-description p:last-child { margin-bottom: 0; }

/* ===== 购买按钮 ===== */
.buy-section {
    text-align: center;
    margin-top: 12px;
}
.btn-buy {
    width: 100%;
    max-width: 320px;
    padding: 16px 24px;
    background: linear-gradient(to bottom, #ffd966, #f0b400);
    color: #3d2614;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(240, 180, 0, 0.4);
}
.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(240, 180, 0, 0.6);
}
.btn-buy:active { transform: translateY(0); }
.buy-notice {
    margin-top: 12px;
    font-size: 12px;
    opacity: 0.7;
}

/* ===== 弹窗 ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}
.modal-overlay.active {
    display: flex;
}
.modal-content {
    background: #fff;
    color: #333;
    border-radius: 16px;
    padding: 28px 24px;
    max-width: 420px;
    width: 100%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}
.modal-content h2 {
    font-size: 20px;
    margin-bottom: 6px;
}
.modal-sub {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
}
.form-group input[type="text"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.form-group input:focus {
    border-color: #07c160;
}

.pay-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.pay-method {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    cursor: pointer;
    background: #fafafa;
    transition: all 0.2s;
    font-size: 14px;
}
.pay-method.active {
    border-color: #07c160;
    background: #f0faf4;
}
.pay-method input {
    display: none;
}
.pay-icon { font-size: 18px; }

.form-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-top: 1px solid #eee;
    margin-top: 8px;
    font-size: 14px;
    color: #666;
}
.form-price {
    font-size: 24px;
    font-weight: 700;
    color: #e74c3c;
}
.btn-submit {
    width: 100%;
    padding: 14px;
    background: #07c160;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-submit:hover:not(:disabled) {
    background: #06ad57;
}
.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ===== 响应式 ===== */
@media (min-width: 768px) {
    .product-main {
        grid-template-columns: 280px 1fr;
        align-items: start;
        padding-top: 48px;
    }
    .product-cover-section { position: sticky; top: 20px; }
    .cover-box { width: 280px; }
    .product-title { font-size: 28px; }
    .price-value { font-size: 42px; }
}

/* ============================================================
   详情页增强：数据来源 · 内容试读 · 脱敏表单 · 微信留言
   金棕书架色系：#ffd966 金 / #d8b88a 米金 / #3d2614 深棕
   ============================================================ */

/* ---- 微信服务号留言按钮 ---- */
.btn-msg {
    width: 100%;
    max-width: 320px;
    margin-top: 12px;
    padding: 13px 24px;
    background: transparent;
    color: #ffd966;
    border: 1.5px solid rgba(255, 217, 102, 0.5);
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.btn-msg:hover {
    background: rgba(255, 217, 102, 0.1);
    border-color: #ffd966;
}
.btn-msg .msg-icon { margin-right: 4px; }

/* ---- 分节标题（金线 + 居中标题，书卷感）---- */
.sources-section, .preview-section {
    max-width: 900px;
    margin: 8px auto 0;
    padding: 36px 20px 0;
}
.section-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 6px;
}
.section-rule {
    flex: 1;
    max-width: 120px;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(216, 184, 138, 0.5), transparent);
}
.section-title {
    font-size: 19px;
    font-weight: 700;
    color: #ffd966;
    letter-spacing: 2px;
    white-space: nowrap;
}
.section-sub {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 22px;
}

/* ---- 权威数据来源卡片 ---- */
.sources-list {
    list-style: none;
    max-width: 640px;
    margin: 0 auto;
    display: grid;
    gap: 10px;
}
.source-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 18px;
    background: linear-gradient(180deg, rgba(255, 220, 180, 0.07), rgba(255, 220, 180, 0.03));
    border: 1px solid rgba(216, 184, 138, 0.18);
    border-left: 3px solid rgba(255, 217, 102, 0.6);
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    color: #f0e4d2;
}
.source-seal {
    color: #ffd966;
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ---- 内容试读：书页质感 ---- */
.preview-pages {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.preview-page {
    margin: 0;
    position: relative;
    cursor: zoom-in;
    transition: transform 0.2s;
}
.preview-page img {
    width: 100%;
    display: block;
    border-radius: 3px;
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.45),
        0 2px 4px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.preview-page:hover { transform: translateY(-3px); }
.preview-page figcaption {
    text-align: center;
    font-size: 12px;
    color: rgba(216, 184, 138, 0.7);
    margin-top: 8px;
    letter-spacing: 1px;
}

/* 试读结束：渐隐遮罩 + 解锁按钮 */
.preview-fade {
    position: relative;
    margin: 4px auto 0;
    max-width: 680px;
    padding: 40px 0 8px;
    text-align: center;
}
.preview-fade::before {
    content: "";
    position: absolute;
    top: -80px; left: 0; right: 0; height: 80px;
    background: linear-gradient(to bottom, transparent, #2e1d0f);
    pointer-events: none;
}
.btn-buy-inline {
    width: auto;
    max-width: none;
    padding: 14px 32px;
    font-size: 16px;
}

/* ---- 试读放大遮罩 ---- */
.zoom-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    align-items: flex-start;
    justify-content: center;
    z-index: 200;
    padding: 20px;
    overflow-y: auto;
    cursor: zoom-out;
}
.zoom-overlay.active { display: flex; }
.zoom-overlay img {
    max-width: 900px;
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

/* ---- 页脚 ---- */
.product-foot {
    text-align: center;
    padding: 48px 20px 36px;
    font-size: 12px;
    color: rgba(216, 184, 138, 0.5);
}
.product-foot a {
    color: rgba(216, 184, 138, 0.7);
    text-decoration: none;
    border-bottom: 1px dotted rgba(216, 184, 138, 0.35);
}
.product-foot a:hover { color: #ffd966; }
.product-foot .foot-sep { margin: 0 10px; }

/* ============================================================
   购买弹窗内：联系方式切换 + 脱敏 + 隐私说明（白底卡片内）
   ============================================================ */
.label-hint {
    font-weight: 400;
    color: #999;
    font-size: 12px;
}
.contact-switch {
    display: inline-flex;
    background: #f0f0f0;
    border-radius: 8px;
    padding: 3px;
    margin-bottom: 10px;
}
.cs-tab {
    border: none;
    background: transparent;
    padding: 6px 18px;
    border-radius: 6px;
    font-size: 13px;
    color: #777;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.cs-tab.active {
    background: #fff;
    color: #b8860b;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.form-group input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.form-group input:focus { border-color: #d4a017; }

/* 联系方式输入区：用 buy- 前缀避免与全站客服 widget 的 .contact-pane 冲突 */
.buy-contact-pane { display: block; }
.buy-contact-pane.hidden { display: none; }
/* 输入框脱敏态：暖金底，提示已保护 */
.form-group input.masked {
    background: #fdf8ec;
    border-color: #e8d9b0;
    color: #8a6d2f;
    letter-spacing: 0.5px;
    font-weight: 500;
}
.privacy-note {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.7;
    color: #8a7a5a;
    background: #fdf9ef;
    border: 1px solid #f0e6cc;
    border-radius: 8px;
    padding: 10px 12px;
}
.privacy-note b { color: #b8860b; }

/* ---- 微信留言弹窗 ---- */
.modal-msg { text-align: center; }
.msg-qr {
    background: linear-gradient(135deg, #f8faf9, #fff);
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 18px;
    margin: 8px auto 12px;
    display: inline-block;
}
.msg-qr img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    display: block;
}
.msg-tip {
    font-size: 12px;
    color: #999;
}

@media (max-width: 600px) {
    .section-title { font-size: 17px; }
    .preview-pages { gap: 20px; }
}
