/**
 * 产品/案例详情页样式 - 参考 Prosperity Lamps 产品页面
 */

/* ========================================
   主容器
   ======================================== */
.product-page {
    background: #fff;
    padding: 40px 0;
}

.product-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   产品主体区域
   ======================================== */
.product-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
    align-items: start;
}

/* ========================================
   产品图片区域
   ======================================== */
.product-image-section {
    position: sticky;
    top: 100px;
}

.product-image-main {
    position: relative;
    background: #fafafa;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
}

.product-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

.product-image-zoom {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.product-image-zoom:hover {
    background: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* 图片可点击指示 */
.product-image {
    transition: transform 0.3s ease;
}

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

/* 兼容性图标 */
.product-compatibility {
    margin-top: 20px;
}

.compatibility-icons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
}

.compatibility-icon {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
    color: #666;
    transition: all 0.3s;
}

.compatibility-icon:hover {
    background: #e9ecef;
}

.compatibility-icon svg {
    width: 24px;
    height: 24px;
    color: #333;
}

/* ========================================
   产品信息区域
   ======================================== */
.product-info-section {
    padding-top: 20px;
}

.product-header {
    margin-bottom: 30px;
}

.product-title {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
    margin: 0 0 20px;
}

.product-power {
    font-size: 28px;
    font-weight: 600;
    color: #666;
}

/* 操作按钮 */
.product-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e5e5e5;
}

.btn-wishlist {
    width: 48px;
    height: 48px;
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.3s;
}

.btn-wishlist:hover {
    background: #fff;
    border-color: #d4af37;
    color: #d4af37;
}

.btn-spec-sheet {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #0066cc;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-spec-sheet:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

/* 产品特点 */
.product-features {
    margin-bottom: 40px;
}

.features-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 20px;
}

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

.features-list li {
    padding: 12px 0;
    padding-left: 24px;
    position: relative;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.features-list li:last-child {
    border-bottom: none;
}

.features-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #0066cc;
    font-size: 20px;
    line-height: 1;
}

/* 可展开部分 */
.product-expandable {
    margin-bottom: 40px;
}

.expandable-section {
    margin-bottom: 15px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

.expandable-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #fafafa;
    cursor: pointer;
    list-style: none;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    transition: all 0.3s;
}

.expandable-title::-webkit-details-marker {
    display: none;
}

.expandable-title:hover {
    background: #f0f0f0;
}

.expandable-title svg {
    transition: transform 0.3s;
}

.expandable-section[open] .expandable-title svg {
    transform: rotate(180deg);
}

.expandable-content {
    padding: 20px;
    background: #fff;
}

.expandable-content h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px;
    color: #1a1a1a;
}

/* 可展开内容中的图片样式 */
.expandable-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 15px 0;
}

.expandable-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* 应用场景 */
.product-applications {
    margin-bottom: 40px;
}

.applications-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 20px;
}

.applications-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.application-tag {
    display: inline-block;
    padding: 8px 16px;
    background: #f8f9fa;
    color: #666;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s;
}

.application-tag:hover {
    background: #e9ecef;
    color: #333;
}

/* ========================================
   技术参数
   ======================================== */
.product-specifications {
    margin: 80px 0;
    padding-top: 60px;
    border-top: 2px solid #e5e5e5;
}

.product-specifications .section-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 40px;
}

.specifications-table-wrapper {
    overflow-x: auto;
}

.specifications-table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.specifications-table-wrapper table th,
.specifications-table-wrapper table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
}

.specifications-table-wrapper table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 15px;
}

.specifications-table-wrapper table td {
    color: #666;
    font-size: 14px;
}

.specifications-table-wrapper table tr:last-child td,
.specifications-table-wrapper table tr:last-child th {
    border-bottom: none;
}

.specifications-table-wrapper table tr:hover {
    background: #fafafa;
}

/* ========================================
   产品描述
   ======================================== */
.product-description {
    margin: 80px 0;
    padding-top: 60px;
    border-top: 2px solid #e5e5e5;
}

.product-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.product-content > * {
    margin-bottom: 1.5em;
}

.product-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 2em 0 0.75em;
}

.product-content h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 1.5em 0 0.5em;
}

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

/* ========================================
   相关产品
   ======================================== */
.related-products {
    margin: 80px 0;
    padding-top: 60px;
    border-top: 2px solid #e5e5e5;
}

.related-products .section-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 40px;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.related-product-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
}

.related-product-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.related-product-image {
    display: block;
    line-height: 0;
    overflow: hidden;
    aspect-ratio: 4/3;
}

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

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

.related-product-info {
    padding: 20px;
}

.related-product-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

.related-product-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s;
}

.related-product-title a:hover {
    color: #0066cc;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1024px) {
    .product-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .product-image-section {
        position: static;
    }
    
    .related-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-page {
        padding: 20px 0;
    }
    
    .product-container {
        padding: 0 16px;
    }
    
    .product-wrapper {
        gap: 30px;
        margin-bottom: 60px;
    }
    
    .product-title {
        font-size: 28px;
    }
    
    .product-power {
        font-size: 24px;
    }
    
    .product-specifications,
    .product-description,
    .related-products {
        margin: 60px 0;
        padding-top: 40px;
    }
    
    .product-specifications .section-title,
    .related-products .section-title {
        font-size: 28px;
    }
    
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .specifications-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .specifications-table-wrapper table {
        min-width: 600px;
    }
}

@media (max-width: 480px) {
    .related-products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-title {
        font-size: 24px;
    }
    
    .compatibility-icons {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* ========================================
   产品图片灯箱样式
   ======================================== */
.product-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.product-lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    pointer-events: auto;
    overflow: visible;
}

.lightbox-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
}

.lightbox-image-wrapper.dragging {
    cursor: grabbing;
}

.lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: lightboxFadeIn 0.3s ease;
    pointer-events: auto;
    user-select: none;
    transition: transform 0.15s ease-out;
    cursor: grab;
    will-change: transform;
}

.lightbox-image.dragging {
    cursor: grabbing;
    transition: none;
}

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

/* 顶部控制栏 - 固定在视口右上角 */
.lightbox-top-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    z-index: 10002;
}

/* 控制按钮组 */
.lightbox-zoom-btn,
.lightbox-close {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 8px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lightbox-zoom-btn:hover,
.lightbox-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.lightbox-zoom-btn:active,
.lightbox-close:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.lightbox-zoom-btn svg,
.lightbox-close svg {
    width: 20px;
    height: 20px;
    stroke: #333;
    stroke-width: 2;
}

/* 关闭按钮特殊样式 */
.lightbox-close:hover {
    background: rgba(239, 68, 68, 0.95);
}

.lightbox-close:hover svg {
    stroke: #fff;
}

/* 缩放信息显示 */
.lightbox-zoom-info {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-variant-numeric: tabular-nums;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .lightbox-content {
        padding: 20px;
        max-width: 95%;
    }
    
    .lightbox-top-controls {
        top: 10px;
        right: 10px;
        gap: 8px;
    }
    
    .lightbox-zoom-btn,
    .lightbox-close {
        width: 40px;
        height: 40px;
    }
    
    .lightbox-zoom-btn svg,
    .lightbox-close svg {
        width: 18px;
        height: 18px;
    }
    
    .lightbox-zoom-info {
        font-size: 13px;
        padding: 8px 12px;
        min-width: 55px;
    }
    
    .lightbox-image {
        max-width: 95vw;
        max-height: 85vh;
    }
}

