.item-preview-container
{
    position: fixed;
    color: aliceblue;
    font-family: sans-serif;
    z-index: 10;
    width: 100vw;
    height: 100vh;
    background: hsl(0deg 0.22% 10.21%);
    padding: 0 0 100px 0;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: .3s;
    overflow: hidden;
    opacity: 0;
}
.item-preview-container-preload .item-preview-body div,
.item-preview-container-preload > .item-preview-title 
{
    color: transparent;
}
.item-preview-container-preload  .item-preview-photo
{
    /* content-visibility: hidden; */
    background: transparent;
}
.item-preview-container-preload .item-preview-price,
.item-preview-container-preload .gallery-cap
{
    visibility: hidden;
}

.item-preview-container-active
{
    transform: scaleY(1);
    opacity: 1;
}
.item-preview-body
{
    padding: 0 3vw 150px 3vw;
    overflow: hidden scroll;
    height: inherit;
    box-sizing: border-box;
    display: grid;
    grid-auto-flow: row;
    grid-template-areas: 
        "photo"
        "order"
        "stats"
        "hr"
        "descr";
    scroll-behavior: smooth;
}
.item-preview-body hr
{
    grid-area: hr;
}
.item-preview-title 
{
    font-size: 18px;
    margin: 25px 8px 15px;
    padding: 50px 6vw;
    padding-bottom: 0;
    display: flex;
    align-items: center;
}
.item-preview-photo
{
    grid-area: photo;
    height: 81.5vw;
    border-radius: 5px;
    background: hsl(0deg 0.22% 12%);
    margin: auto;
    margin-bottom: 20px;
    overflow: hidden;
    padding: 20px;
    position: relative;
    transition: .5s;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    -webkit-user-select: none;
    user-select: none;
}
.item-preview-photo:hover .gallery-navigation-active
{
    display: flex;
}
.item-preview-photo > img
{
    width: 100%;
    border-radius: 4px;
}
.item-preview-photo-fullscreen
{
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    z-index: 1;
    height: 100vh;
}
.item-preview-photo-fullscreen .gallery-cap
{
    display: none;
}
.item-preview-stats-other 
{
    grid-area: order;
    display: flex;
    position: relative;
    background: linear-gradient(-45deg, hsla(242, 20%, 10%) 10%, hsl(226, 10%, 15%));
    padding: 10px 20px;
    border-radius: 5px;
    padding-bottom: 45px;
    flex-wrap: wrap;
    justify-content: center;
}
.item-preview-stats-container
{
    grid-area: stats;
}
.item-preview-stats
{
    display: grid;
    background: hsl(0deg 0% 12%);
    padding-bottom: 50px;
    border-radius: 5px;
    margin: 10px 0;
    gap: 18px;
    grid-column: 1 / span 2;
    font-size: 14px;
}
.item-preview-stats-name 
{
    font-size: 1.1rem;
    font-weight: bolder;
    grid-column: 1 / span 2;
    background: hsl(0deg 0% 14%);
    padding: 15px 20px;
    border-radius: 4px 4px 0 0;
}
.item-preview-stats-row-name
{
    grid-column: 1;
    opacity: 0.4;
    margin-left: 20px;
}
.item-preview-stats-row-value
{
    grid-column: 2;
    padding: 0 20px;
    margin-left: auto;
    margin-right: 20px;
    white-space: nowrap;
}
.item-preview-stats-other-element
{
    margin: 3px 15px;
    font-size: 11px;
    text-align: center;
    display: flex;
    flex-direction: column;
    padding: 2px 20px 12px;
    color: hsl(207, 5%, 50%);
    border-radius: 10px;
    background: hsl(225deg 11% 18%);
    width: min-content;
}
.item-preview-stats-other-element div
{
    font-size: 12px;
    margin: 10px;
    text-align: center;
    font-size: 17px;
    color: aliceblue;
}
.item-preview-tags
{
    display: flex;
    margin-top: 20px;
    color: hsl(0deg 0% 53%);
    font-size: 13px;
    -webkit-user-select: none;
    user-select: none;
    flex-wrap: wrap;
    width: 100%;
}
.item-preview-tag
{
    padding: 5px 10px;
    background: hsl(0deg 0% 15%);
    margin: 3px;
    font-size: 12px;
    border-radius: 4px;
}
.item-preview-price 
{
    background: var(--main-color);
    border-radius: 5px;
    display: flex;
    width: min-content;
    margin: 50px auto 25px;
    cursor: pointer;
}
.item-preview-price-value 
{
    font-size: 15px;
    background: hsl(0deg 0% 0% / 30%);
    padding: 14px 11px;
    white-space: nowrap;
}
.item-preview-price-btn
{
    background: none;
    border: none;
    font-weight: bolder;
    font-size: 14px;
    text-align: inherit;
    padding: 0 10px;
    pointer-events: none;
    color: black;
    -webkit-user-select: none;
    user-select: none;
}
.item-preview-other-photos 
{
    margin: 10px 0;
    grid-column: 1 / span 2;
}
.item-preview-other-photos > img
{
    margin: 5px 0;
    border-radius: 5px;
}
.item-preview-description
{
    grid-area: descr;
    padding: 0 20px 100px;
    margin-bottom: 50px;
    font-size: 14px;
}
.item-photos-gallery
{
    position: fixed;
    top: 0;
    left: 0;
    display: none;
    z-index: 200;
    overflow: scroll;
    height: 100vh;
    width: 100vw;
    -webkit-backdrop-filter: blur(75px);
    backdrop-filter: blur(75px); 
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}
.item-photos-gallery-active
{
    display: flex;
}
.gallery-container
{
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 40px;
    transition: .5s;
}
.gallery-container img
{
    border-radius: 5px;
    flex: 0 0 100%;
    width: 100%;
}
.gallery-navigation
{
    position: absolute;
    top: 0;
    left: 0;
    color: aliceblue;
    width: 100%;
    height: 100%;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
    pointer-events: none;
    display: none;
}
.gallery-navigation-btn 
{
    border-radius: 5px;
    background: hsla(0, 0%, 0%, 1);
    font-size: 21px;
    padding: 12px 5px;
    -webkit-user-select: none;
    user-select: none;
    cursor: pointer;
    margin: 1px;
    pointer-events: all;
    font-family: monospace;
}
.gallery-navigation-btn:disabled
{
    opacity: 0.3;
}
.gallery-cap
{
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    background: hsla(0, 3%, 56%, 0.4);
    padding: 15px;
    border-radius: 13px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    width: 90px;
    text-align: center;
    z-index: 2;
    font-size: 12px;
    box-shadow: 0px 17px 16px hsl(0deg 0% 0% / 50%);
    -webkit-user-select: none;
    user-select: none;
    pointer-events: none;
    text-transform: capitalize;
    transition: .5s;
}
.gallery-cap-num 
{
    font-size: 41px;
}
.gallery-cap-btn
{
    background: hsl(0deg 0% 55% / 50%);
    padding: 10px 9px;
    border-radius: 5px;
    font-size: 10px;
    white-space: nowrap;
    text-transform: capitalize;
    margin-top: 24px;
}
#item-preview-back
{
    height: 30px;
    filter: invert(1);
    cursor: pointer;
    margin-right: 20px;
    display: none;
}
.gallery-full-container
{
    display: none;
    position: fixed;
    overflow: hidden;
    z-index: 10;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-sizing: border-box;
    background: hsla(0, 0%, 0%, 0.6);
    border-radius: 5px;
    left: 0;
    top: 0;
    height: 100vh;
    width: 100vw;
    cursor: pointer;
}
.gallery-full-rail
{
    display: flex;
    height: 100%;
    pointer-events: none;
    transition: translate .5s;
}
.gallery-full-holder
{
    padding: 5vh 0;
    flex: 0 0 100vw;
    text-align: center;
    transition: .5s ease-in-out;
    position: relative;
    width: 100vw;
    overflow: hidden;
}
.gallery-full-holder img
{
    transition: 
       left .2s cubic-bezier(0.4, 0, 1, 1),
       top .2s cubic-bezier(0.4, 0, 1, 1);
}
.gallery-full-container-wrapping
{
    transition: transform .2s cubic-bezier(1, 0.3, 0.7, 1);
}
.gallery-full-container-wrapping .gallery-full-holder
{
    flex: 0 0 100%;
    padding: 0;
    transition: none;
}
.gallery-full-navigation
{
    position: absolute;
    z-index: 3;
    pointer-events: none;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.gallery-full-container-wrapping .gallery-full-navigation
{
    display: none;
}
.gallery-full-navigation button
{
    background: hsl(0deg 0% 100% / 30%);
    border-radius: 3px;
    margin: 5px;
}
.gallery-preload-photo
{
    width: 400px;
    height: 300px;
    background: var(--sub-base-color);
    border-radius: 5px;
    display: none;
}

@keyframes nestImage 
{
    0% 
    { 
        width: 0;
        background: none;
    }
    60% 
    {
        width: 169px;
        background: none;
    }
    100%
    {
        width: 169px;
        background: hsl(0deg 0% 18%);
    }
}

.gallery-preload-photo:nth-child(1)
{
    width: 169px;
    animation: nestImage 0.75s;
}

@media screen and (min-width: 500px)
{
    .gallery-preload-photo
    {
        display: block;
    }
    .item-preview-title
    {
        padding: 100px 2vw 30px;
        margin-bottom: 25px;
        margin: 10px;
    }
    #item-preview-back
    {
        display: block;
    }
    .gallery-container
    {
        gap: 10px;
        height: 300px;
        cursor: pointer;
        align-items: baseline;
        border-radius: 3px;
        width: min-content;
        transition: translate .3s cubic-bezier(0.63, 0.38, 0.29, 0.76);
    }
    .gallery-container img,
    .gallery-full-container img
    {
        width: unset;
        height: 100%;
        flex: 0;
        border-radius: 3px;
    }
    .item-preview-body
    {
        padding: 0 2vw 150px 2vw;
        gap: 20px;
        overflow: auto;
        grid-template-rows: min-content min-content min-content auto;
        grid-template-columns: auto;
        grid-template-areas: 
            "photo"
            "order"
            "stats"
            "hr"
            "descr";
    }
    .item-preview-body::-webkit-scrollbar
    {
        background: transparent;
    }
    .item-preview-body::-webkit-scrollbar-thumb
    {
        background: hsl(0deg 0.87% 20%);
        border: 4px solid hsl(0deg 0.87% 10%);
        border-radius: 30px;
        cursor: pointer;
    }
    .item-preview-body::-webkit-scrollbar-thumb:hover
    {
        background: hsl(0deg 0.87% 30%);
    }
    .item-preview-body::-webkit-scrollbar-button
    {
        display: none;
    }
    .item-preview-photo
    {
        height: unset;
        margin: unset;
        border-radius: 3px;
        background: transparent;
        padding: unset;
        width: 100%;
        max-width: min-content;
    }
    .item-preview-price 
    {
        margin: 23px 5px 23px auto;
    }
    .item-preview-stats
    {
        grid-row: auto;
        width: 350px;
        min-width: 350px;
        margin: 0 0 20px 0;
        flex: 0 0 49%;
        width: auto;
    }
    .item-preview-stats-name
    {
        height: 15px;
    }
    .gallery-cap
    {
        display: none;
    }
    .item-preview-stats-other-element
    {
        padding: 5px 15px;
        margin: 3px 0;
        margin-right: 10px;
        height: 60px;
        width: auto;
    }
    .item-preview-photo-fullscreen
    {
        height: 100vh;
        width: 100vw;
    }
    .item-preview-photo-fullscreen .gallery-container
    {
        height: 100vh;
    }
    .item-preview-photo-fullscreen img
    {
        align-items: center;
    }
    .item-preview-stats-other
    {
        min-width: 400px;
        justify-content: start;
    }
    .list-showcase-item-details-nest
    {
        left: 2vw;
        top: 180px;
        transform: none;
        padding: unset;
        margin: 0;
        width: 169px;
        height: 300px;
        border-radius: 2px;
    }
    .list-showcase-item-details-nest div
    {
        display: none;
    }
    .list-showcase-item-details-nest .list-showcase-img
    {
        display: block;
    }
}

@media screen and (min-width: 745px)
{
    .item-preview-stats-container
    {
        display: flex;
        justify-content: space-between;
    }
}

@media screen and (min-width: 1015px)
{
    .item-preview-body
    {
        grid-template-columns: min-content minmax(auto, min-content);
        grid-template-areas: 
            "stats photo"
            "stats order"
            "stats hr"
            "stats descr";
    }
    .item-preview-stats-container
    {
        display: block;
    }
    .item-preview-stats
    {
        width: 350px;
    }
    .list-showcase-item-details-nest
    {
        left: calc(370px + 2vw);
    }
}
