/* ========= Alternative image Layout (.JS in Assets Folder) ======= */

/* --- DESKTOP VIEW  --- */
@media screen and (min-width: 1024px) {
    
    /* 1. LAYOUT COLUMNS */
    div#prodInfoLeft {
        margin-top: 1rem;
        width: 60%;
        min-height: 100vh; 
    }

    div#prodInfoRight {
        width: 40%;
    }

    /* 2. OVERFLOW FIXES  */
    
    .grid.fixed.productPageTop, 
    .container, 
    .maxInner, 
    .zflex-w, 
    #prodInfoRight {
        overflow: visible !important;
    }

    .productPageTop .zflex-w {
        align-items: stretch !important;
    }

    #detailMiv{
        border:1px solid #c2c2c261;
        border-radius: 0px;
    }
    
    /* 3. MAIN IMAGE (Capped at 70vh) */
    div#detailMiv img {
        border-radius: 0px;
        aspect-ratio: 1/1;
        max-height: 70vh; /* Cap the height */
        width: auto;      /* Width adjusts automatically */
        margin: 0 auto;
        display: block;
        object-fit: contain;
    }

    .MIVicon {
        border-radius: 0px;
        margin: .5rem;
    }
    
    div#webdes_pdp .productPageTop .maxInner {
        max-width: 100%;
        padding-inline: 1rem;
    }

    /* 4. THUMBNAILS (Capped at 70vh) */
    div#detailMivThumb {
        display: flex;
        flex-flow: row wrap;
        width: 100%;
        gap: 1rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    div#detailMivThumb a,
    div#detailMivThumb a img,
    div#detailMivThumb #youTubeLink {
        height: auto;
        max-height: 70vh !important;
        width: 100%;
        max-width: 100%!important;
        flex-basis: calc(50% - 0.5rem); /* 2 per row */
        flex-grow: 1;
        aspect-ratio: 1/1;
        object-fit: cover;
        border-radius: 0px;
        border: 1px solid #c2c2c261;
    }

    div#detailMivThumb #youTubeLink .bgStandard {
        display: none !important;
        padding: 0 !important;
    }

    /* 5. STICKY  */
    #firstdetails {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 90px;
        align-self: flex-start;
        height: fit-content !important;
        z-index: 50;
        margin-bottom: 0 !important;
        overflow: scroll !important;
        padding-top: 1rem !important;
    }
}       

/* --- MOBILE VIEW --- */
@media screen and (max-width: 1024px) {
    div#prodInfoLeft {
        display: flex;
        flex-flow: row;
        overflow-x: scroll;
        padding: .5rem;
        background: #fff;
    }

    #detailMiv::before {
       content: 'More Images >';
       font-size: 0.7rem;
       position: absolute;
       bottom: 1rem;
       right: 2rem;
       letter-spacing: 0.05rem;
       z-index: 1;
       background: var(--color4);
       padding: .5rem;
       border-radius: 0px;
    }

    
    div#detailMivThumb {
        display: flex;
        flex-flow: row;
        overflow: visible;
        gap: 1rem;
        margin-block: 0;
    }
    
    #detailMivThumb > a img,
    .cssItemImg > a img {
        min-width: 85vw !important;
        width: 85vw !important;
        height: 100% !important;
        aspect-ratio: 1/1 !important;
        border-radius: 0px;
        object-fit: cover;
        border: 1px solid #c2c2c261;
    }
    
    .cssItemImg > a img {
        margin-right: 1rem;
    }

    /* Hiding logic for single images */
    #prodInfoLeft:has(#detailMivThumb .col-thumbnail:only-child) {
        overflow: hidden;
    }
    
    #prodInfoLeft:has(#detailMivThumb .col-thumbnail:only-child) .cssItemImg > a img {
        width: 100% !important;
        padding: .5rem !important;
    }
    
    #detailMivThumb:has(> .col-thumbnail:only-child) {
        display: none;
    }

	#prodInfoLeft:has(#detailMivThumb .col-thumbnail:only-child) #detailMiv::before {
       display: none;
    }

    
    #detailMivThumb .col-thumbnail {
        flex: 0 !important;
        min-width: 85vw;
        border-radius: 0px;
    }

    #youTubeLink .bgStandard {
        background: transparent;
        border-radius: 0px;
    }
    
    #brand-logo-area > a {
        padding-right: 1rem !important;
        padding-top: 0;
    }

    #brand-logo-area > a img {
        border-radius: 0px !important;
    }

    .MIViconZoom {
        display: none;
    }
}

/* Hide short desc*/

a[href="#ModularShortDescription"]{
    display: none !important;
}

/* --- YOUTUBE PLAY BUTTON STYLING --- */
#youTubeLink {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
}

#youTubeLink::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    background-color: rgb(0 0 0 / 36%);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 30px;
    border-radius: 50%;
    border: 2px solid #fff;
    transition: all 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

#youTubeLink:hover::after {
    background-color: #FF0000;
    transform: scale(1.1);
    border-color: #FF0000;
}

/* show more button */
#pdpShowMoreBtn{
width: 100%;
    padding: 12px;
    cursor: pointer;
    background: #fff;
    color: var(--color1);
    border: 2px solid var(--color1);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 0;
    line-height: normal;
    margin-bottom: 1rem;
    transition: .5 ease;
}

#pdpShowMoreBtn:hover{
    background: var(--color1);
    color: #fff;
    border: 2px solid var(--color1);
}