/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: auto;
    background: #f8f9fa;
 /* 添加最小高度以确保在小屏幕上也有合理显示 */
    min-height: 200px;
}

.hero-content {
    position: relative;
    width: 100%;
    height: auto;
    z-index: 2;
}

.hero-banner-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center; /* 保持图片居中 */
    /* 添加过渡效果使缩放更平滑 */
    transition: transform 0.3s ease;
}

/* Sticky Product Navigation - 修改为独立的sticky效果 */
.product-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease-in-out;
    z-index: 1020; /* 确保在最顶层 */
    position: relative;
}

.main-content-container {
    margin-top: 0px !important; /* 确保内容不被导航栏遮挡 */
}

.product-nav.sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-bottom: none;
    background: rgba(255, 255, 255, 0.98);
}

.product-nav .container-fluid {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-model .model-text {
    font-size: 23px;
    font-weight: 600;
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif !important;
    color: white !important; 
    padding: 8px 16px;
    border-radius: 5px;
}

.product-model .model-image {
    display: block;
    transition: all 0.3s ease;
}

.product-model .model-image:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.product-nav .nav-link {
    color: #495057;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 16px;
    white-space: nowrap;
    border: 2px solid transparent;
}

.product-nav .nav-link:hover {
    background-color: #f8f9fa;
    color: #00A0E9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 160, 233, 0.15);
}

.product-nav .nav-link.active {
    background: linear-gradient(135deg, #00A0E9 0%, #0080C7 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(0, 160, 233, 0.4);
    transform: translateY(-2px);
}

.product-nav .nav-link.order-btn {
    background: linear-gradient(135deg, #00A0E9 0%, #0080C7 100%);
    color: white !important;
    box-shadow: 0 6px 20px rgba(0, 160, 233, 0.4);
    transform: translateY(-2px);
    font-weight: 600;
}

.product-nav .nav-link.order-btn:hover {
    background: linear-gradient(135deg, #0080C7 0%, #006BA8 100%);
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 160, 233, 0.5);
}

/* 防止内容跳跃的过渡效果 */
.product-gallery, #product-features {
    transition: margin-top 0.3s ease-in-out;
}

/* Product Gallery */
.product-gallery {
    background: white;
}

.image-gallery-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.main-image-container {
    border-radius: 10px;
    overflow: hidden;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.main-image-placeholder {
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
}

.main-image-placeholder::before {
    content: "暂无图片";
    color: #6c757d;
    font-size: 1.2rem;
    opacity: 0.7;
}

.main-product-image {
    width: 100%;
    height: auto;
    transition: all 0.3s ease;
}

.thumbnail-container {
    margin-top: 20px;
}

.thumbnail-wrapper {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
}

.thumbnail-item {
    flex: 1;
    height: auto;
    width: 33%;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail-item.placeholder {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.thumbnail-item.placeholder::before {
    content: "";
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 24 24\'%3E%3Cpath fill=\'%23adb5bd\' d=\'M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 16H6c-.55 0-1-.45-1-1V6c0-.55.45-1 1-1h12c.55 0 1 .45 1 1v12c0 .55-.45 1-1 1zm-4.44-6.44l-2.35 3.02-1.56-1.88c-.2-.25-.58-.24-.78.01l-1.74 2.23c-.26.33-.02.81.39.81h8.98c.41 0 .65-.47.4-.8l-2.55-3.39c-.19-.26-.59-.26-.79 0z\'/%3E%3C/svg%3E");
    background-size: contain;
    opacity: 0.5;
}

.thumbnail-item:hover,
.thumbnail-item.active {
    border-color: #00A0E9;
    box-shadow: 0 5px 15px rgba(0, 160, 233, 0.3);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    height: 100%;
}

.model-number {
    color: #666;
    font-weight: 500;
}

.quick-specs {
    margin-top: 5rem;
}

.specs-list {
    list-style: none;
    padding: 0;
}

.specs-list li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.specs-list li:before {
    content: "✓";
    color: #28a745;
    font-weight: bold;
    margin-right: 10px;
}

/* Section Styles */
.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

/* Features Section */
.product-features {
    background: #f8f9fa;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    height: 100%;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    background: linear-gradient(135deg, #00A0E9 0%, #0080C7 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.feature-icon i {
    font-size: 24px;
}

/* 修复：移除 .feature-content h4 中不合适的样式，这些样式应该属于 .feature-item */
.feature-content h4 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.25rem;
    font-weight: 600;
}

.application-card:hover {
    transform: translateY(-5px);
}

.application-image {
    height: 200px;
    height: 100%;
}

.application-card:hover {
    transform: translateY(-5px);
}

.application-image {
    height: 200px;
    overflow: hidden;
}

.application-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.application-card:hover .application-image img {
    transform: scale(1.05);
}

.application-placeholder {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #dee2e6;
}

.placeholder-content {
    text-align: center;
    color: #6c757d;
}

.placeholder-content i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.placeholder-content p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.7;
}

.application-content {
    padding: 20px;
}

.application-content h4 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
}

.application-content p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Specifications Section */
.specifications {
    background: white !important;
}

.comparison-table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow-x: auto;
}

.comparison-table {
    margin: 0;
    width: 100%;
    min-width: 800px;
}

.comparison-table thead th {
    background: linear-gradient(135deg, #00A0E9 0%, #0080C7 100%);
    color: white;
    font-weight: 600;
    padding: 20px 15px;
    border: none;
    text-align: center;
}

.comparison-feature-col {
    width: 25%;
    min-width: 200px;
}

.comparison-product-col {
    width: 37.5%;
    min-width: 300px;
}

.product-header h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.comparison-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.comparison-table tbody tr:nth-child(odd) {
    background-color: white;
}

.comparison-table tbody tr:hover {
    background-color: #e3f2fd !important;
}

.feature-label {
    font-weight: 600;
    color: #333;
    padding: 15px;
    border: none;
    background-color: #f1f3f4;
    vertical-align: top;
}

.comparison-table .spec-value {
    padding: 15px;
    border: none;
    vertical-align: top;
    line-height: 1.5;
}

/* Product comparison images */
.product-comparison-image {
    max-width: 200px;
    max-height: 150px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.product-comparison-image:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.product-images-row {
    background-color: #f0f8ff !important;
}

.product-images-row:hover {
    background-color: #e3f2fd !important;
}

/* Responsive Design for Comparison Table */
@media (max-width: 768px) {
    .comparison-table-container {
        margin: 0 -15px;
        border-radius: 0;
    }
    
    .comparison-table {
        font-size: 14px;
        min-width: 600px;
    }
    
    .comparison-feature-col {
        min-width: 150px;
    }
    
    .comparison-product-col {
        min-width: 225px;
    }
    
    .feature-label,
    .comparison-table .spec-value {
        padding: 10px 8px;
    }
    
    .product-header h4 {
        font-size: 1rem;
    }
    
    .product-comparison-image {
        max-width: 120px !important;
        max-height: 80px !important;
    }
}

/* Downloads Section */
.downloads {
    background: white;
}

.download-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background: white;
    border: 1px solid #eee;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.download-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #00A0E9;
}

.download-icon {
    background: linear-gradient(135deg, #00A0E9 0%, #0080C7 100%);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.download-content {
    flex-grow: 1;
}

.download-content h5 {
    margin-bottom: 5px;
    color: #333;
}

.download-content p {
    margin-bottom: 5px;
    color: #666;
    font-size: 0.9rem;
}

.file-size {
    font-size: 0.8rem;
    color: #999;
}

.download-action {
    flex-shrink: 0;
}

/* Product Detail */
.product-detail-content {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    text-align: justify;
    word-wrap: break-word;
    hyphens: auto;
}

/* 新增的富文本内容包装器 */
.rich-text-content {
    /* 确保内容不会超出容器 */
    max-width: 100%;
    /* 使用文本对齐来处理长单词 */
    text-align: justify;
    word-wrap: break-word;
    word-break: normal;
    hyphens: auto;
}

.rich-text-content * {
    /* 为所有子元素设置最大宽度 */
    max-width: 100%;
    /* 保持文本对齐 */
    text-align: justify;
    word-break: normal;
    word-wrap: break-word;
}

/* 限制产品详情内容中的图片宽度 */
.product-detail-content img,
.rich-text-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin: 10px 0;
    /* 图片不需要文本对齐 */
    text-align: center;
}

/* 添加处理长文本的类 */
.product-detail-content span,
.product-detail-content p,
.product-detail-content div,
.rich-text-content span,
.rich-text-content p,
.rich-text-content div {
    /* 保持文本对齐 */
    text-align: justify;
    word-break: normal;
    word-wrap: break-word;
    max-width: 100%;
    text-wrap-mode: wrap !important;
}

/* 特别处理表格中的内容 */
.product-detail-content table,
.rich-text-content table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
}

.product-detail-content table td,
.product-detail-content table th,
.rich-text-content table td,
.rich-text-content table th {
    word-break: normal;
    word-wrap: break-word;
    max-width: 100%;
    /* 表格单元格内的文本对齐 */
    text-align: justify;
}

@media (max-width: 768px) {
    .product-detail-content {
        padding: 20px;
    }
    
    .product-detail-content img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        margin-top: 0px; /* 移动端也不需要margin-top */
        height: 300px; /* 移动端使用较小高度 */
    }
    
    .hero-banner-image {
        object-fit: cover;
        /* 在移动端可以考虑使用fill来确保图片填满容器 */
        /* object-fit: fill; */
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .product-nav .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        flex-direction: column;
        gap: 15px;
    }
    
    .product-model .model-text {
        font-size: 21px;
    }
    
    .product-model .model-image {
        width: 160px !important;
        height: 40px !important;
    }
    
    .nav-links {
        gap: 10px;
    }
    
    .product-nav .nav-link {
        font-size: 14px;
        padding: 8px 16px;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
    }
    
    .feature-icon {
        margin-right: 0;
    }
    
    .download-item {
        flex-direction: column;
        text-align: center;
    }
    
    .download-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .thumbnail-item {
        border-color: #007bff;
    }
}

#toggleSpecsBtn.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.spec-row-hidden {
    transition: all 0.3s ease;
}

/* 返回按钮样式 - 参考回到顶部按钮 */
.back-button {
    width: 60px;
    height: 60px;
    background: linear-gradient(270deg, #015EEA, #00C0FA);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    bottom: 30px; /* 与回到顶部按钮同高度 */
    left: 30px; /* 改为左下角 */
    z-index: 1000;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    font-size: 24px;
}

.back-button.show {
    opacity: 1;
    visibility: visible;
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(1, 94, 234, 0.4);
    background: linear-gradient(270deg, #004cc7, #0099d6);
}

.back-button i {
    transform: translateY(-1px);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .back-button {
        width: 50px;
        height: 50px;
        bottom: 30px;
        left: 20px; /* 移动端也在左下角 */
        font-size: 20px;
    }
}

/* Control Software Section */
.control-software {
    background: white;
    padding: 80px 0;
}

/* 新增按钮样式 */
.discover-btn {
    background: linear-gradient(135deg, #00A0E9 0%, #0080C7 100%);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 160, 233, 0.3);
}

.discover-btn:hover {
    background: linear-gradient(135deg, #0080C7 0%, #006BA8 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 160, 233, 0.5);
}

.software-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    max-width: 390px;
    margin: 0 auto;
}

.software-image-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.software-image {
    width: 100%;
    height: auto;
    max-height: 390px;
    object-fit: contain;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.software-content {
    padding-left: 40px;
}

.software-content .section-title {
    color: #333;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.software-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 2rem;
}

.software-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feature-highlight {
    display: flex;
    align-items: center;
    font-size: 1rem;
    color: #555;
    font-weight: 500;
}

.feature-highlight i {
    color: #00A0E9 !important;
    font-size: 1.2rem;
}

/* Responsive Design for Control Software */
@media (max-width: 768px) {
    .control-software {
        padding: 60px 0;
    }
    
    .software-image-container {
        max-width: 100%;
    }
    
    .software-image {
        max-height: 250px;
    }
    
    .software-content {
        padding-left: 0;
        margin-top: 30px;
        text-align: center;
    }
    
    .software-content .section-title {
        font-size: 2rem;
        text-align: center;
    }
    
    .software-description {
        text-align: left;
    }
    
    .software-features {
        align-items: flex-start;
    }
}

/* Dynamic Specifications Section Styles */
.dynamic-specifications .dynamic-specs-content table {
    margin: 0;
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
}

.dynamic-specifications .dynamic-specs-content table thead th {
    background: linear-gradient(135deg, #00A0E9 0%, #0080C7 100%);
    color: white;
    font-weight: 600;
    padding: 20px 15px;
    border: none;
    text-align: center;
}

.dynamic-specifications .dynamic-specs-content table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.dynamic-specifications .dynamic-specs-content table tbody tr:nth-child(odd) {
    background-color: white;
}

.dynamic-specifications .dynamic-specs-content table tbody tr:hover {
    background-color: #e3f2fd !important;
}

.dynamic-specifications .dynamic-specs-content table td {
    padding: 15px;
    border: none;
    vertical-align: top;
    line-height: 1.5;
    /* 使用文本对齐来处理长单词 */
    text-align: justify;
    word-break: normal;
    word-wrap: break-word;
}

.dynamic-specifications .dynamic-specs-content table td:first-child {
    font-weight: 600;
    color: #333;
}

.dynamic-specifications .dynamic-specs-content img {
    max-width: 200px;
    max-height: 150px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.dynamic-specifications .dynamic-specs-content img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.dynamic-specifications .dynamic-specs-content .comparison-table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow-x: auto;
}

/* 添加隐藏行的样式 */
.spec-row-hidden {
    display: none;
}

/* Show/Hide Specifications Button */
.toggle-specs-btn {
    display: block;
    margin: 20px auto;
    min-width: 250px;
    font-weight: 600;
    border-width: 2px;
    padding: 12px 30px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #00A0E9 0%, #0080C7 100%);
    border: none;
    color: white;
    border-radius: 50px;
}

.toggle-specs-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    background: linear-gradient(135deg, #0080C7 0%, #006BA8 100%);
}

/* Mobile responsive for dynamic specs */
@media (max-width: 768px) {
    .dynamic-specifications .dynamic-specs-content .comparison-table-container {
        margin: 0 -15px;
        border-radius: 0;
    }
    
    .dynamic-specifications .dynamic-specs-content table {
        font-size: 14px;
        min-width: 600px;
    }
    
    .dynamic-specifications .dynamic-specs-content table td {
        padding: 10px 8px;
    }
    
    .dynamic-specifications .dynamic-specs-content img {
        max-width: 120px !important;
        max-height: 80px !important;
    }
}

/* Related Products Section */
.related-products {
    background: white;
    border-top: 1px solid #e9ecef;
}

.related-product-card {
    border: none;
    padding: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.related-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.related-product-card a {
    position: relative;
    display: block;
    text-decoration: none;
}

.related-product-card .card-img-top {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.related-product-card:hover .card-img-top {
    transform: scale(1.05);
}

.related-product-card .card-body {
    background-color: #F7F7F7;
    border-radius: 0 0 8px 8px;
}

.related-product-card .card-title {
    color: #333;
    font-size: 16px;
    min-height: 48px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
}

.related-product-card .card-text {
    color: #666;
    font-size: 14px;
    margin-bottom: 0;
}

.related-product-card a:hover .card-title {
    color: #00A0E9;
}

/* Responsive Design for Related Products */
@media (max-width: 768px) {
    .related-products .section-title {
        font-size: 2rem;
    }
    
    .related-product-card .card-title {
        font-size: 14px;
        min-height: 40px;
    }
    
    .related-product-card .card-text {
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .related-products .row > div {
        flex: 0 0 50%;
        max-width: 50%;
    }
}
