product-compare{
    position: fixed;
    bottom: 0;
    background-color: rgba(var(--color-background));
    width: 100%;
    z-index: 1200;
    height: 0;
    overflow: hidden;
    transition: height 0.5s ease-out;
}

product-compare.active{
    overflow: visible;
}

product-compare .compare-container{
    padding-block: 20px;
}
product-compare .compare-title{
    margin-bottom: 20px;
}

product-compare .compare-body{
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: space-between;
}
product-compare .compare-grid{
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 20px;
    flex-grow: 1;
}

product-compare .product-compare-item{
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    background-color: #F7F7F7;
    align-items: center;
}

product-compare .product-image{
    aspect-ratio: 1/1;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    min-width: fit-content;
}


product-compare .product-image img,
product-compare .product-image svg{
    height: auto;
    aspect-ratio: 1 / 1;
    max-width: 60px;
    width: 60px;
}

product-compare .product-info{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

product-compare .compare-button{
    min-width: fit-content;
}

product-compare .delete-button{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 20px;
    height: 20px;
    background-color: #333;
    border-radius: 50%;
    cursor: pointer;
    margin-left: auto;
    margin-bottom: auto;
}

product-compare .product-compare-item.product-empty{
    justify-content: center;
    align-items: center;
    border: 1px dashed rgba(51,51,51,0.3);
    background-color: transparent;
}

product-compare .close-button{
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #333;
    right: var(--page-padding);
    top: -20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

product-compare .compare-table-body{
    display: none;
    position: fixed;
    width: 100vw;
    height: 100vh;
    z-index: 1200;
    overflow: auto;
    top: 0;
    left: 0;
    background-color: rgba(var(--color-page-background));
    align-items: center;
    justify-content: center;
}

product-compare .compare-table-body.open{
    display: flex;
}

product-compare .product-card{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
product-compare .product-card img{
    width: 15vw;
}
product-compare .product-card .v-button{
    padding-block: 10px;
}
product-compare .comparison-table .rating{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    color: #FFC439;
}

product-compare .comparison-table .rating-stars{
    display: flex;
}

product-compare .comparison-table{
    table-layout: fixed;
    margin: 0 auto;
}
product-compare .compare-price{
    text-decoration: line-through;
}
product-compare .comparison-table tbody tr:nth-child(2n-1){
    background-color: #ffffff;
}
product-compare .comparison-table tbody tr td:not(:first-child){
    text-align: center;
}
product-compare .comparison-table td,
product-compare .comparison-table th{
    padding: 14px 20px;
    white-space: nowrap;
}

product-compare .compare-table-container{
    overflow-x: auto;
    width: 100%;
    height: 90%;
    display: flex;
}

product-compare .table-close{
    position: absolute;
    top: 20px;
    right: 20px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #333;
    cursor: pointer;
    z-index: 10;
}
product-compare .product-card-image{
    position: relative;
}
product-compare .product-card-image .product-close-button{
    position: absolute;
    top: 20px;
    right: 20px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #333;
    cursor: pointer;
}

product-compare .rating{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    color: #FFC439;
}
product-compare .rating-stars{
    display: flex;
}
@media(max-width:959px){
    product-compare .compare-body{
        flex-direction: column;
    }
    product-compare .compare-grid{
        overflow-x: auto;
        grid: auto / auto-flow 70%;
        width: 100%;
    }
    product-compare .product-card img{
        width: 150px;
    }
    product-compare .product-card-image .product-close-button{
        top: 10px;
        right: 10px;
    }
    product-compare .compare-table-container{
        display: block;
    }
}