/* 产品详情页样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #fff;
    color: #333;
    line-height: 1.6;
    padding-bottom: 80px;
    scroll-behavior: smooth;
}

/* 顶部导航条 */
.footpf {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, var(--color-forest) 0%, var(--color-sage) 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.footpf .am-header {
    max-width: 800px;
    margin: 0 auto;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footpf .am-header-title {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

/* 顶部占位 */
.top-spacer {
    height: 49px;
}

/* 主容器 */
.body-a {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

/* 强制产品内容下所有div宽度一致 */
.product-content > div {
    max-width: 800px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

/* 图片上下排列 - 与原产品页面一致 */
.product-content > .body-a:first-of-type {
    padding: 0 !important;
}

.product-content > .body-a:first-of-type img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
}

/* 内容区块样式 */
.body-a {
    background: #fff;
}

.body-a h2 {
    color: var(--color-forest);
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--color-honey);
}

.body-a h3 {
    color: var(--color-espresso);
    font-size: 1.3rem;
    font-weight: 600;
    margin: 1.5rem 0 0.8rem 0;
    padding-left: 0.8rem;
    border-left: 4px solid var(--color-sage);
}

.body-a p {
    line-height: 1.8;
    margin-bottom: 1rem;
    color: #555;
    text-align: justify;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

.body-a br {
    content: '';
    display: block;
    margin: 0.5rem 0;
}

/* 图片样式 */
.body-a img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* 链接样式 */
.body-a a {
    color: var(--color-forest);
    text-decoration: none;
    transition: color 0.3s;
}

.body-a a:hover {
    color: var(--color-honey);
    text-decoration: underline;
}

/* 页脚 */
.blog-footer {
    background: var(--color-espresso);
    color: var(--color-cream);
    padding: 2rem 1rem;
    text-align: center;
    margin-top: 3rem;
}

.blog-footer a {
    color: var(--color-honey);
    text-decoration: none;
}

.blog-footer a:hover {
    text-decoration: underline;
}

/* 底部导航 */
.bottom-spacer {
    height: 35px;
}

#bottomnav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-sage);
    padding: 1rem;
    text-align: center;
    z-index: 999;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

#bottomnav a {
    display: inline-block;
    margin: 0.5rem 1rem;
    padding: 0.5rem 1.5rem;
    background: white;
    color: var(--color-forest);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s;
    align-items: center;
}

#bottomnav a i {
    margin-right: 0.3rem;
    font-size: 1.1em;
}

#bottomnav a:hover {
    background: var(--color-honey);
    color: white;
    transform: translateY(-2px);
}

#bottomnav a.botdet {
    background: var(--color-forest);
    color: white;
}

/* 订单区域（iframe容器） */
.order-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

.order-section iframe {
    width: 100%;
    border: none;
}

/* 响应式设计 */
@media (max-width: 640px) {
    .top-images {
        flex-direction: column;
    }

    .top-images img {
        width: 100%;
    }

    .body-a {
        padding: 1rem 0.8rem;
    }

    .body-a h2 {
        font-size: 1.4rem;
    }

    .body-a h3 {
        font-size: 1.1rem;
    }

    #bottomnav {
        padding: 0.5rem;
    }

    #bottomnav a {
        display: inline-block;
        margin: 0.3rem 0.2rem;
        padding: 0.4rem 0.6rem;
        font-size: 0.875rem;
    }

    #bottomnav a i {
        margin-right: 0.2rem;
        font-size: 1em;
    }
}

/* 隐藏重复元素 */
.product-content .footpf,
.product-content .am-header,
.product-content .blog-footer,
.product-content #bottomnav {
    display: none !important;
}

/* 隐藏空白占位区域 */
.product-content > div[style*="height:49px"],
.product-content > div[style*="height:35px"] {
    display: none !important;
}

/* 确保所有容器宽度一致 */
.product-content > div {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
