.products-page {
    padding: 120px 0 60px;
    background: #ffffff;
}

.products-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.product-categories {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    margin-top: -100px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 15px 40px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    color: #333;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover,
.category-btn.active {
    background: #5fa5f0;
    border-color: #5fa5f0;
    color: white;
}

.sub-categories {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.sub-category-btn {
    padding: 10px 26px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sub-category-btn:hover,
.sub-category-btn.active {
    background: #8dc0f7;
    border-color: #8dc0f7;
    color: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    background-color: #f5f8fa;
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-info a,
.product-image a {
    text-decoration: none;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.product-info p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    height: 44px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.product-tag {
    padding: 5px 12px;
    background: #f0f4f8;
    border-radius: 15px;
    font-size: 12px;
    color: #5fa5f0;
}

/* 重点修改区域 - 查看详情按钮样式 */
.view-details {
    display: inline-block;
    padding: 10px 25px;
    background: transparent;        /* 默认透明背景 */
    color: #5fa5f0;                /* 默认蓝色文字 */
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid #5fa5f0;     /* 默认蓝色边框 */
}

/* 当卡片悬停时，按钮变化 */
.product-card:hover .view-details {
    transform: translateY(-2px);    /* 按钮上移效果 */
    box-shadow: 0 5px 15px rgba(94, 158, 228, 0.3); /* 阴影效果 */
    background: #5fa5f0;           /* 蓝色背景 */
    color: white;                   /* 白色文字 */
    border-color: #5fa5f0;          /* 边框颜色与背景一致 */
}
/* 重点修改区域结束 */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
    gap: 10px;
}

.page-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover,
.page-btn.active {
    background: #5fa5f0;
    border-color: #5fa5f0;
    color: white;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .product-image {
        height: 150px; /* 在小屏幕上减小图片高度为 150px */
    }
}

.products-title {
    text-align: center;
    color: white; /* 根据图片调整文本颜色 */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5); /* 添加文本阴影增强可读性 */
}

.products-title span {
    display: block;
    margin-bottom: 10px; 
}

.products-title span:first-child {
    font-size: clamp(2rem, 4vw, 4rem); /* 响应式字体 */
    font-weight: bold;
}

.products-title span:nth-child(2) {
    font-size: clamp(1rem, 2vw, 1.5rem); /* 响应式字体 */ 
}

.products-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%; /* 左半部分 */
    height: 100%;
    display: flex;
    align-items: center; /* 垂直居中 */
    justify-content: center; /* 水平居中 */
    padding: 20px;
    box-sizing: border-box;
}

.products-image {
    width: 100%;
    height: auto;
}

.products-image img {
    width: 100%;
    height: 600px;
    object-fit: cover;
}