/* detail页面样式 */
body {
    margin: 0;
    padding: 0;
    font-family: '微软雅黑', Arial, sans-serif;
    overflow-x: hidden;
}

.detail-page {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 背景层 */
.detail-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.detail-bg-pc {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(../images/max_bg2.jpg) center center no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

.detail-bg-mobile {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(../images/min_bg2.jpg) center center no-repeat;
    background-size: cover;
}

/* 返回按钮 */
.detail-back {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.back-btn {
    display: inline-block;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.3s;
    -webkit-transition: opacity 0.3s;
}

.back-btn:hover {
    opacity: 0.8;
    filter: alpha(opacity=80);
}

.back-btn img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* 主容器 */
.detail-container {
    position: relative;
    z-index: 2;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    display: table;
    table-layout: fixed;
}

/* 左侧按钮区域 */
.detail-sidebar {
    position: relative;
    display: table-cell;
    vertical-align: top;
    width: 200px;
    padding-right: 20px;
}

.sidebar-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1;
}

.sidebar-bg img {
    width: 100%;
    height: auto;
    display: block;
    border: 0; /* IE兼容 */
}

.sidebar-btns {
    position: relative;
    z-index: 2;
    padding: 20px 10px;
}

.sidebar-btn {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
    text-align: center;
    position: relative;
}

.sidebar-btn:last-child {
    margin-bottom: 0;
}

.sidebar-btn img {
    width: 100%;
    height: auto;
    display: block;
    border: 0; /* IE9兼容 */
    vertical-align: top; /* IE兼容 */
}

/* 确保按钮切换效果（继承base.css的mod-menu-btn样式） */
.sidebar-btn.mod-menu-btn > img:nth-child(2) {
    display: none;
}

.sidebar-btn.mod-menu-btn:hover > img:nth-child(1),
.sidebar-btn.mod-menu-btn.active > img:nth-child(1) {
    display: none;
}

.sidebar-btn.mod-menu-btn:hover > img:nth-child(2),
.sidebar-btn.mod-menu-btn.active > img:nth-child(2) {
    display: block;
}

/* 右侧内容区域 */
.detail-content {
    position: relative;
    display: table-cell;
    vertical-align: top;
    padding-left: 20px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* 标题区域 */
.content-title {
    position: relative;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.title-item {
    display: none;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.title-item.active {
    display: block;
}

.title-item img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    border: 0; /* IE兼容 */
    box-sizing: border-box;
}

/* 内容区域 */
.content-main {
    position: relative;
    width: 1564px;
    height: 837px;
    background: url(../images/detail-content-bg.png) no-repeat;
    box-sizing: border-box;
    overflow-x: hidden;
}

.content-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    z-index: 1;
    box-sizing: border-box;
    overflow-x: hidden;
}

.content-bg img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    border: 0; /* IE兼容 */
    box-sizing: border-box;
}

.content-inner {
    color:#c33f26;
    position: relative;
    z-index: 2;
    margin:6% 16%;
    /* 最大高度不超过背景图高度（1564*837，高度约为宽度的53.5%） */
    /* 使用 calc 计算，减去 padding */
    max-height:600px;
    overflow-y: auto;
    overflow-x: hidden;
    /* IE9兼容滚动条 */
    -ms-overflow-style: scrollbar;
    /* 自定义滚动条样式 */
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 165, 116, 0.5) transparent;
    /* 防止横向溢出 */
    box-sizing: border-box;
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
}

/* 内容区域内图片自适应，防止超宽 */
.content-inner img,
.content-text img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Webkit 浏览器滚动条样式 */
.content-inner::-webkit-scrollbar {
    width: 8px;
}

.content-inner::-webkit-scrollbar-track {
    background: transparent;
}

.content-inner::-webkit-scrollbar-thumb {
    background: rgba(212, 165, 116, 0.5);
    border-radius: 4px;
}

.content-inner::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 165, 116, 0.7);
}

/* 内容项 */
.content-item {
    display: none;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.content-item.active {
    display: block;
}

/* 小标题 */
.content-subtitle {
    position: relative;
    margin: 20px 0 15px;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    width:337px;
    height:54px;
    line-height: 54px;
    background:url(../images/tit-bg.png) no-repeat;
    text-align: center;

}

.content-subtitle:first-child {
    margin-top: 0;
}

.content-subtitle img {
    display: block;
    width: 200px;
    max-width: 200px;
    height: auto;
    margin: 0;
    border: 0; /* IE兼容 */
    box-sizing: border-box;
}

.subtitle-text {

    color: #c33f26;
    font-size: 16px;
    font-weight: bold;
    white-space: nowrap;
    display: inline-block;
}

/* 内容文本 */
.content-text {
    color: #c33f26;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
    /* 防止横向溢出 */
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
    width: 100%;
    box-sizing: border-box;
}

/* 属性表格 */
.attr-table {
    width:100%;
    max-width: 60%;
    margin:10px auto;
    border-collapse: collapse;
    margin-top: 8px;
    border:1px solid #c33f26;
    font-size: 14px;
    color: #c33f26;
}

.attr-table th,
.attr-table td {
    border: 1px solid rgba(255, 232, 194, 0.5);
    padding: 6px 10px;
    text-align: center;
    border:1px solid #c33f26;
    
}

.attr-table th {
     background-color: #c33f26;
    color: #fff;
    font-weight: bold;
    text-align: center;
}

.attr-table tr:nth-child(even) td {
    
}

.content-text p {
    margin-bottom: 15px;
    text-indent: 2em;
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
    max-width: 100%;
}

.content-text p:last-child {
    margin-bottom: 0;
}

/* 底部装饰 */
.detail-decoration {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 3;
    text-align: center;
    pointer-events: none;
}

.detail-decoration img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border: 0; /* IE兼容 */
}

/* IE9及以下兼容 */
.ie9 .detail-container,
.ie8 .detail-container,
.ie7 .detail-container {
    display: block;
}

.ie9 .detail-sidebar,
.ie8 .detail-sidebar,
.ie7 .detail-sidebar {
    float: left;
    width: 200px;
    display: block;
}

.ie9 .detail-content,
.ie8 .detail-content,
.ie7 .detail-content {
    margin-left: 220px;
    display: block;
}

/* IE9 transform兼容 */
.ie9 .subtitle-text {
    left: 50%;
    top: 50%;
    margin-left: -50px; /* 需要根据实际文本宽度调整 */
    margin-top: -10px;
}

.ie9 .detail-decoration {
    left: 0;
    width: 100%;
}

.content-inner img {
    display: block!important;
    max-width: 100%;
    margin: 10px auto;
}

/* 移动端样式 */
@media screen and (max-width: 768px) {

    .content-main {
        width: 100%;
        height: auto;
        background: none;
    }

    


    .detail-bg-pc {
        display: none;
    }
    
    .detail-bg-mobile {
        display: block;
    }
    
    .detail-back {
        top: 10px;
        right: 10px;
    }
    
    .detail-back img {
        width: 60px;
        max-width: 60px;
    }
    
    .detail-container {
        display: block;
        padding: 60px 15px 100px;
        padding-bottom: 120px; /* 为底部按钮留出空间 */
    }
    
    .detail-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        padding-right: 0;
        margin-bottom: 0;
        z-index: 10;
        background: rgba(0, 0, 0, 0.8); /* 添加半透明背景 */
    }
    
    .sidebar-bg {
        display: none; /* 移动端隐藏左侧背景图 */
    }
    
    .sidebar-bg img {
        display: none;
    }
    
    .sidebar-btns {
        display: -webkit-box;
        display: -moz-box;
        display: -ms-flexbox;
        display: -webkit-flex;
        display: flex;
        -webkit-flex-direction: row;
        -ms-flex-direction: row;
        flex-direction: row;
        -webkit-justify-content: space-around;
        -ms-flex-pack: distribute;
        justify-content: space-around;
        padding: 10px 5px;
    }
    
    .sidebar-btn {
        -webkit-box-flex: 1;
        -moz-box-flex: 1;
        -webkit-flex: 1;
        -ms-flex: 1;
        flex: 1;
        margin: 0 3px;
        margin-bottom: 0;
    }
    
    .sidebar-btn img {
        width: 100%;
        max-width: 100%;
        height: auto;
    }
    
    .detail-content {
        display: block;
        padding-left: 0;
    }
    
    .content-title {
        margin-bottom: 15px;
    }
    
    .content-title img {
        width: 100%;
    }
    
    .content-bg {
        display: none; /* 移动端隐藏右侧内容背景图 */
    }
    
    .content-bg img {
        display: none;
    }
   
    
    .content-inner {
        padding: 8px;
        min-height: auto;
        max-height: none;
        overflow: auto;
        width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
        word-break: break-all;
        overflow-wrap: break-word;
        border-radius: 5px;
        margin: 0;
    }
    
    .content-subtitle {
        margin: 15px 0 10px;
    }
    
    .subtitle-text {
        font-size: 16px;
    }
    
    .content-text {
        font-size: 14px;
        line-height: 1.6;
    }

    .attr-table {
        font-size: 12px;
        max-width: 100%;
        table-layout: fixed;
    }
    
    .attr-table th,
    .attr-table td {
        padding: 4px 6px;
        word-break: break-all;
    }
    
    .content-text p {
        text-indent: 1.5em;
        margin-bottom: 12px;
    }
    
    .detail-decoration {
        display: none; /* 移动端不显示 */
    }
}

/* 大屏样式 */
@media screen and (min-width: 769px) {
    .detail-bg-mobile {
        display: none;
    }
}

/* 中等屏幕适配 */
@media screen and (min-width: 769px) and (max-width: 1200px) {
    .detail-container {
        max-width: 100%;
        padding: 30px 15px 80px;
    }
    
    .detail-sidebar {
        width: 150px;
    }
    
    .content-inner {
        margin: 12% 16%;
    }
}
