﻿:root {
    --primary-color: #333;
    --accent-color: #3c5e67;
    --bg-gray: #f4f4f4;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
/* 布局容器 */
.product-detail {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
}

/* --- 左侧轮播区域 --- */
.gallery-container {
    flex: 1.05;
    min-width: 0;
    position: relative; /* 为放大镜框提供定位参考 */
}

/* 大图展示区 */
.main-display {
    width: 100%;
    border-radius: 4px;
    background: var(--bg-gray);
    position: relative;
    cursor: crosshair;
}
/* 将 overflow 移到这里，防止遮挡右侧放大框 */
.slider-viewport {
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
}
.main-slider {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.main-slider img {
    width: 100%;
    height: auto; /* 关键：让容器高度随图片比例自适应 */
    display: block;
    flex-shrink: 0;
    object-fit: contain;
}
/* 放大镜遮罩（黄透方块） */
.zoom-lens {
    position: absolute;
    width: 150px;
    height: 150px;
    background: rgba(255, 235, 59, 0.4);
    border: 1px solid rgba(0,0,0,0.1);
    display: none;
    pointer-events: none; /* 穿透点击事件 */
    z-index: 10;
}

/* 右侧放大镜预览框 */
.zoom-result {
    position: absolute;
    left: calc(100% + 20px); /* 关键：定位在主图右侧 20px 处 */
    top: 0;
    width: 80%; /* 与主图同宽 */
    height: 80%; /* 与主图同高 */
    border: 1px solid #ddd;
    background-color: #fff;
    background-repeat: no-repeat;
    display: none;
    z-index: 100;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
/* 缩略图导航栏 */
.thumb-nav {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
}

.thumb-viewport {
    flex: 1;
    overflow: hidden; /* 隐藏滚动条 */
    scroll-behavior: smooth;
    display: flex;
    gap: 10px;
}

.thumb-item {
    width: 110px;
    height: auto; /* 固定缩略图高度，宽度随比例或保持一致 */
    flex-shrink: 0;
    cursor: pointer;
    border: 1px solid transparent;
    transition: 0.3s;
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-item.active {
    border-color: var(--accent-color);
    opacity: 1;
}
/* 箭头样式 */
.nav-btn {
    width: 30px;
    height: 60px;
    background: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: 0.2s;
}
.nav-btn:hover { background:  #fff }

/* --- 右侧信息区域 --- */
.info-container {
    flex: 0.95;
}
.product-title { font-size: 28px; font-weight: 600; margin-bottom: 10px; }
.product-price { font-size: 24px; color: var(--accent-color); margin: 20px 0; }
.product-desc { line-height: 1.8; color: #666; font-size: 15px; }
.info-container h1{font-size: 36px;color: #333;font-weight: bold;display: block;margin-bottom: 35px; margin-top: 5%;}
.info-container .cc{background: #3c5e67;padding: 14px 30px;border-radius: 10px;font-size: 16px;font-weight: bold;color: #fff;display: inline-block;}
.info-container .cc a{color: #fff;}
.info-container .cc span{font-weight: normal;font-size: 24px;margin-right: 10px;}
.info-container .des{margin-bottom: 20px;}
.info-container .dianhuapc{ margin-left: 15px;}
/* --- 响应式适配 --- */
@media (max-width: 1200px){
	.info-container h1{font-size: 30px;}
}
@media (max-width: 900px) {
    .product-detail { flex-direction: column;gap:20px; display: flex;}
    .zoom-result, .zoom-lens, .nav-btn {  display: none !important; }
    .thumb-viewport { overflow-x: auto; }
    .info-container{ margin: 15px 2% 15px 2%; order: 1; /* 排在第一个 */}
	.info-container h1{font-size: 20px;margin-top: 0.1%;margin-bottom: 15px;}
	.info-container .cc{font-size: 14px;}
	.info-container .cc span{font-size: 16px;}
    .info-container .dianhuapc{display:none;}
    .gallery-container {
        order: 2;
    }
    .thumb-item{ width: 90px;}
   
@media (max-width: 540px) {
	.info-container h1{font-size: 20px;}
	.info-container .cc{font-size: 14px;}
	.info-container .cc span{font-size: 16px;}
}
