/* 产品详情页样式 */
.product-detail {
    padding-top: 100px;  /* 为固定导航栏留出空间 */
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 2rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.product-gallery {
    width: 100%;
    max-width: 500px;  /* 可以根据需要调整大小 */
    margin: 0 auto;
}

.product-gallery .image-slider {
    position: relative;
    width: 100%;
    height: 400px;  /* 可以设置更大的高度 */
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.product-gallery .slider-container {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
    width: 300%;  /* 根据图片数量设置宽度 */
}

.product-gallery .slider-container img {
    width: 33.333%;  /* 每张图片占容器的三分之一 */
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;  /* 防止图片被压缩 */
    cursor: zoom-in;
}

.product-gallery .slider-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.product-gallery .indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.product-gallery .indicator.active {
    background: #fff;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
    }
    .product-gallery .image-slider {
        height: 300px;
    }
}

.product-info {
    /* 添加产品信息样式 */
}

/* 添加返回按钮样式 */
.back-to-home {
    margin-bottom: 2rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #f02c8e;
}

.back-link i {
    font-size: 0.8em;
}

/* 更新灯箱样式 */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

/* 更新包装器样式 */
.lightbox-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90%;
    max-height: 90vh;
    width: 100%; /* 添加宽度确保子元素可以居中 */
}

.lightbox-image {
    max-width: 100%;
    max-height: calc(90vh - 40px); /* 为指示器留出空间 */
    object-fit: contain;
    border-radius: 4px;
}

/* 更新指示器样式 */
.lightbox .slider-indicators {
    position: relative;
    margin-top: 20px;
    display: flex;
    justify-content: center; /* 添加水平居中 */
    gap: 12px;
    z-index: 2;
    width: 100%; /* 确保占据整个宽度 */
}

.lightbox .indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.lightbox .indicator.active {
    background: #fff;
}

/* 恢复关闭按钮样式（之前被误删了） */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: #f02c8e;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
} 