body{
    font-size: 1rem;
    --body-bg-color: #2b384010;

    /* overflow-x: hidden; */
}

:root{
    --gallery-height: 80dvh;
    --gallery-margin-top: 10dvh;
}

.detailes{
    display: flex;

    flex-direction: column;

    row-gap: 12px;
    margin-top: 15px;
}


fieldset.detail-group{
    border-radius: var(--border-radius);
    
    border: 1px solid #2b384057;
    /* border: 1px solid #e4e7e9; */

    display: grid;
    grid-template-columns: repeat(1, 1fr);

    row-gap: 20px;

    padding-inline: 1.5rem;
    padding-block: 1.5rem;

    background-color: #fff;
}

fieldset.detail-group.main{
    grid-template-columns: repeat(3, 1fr);
}

fieldset.detail-group.main .detail{
    text-align: center;
}


.detail{
    padding-inline: 1rem;
    flex-direction: row;

    column-gap: 10px;

    justify-content: space-between;

}

h2{
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

h2>span:last-of-type{
    font-weight: 100;
    font-size: 1.1rem;
    color: var(--gray-font-color);
}

.detail-group.main>.detail{
    flex-direction: column;

}


.detail>:first-child{
    font-size: 1rem;
    /* color: #101113; */
}

.detail>:last-child{    
    font-size: 1rem;
}

.detail-group>.detail-group-title{
    font-weight: 700;
    font-size: 1.25rem;
}


.detail>p{
    margin: 0;

    min-width: 50%;
    /* box-sizing: content-box; */
}

.detail-group.main>.detail:nth-of-type(3){
    /* border-inline: 1px solid #ccd1d5; */
    border-inline: 1px solid #2b384057;
}

.detail-group.main>.detail>:last-child{    
    font-size: 1.5rem;
}

.detail-group.main>.detail>:first-child{
    margin-bottom: 3px;
}

.detail-group>p{
    margin-top: 0;
    line-height: 1.4rem;
    font-size: 1rem;
    margin-bottom: 0;

    color: #101113
}

/*MODAL CSS START*/
#gallery-modal{
    z-index: 6;
    /* display: none; */
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;

    /* background-color: rgba(0, 0, 0, 0.9); */
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}


body:has(#gallery-modal[data-open="1"]){
    overflow-y: hidden;
}

#gallery-modal>.slider{
    display: flex;
    flex-direction: row;
    
    -webkit-overflow-scrolling: touch;

    overflow-x: scroll;
    scroll-snap-type: x mandatory;

    scroll-snap-points-x: repeat(100dvw);

    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */

    height: var(--gallery-height);
    min-height: var(--gallery-height);
    margin-top: var(--gallery-margin-top);

    z-index: 2;
}


.gallery-control-button>svg{
    /* background-color: white;
    padding-inline: 5px;
    padding-block: 10px;

    border-radius: .5rem; */

    height: 40px;
    width: 40px;
    fill: white;
}

.gallery-control-button:disabled>svg{
    /* background-color: gray; */
    fill: rgb(189, 189, 189);
}

#gallery-modal>.slider::-webkit-scrollbar{
    display: none;
}

#gallery-modal>.slider:focus-visible{
    border: none;
    outline: none;
}

.close-modal-button{
    position: absolute;
    top: 20px;
    right: 20px;

    height: 40px;
    width: 40px;
}

.close-modal-button>svg{
    color: white;
}



#gallery-modal>.slider>.image-holder{
    scroll-snap-align: start;
    scroll-snap-stop: always;

    width: 100dvw;
    min-width: 100dvw;
    max-width: 100dvw;    
}

#gallery-modal>.slider>.image-holder>img{
    object-fit: contain;
}


img{
    margin-inline: auto;
}


#gallery-modal #current-image-index{
    display: block;
    width: 100dvw;
    
    text-align: center;

    color: white;
    font-size: 1.15rem;
    font-weight: 700;

    transform: translateY(-50%);
    margin-top: 5dvh;

    z-index: 3;
}

#gallery-modal>.gallery-control-button{
    position: absolute;
    transform: translateY(-50%);

    top: calc(var(--gallery-margin-top) + var(--gallery-height) / 2);
    left: var(--side-distance);

    --side-distance: 5dvw;
}


#gallery-modal>.gallery-control-button#right-button{
    left: unset;
    right: var(--side-distance);
}

.detailed #gallery-modal .image-holder{
    max-height: 250px;
    max-width: 444px;

}


/*MODAL CSS END*/

.detailed .image-holder{
    cursor: pointer;
    position: relative;
    overflow: hidden;

    border-radius: var(--border-radius);
}

.detailed .image-holder>img{    
    transition: transform .2s ease-in-out;
    will-change: transform;
}

.detailed .image-holder:hover>img{
    transform: scale(1.02);
}


/* .image-holder>img{
    width: 100%;
    height: 100%;
    object-fit: cover;
} */

.count_display {
    position: absolute;
    bottom: 4px;
    right: 4px;

    background-color: #000000a9;
    
    padding-inline: 5px;
    padding-block: 8px;
    border-radius: 5px;
    
    color: white;
    font-size: .9rem;
    font-weight: bold;

    backdrop-filter: blur(3px);

}

/* VIRTUAL TOUR IFRAME MODAL STYLES---------------------------------- */
#virtual-tour-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;

    padding-top: 50px;

    backdrop-filter: blur(5px);

    opacity: 1;
    transition: opacity 200ms ease-in-out;
}

#virtual-tour-modal.fade-out{
    opacity: 0;
}

#virtual-tour-modal[data-open="0"]{
    display: none;
}

.overlay {
    position: absolute;
    inset: 0;
    
}

.iframe-wrapper {
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 1200px;
    background: #000;
}

#virtual-tour-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0.5rem;
}

#loadScreen {
    position: absolute;
    /* top: 50%; left: 50%; */
    /* transform: translate(-50%, -50%); */
    color: white;
    font-size: 1.2em;

    background-color: rgb(0, 0, 0);
    display: flex;    
    align-items: center;
    justify-content: center;
    inset: 0;

    border-radius: 0.5rem;
}

#virtualTourButton{
    position: absolute;
    padding-right: 3px;
    padding-left: 2px;
    padding-top: 3px;
    left: 10px;
    bottom: 10px;
    background-color: rgba(0, 0, 0, 0.46);

    color: white;
    backdrop-filter: blur(3px);
    border-radius: 50%;

    transition: transform 150ms ease-in-out;
    will-change: transform;

    
    z-index: 3;

}

#virtualTourButton:hover, #virtualTourButton:focus-visible{
    transform: scale(1.1);
}

#virtualTourButton>svg{
    width: 50px;
    height: 50px;
}


/* VIRTUAL TOUR IFRAME MODAL STYLES END---------------------------------- */

/* LOADER STYLES -------------------------------------------------------- */

 .loader {
      width: 64px;
      height: 64px;
      position: relative;
      background: #FFF;
      border-radius: 4px;
      overflow: hidden;
    }
    .loader:before {
      content: "";
      position: absolute;
      left: 0;
      bottom: 0;
      width: 40px;
      height: 40px;
      transform: rotate(45deg) translate(30%, 40%);
      background: #597586ff;
      box-shadow: 32px -34px 0 5px #364751ff;
      animation: slide 2s infinite ease-in-out alternate;
    }
    .loader:after {
      content: "";
      position: absolute;
      left: 10px;
      top: 10px;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: #364751ff;
      transform: rotate(0deg);
      transform-origin: 35px 145px;
      animation: rotate 2s infinite ease-in-out;
    }

    @keyframes slide {
      0% , 100%{ bottom: -35px}
      25% , 75%{ bottom: -2px}
      20% , 80%{ bottom: 2px}
    }
    @keyframes rotate {
      0% { transform: rotate(-15deg)}
      25% , 75%{ transform: rotate(0deg)}
      100% {  transform: rotate(25deg)}
    }


/* LOADER STYLES END----------------------------------------------------- */

@media screen and (max-width: 420px){
    .detail{
        padding-inline: 10px;
    }

    fieldset.detail-group{
        padding-inline: 1rem;
    }

}

@media screen and (min-width: 750px) {
    
    .starter-images>.image-holder:first-of-type{
        grid-column: 1 / span 2;
        grid-row: 1 / span 2;
        
    }

    .starter-images{
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 200px);
        gap: 10px;
    }

    fieldset.detail-group.main{
        grid-template-columns: repeat(4, 1fr);
    }
    

    .detail-group.main>.detail:first-of-type{
        grid-column: unset;

    }

    .detail-group.main>.detail:nth-of-type(2){
        border-left: 1px solid #2b384057;
        /* border-left: 1px solid #ccd1d5; */
    }

    .count_display{
        display: none;
    }

    .starter-images>.image-holder:nth-of-type(3)>.count_display{
        display: block;
    }

}

@media screen and (max-width: 750px) {
    .starter-images>.image-holder{
        display: none;
    }

    .starter-images>.image-holder:first-of-type{
        display: block;
        height: 240px;
        max-height: 240px;
    }

    .detail-group.main>.detail:first-of-type{
        grid-column: 1 / span 3;
        border: none;
    } 

}



