
/* ==========================================================================
   MIDCARS CLEAN E-COMMERCE PRODUCT HERO GALLERY WITH WHEEL ZOOM & DRAG
   纯原生 1:1 正方形大图 + 缩略图切换 + 全屏灯箱 (支持鼠标中键滚轮无损放大 + 鼠标拖拽平移)
   ========================================================================== */
.product-hero-wrap {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 36px !important;
    margin-bottom: 40px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 左侧：正方形 1:1 大主图 + 下方横排小图轮播 */
.product-gallery-side {
    width: 500px !important;
    flex-shrink: 0 !important;
}

.product-main-square {
    width: 500px !important;
    height: 500px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    position: relative !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    cursor: zoom-in !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}
.product-main-square:hover {
    border-color: #2baab1 !important;
    box-shadow: 0 6px 16px rgba(43,170,177,0.15) !important;
}
.product-main-square:hover::after {
    content: "Click to expand" !important;
    position: absolute !important;
    bottom: 12px !important;
    right: 12px !important;
    background: rgba(15, 23, 42, 0.75) !important;
    color: #ffffff !important;
    font-size: 11.5px !important;
    padding: 4px 10px !important;
    border-radius: 20px !important;
    pointer-events: none !important;
    letter-spacing: 0.3px !important;
}

.product-main-square img#main_img {
    max-width: 480px !important;
    max-height: 480px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    transition: opacity 0.2s ease !important;
}

/* 下方横排缩略图轮播（一行 5 个 + 左右箭头） */
.product-thumbs-carousel {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-top: 14px !important;
    gap: 8px !important;
    width: 500px !important;
    box-sizing: border-box !important;
}
.thumb-nav-btn {
    width: 28px !important;
    height: 82px !important;
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    color: #475569 !important;
    font-size: 16px !important;
    font-weight: bold !important;
    user-select: none !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
}
.thumb-nav-btn:hover {
    background: #2baab1 !important;
    color: #ffffff !important;
    border-color: #2baab1 !important;
}
.thumb-viewport {
    flex: 1 !important;
    overflow-x: auto !important;
    scroll-behavior: smooth !important;
    display: flex !important;
    gap: 10px !important;
    padding: 2px !important;
    scrollbar-width: none !important;
}
.thumb-viewport::-webkit-scrollbar {
    display: none !important;
}
.thumb-card {
    width: 80px !important;
    height: 80px !important;
    flex-shrink: 0 !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    overflow: hidden !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}
.thumb-card:hover, .thumb-card.active {
    border-color: #2baab1 !important;
    box-shadow: 0 0 0 2px rgba(43,170,177,0.35) !important;
}
.thumb-card img {
    max-width: 74px !important;
    max-height: 74px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
}

/* 全屏高清灯箱弹窗 (支持鼠标滚轮无级缩放与拖拽) */
.product-lightbox-modal {
    display: none;
    position: fixed !important;
    z-index: 999999 !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.92) !important;
    backdrop-filter: blur(5px) !important;
    align-items: center !important;
    justify-content: center !important;
    animation: fadeInModal 0.2s ease !important;
    overflow: hidden !important;
    user-select: none !important;
}
.product-lightbox-modal.open {
    display: flex !important;
}
@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-viewport-area {
    position: relative !important;
    width: 100vw !important;
    height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    cursor: grab !important;
}
.lightbox-viewport-area.dragging {
    cursor: grabbing !important;
}

.lightbox-img-wrapper {
    position: absolute !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transform-origin: center center !important;
    transition: transform 0.08s ease-out !important;
}

.lightbox-img-wrapper img {
    max-width: 70vw !important;
    max-height: 78vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    border-radius: 8px !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6) !important;
    background: #ffffff !important;
    padding: 12px !important;
    pointer-events: none !important;
}

/* 灯箱右上角关闭按钮 */
.lightbox-close-btn {
    position: fixed !important;
    top: 24px !important;
    right: 28px !important;
    width: 42px !important;
    height: 42px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 24px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    z-index: 1000000 !important;
    transition: all 0.2s ease !important;
}
.lightbox-close-btn:hover {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    transform: scale(1.1) !important;
}

/* 灯箱底部控制条与操作提示 */
.lightbox-toolbar {
    position: fixed !important;
    bottom: 24px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 30px !important;
    padding: 6px 18px !important;
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    z-index: 1000000 !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3) !important;
}
.lightbox-tool-btn {
    color: #ffffff !important;
    cursor: pointer !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    padding: 4px 10px !important;
    border-radius: 15px !important;
    transition: background 0.2s ease !important;
}
.lightbox-tool-btn:hover {
    background: rgba(43, 170, 177, 0.6) !important;
}
.lightbox-tips-text {
    color: #94a3b8 !important;
    font-size: 12.5px !important;
    border-left: 1px solid rgba(255,255,255,0.2) !important;
    padding-left: 14px !important;
}

/* 右侧：产品信息区（标题 + 规格表 + 询盘按钮） */
.product-info-side {
    flex: 1 !important;
    min-width: 0 !important;
}
.product-info-side .title h1 {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.35 !important;
    margin: 0 0 14px !important;
}
.product-info-side .share {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 18px !important;
    padding-bottom: 14px !important;
    border-bottom: 1px solid #f1f5f9 !important;
}
.product-info-side .cpxx {
    margin-bottom: 24px !important;
}
.product-info-side .btn {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    margin-top: 20px !important;
}
.product-info-side .btn a {
    display: inline-block !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    height: 44px !important;
    line-height: 44px !important;
    padding: 0 28px !important;
    border-radius: 25px !important;
    text-align: center !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}
.product-info-side .btn a:first-child {
    background: #2baab1 !important;
    color: #ffffff !important;
    border: 1px solid #2baab1 !important;
    box-shadow: 0 4px 12px rgba(43,170,177,0.3) !important;
}
.product-info-side .btn a:first-child:hover {
    background: #23949a !important;
    transform: translateY(-2px) !important;
}
.product-info-side .btn a:last-child {
    background: #ffffff !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
}
.product-info-side .btn a:last-child:hover {
    background: #f8fafc !important;
    color: #2baab1 !important;
    border-color: #2baab1 !important;
}

/* 移动端 (<=768px) 自适应 */
@media screen and (max-width: 768px) {
    .product-hero-wrap {
        flex-direction: column !important;
        gap: 20px !important;
    }
    .product-gallery-side {
        width: 100% !important;
    }
    .product-main-square {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
    }
    .product-main-square img#main_img {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
    }
    .product-thumbs-carousel {
        width: 100% !important;
    }
    .thumb-card {
        width: 68px !important;
        height: 68px !important;
    }
    .thumb-nav-btn {
        height: 68px !important;
    }
    .product-info-side .title h1 {
        font-size: 20px !important;
    }
    .lightbox-toolbar {
        bottom: 16px !important;
        padding: 4px 12px !important;
        gap: 8px !important;
    }
    .lightbox-tips-text {
        display: none !important;
    }
}
