/* 面包屑导航 */
.breadcrumb {
    padding: 20px 0;
    background-color: var(--light-blue);
}

.breadcrumb-links {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
}

.breadcrumb-links li {
    margin-right: 10px;
    font-size: clamp(0.8rem, 2vw, 1rem);
}

.breadcrumb-links li:not(:last-child):after {
    content: '>';
    margin-left: 10px;
    color: var(--primary-blue);
}

.breadcrumb-links a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.breadcrumb-links a:hover {
    color: var(--primary-blue);
}

.breadcrumb-links .current {
    color: var(--primary-blue);
    font-weight: 600;
}

/* 产品页面内容样式 */
.product-hero {
    background-color: var(--light-blue);
    padding: 60px 0;
    text-align: center;
}

.product-hero h1 {
    font-size: clamp(1.5rem, 2vw, 2.5rem);
    color: var(--dark-blue);
    margin-bottom: 20px;
}

.product-hero p {
    font-size: clamp(0.8rem, 2vw, 1rem);
    max-width: 800px;
    margin: 0 auto;
}

.product-content {
    display: flex;
    gap: 30px;
    margin: 50px 0;
}

.product-sidebar {
    flex: 0 0 250px;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
}

.product-sidebar h3 {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--dark-blue);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-blue);
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 10px;
    font-size: clamp(0.8rem, 2vw, 1rem);
}

.category-list a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--text-color);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.category-list a:hover,
.category-list a.active {
    background-color: var(--light-blue);
    color: var(--primary-blue);
}

.category-list a i {
    font-size: clamp(0.8rem, 2vw, 1rem);
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.product-main {
    flex: 1;
}

/* 视图切换控件 */
.view-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
    gap: 10px;
}

.view-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    background-color: var(--light-blue);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn.active {
    background-color: var(--primary-blue);
    color: white;
}

.view-btn:hover {
    background-color: var(--primary-blue);
    color: white;
}

/* 产品网格布局 - 一行四个 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.product-grid.grid-view-4 .product-card {
    display: flex;
    flex-direction: column;
}

.product-grid.grid-view-4 .product-media {
    height: 200px;
}

/* 产品网格布局 - 一行一个 */
.product-grid.grid-view-1 {
    grid-template-columns: 1fr;
    gap: 40px;
}

.product-grid.grid-view-1 .product-card {
    display: grid;
    grid-template-columns: 2fr 2fr;
    gap: 30px;
    align-items: center;
}

.product-grid.grid-view-1 .product-card:nth-child(odd) {
    direction: ltr;
}

.product-grid.grid-view-1 .product-card:nth-child(even) {
    direction: rtl;
}

.product-grid.grid-view-1 .product-card:nth-child(even) .product-info {
    direction: ltr;
}

.product-grid.grid-view-1 .product-media {
    height: 300px;
}

.product-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-10px);
}

.product-media {
    height: 250px;
    overflow: hidden;
    background-color: var(--white);
    position: relative;
}

.product-media img,
.product-media video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.product-card:hover .product-media img,
.product-card:hover .product-media video {
    transform: scale(1.1);
}

/* 视频播放控制 */
.video-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 10;
    display: flex;
    gap: 5px;
}

.video-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-btn:hover {
    background-color: var(--primary-blue);
    transform: scale(1.1);
}

.video-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: clamp(0.8rem, 2vw, 1rem);
}

.product-info {
    padding: 20px;
}

/* 优化标题和描述显示 - 超过两行显示省略号 */
.product-info h3 {
    margin-bottom: 10px;
    color: var(--dark-blue);
    /* 限制为两行，超过显示省略号 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.8em;
    /* 两行文本的大致高度 */
    line-height: 1.4;
    color: #161515;
    font-size: clamp(0.8rem, 2vw, 1rem);
}

.product-info p {
    margin-bottom: 15px;
    color: #666;
    font-size: clamp(0.8rem, 2vw, 1rem);
    /* 限制为两行，超过显示省略号 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.8em;
    /* 两行文本的大致高度 */
    line-height: 1.4;
}

.product-actions {
    display: flex;
    gap: 10px;
    pointer-events: auto;
}

.product-actions .btn {
    padding: 8px 15px;
    font-size: clamp(0.8rem, 2vw, 1rem);
    flex: 1;
    text-align: center;
    pointer-events: auto;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
}

.btn-outline:hover {
    background-color: var(--primary-blue);
    color: white;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.pagination-list {
    display: flex;
    list-style: none;
    gap: 5px;
}

.pagination-item a,
.pagination-item span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-item a:hover {
    background-color: var(--light-blue);
    color: var(--primary-blue);
}

.pagination-item.active a {
    background-color: var(--primary-blue);
    color: white;
}

.pagination-item.disabled span {
    color: #ccc;
    cursor: not-allowed;
}

/* 响应式设计 - 移动端菜单 */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-grid.grid-view-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .section {
        padding: 50px 0;
    }

    .product-info h3 {
        min-height: 2.4em;
    }

    .product-info p {
        min-height: 2.4em;
    }

    .product-content {
        flex-direction: column;
    }

    .product-sidebar {
        flex: 0 0 auto;
    }

    /* 移动端产品网格布局 - 一行两个 */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .product-grid.grid-view-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .product-grid.grid-view-1 .product-card {
        grid-template-columns: 1fr;
        direction: ltr !important;
    }

    .product-grid.grid-view-1 .product-card .product-info {
        direction: ltr !important;
    }

    .product-info {
        padding: 0px 15px 15px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 40px 0;
    }
}
