#lightbox-buy-now {
    z-index: 1000; /* For compatibility with the "photoTriangleWhiteRightShorter" */
    display: flex;
    visibility: hidden;
    position: fixed;
    padding-top: 100px;
    padding-bottom: 100px;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    transition: opacity 1s;
    opacity: 0;
}

 #lightbox-content {
    background-color: #ebebeb;
    margin: auto;
    padding-left: 50px;
    padding-right: 50px;
    padding-bottom: 50px;
    /*transform: translate(0, -100%);*/
    transition: transform 0.9s ease-in, opacity 0.9s;
    opacity: 0;
}

.textBuyNowContainer {
    display: inline-block;
    margin-top: 30px;
    margin-left: 30px;
    margin-bottom: 30px;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 21px;
    color: #333333;
}

.closeBuyNow {
    color: white;
    position: absolute;
    top: 0;
    background-color: #ff6600;
    right: 0;
    font-size: 40px;
    font-weight: bold;
    z-index: 99;
    border: 7px solid #FF6600;
}

.closeBuyNow:hover, .closeBuyNow:focus {
    color: #999;
    text-decoration: none;
    cursor: pointer;
}

.closeBuyNow:hover, .closeBuyNow:focus {
    color: #999;
    text-decoration: none;
    cursor: pointer;
}

.bricks-container{
    display: grid;
    gap: 50px;
}

.one-brick.bricks-container{
    display: flex;
}

.one-brick > .buy-now-brick{
    height: 440px;
    width: 355px;
    margin-left: auto;
    margin-right: auto;
}

.two-bricks.bricks-container{
    grid-template-rows: 440px;
    grid-template-columns: 355px 355px;
}

.three-bricks.bricks-container{
    grid-template-rows: 440px;
    grid-template-columns: 355px 355px 355px;
}

.four-bricks.bricks-container{
    grid-template-rows: 440px 440px;
    grid-template-columns: 355px 355px;
}


.brick-0 {
    grid-column: 1 / span 1;
    grid-row: 1 / span 1;
}

.brick-1 {
    grid-column: 2 / span 1;
    grid-row: 1 / span 1;
}

.three-bricks.brick-2 {
    grid-column: 1 / span 1;
    grid-row: 3 / span 1;
}

.four-bricks.brick-2 {
    grid-column: 1 / span 1;
    grid-row: 2 / span 1;
}

.brick-3 {
    grid-column: 2 / span 1;
    grid-row: 2 / span 1;
}

@media (max-width: 1310px) and  (min-width: 860px){
    .three-bricks.bricks-container{
        grid-template-rows: 440px 440px;
        grid-template-columns: 150px 150px 150px 150px;
    }

    .three-bricks .brick-0 {
        grid-column: 1 / span 2;
        grid-row: 1 / span 1;
    }
    
    .three-bricks .brick-1 {
        grid-column: 3 / span 2;
        grid-row: 1 / span 1;
    }
    
    .three-bricks .brick-2 {
        grid-column: 2 / span 2;
        grid-row: 2 / span 1;
    }
    
}

@media (max-width: 860px){
    #lightbox-buy-now {
        padding-bottom: 40px;
    }

    #lightbox-content{
        width: 95%;
        margin-left: 2.5%;
        margin-right: 2.5%;
        padding-left: 0;
        padding-right: 0;
        padding-bottom: 20px;
        margin-bottom: 30px;
    }

    .textBuyNowContainer {
        position: initial;
        margin-left: 20px;
        margin-top: 20px;
    }

    .bricks-container{
        display: flex;
        flex-direction: column;
        margin-left: 2%;
        margin-right: 2%;
        margin-top: 20px;
        padding-bottom: 25px;
        gap: initial;
    }
    
    .buy-now-brick,
    .one-brick > .buy-now-brick{
        height: 490px;
        width: 100%;
        max-width: 430px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 25px;
    }
}
