.products-ele{
    /* width: 21%; */
    height: auto;
    float: left;
    padding: 1em 5%;
    /* margin: 1em 1%; */
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 0 15px 2px #0000002a;
    background-color: white;
    flex-grow: 1;
    justify-content: space-between;
    box-sizing: border-box;
}
.products-ele::before{
    content: "";
    width: 100%;
    height: 43em;
    position: absolute;
    z-index: -1;
    background-color: var(--shape);
    top: -59%;
    right: -8em;
    transform: rotate(323deg);
    transition: 0.3s;
}
.products-ele:hover::before{
    background-color: var(--more);
    transition: 0.3s;
}
.products-img{
    width: 100%;
    height: auto;
    float: left;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 10px;
}
.products-img img{
    width: 100%;
    height: auto;
    float: left;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
.products-ele h3{
    width: 100%;
    height: auto;
    float: left;
    text-align: center;
    margin: 10px 0;
    color: black;
}
.price-sec{
    width: 100%;
    height: auto;
    float: left;
    display: flex;
    flex-direction: column;
}
.price-sec span{
    width: 100%;
    height: auto;
    float: left;
    text-align: center;
    margin-bottom: 2%;
}
.off-price{
    color: var(--off);
    text-decoration: line-through;
}
.buy-btn{
    width: fit-content;
    height: auto;
    float: left;
    border: none;
    padding: 0.3em 3em;
    background-color: var(--buy-btn);
    border-radius: 7px;
    margin-top: 3%;
    cursor: pointer;
    transition: 0.4s;
    color: white;
}
.buy-btn:hover{
    color: white;
    background-color: var(--buy-btn-hover);
    transition: 0.4s;
}
.m-card-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 ستون مساوی */
  gap: 10px; /* فاصله بین باکس‌ها */
  margin: 0 auto; /* وسط‌چین کردن کل گرید */
}

@media only screen and (max-width: 900px) {
    
    .m-card-row {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
        margin: 0 auto;
        max-width: 1200px;
        padding: 20px;
    }
}
