@import url('https://fonts.googleapis.com/css2?family=Cal+Sans&family=Leckerli+One&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Roboto:ital,wght@0,100..900;1,100..900&family=Send+Flowers&display=swap');

:root{
    --background-main: #faf9f6;
    --background-sec: #F0F2F5;
    --background-third: #F7F6F3;
    --accent-black: #121212;
    --accent-gold: #CCac00;
    --box-shadow: 0px 8px 15px rgba(0.1, 0.1, 0.1, 0.1);

    --text-regular1: Roboto;
    --text-regular2: Open Sans;
    --text-bold: Cal Sans;
    --text-stylish: Leckerli One;
}

main{
    .windows-container{
        .package-window, .cart-window{
            position: relative;
            display: flex;
            flex-direction: column;
            align-content: center;
            padding: 20px 20px;
            width: 97%;
            min-height: 93%;
            overflow-y: auto;

            .close-button{
                position: absolute;
                top: 2%;
                right: 1%;
                display: flex;
                align-items: center;
                justify-content: center;
                padding: 15px 15px;
                background: rgba(87, 94, 85, .4);
                backdrop-filter: blur(10px);
                color: var(--background-third);
                box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.3);
                border: 1px solid rgba(255, 255, 255, .15);
                border-radius: 100%;
                cursor: pointer;
                transition: all .4s ease-in-out;
                svg{
                    fill:  var(--background-third);
                    transform: rotate(45deg);
                }
                &:hover{
                    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.35),
                    -0px -.1px 2px rgba(0, 0, 0, 0.15);
                }
            }
            .header{
                display: flex;
                flex-direction: column;
                align-items: center;
                span{
                    white-space: nowrap;
                    &:nth-child(1){
                        font-family: var(--text-bold);
                        font-size: 3.5rem;
                    }
                    &:nth-child(2){
                        font-size: 1rem;
                    }
                }
            }
            .grid{
                margin-top: 20px;
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
                gap: 20px;
                height: 380px;
                overflow-y: scroll;
                overflow-x:auto ;
                scrollbar-width: none;
                -webkit-scrollbar-width: none;

                .product-card{
                    display: flex;
                    flex-shrink: 0;
                    width: 100%;
                    height: 200px;
                    color: var(--background-third);
                    margin-bottom: 3%;
                    border-radius: 20px;
                    /* background: rgba(255, 255, 255, 0.05); */
                    border: 1px solid rgba(255, 255, 255, 0.45);
                    transition: all .35s ease-in-out;

                    .left{
                        width: 55%;
                        border-bottom-left-radius: 20px;
                        border-top-left-radius: 20px;

                        img{
                            width: 100%;
                            height: 100%;
                            object-fit: cover;
                            box-sizing: border-box;
                            border-bottom-left-radius: inherit;
                            border-top-left-radius: inherit;
                        }
                    }

                    .right{
                        display: flex;
                        /* justify-content: center; */
                        align-items: flex-start;
                        flex-direction: column;
                        gap: 7%;
                        padding: 8px 12px;
                        width: 45%;
                        height: 90%;
                        border-bottom-right-radius: inherit;
                        border-top-right-radius: inherit;

                        .product-name{
                            font-family: var(--text-bold);
                            font-size: 1.2rem;
                        }

                        .price ,.quantity{
                            font-size: 1rem;
                            span{
                                font-size: 1.15rem;
                            }
                        }

                        .ctas{
                            display: flex;
                            align-items: flex-end;
                            width: 100%;
                            height: 95%;

                            button{
                                display: flex;
                                align-items: center;
                                justify-content: center;
                                gap: 5px;
                                width: 110px;
                                height: 50px;
                                color: var(--accent-black);
                                white-space: nowrap;
                                font-family: var(--text-regular1);
                                font-size: .8rem;
                                background: var(--background-third);
                                font-weight: bold;
                                backdrop-filter: blur(10px);
                                -webkit-backdrop-filter: blur(10px);
                                border-radius: 20px;
                                border: 1px solid rgba(255, 255, 255, 0.2);
                                box-shadow: var(--box-shadow);
                                transition: all .4s ease-in-out;
                                cursor: pointer;
                                svg{
                                    fill: var(--accent-black);
                                    transition: .4s ease-in-out;
                                }
                                &:hover{
                                    color: var(--background-third);
                                    background: rgba(255, 255, 255, 0.35);
                                    box-shadow: 0px 1px 6px rgba(0, 0, 0, 0.15),
                                    -0px -.1px 3px rgba(0, 0, 0, 0.15);
                                    svg{
                                        fill: var(--background-third);
                                    }
                                }
                            }
                        }
                    }
                }
            }
            .package-checkout-btn, .cart-checkout-btn{
                position: sticky;
                bottom: 1%;
                left: 90%;
                width: 240px;
                height: 50px;
                color: var(--accent-black);
                white-space: nowrap;
                font-size: 1rem;
                font-weight: bold;
                background: var(--background-third);
                backdrop-filter: blur(10px);
                -webkit-backdrop-filter: blur(10px);
                border-radius: 20px;
                border: 1px solid rgba(255, 255, 255, 0.2);
                box-shadow: var(--box-shadow);
                transition: all .4s ease-in-out;
                cursor: pointer;
                &:hover{
                    color: var(--background-third);
                    background: rgba(255, 255, 255, 0.35);
                    box-shadow: 0px 1px 6px rgba(0, 0, 0, 0.15),
                    -0px -.1px 3px rgba(0, 0, 0, 0.15);
                }
            }

            /* FOR CART WINDOW */
            .cart-summary-bar{
                position: sticky;
                bottom: 1%;
                display: flex;
                align-items: center;
                justify-content: space-between;
                margin-top: auto;
                padding-left: 250px;
                background: rgba(87, 94, 85, .4);
                backdrop-filter: blur(20px);
                border-radius: 30px;

                .wrapper{
                    display: flex;
                    align-items: center;
                    justify-content: space-between;
                    height: 40px;
                    width: 320px;

                    .cart-no-container, .cart-total-container{
                        display: flex;
                        align-items: center;
                        gap: 5px;
                        span{
                            &:nth-child(1){
                                font-size: 1rem;
                            }
                            &:nth-child(2){
                                font-size: 1.2rem;
                                font-weight: bold;
                            }
                        }
                    }
                }
                .cart-checkout-btn{
                    position: unset;
                }
            }
        }
        .cart-window{
            .header{
                h2{
                    font-size: 3.8rem;
                    font-family: var(--text-bold);
                }
            }
            .grid{
                .cart-no-results-screen{
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    flex-direction: column;
                    height: 100%;
                    width: 100%;
                    font-size: 1.3rem;
                    white-space: nowrap;

                    svg{
                        margin-bottom: 50px;
                    }
                    a{
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        gap: 5px;
                        margin-top: 10px;
                        width: 140px;
                        height: 50px;
                        color: var(--accent-black);
                        text-decoration: none;
                        white-space: nowrap;
                        font-family: var(--text-regular1);
                        font-size: .8rem;
                        background: var(--background-third);
                        font-weight: bold;
                        backdrop-filter: blur(10px);
                        -webkit-backdrop-filter: blur(10px);
                        border-radius: 20px;
                        border: 1px solid rgba(255, 255, 255, 0.2);
                        box-shadow: var(--box-shadow);
                        transition: all .4s ease-in-out;
                        cursor: pointer;
                        svg{
                            margin-bottom: 0;
                            fill: var(--accent-black);
                            transition: .4s ease-in-out;
                        }
                        &:hover{
                            color: var(--background-third);
                            background: rgba(255, 255, 255, 0.35);
                            box-shadow: 0px 1px 6px rgba(0, 0, 0, 0.15),
                            -0px -.1px 3px rgba(0, 0, 0, 0.15);
                            svg{
                                fill: var(--background-third);
                            }
                        }
                    }
                }
                .product-card{
                    .right{
                        gap: 1px;
                        .ctas{
                            flex-direction: column;
                            justify-content: end;
                            gap: 5px;
                            button{
                                &:nth-child(1){
                                    width: 90px;
                                    height: 35px;
                                    color: var(--background-third);
                                    background: rgba(87, 94, 85, .4);
                                    backdrop-filter: blur(10px);
                                    -webkit-backdrop-filter: blur(10px);
                                }
                                &:nth-child(2){
                                    width: 130px;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

@media (max-width: 900px){
    main{
        .windows-container{
            .package-window, .cart-window{
                width: 88.5%;
                .close-button{
                    top: .4%;
                    right: .3%;
                }
                .header{
                    margin-top: 20px;
                    span{
                        &:nth-child(1){
                            font-size: 2.5rem;
                        }
                    }
                }
                .grid{
                    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
                    height: 550px;
                }

                .cart-summary-bar{
                    flex-direction: column;
                    padding-left: 0;
                    .wrapper{
                        justify-content: space-around;
                    }
                    .cart-checkout-btn{
                        width: 100%;
                        border-radius: inherit;
                    }
                }
            }
        }
    }
}
