/* 全局样式 */
body {
    font-family: 'Microsoft YaHei', sans-serif;
    background: #f5f5f5;
}

/* 顶部 */
.top-header {
    background: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo img {
    max-height: 50px;
}

.search-form .form-control {
    border-radius: 25px 0 0 25px;
    border: 2px solid #667eea;
}

.search-form .btn {
    border-radius: 0 25px 25px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 0 25px;
}

/* 导航 */
.main-nav {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 10px 0;
}

.main-nav .nav-link {
    color: white !important;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 5px;
    margin: 0 5px;
}

.main-nav .nav-link:hover {
    background: rgba(255,255,255,0.2);
}

/* 轮播图 */
.banner-section {
    margin: 20px 0;
}

.banner-section .carousel {
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
}

.banner-section .carousel-item img {
    height: 100px;
    object-fit: cover;
}

/* 图片列表 */
.content-section {
    padding: 40px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    font-weight: 600;
    color: #333;
}

.content-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.content-card .card-img-top {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.content-card .card-body {
    padding: 15px;
}

.content-card .card-title {
    font-size: 14px;
    margin-bottom: 10px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.content-card .card-price {
    color: #e74c3c;
    font-weight: 600;
    font-size: 16px;
    margin: 0;
}

/* 文章列表 */
.article-section {
    padding: 40px 0;
    background: white;
}

.article-category {
    padding: 20px;
}

.category-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.article-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-list li {
    border-bottom: 1px dashed #eee;
    padding: 10px 0;
}

.article-list li a {
    display: flex;
    justify-content: space-between;
    color: #666;
    text-decoration: none;
}

.article-list li a:hover {
    color: #667eea;
}

.article-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
}

.article-date {
    color: #999;
    font-size: 12px;
}

/* 底部 */
.site-footer {
    background: #333;
    color: white;
    padding: 30px 0;
    margin-top: 40px;
}

/* 客服按钮 */
.service-btn {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: transform 0.3s;
    z-index: 999;
}

.service-btn:hover {
    transform: translateY(-50%) scale(1.1);
}

.service-btn i {
    font-size: 24px;
}

.service-btn span {
    font-size: 12px;
    margin-top: 2px;
}

/* 客服模态框 */
.service-name {
    font-size: 18px;
    margin-bottom: 20px;
}

/* 详情页 */
.detail-section {
    padding: 40px 0;
}

.detail-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.detail-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 15px;
}

.detail-meta {
    color: #999;
    margin-bottom: 20px;
}

.detail-meta span {
    margin-right: 20px;
}

.detail-price {
    font-size: 24px;
    color: #e74c3c;
    font-weight: 600;
    margin-bottom: 20px;
}

.detail-cover img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 20px;
}

.detail-description,
.detail-content {
    line-height: 1.8;
    color: #666;
    overflow: hidden;
}

/* 富文本内容图片样式限制 */
.rich-text-content img,
.detail-description img,
.detail-content img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    display: block;
    margin: 15px auto;
    border-radius: 5px;
    box-sizing: border-box;
}

/* 强制限制富文本中的图片大小 */
.rich-text-content img[style],
.detail-description img[style],
.detail-content img[style] {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
}

.detail-images {
    margin-top: 30px;
}

.detail-images h4 {
    margin-bottom: 20px;
}

.detail-images img {
    border-radius: 5px;
}

/* 侧边栏 */
.sidebar-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.sidebar-card h4 {
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li {
    margin-bottom: 15px;
}

.sidebar-list li a {
    display: flex;
    align-items: center;
    color: #666;
    text-decoration: none;
}

.sidebar-list li a:hover {
    color: #667eea;
}

.sidebar-list li img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 10px;
}

.sidebar-list li span {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

/* 响应式 */
@media (max-width: 768px) {
    .content-card .card-img-top {
        height: 120px;
    }
    
    .service-btn {
        width: 50px;
        height: 50px;
        right: 10px;
    }
    
    .service-btn i {
        font-size: 20px;
    }
}

/* 富文本内容图片样式限制 */
.rich-text-content img,
.detail-description img,
.detail-content img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    display: block;
    margin: 15px auto;
    border-radius: 5px;
    box-sizing: border-box;
}

/* 强制限制富文本中的图片大小 */
.rich-text-content img[style],
.detail-description img[style],
.detail-content img[style] {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
}

/* 纯文本列表样式（无图片） */
.sidebar-list-text li a {
    display: block !important;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

.sidebar-list-text li:last-child a {
    border-bottom: none;
}

.sidebar-list-text li span {
    display: block;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
}

.sidebar-list-text li a:hover span {
    color: #667eea;
}
