.product-detail-section {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 20px; 
    align-items: flex-start; 
    position: relative;
    height: 90%;
    width: auto; 
}

.product-detail-image {
    display: flex;
    flex-direction: column; 
    align-items: center; 
    justify-content: flex-start; 
    width: auto; 
    padding-right: 20px; 
    height: auto; 
}

.main-image {
    width: 100%;
    max-width: 520px;
    aspect-ratio: 1/1;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 20px;
}

.thumbnail-container {
    display: flex;
    justify-content: flex-start; /* 从起始位置开始排列 */
    align-items: center;
    gap: 10px; /* 略图之间的间距 */
    overflow-x: auto; /* 允许水平滚动 */
    scroll-behavior: smooth;
    padding: 10px 0;
    white-space: nowrap;
}

.related-products {
    display: flex;
    gap: 8px;
    overflow: hidden;
    width: 100%;
}

.thumbnail {
    width: 60px; /* 调整略图宽度 */
    height: 60px; /* 调整略图高度 */
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
}

.thumbnail.active {
    border-color: #cda292;
    transform: scale(1.15);
}

.thumbnail:hover:not(.active) {
    opacity: 0.8;
}

.product-detail-content {
    display: flex; /* 使用 Flexbox 布局 */
    flex-direction: column; /* 子元素垂直排列 */
    justify-content: center; /* 垂直居中对齐子元素 */
    align-items: center; /* 水平居中对齐子元素 */
    width: 90%; /* 右侧占一半宽度 */
    padding-left: 20px; /* 和左侧的间距 */
    overflow: auto; /* 允许滚动 */
    height: 100%; /* 使容器高度占满整个模态框的高度 */
    
}

.product-detail-content h1 {
    margin-bottom: 15px;
    font-size: 24px;
    color: #cda292;
}

.product-detail-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    color: #cda292;
}

.product-detail-content td {
    padding: 8px;
    border-bottom: 1px solid #f0f0f0;
    color: #cda292;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .product-detail-section {
        grid-template-columns: 1fr; /* 单列布局 */
    }
    .product-detail-image, .product-detail-content {
        width: 100%;
    }
    .main-image {
        height: 350px;
    }
    .thumbnail {
        min-width: calc(25% - 8px);
        height: 80px;
    }
}

@media (max-width: 480px) {
    .main-image {
        height: 250px;
    }
    .thumbnail {
        min-width: calc(33.33% - 8px);
        height: 70px;
    }
}