/* 产品展示样式 */

/* Banner样式 */
.banner {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.banner-slider {
    position: relative;
    width: 100%;
    height: auto;
}

.banner-slide {
    position: absolute; /* 绝对定位 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.banner-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.products {
    padding: 60px 0;
}

/* 二级导航样式 */
.product-nav {
    margin: 30px 0;
    text-align: center;
    background-color: #f0f0f0;
    padding: 15px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.product-nav-item {
    margin: 10px 15px;
}

.product-nav-item a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.3s ease;
    padding: 10px 20px;
    border-radius: 4px;
    display: inline-block;
}

.product-nav-item a:hover,
.product-nav-item a.active {
    color: #fff;
    background-color: var(--secondary-color);
}

/* 产品网格样式 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.product-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 产品图片容器 */
.product-img {
    width: 100%;
    height: 0;
    padding-bottom: 66.67%; /* 3:2比例 */
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.product-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

/* 鼠标悬停效果 */
.product-item:hover .product-img img {
    transform: scale(1.05);
}

/* 产品信息样式 */
.product-info {
    padding: 20px;
    background: #fff;
}

.product-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.product-info p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.product-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #999;
}

.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    background-color: #fff;
    padding: 20px;
    width: 95%;
    max-width: 1000px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 30px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    display: block;
}

.modal-img {
    object-fit: cover;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

.modal-info {
    width: 100%;
}

.modal-desc {
    line-height: 1.6;
    margin-bottom: 20px;
}

.modal-specs {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.modal-specs h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.modal-specs ul {
    list-style: none;
    padding: 0;
}

.modal-specs li {
    overflow: hidden;  /* 清除浮动 */
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.modal-specs li:last-child {
    border-bottom: none;
}

.modal-specs li span {
    float: left;
    font-size: 14px;
    color: #666;
    margin-right: 20px;  /* 两个span之间的间距 */
}

/* 弹窗样式 */
.modal-images img {
    width: 100%;
    height: 500px;
    border-radius: 8px;
    object-fit: contain;
    background-color: #f5f5f5;
    margin-bottom: 15px;
}

/* 弹窗样式 */
.modal-gallery {
    margin-bottom: 20px;
}

/* 响应式设计 */
@media screen and (max-width: 1055px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-nav {
        padding: 20px 0;
    }

    .product-nav-item {
        display: block;
        margin: 10px 0;
    }
    
    .product-nav-item a {
        width: 100%;
        text-align: center;
        padding: 8px 15px;
        font-size: 16px;
    }

    .modal-content {
        margin: 20px auto;
        width: 95%;
    }

    .modal-info {
        grid-template-columns: 1fr;
    }

    .modal-title {
        font-size: 20px;
    }

    .modal-img {
        max-height: 300px;
    }

    .product-img {
        padding-bottom: 66.67%; /* 保持3:2比例 */
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-info h3 {
        font-size: 16px;
    }
}

/* 指示器样式 */
.banner-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    padding: 0 15px;
    height: 30px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 20px;
    z-index: 20;
}

.banner-indicator {
    width: 12px;
    height: 12px;
    margin: 0 6px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.banner-indicator.active {
    background-color: #fff;
    transform: scale(1.2);
}

/* 设置首张幻灯片显示，确保banner有高度 */
.banner-slide:first-child {
    position: relative;
    opacity: 1;
    visibility: visible;
}

/* 移动端适配 */
@media screen and (max-width: 1055px) {

    .banner-slider {
        height: 100%;
    }
    
    .banner-slide {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        visibility: hidden;
        transition: opacity 1.5s ease, visibility 1.5s ease;
    }
    
    .banner-slide.active {
        opacity: 1;
        visibility: visible;
    }
    
    .banner-img {
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
    
    /* 移动端指示器样式 */
    .banner-indicators {
        bottom: 20px;
        padding: 0 10px;
        height: 24px;
    }
    
    .banner-indicator {
        width: 10px;
        height: 10px;
        margin: 0 4px;
    }
    
}

/* 面包屑导航 */
.breadcrumb {
    padding: 20px 0;
    margin-top: 30px;
    color: #666;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--secondary-color);
}

/* 三级导航样式 */
.product-subnav {
    margin: 20px 0 40px;
    border-bottom: 1px solid #eee;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.subnav-group {
    display: none;  /* 产品分类的二级导航 */
    padding: 15px 0;
}

.subnav-group.active {
    display: block;
}

.subnav-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 15px;
    padding: 0 15px;
    min-width: min-content;
}

.subnav-group li {
    margin: 5px 0;
    flex: 0 0 auto;
}

.subnav-group a {
    text-decoration: none;
    color: #666;
    font-size: 16px;
    padding: 5px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.subnav-group a:hover,
.subnav-group a.active {
    color: #fff;
    background-color: var(--secondary-color);
}

/* 移动端样式 */
@media screen and (max-width:1055px) {
    .subnav-group ul {
        justify-content: center;
    }
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.pagination a {
    text-decoration: none;
    color: #666;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 0 5px;
    transition: background-color 0.3s, color 0.3s;
}

.pagination a:hover {
    background-color: var(--secondary-color);
    color: #fff;
}

.pagination a.active {
    background-color: var(--secondary-color);
    color: #fff;
    border: 1px solid var(--secondary-color);
}



.gallery-main {
    margin-bottom: 15px;
    text-align: center;
}

.gallery-main img {
    /**width: 100%;**/
    height: auto;
    border-radius: 8px;
    object-fit: contain;
    background-color: #f5f5f5;
}

.gallery-thumbs {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    padding-bottom: 10px;
}

.gallery-thumb {
    width: 100px;
    height: 100px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
}

.gallery-thumb.active {
    border-color: var(--secondary-color);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 2K屏幕适配 */
@media screen and (min-width: 2000px) {
    .modal-content {
        max-width: 1500px !important;
    }
    
    .modal-title {
        font-size: 28px;
    }
    
    .modal-desc {
        font-size: 18px;
    }
}

/* 4K屏幕适配 */
@media screen and (min-width: 3000px) {
    .modal-content {
        max-width: 1900px !important;
    }
    
    .modal-title {
        font-size: 32px;
    }
    
    .modal-desc {
        font-size: 20px;
    }
} 