/* 产品中心页面样式 */
/* 产品页面专用样式 */
.products-banner + .products-section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    background-color: transparent !important; /* 移除背景色，使用透明背景，添加!important确保优先级 */
}

/* 确保产品页面的背景色被移除，不影响首页 */
body .products-banner + .products-section {
    background-color: transparent !important;
}

/* 使用更高优先级的选择器覆盖index.css中的样式 */
html body .products-banner + .products-section,
body.products-page .products-section,
.products-banner + .products-section[class] {
    background-color: transparent !important;
    width: auto !important;
}

/* 增加更高优先级的选择器覆盖index.css中的样式 */
html body .products-banner + .products-section,
body.products-page .products-section {
    background-color: transparent !important;
}

.products-container {
    width: 100%;
}

.products-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 10px;
    color: #2c3e50;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.products-sub-title {
    text-align: center;
    font-size: 22px;
    color: #7f8c8d;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    letter-spacing: 1px;
}

.products-sub-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: #3498db; /* 海军蓝 */
}

/* 产品内容布局 */
.products-content {
    display: flex;
    gap: 30px;
    margin-bottom: 30px; /* 增加底部间距，为分页控件留出空间 */
}

/* 左侧产品分类菜单样式 */
.product-categories {
    flex: 0 0 250px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    top: 20px;
    align-self: flex-start;
    /* 移除最大高度限制和滚动条 */
    max-height: none;
    overflow-y: visible;
}

.category-title {
    font-size: 18px;
    color: #3498db; /* 现代蓝色 */
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    letter-spacing: 0.3px;
}

.product-categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-categories li {
    margin-bottom: 10px;
}

.product-categories li a {
    display: block;
    padding: 10px 15px;
    color: #555;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.product-categories li a:hover {
    background-color: #f5f5f5;
    color: #000080; /* 海军蓝 */
}

.product-categories li.active a {
    background-color: #3498db; /* 现代亮蓝色 */
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* 右侧产品网格样式 */
.product-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    height: auto;
    position: relative;
    align-items: stretch;
    align-self: flex-start; /* 确保网格不会随左侧分类高度变化 */
}

.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
    height: auto;
}

.product-card-link:hover {
    transform: translateY(-5px);
}

.product-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: auto;
    min-height: 240px;
    display: flex;
    flex-direction: column;
}

.product-image {
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-card-title {
    color: #fff;
    font-size: 16px;
    margin: 0;
    text-align: center;
}

.product-card-content {
    padding: 15px;
}

.product-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-info h3 {
    font-size: 18px;
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* 分页控件样式 - 现代化设计 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
    gap: 8px;
    width: 100%;
    clear: both;
    position: relative;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    padding: 10px 0;
}

@media (max-width: 767px) {
    .pagination {
        flex-direction: row;
        justify-content: center;
        gap: 15px;
        padding: 10px;
    }

    .page-link {
        min-width: 35px;
        height: 35px;
        padding: 0 10px;
        font-size: 14px;
    }
}

/* 确保分页控件在产品列表下方 */
.products-content {
    margin-bottom: 30px;
}

.page-link {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background-color: #ffffff;
    color: #555;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 15px;
}

.page-link:hover {
    background-color: #f8f9fa;
    color: #000080;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-link.active {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.4);
    border: none;
}

.page-link.prev,
.page-link.next {
    background-color: #f8f9fa;
    font-weight: 600;
    padding: 0 15px;
}

/* 无产品提示 */
.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 0;
    color: #666;
    font-size: 18px;
}

/* 产品详情页样式 */
.product-detail-section {
    padding: 60px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.product-detail-container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.product-detail-header {
    margin-bottom: 20px;
    padding-bottom: 20px;
}

.product-detail-title {
    font-size: 32px;
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.product-detail-header h1 {
    text-align: center;
}

.product-detail-meta {
    margin-bottom: 20px;
    color: #666;
    text-align: center;
    font-size: 14px;
}

.product-detail-image {
    margin-bottom: 30px;
    text-align: center;
}

.product-detail-image img {
    max-width: 100%;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-detail-content {
    margin-bottom: 30px;
    line-height: 1.8;
    color: #555;
}

.product-detail-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.prev-product,
.next-product {
    color: #555;
    text-decoration: none;
    transition: color 0.3s ease;
    max-width: 45%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prev-product:hover,
.next-product:hover {
    color: #0000cd; /* 中蓝色 */
}

.product-detail-back {
    text-align: center;
    margin-top: 30px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .products-content {
        flex-direction: column;
    }
    
    .product-categories {
        flex: none;
        width: 100%;
        margin-bottom: 30px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .product-detail-navigation {
        flex-direction: column;
        gap: 15px;
    }
}