/* Product Detail Page Styles */
.breadcrumb-container {
    background-color: #f5f5f5;
    padding: 15px 0;
    margin-bottom: 30px;
}

.product-detail-container {
    padding-bottom: 60px;
}

.product-detail-grid {
    display: grid;  
    gap: 30px;
}


.product-detail-content {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.product-gallery-section {
    margin-bottom: 40px;
}

.product-gallery-grid {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
}

.product-main-image {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
    background: white;
    aspect-ratio: 1 / 1;
    max-width: 450px;
    margin: 0 auto;
}

.image-zoom-container {
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

#main-product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-thumbnails {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.thumbnail-nav {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    margin: 5px 0;
}

.thumbnail-list {
    height: 400px;
    overflow-y: auto;
    margin: 10px 0;
}

.thumbnail {
    width: 80px;
    height: 80px;
    margin: 5px 0;
    border: 2px solid #ddd;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.3s;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail.active {
    border-color: var(--primary-color);
}

.zoom-result {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-size: 200%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-info-card {
    padding: 20px;
    background: #f9f9f9;
    border-radius: var(--border-radius);
    height: 100%;
    overflow-y: auto;
}

.product-info-card h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.product-model {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.product-highlights ul {
    list-style: none;
    margin: 15px 0;
}

.product-highlights li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.product-highlights i {
    margin-right: 10px;
    color: var(--primary-color);
}

.contact-card {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 4px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    transition: all 0.3s;
}

.contact-btn i {
    margin-right: 10px;
}

.contact-btn.whatsapp {
    background-color: #25D366;
}

.contact-btn.email {
    background-color: var(--primary-color);
}

.contact-btn.phone {
    background-color: #34B7F1;
}

.contact-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.product-tabs-section {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 25% 72%;
    gap: 3%;
}

/* 让侧边栏单独占第一列 */
.product-tabs-section > .product-sidebar {
    grid-column: 1;
    grid-row: 1 / span 999;
}

/* 让标签按钮和标签内容都在第二列 */
.product-tabs-section > .product-tabs {
    grid-column: 2;
    grid-row: 1;
}

.product-tabs-section > .tab-content {
    grid-column: 2;
}


.tab-content {
    display: none;
    padding: 10px 0;
}

.tab-content.active {
    display: block;
}


.spec-table {
    width: 100%;
    border-collapse: collapse;
}

.spec-table th, .spec-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.spec-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.process-steps {
    list-style: none;
    counter-reset: step-counter;
}

.process-steps li {
    counter-increment: step-counter;
    margin-bottom: 20px;
    position: relative;
    padding-left: 40px;
}

.process-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.case-studies {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.case-item {
    background: #f9f9f9;
    padding: 15px;
    border-radius: var(--border-radius);
}

.case-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}

.related-products {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.product-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.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-info {
    padding: 15px;
}

.product-info h3 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

@media (max-width: 992px) {
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive Styles for Product Detail */
@media (max-width: 1400px) {
    .product-gallery-grid {
        grid-template-columns: 90px minmax(300px, 1fr) minmax(280px, 1fr);
        gap: 10px;
    }
    
    .product-main-image {
        max-width: 400px;
    }
}

@media (max-width: 1200px) {
    .product-gallery-grid {
        grid-template-columns: 80px minmax(280px, 1fr) minmax(250px, 1fr);
        gap: 10px;
    }
    
    .product-main-image {
        max-width: 350px;
    }
    
    .product-tabs-section {
        grid-template-columns: 30% 67%;
        gap: 3%;
    }
}

@media (max-width: 992px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
    }

    .product-gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .product-main-image {
        max-width: 100%;
        margin: 0;
    }
    
    .product-thumbnails {
        order: 3;
        flex-direction: row;
        justify-content: center;
        margin-top: 15px;
    }
    
    .product-info-card {
        order: 2;
        margin-top: 20px;
    }

    .product-tabs-section {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
    }
    
    .product-sidebar {
        position: static;
        order: 2;
    }
    
    .product-tabs {
        order: 1;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 120px;
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* 大表格横向滚动 */
    .spec-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        min-width: 600px;
    }
    
    .spec-table thead,
    .spec-table tbody,
    .spec-table th,
    .spec-table td,
    .spec-table tr {
        display: table;
        display: table-row;
        display: table-cell;
    }
}

/* 增强的移动端媒体查询 */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* 整体布局调整 */
    .product-detail-container {
        padding-bottom: 40px;
    }
    
    .product-detail-content {
        padding: 15px;
        margin: 0 -5px;
        width: calc(100% + 10px);
        border-radius: 8px;
    }
    
    .product-gallery-section {
        margin-bottom: 20px;
    }
    
    /* 缩略图改进 */
    .product-thumbnails {
        flex-direction: row;
        justify-content: center;
        margin-top: 15px;
        position: relative;
        overflow: visible;
    }

    .thumbnail-list {
        height: auto;
        display: flex;
        overflow-x: auto;
        margin: 0;
        padding: 10px 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        width: 100%;
    }
    
    /* 隐藏滚动条但保持功能 */
    .thumbnail-list::-webkit-scrollbar {
        display: none;
    }

    .thumbnail {
        margin: 0 5px;
        flex-shrink: 0;
        width: 60px;
        height: 60px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    .thumbnail-nav {
        display: none;
    }
    
    /* 主图区域优化 */
    .product-main-image {
        max-width: 85%;
        margin: 0 auto;
        box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    }
    
    /* 产品信息卡片优化 */
    .product-info-card {
        padding: 15px;
        border-radius: 8px;
        margin-top: 15px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    .product-info-card h1 {
        font-size: 1.3rem;
        margin-bottom: 8px;
        line-height: 1.3;
    }
    
    .product-model {
        font-size: 0.95rem;
        margin-bottom: 12px;
    }
    
    /* 联系方式按钮优化 */
    .contact-methods {
        gap: 8px;
    }
    
    .contact-btn {
        padding: 10px 8px;
        font-size: 0.9rem;
        border-radius: 6px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    
    /* 标签页优化 */
    .product-tabs-section {
        margin-top: 25px;
        gap: 15px;
    }
    
    .product-tabs {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        display: flex;
        gap: 3px;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }
    
    .product-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tab-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
        min-width: auto;
        flex: 0 0 auto;
        white-space: nowrap;
        border-radius: 6px 6px 0 0;
    }
    
    .tab-content {
        padding: 15px 0;
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    /* 网格布局优化 */
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .case-studies {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .case-item {
        padding: 10px;
    }
    
    .case-item img {
        height: 100px;
    }
    
    /* 内容区域中的图片自适应 */
    .tab-content img {
        max-width: 100%;
        height: auto;
        display: block;
        margin: 10px auto;
        border-radius: 4px;
    }
    
    /* 参数表格完全重构为移动友好格式 */
    .spec-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid #ddd;
        border-radius: 6px;
        margin-bottom: 15px;
    }
    
    .spec-table thead {
        display: none;
    }
    
    .spec-table tbody {
        display: block;
    }
    
    .spec-table tr {
        display: block;
        margin-bottom: 8px;
        border: 1px solid #eee;
        border-radius: 6px;
        padding: 10px;
        background: #f9f9f9;
    }
    
    .spec-table td {
        display: block;
        text-align: left !important;
        padding: 5px 0;
        border: none;
        line-height: 1.4;
    }
    
    .spec-table td:first-child {
        font-weight: bold;
        color: var(--primary-color);
        margin-bottom: 5px;
        border-bottom: 1px dashed #eee;
        padding-bottom: 5px;
    }
    
    /* 流程步骤优化 */
    .process-steps li {
        padding-left: 35px;
        margin-bottom: 15px;
    }
    
    .process-steps li::before {
        width: 26px;
        height: 26px;
        font-size: 0.9rem;
    }
    
    /* 侧边栏移动端优化 */
    .product-sidebar {
        margin-top: 20px;
    }
    
    .sidebar-widget {
        margin-bottom: 15px;
        padding: 15px;
        border-radius: 8px;
    }
}

/* 小屏手机优化 */
@media (max-width: 576px) {
    body {
        font-size: 15px;
    }
    
    .product-detail-content {
        padding: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    /* 重新排列布局元素 */
    .product-gallery-grid {
        gap: 12px;
    }
    
    .product-main-image {
        max-width: 100%;
        aspect-ratio: 1/1;
    }
    
    .product-info-card {
        padding: 12px;
    }
    
    .product-info-card h1 {
        font-size: 1.2rem;
        margin-bottom: 6px;
    }
    
    .product-model {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    /* 联系方式按钮进一步优化 */
    .contact-methods {
        gap: 6px;
    }
    
    .contact-btn {
        padding: 8px 6px;
        font-size: 0.85rem;
    }
    
    /* 简化标签页 */
    .tab-btn {
        min-width: auto;
        padding: 8px 5px;
        font-size: 0.75rem;
        border-radius: 4px 4px 0 0;
    }
    
    .tab-content {
        padding: 12px 0;
        font-size: 0.9rem;
    }
    
    /* 单列布局 */
    .related-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .case-studies {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    /* 侧边栏进一步简化 */
    .sidebar-widget {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .widget-title {
        font-size: 1rem;
        padding-bottom: 8px;
        margin-bottom: 10px;
    }
    
    .categories-list > li {
        margin-bottom: 6px;
    }
    
    .categories-list a,
    .news-list h4 {
        font-size: 0.85rem;
    }
    
    .contact-widget .contact-card p {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }
    
    /* 进一步优化小屏幕的表格显示 */
    .spec-table tr {
        padding: 8px;
        margin-bottom: 6px;
    }
    
    .spec-table td {
        font-size: 0.85rem;
        padding: 3px 0;
    }
    
    /* 触摸区域优化 */
    .thumbnail {
        width: 50px;
        height: 50px;
        margin: 0 3px;
    }
    
    button, 
    .contact-btn, 
    a {
        touch-action: manipulation;
    }
    
    /* 优化小屏幕上表单元素 */
    .form-group input, 
    .form-group textarea {
        font-size: 16px; /* 避免iOS上自动缩放 */
    }
    
    /* 减少大字体图片内容的尺寸 */
    .tab-content h2 {
        font-size: 1.1rem;
    }
    
    .tab-content h3 {
        font-size: 1rem;
    }
    
    /* 提高内容表现形式 */
    p {
        margin-bottom: 10px;
        line-height: 1.4;
    }
}

/* 超小屏幕手机优化 */
@media (max-width: 375px) {
    .product-detail-content {
        padding: 10px;
    }
    
    .thumbnail {
        width: 45px;
        height: 45px;
    }
    
    .tab-btn {
        padding: 6px 4px;
        font-size: 0.7rem;
    }
    
    .contact-btn {
        font-size: 0.8rem;
    }
    
    .product-info-card h1 {
        font-size: 1.1rem;
    }
}

/* 修复图片在移动设备上的溢出问题 */
img {
    max-width: 100%;
    height: auto;
}

/* 修复表格在移动设备上的溢出问题 */
table {
    max-width: 100%;
}

/* 优化产品详情图片 */
.product-detail-content img {
    width: 100% !important;
    height: auto;
    margin: 10px auto;
    display: block;
}


/* 超大屏幕优化 */
@media (min-width: 1600px) {
    .product-gallery-grid {
        grid-template-columns: 120px minmax(400px, 1fr) minmax(400px, 1fr);
        gap: 30px;
    }
    
    .product-main-image {
        max-width: 500px;
    }
    
    .thumbnail {
        width: 100px;
        height: 100px;
    }
    
    .thumbnail-list {
        height: 500px;
    }
}

/* Sidebar Styles for Product Detail Page */
.product-sidebar {
    position: sticky;
    top: 120px;
    align-self: start;
}

.sidebar-widget {
    margin-bottom: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    transition: all 0.3s ease;
}

.sidebar-widget:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.widget-title {
    color: #004296;
    font-size: 1.4rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #004296;
    font-weight: 600;
}

/* Categories Navigation */
.categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.categories-list > li {
    margin-bottom: 15px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f5f8fd;
    border-radius: 8px;
    padding: 0;
    transition: all 0.3s ease;
}

.category-item:hover {
    background: #e0e9f7;
}

.category-item a {
    color: #333;
    text-decoration: none;
    flex: 1;
    padding: 12px 15px;
    font-weight: 500;
}

.category-item a:hover {
    color: #004296;
}

.toggle-submenu {
    background: none;
    border: none;
    color: #004296;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.toggle-submenu:hover {
    transform: rotate(90deg);
}

.submenu {
    list-style: none;
    padding-left: 20px;
    margin-top: 10px;
    display: none;
}

.submenu li {
    margin-bottom: 8px;
}

.submenu a {
    color: #555;
    text-decoration: none;
    font-size: 0.95rem;
    display: block;
    padding: 8px 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.submenu a:hover {
    color: #004296;
    background: #e8f0ff;
    padding-left: 20px;
}

/* News Widget */
.news-widget {
    background: linear-gradient(135deg, #fafbfc 0%, #f0f4f8 100%);
    border-left: 4px solid #004296;
}

.news-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.news-list li {
    margin-bottom: 18px;
    padding: 15px;
    border-bottom: 1px solid #e0e7ef;
    position: relative;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.news-list li:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.news-list li:last-child {
    margin-bottom: 0;
}

.news-list a {
    text-decoration: none;
    display: block;
}

.news-list h4 {
    color: #333;
    font-size: 1rem;
    margin-bottom: 8px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.news-list li:hover h4 {
    color: #004296;
}

.news-list p {
    color: #999;
    font-size: 0.85rem;
    margin: 0;
    display: flex;
    align-items: center;
}

.news-list p::before {
    content: "\f017";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 6px;
    color: #004296;
}

/* Contact Widget */
.contact-widget {
    background: linear-gradient(135deg, #f5f8fd 0%, #e8f0ff 100%);
    border-left: 4px solid #004296;
}

.contact-card p {
    margin-bottom: 12px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    color: #333;
    transition: all 0.3s ease;
}

.contact-card p:hover {
    color: #004296;
    padding-left: 5px;
}

.contact-card i {
    margin-right: 12px;
    color: #004296;
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.news-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.news-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.news-dates {
    color: #999;
    font-size: 0.85rem;
    display: block;
    text-align: right;
    margin-top: 5px;
    font-style: italic;
}

.news-list li:hover .news-dates {
    color: #777;
}

.news-list a {
    text-decoration: none;
}

.news-list h4 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 5px;
}

.news-list p {
    color: #666;
    font-size: 0.8rem;
}

/* Contact Widget Sidebar Styles */
.contact-widget .contact-card p {
    margin-bottom: 10px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.contact-widget .contact-card i {
    margin-right: 10px;
    color: var(--primary-color);
}

/* Responsive Styles for Sidebar */
@media (max-width: 992px) {
    .product-sidebar {
        position: static;
        margin-bottom: 30px;
    }
}