.modern-contenedor {
    margin-top: 20px;
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 20px;
    min-height: 632px;
    overflow-x: hidden;
    overflow-y: hidden;
}

.modern-contenedor .modern-card {
    width: 300px;
    border-radius: 20px;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.modern-contenedor .card-image {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    text-align: center;
    min-height: 210px;
    height: auto;
}

.modern-contenedor .card-image img {
    max-width: 100%;
    height: 300px;
    border-radius: 10px;
    width: auto;
}

.modern-contenedor .card-image .color-dis .color ul li span img{
    width: 18px;
    height: 18px;
}


.modern-contenedor .card-content {
    padding: 20px;
    min-height: 220px;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.modern-contenedor .card-content h3 {
    font-size: 17px;
    margin: 0 0 10px 0;
    color: #333;
    font-weight: 600;
    height: 50px;
    line-height: 27px;
    overflow: hidden;
    text-align: center;
}

.modern-contenedor .card-content p {
    font-size: 13px;
    line-height: 1.5;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    /* محاسبه ارتفاع بر اساس خطوط */
    height: calc(1.5em * 3); /* (line-height × تعداد خطوط) */
    max-height: calc(1.5em * 3);
    text-align: justify;
    margin: 0;
}

.modern-contenedor .card-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modern-contenedor .dot {
    height: 10px;
    width: 10px;
    background-color: #bbb;
    border-radius: 5px;
    display: inline-block;
    animation-duration: 0.5s;
    animation-timing-function: ease-in-out;
}

@keyframes dot-animation {
    from {
        background-color: #bbb;
        width: 10px;
    }
    to {
        background-color: #333;
        width: 30px;
    }
}

@keyframes dot-animation-reverse {
    from {
        background-color: #333;
        width: 30px;
    }
    to {
        background-color: #bbb;
        width: 10px;
    }
}

.modern-contenedor .active-dot {
    animation-name: dot-animation;
    background-color: var(--main-color);
    width: 30px;
}

.modern-contenedor .dot:not(.active-dot) {
    animation-name: dot-animation-reverse;
}


.modern-contenedor .buttons {
    display: flex;
    gap: 20px;
    direction: ltr;
}

.modern-contenedor .next-button {
    background-color: var(--main-color);
    color: white;
    border-radius: 5px;
    width: 40px;
    height: 40px;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.modern-contenedor .next-button:hover {
    background-color: var(--second-color);
}

.modern-contenedor .previous-button {
    background-color: #eee;
    color: #272727;
    border-radius: 5px;
    width: 40px;
    height: 40px;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.modern-contenedor .previous-button:hover {
    color: white;
    border: 1px solid #939393;
    background-color: #939393;
}

.modern-contenedor .ocultar {
    display: none;
}

.modern-contenedor .principal {
    position: absolute;
    top: 0;
    left: calc(50% - 150px);
    z-index: 10;
    transition: 0.5s;
}

.modern-contenedor .siguiente {
    pointer-events: none;
    position: absolute;
    top: 0;
    left: calc(50%);
    z-index: 8;
    transition: 0.5s;
    transform: scale(0.8) perspective(40px) rotateY(-0.5deg);
    filter: blur(3px);
}

.modern-contenedor .siguiente2 {
    pointer-events: none;
    position: absolute;
    top: 0;
    left: calc(50% + 0px);
    z-index: 6;
    transition: 0.5s;
    transform: scale(0.8) perspective(40px) rotateY(-0.5deg);
    filter: blur(8px);
}

.modern-contenedor .anterior {
    pointer-events: none;
    position: absolute;
    top: 0;
    left: calc(50% - 300px);
    z-index: 8;
    transition: 0.5s;
    transform: scale(0.8) perspective(40px) rotateY(0.5deg);
    filter: blur(3px);

}

.modern-contenedor .anterior .card-navigation .active-dot{
    display: none;
}

.modern-contenedor .anterior2 {
    pointer-events: none;
    position: absolute;
    top: 0;
    left: calc(50% - 420px);
    z-index: 6;
    transition: 0.5s;
    transform: scale(0.6) perspective(40px) rotateY(0.5deg);
    filter: blur(8px);
}

.modern-contenedor #div-transparent-previous {
    position: absolute;
    width: 250px;
    height: 100%;
    right: calc(50% + 150px);
    top: 0;
    z-index: 9;
    cursor: pointer;
}

.modern-contenedor #div-transparent-next {
    position: absolute;
    width: 250px;
    height: 100%;
    left: calc(50% + 150px);
    top: 0;
    z-index: 9;
    cursor: pointer;
}

.modern-contenedor .card-image .color-dis .discount {
    background-color: red;
    padding: 2px 5px;
    z-index: 100;
    position: relative;
    color: #fff;
    border-radius: 5px;
}