/* 容器居中‌:ml-citation{ref="1,3" data="citationList"} */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* 网格布局‌:ml-citation{ref="5,6" data="citationList"} */
.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 25px;
}

/* 产品卡片‌:ml-citation{ref="2,7" data="citationList"} */
.product-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #dddddd;
    /*box-shadow: 0 2px 2px rgba(0,0,0,0.1);*/
    transition: transform 0.3s;
    overflow: hidden;
    cursor: pointer;
}

.product-card img {
    background: #dddddd;
}
.product-card:hover {
    transform: translateY(-5px);
}

/* 分页样式‌:ml-citation{ref="3,4" data="citationList"} */
.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 50px 0;
}
.pagination button {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #f8f9fa;
    cursor: pointer;
}
.pagination button.active {
    background: #323232;
    color: white;
}


/* 手机端样式 */
@media (max-width: 768px) {
    .pagination {
       flex-wrap: wrap;
    }
}

/* 容器布局体系 */
.search-filter-container {
    display: flex;            /* 启用弹性布局 ‌:ml-citation{ref="1,2" data="citationList"} */
    gap: 15px;                /* 元素间距控制 ‌:ml-citation{ref="2,3" data="citationList"} */
    align-items: center;      /* 垂直居中对齐 ‌:ml-citation{ref="2,3" data="citationList"} */
    margin: 30px auto;
justify-content: space-between}

/* 输入框样式 */
#searchInput {
    flex: 1;                  /* 自动填充剩余空间 ‌:ml-citation{ref="2,3" data="citationList"} */
    min-width: 200px;
    max-width: 300px;
    padding: 11px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

#searchInput:focus {
    border-color: #959595;
    outline: none;
    box-shadow: 0 2px 8px rgba(60, 60, 60, 0.1); /* 聚焦效果增强 ‌:ml-citation{ref="1,6" data="citationList"} */
}

#goToPage{
    flex: 1;                  /* 自动填充剩余空间 ‌:ml-citation{ref="2,3" data="citationList"} */
    width: 20px;
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

/* 动作按钮样式 */
.search_button {
    font-size: 16px;
    padding: 12px 28px;
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    transition:
            background 0.3s ease,
            transform 0.2s ease;  /* 交互动效优化 ‌:ml-citation{ref="2,3" data="citationList"} */
}

.search_button:hover {
    background: #323232;
    color: white;
    /*transform: translateY(-1px);*/
}

/* 下拉菜单美化 */
#filterSelect {
    padding: 12px 40px 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background:linear-gradient(45deg, transparent 50%, #666 50%),linear-gradient(135deg, #666 50%, transparent 50%); /* 自定义箭头 ‌:ml-citation{ref="1,5" data="citationList"} */
    background-position:calc(100% - 15px) 50%,calc(100% - 10px) 50%;
    background-size: 5px 5px;
    background-repeat: no-repeat;
    appearance: none;         /* 去除原生样式 ‌:ml-citation{ref="1,5" data="citationList"} */
    min-width: 180px;
}


.product-detail{
    margin: 0 auto;
    padding: 50px 0;
    width: 95%;
    display: flex;
    max-width: 1600px;

}
/* 图库容器 */
.gallery-container {
    width: 30%;
    position: relative;
}

/* 主图样式 */
.main-gallery img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 8px;
    /*box-shadow: 0 4px 15px rgba(0,0,0,0.1);*/
    transition: opacity 0.3s ease;
}
.main-gallery img {
    background: #f3f3f3;
    /*background: url(../products/images/default.jpg) no-repeat center/cover;*/
}
/* 缩略图列表 */
.thumbnail-list {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 1rem 0;
    margin-top: 1rem;
}

.thumbnail-list li {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.thumbnail-list li.active {
    border-color: #979797;
}

.thumbnail-list img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.thumbnail-list li:hover img {
    opacity: 1;
}

/* 信息区优化 */
.product-info {
    width: 60%;
    padding-left: 10%;
}
.product-info h1{
    font-family: 'HarmonyOS_Medium', serif;
    font-size: 35px;
}
.specs-box{
    width: 100%;
    margin-top: 50px;
}
.specs-box p,
.func-details p {
    font-family: 'HarmonyOS_Medium', serif;
    font-size: 18px;
    padding: 12px 20px;
    margin: 8px 0;
    background: #f8f9fa;
    /*border-left: 3px solid #323232;*/
}
a{
    font-family: 'HarmonyOS_Regular', serif;
}

.func-details p {
    background: #f8f9fa;
}

.product_name{
    overflow: hidden; /* 隐藏溢出的内容 */
    text-overflow: ellipsis; /* 显示省略符号来代表被修剪的文本 */
    white-space: nowrap; /* 防止文本换行 */
    font-size: 18px;
    padding:15px;
    margin:0;
}
.product_type{
    font-size: 16px;
    padding:0 15px 15px;
    color:#666;
}
.img-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.img-popup-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.img-popup-content img {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    border-radius: 8px;
}

.img-popup-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

.filter-button {
    background-color: #f0f0f0;  /* 默认背景色 */
    margin: 5px;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;         /* 圆角 */
    transition: background-color 0.3s, color 0.3s; /* 动画效果 */
}

/* 悬停状态 */
.filter-button:hover {
    background-color: #323232;  /* 悬停时背景色 */
    color: #fff;
}

/* 选中状态 */
.filter-button.active {
    background-color: #323232;  /* 选中时背景色 */
    color: white;                /* 选中时字体颜色 */
}

/* 响应式适配 */
@media (max-width: 768px) {
    .gallery-container {
        width: 100%;
    }
    .product-detail{
        flex-direction: column;
    }
    .product-info {
        margin: 25px auto;
        width: 100%;
        padding-left: 0;
    }
    .product-info h1{
       font-size: 25px;
    }

    .search-filter-container {
        flex-wrap: wrap;      /* 小屏换行显示 ‌:ml-citation{ref="5,7" data="citationList"} */
    }

    #searchInput {
        margin-bottom: 10px;
    }
    #filterSelect{
        width: 100%;
    }
}



/* 响应式布局‌:ml-citation{ref="5,6" data="citationList"} */
@media (max-width: 1200px) {
    .product-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1000px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .product-grid { grid-template-columns: repeat(1, 1fr); }
}