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

.product_banner {
    margin-top: 80px;
    display: flex;
    align-items: center;
    margin-left: auto;
    position: sticky;
    top: 0;
    max-height: 680px;
    overflow: hidden;
}

.product_banner h1 {
    position: absolute;
    top: 40%;
    left: 10%;
    transform: translate(-10%, -40%);
    font-size: min(max(3vw, 16px), 46px);
    color: #fff;
    border-bottom: 0.1em solid #1DDFF4;
    font-weight: 600;
}

.product_area {
    background-color: #fff;
    margin: auto;
    padding: 5rem 2rem;
    position: relative;
}


.product_div {
    display: flex;
    align-items: start;
}

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

.content {
    width: calc(100% - 500px);
    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: 18px;
    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-link.active {
    background-color: transparent !important;
}

.nav-link.active img {
    border-radius: 5px;
    border: 5px solid #8f35ef;
}

.nav-link img {
    box-shadow: 0 5px 5px -3px rgb(0 0 0 / 16%), 0 8px 10px 1px rgb(0 0 0 / 11%), 0 3px 14px 2px rgb(0 0 0 / 10%);
    border: 2px solid #464646;
    border-radius: 5px;
}

.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: 85%;
    max-width: 1000px;
    margin: auto;

}

.main-image {
    width: 100%;
    aspect-ratio: 3.5/2;
    margin: 0 auto 40px;
    box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0.25) 0px 25px 50px -12px;
    border-radius: 10px;
}

.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 {
    max-width: 1000px;
    margin: 0 auto 4rem;
    font-size: min(max(2.5vw, 22px), 36px);
    font-weight: 600;
    padding-left: 2rem;
    border-left: 6px solid #1c4e95;
}


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


.product_describe {
    width: 90%;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem 1.5rem;
    background-color: #f7f7f7;
    box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}

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

#v-pills-tab {
    background-color: #fefefe;
    width: 260px;
    max-height: 80vh;
    overflow: auto;
    margin-left: 1.5rem;
    padding: .5rem 1rem;
    box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
}

.list_title{
    text-align: center;
    padding-bottom: 15px;
    font-weight: 600;
    color: #2f2932;
    font-size: min(max(2.5vw, 22px), 28px);
    margin-left: 1.5rem;
}


.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 {
        flex-direction: column-reverse;
    }
    .product_list{
        width: 100%;
    }
    .product_area{
        padding: 0;
    }
    #v-pills-tab {
        display: flex;
        flex-direction: row !important;
        flex-wrap: nowrap;
        align-items: center;
        width: 100%;
        overflow-x: auto;
        /* 超出時出現水平滾動條 */
        overflow-y: hidden;
        /* 隱藏垂直滾動條 */
        white-space: nowrap;
        margin: auto;
    }

    #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_detail {
        font-size: 18px;
    }

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

    .tab_product_name {
        font-size: 14px;
    }

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