/* ===== 产品列表布局 ===== */
.products-section {
    padding: 50px 0;
    background: var(--bg-light);
}

.products-layout {
    display: flex;
    gap: 30px;
}

.products-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.products-main {
    flex: 1;
    min-width: 0;
}

/* 侧边栏样式 */
.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 10px;
}

.category-list li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 6px;
    transition: var(--transition);
    background: var(--bg-light);
}

.category-list li a i {
    font-size: 12px;
    color: var(--primary-color);
}

.category-list li a:hover,
.category-list li a.active {
    background: var(--primary-color);
    color: white;
    transform: translateX(3px);
}

.category-list li a:hover i,
.category-list li a.active i {
    color: white;
}

/* 产品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.product-image {
    height: 220px;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
}

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

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 600;
    line-height: 1.4;
    height: 44px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-info h3 a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

.product-info h3 a:hover {
    color: var(--primary-color);
}

.product-code {
    color: var(--text-light);
    font-size: 12px;
    margin-bottom: 10px;
    display: block;
}

.product-desc {
    color: var(--text-light);
    font-size: 13px;
    margin-bottom: 15px;
    line-height: 1.5;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-actions {
    display: flex;
    gap: 8px;
}

.btn-view {
    flex: 1;
    background: var(--bg-light);
    color: var(--text-dark);
    padding: 8px;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

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

.btn-inquire-small {
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    text-decoration: none;
    transition: var(--transition);
}

.btn-inquire-small:hover {
    background: var(--secondary-color);
}

/* 推荐产品小卡片 */
.featured-products-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.featured-product-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    transition: var(--transition);
}

.featured-product-item:hover {
    background: var(--bg-light);
}

.product-image-small {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.product-image-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info-small {
    flex: 1;
    min-width: 0;
}

.product-info-small h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-info-small h4 a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

.product-info-small h4 a:hover {
    color: var(--primary-color);
}

.product-info-small .product-code {
    font-size: 11px;
    margin: 0;
}

/* 联系侧边栏 */
.contact-info-sidebar {
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.contact-item i {
    width: 20px;
    color: var(--primary-color);
    font-size: 16px;
    margin-top: 2px;
}

.contact-item div {
    flex: 1;
}

.contact-item span {
    font-size: 12px;
    color: var(--text-light);
    display: block;
    margin-bottom: 2px;
}

.contact-item a,
.contact-item p {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.btn-contact {
    display: block;
    text-align: center;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-contact:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* ===== 产品详情页全新布局 ===== */
.product-detail-section {
    padding: 50px 0;
}

.product-detail-layout {
    display: flex;
    gap: 30px;
}

.product-main {
    flex: 1;
    min-width: 0;
}

/* 产品主图区域 - 新布局 */
.product-gallery-wrapper {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    align-items: flex-start;
}

/* 主图容器 */
.product-main-image-container {
    width: 380px;
    flex-shrink: 0;
}

.product-main-image {
    width: 380px;
    height: 380px;
    background: #f8f9fa;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

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

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

.btn-enlarge {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--primary-color);
    z-index: 5;
}

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

/* 产品信息区域 - 放在主图右侧 */
.product-info-section {
    flex: 1;
    padding: 20px 0;
}

.product-detail-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
    line-height: 1.3;
}

.product-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.product-sku,
.product-category {
    font-size: 14px;
    color: var(--text-light);
    background: var(--bg-light);
    padding: 5px 12px;
    border-radius: 30px;
}

.product-category a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.product-short-desc {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 25px;
    line-height: 1.8;
    background: var(--bg-light);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

/* 关键参数 */
.product-key-params {
    margin-bottom: 25px;
}

.product-key-params h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-key-params h3 i {
    color: var(--primary-color);
}

.key-params-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.key-param-item {
    background: var(--bg-light);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.key-param-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.key-param-label {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.key-param-label i {
    color: var(--primary-color);
    font-size: 14px;
}

.key-param-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--secondary-color);
}

/* 操作按钮 */
.product-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn-inquire {
    flex: 1;
    background: var(--primary-color);
    color: white;
    padding: 15px;
    text-align: center;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--shadow-blue);
}

.btn-inquire:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(6,23,56,0.2);
}

.btn-whatsapp {
    flex: 1;
    background: #25D366;
    color: white;
    padding: 15px;
    text-align: center;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 10px 20px rgba(37,211,102,0.2);
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-3px);
}

/* 缩略图轮播区域 - 全新设计 */
.product-thumbnails-carousel {
    margin-top: 20px;
    width: 380px;
    position: relative;
}

.thumbnails-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.thumbnails-track {
    display: flex;
    gap: 10px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.thumbnail-item {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    box-shadow: var(--shadow-sm);
}

.thumbnail-item:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.thumbnail-item.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(10,92,245,0.2);
    transform: scale(1.05);
}

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

/* 轮播箭头 */
.thumbnail-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: var(--shadow-md);
    opacity: 0.9;
}

.thumbnail-arrow:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
    opacity: 1;
}

.thumbnail-arrow.prev {
    left: -15px;
}

.thumbnail-arrow.next {
    right: -15px;
}

.thumbnail-arrow i {
    font-size: 14px;
    color: var(--primary-color);
    transition: var(--transition);
}

.thumbnail-arrow:hover i {
    color: white;
}

.thumbnail-arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* 轮播指示器 */
.thumbnail-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.thumbnail-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-color);
    transition: var(--transition);
    cursor: pointer;
}

.thumbnail-indicator.active {
    width: 20px;
    background: var(--primary-color);
    border-radius: 10px;
}

/* 参数表格 */
.product-params-section {
    margin-bottom: 40px;
    clear: both;
}

.product-params-section h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-params-section h3 i {
    color: var(--primary-color);
}

.params-table-container {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.params-table {
    width: 100%;
    border-collapse: collapse;
}

.params-table tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.params-table tr:hover {
    background: var(--bg-light);
}

.params-table tr:last-child {
    border-bottom: none;
}

.params-table td {
    padding: 15px 20px;
    font-size: 15px;
}

.params-table td:first-child {
    font-weight: 600;
    color: var(--secondary-color);
    width: 220px;
    background: var(--bg-light);
    border-right: 1px solid var(--border-color);
}

.params-table td:last-child {
    color: var(--text-dark);
}

/* 产品描述 */
.product-description-section {
    margin-bottom: 30px;
    clear: both;
}

.product-description-section h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-description-section h3 i {
    color: var(--primary-color);
}

.product-description-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border-color);
    line-height: 1.8;
    box-shadow: var(--shadow-sm);
}

.product-description-content h2,
.product-description-content h3,
.product-description-content h4 {
    margin-top: 1.5em;
    margin-bottom: 1em;
    color: var(--secondary-color);
}

.product-description-content p {
    margin-bottom: 1.2em;
}

.product-description-content ul,
.product-description-content ol {
    margin: 1em 0 1em 2em;
}

.product-description-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.product-description-content blockquote {
    margin: 20px 0;
    padding: 20px;
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    font-style: italic;
}

/* 同类产品推荐 */
.category-products-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.related-product-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.related-product-item:hover {
    background: var(--bg-light);
    border-color: var(--border-color);
    transform: translateX(3px);
}

.related-product-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.related-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-product-info {
    flex: 1;
    min-width: 0;
}

.related-product-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-product-info h4 a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

.related-product-info h4 a:hover {
    color: var(--primary-color);
}

.related-product-info .product-code {
    font-size: 11px;
    color: var(--text-light);
}

/* Lightbox */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.98);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.lightbox-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10000;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}

.lightbox-close:hover {
    background: var(--primary-color);
    transform: rotate(90deg);
}

.lightbox-controls {
    position: absolute;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 10000;
}

.lightbox-controls button {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(5px);
    font-size: 20px;
}

.lightbox-controls button:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .product-gallery-wrapper {
        flex-direction: column;
    }
    
    .product-main-image-container,
    .product-thumbnails-carousel {
        width: 100%;
        max-width: 380px;
        margin: 0 auto;
    }
    
    .product-info-section {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .product-detail-layout {
        flex-direction: column;
    }
    
    .product-gallery-wrapper {
        flex-direction: column;
    }
    
    .product-main-image-container,
    .product-thumbnails-carousel {
        width: 100%;
        max-width: 100%;
    }
    
    .product-main-image {
        width: 100%;
        height: auto;
        aspect-ratio: 1/1;
    }
    
    .key-params-grid {
        grid-template-columns: 1fr;
    }
    
    .params-table td {
        display: block;
        width: 100%;
    }
    
    .params-table td:first-child {
        background: none;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 5px;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .thumbnail-arrow.prev {
        left: 5px;
    }
    
    .thumbnail-arrow.next {
        right: 5px;
    }
}