#rp-modal-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    direction: rtl;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#rp-modal-box {
    background: #fff;
    width: 90%;
    max-width: 1000px;
    margin: 50px auto;
    padding: 20px;
    border-radius: 10px;
    position: relative;
    max-height: calc(100vh - 100px); /* به جای 80% */
    overflow-y: auto;
}

body.modal-open {
    overflow: hidden;
    position: fixed!important;
    width: 100%;
}
#rp-modal-close {
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 30px;
    cursor: pointer;
    color: #333;
}


.button-89 {
    --b: 3px; /* border thickness */
    --s: .45em; /* size of the corner */
    --color: #373B44;

    padding: calc(.5em + var(--s)) calc(.9em + var(--s));
    color: var(--color);
    --_p: var(--s);
    background: conic-gradient(from 90deg at var(--b) var(--b), #0000 90deg, var(--color) 0) var(--_p) var(--_p)/calc(100% - var(--b) - 2 * var(--_p)) calc(100% - var(--b) - 2 * var(--_p));
    transition: .3s linear, color 0s, background-color 0s;
    outline: var(--b) solid #0000;
    outline-offset: .6em;
    font-size: 16px;

    border: 0;

    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    display: block;
    text-align: center;
    margin-bottom: 20px;
}

.button-89:hover,
.button-89:focus-visible {
    --_p: 0px;
    outline-color: var(--color);
    outline-offset: .05em;
    color: black!important;
    text-decoration: none!important;
}

.button-89:active {
    background: var(--color);
    color: #fff;
}

#rp-modal-content .d-flex {
    display: flex;
    flex-wrap: wrap;
}

#rp-modal-content .d-flex .col-4 {
    width: 25%;
    padding: 5px;
    box-sizing: border-box;
}

#rp-modal-content .d-flex .col-4 .product{
        border: 1px solid #d7d1d1;
        border-radius: 10px;
    overflow: hidden;
}
#rp-modal-content .d-flex .col-4 .title{
    margin: 0 auto;
    padding: .5rem 0;

}
#rp-modal-content .d-flex .col-4 hr{
    width: 100%;
    margin:0 auto;
}
#rp-modal-content .d-flex .col-4 .price{
    margin:0 auto;
    font-size: 1.2rem;
}
@media only screen and (max-width: 1024px) {
    #rp-modal-box {
        margin: 100px auto;
    }
    #rp-modal-content .d-flex .col-4 {
        width: 50%;
    }
    #rp-modal-content .d-flex .col-4 .price{
        font-size: 1rem;
    }
}