.product-carousel {
    display: flex;
    gap: 10px;
}

.product-carousel-main {
    flex: 4; /* 左側大圖佔據較大空間 */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border: none; /* 移除邊框 */
    border-radius: 8px;
    background-color: #fff;
    height: 450px; /* 固定高度 */
}

.product-carousel-main img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 保持圖片完整顯示 */
}

.product-carousel-thumbs {
    flex: 1; /* 右側縮圖佔據較小空間 */
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 450px; /* 限制最大高度，避免過長 */
    overflow-y: auto; /* 如果縮圖過多，允許滾動 */
}

.product-carousel-thumbs .thumb {
    border: 2px solid #eee;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    opacity: 0.6;
    transition: opacity 0.3s ease, border-color 0.3s ease;
    height: 80px; /* 設定固定高度以統一尺寸 */
    width: 100%;
}

.product-carousel-thumbs .thumb:hover {
    opacity: 1;
}

.product-carousel-thumbs .thumb.active {
    border-color: #ff3a5f;
    opacity: 1;
}

.product-carousel-thumbs .thumb img {
    width: 100%;
    height: 100%; /* 讓圖片填滿容器 */
    display: block;
    object-fit: cover; /* 裁切填滿 */
    object-position: center; /* 改回置中顯示 */
}

/* 響應式調整 */
@media (max-width: 767px) {
    .product-carousel {
        flex-direction: column-reverse; /* 手機版時，縮圖在上方 */
    }

    .product-carousel-thumbs {
        flex-direction: row;
        overflow-x: auto; /* 水平滾動 */
        max-height: none;
    }

    .product-carousel-thumbs .thumb {
        min-width: 80px; /* 縮圖最小寬度 */
        height: 60px;
    }
    .product-carousel-thumbs .thumb img {
        height: 100%;
        object-fit: cover;
    }
}
