#product-bg {
    position: absolute;
    z-index: -1;
    width: 100%;
    height: 100%;
}

.product_area {
    padding: 5rem 2rem;
    position: relative;
}


.product_div {
    display: flex;
    align-items: start;
    padding-top: 5rem;
}

#mainDisplay {
    transition: opacity 0.4s ease;
    opacity: 1;
}

.content {
    padding: 2rem 4rem;
    width: 90%;
    margin: 0 auto;
}

.tab_product_name {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    z-index: 1;
    border-radius: 10px;

    /* Flex 置中 */
    display: flex;
    justify-content: center;
    align-items: center;

    /* 預設隱藏 */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.nav-pills .nav-link.active {
    background-color: transparent;
}

.nav-pills .nav-link.active img {
    border: #0c59ff 5px solid;
}

.nav-pills .nav-link img {
    border-radius: 10px;
}

.products_btn {
    padding: 5px;
    max-width: 250px;
    margin: auto;
}

.tab-image:hover .tab_product_name {
    opacity: 1;
    visibility: visible;
}

.tab-image {
    position: relative;
    height: 100%;
    margin: 1rem 0;
}

.image-gallery {
    width: 45%;
    margin: auto;

}

.main-image {
    width: 100%;
    aspect-ratio: 3.5/2;
    margin: auto;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-position: center;
    object-fit: cover;
    border-radius: 10px;
}

.thumbnails {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.thumbnails img {
    width: 100px;
    height: 70px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 6px;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.thumbnails img:hover,
.thumbnails img.active {
    border: 3px solid #5175C3;
    opacity: 1;
}

.product_title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 4rem;
    padding-bottom: .8rem;
    position: relative;
    overflow: hidden;
}

.product_title::before {
    position: absolute;
    content: "";
    width: 100%;
    height: 6px;
    background-color: #5175C3;
    bottom: 0;
    left: 0;
}

.product_detail {
    font-size: 22px;
    line-height: 2;
}

.nav-pills {
    padding: 2rem 0;
}

.product_describe {
    width: 80%;
    margin: 2rem auto;
}

.attachment_div {
    width: 80%;
    margin: auto;
}

#v-pills-tab {
    width: 20%;
}

#v-pills-tab h2 {
    border-bottom: 2px solid #b1b1b1;
    padding-bottom: 15px;
    font-weight: bold;
    color: rgb(108, 108, 108);
    width: 70%;
    margin: auto;
}

.tab_product_name p {
    width: 100%;
    padding: 0 1rem;
    white-space: break-spaces;
}

@media (max-width: 1200px) {
    .product_content {
        display: block;
    }

    .image-gallery,
    .product_describe {
        width: 100%;
    }

    .product_describe {
        margin-top: 3rem;
    }
}

@media (max-width: 992px) {
    .product_div {
        display: block;
    }

    #v-pills-tab {
        flex-direction: row !important;
        flex-wrap: nowrap;
        align-items: center;
        width: 100%;
        overflow-x: auto;
        /* 超出時出現水平滾動條 */
        overflow-y: hidden;
        /* 隱藏垂直滾動條 */
        white-space: nowrap;
    }

    #v-pills-tab h2 {
        display: none;
    }

    .tab-image {
        margin: auto;
    }

    .img-fluid {
        width: 100%;
        height: 100%;
    }

    .products_btn {
        height: 100px;
        margin: 0 2rem;
        flex: 0 0 auto;
    }

    .product_title {
        font-size: 28px;
    }

    .product_detail {
        font-size: 18px;
    }

    .content {
        padding: 4rem .5rem;
        width: 90%;
        margin: 0 auto;
    }

    .tab_product_name {
        font-size: 14px;
    }

    .nav-pills .nav-link {
        width: 100%;
        height: auto;
    }
}