.reviews__wrapper--full {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.review {
    box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.07);
    background: var(--belyy);
    width: 100%;
    padding: 15px;
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
    height: auto;
}

.review--main {
    display: grid;
    grid-template-columns: repeat(2, auto);
    grid-template-rows: repeat(2, auto);
    min-width: 320px;
    height: 230px;
}

.review__card-header {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    row-gap: 3px;
    grid-auto-flow: column;
    position: relative;
    margin: 0;
}

.review__date {
    font-weight: 500;
    font-size: clamp(15px, 12.86px + 0.36vw, 18px);
    line-height: 140%;
    color: var(--seryy);
    position: absolute;
    margin: 0 auto;
    left: 0;
    right: 0;
    top: 0;
    max-width: max-content;
}

.scrolling-cards .review__date {
    left: auto;
}

/* Figma "М. Отзывы": the date sits at the right edge of the header row */
.review--full .review__date {
    left: auto;
    right: 0;
    margin: 0;
}

.scrolling-cards.review__gallery-wr {
    gap: 5px;
}

.review__content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.grid__content--full {
    grid-template-columns: repeat(2, auto);
}

.review__author {
    font-weight: 500;
    font-size: clamp(16px, 2vw, 23px);
    line-height: 150%;
    color: var(--chernyy);
}

.review__title {
    font-weight: 700;
    font-size: clamp(15px, 13.7px + 0.33vw, 20px);
    line-height: 140%;
    color: var(--chernyy);
    margin-bottom: 3px;
}

.review__rating-wrapper {
    display: flex;
    gap: 2.5px;
    align-items: center;
}

.review__rating-wrapper--right {
    justify-self: end;
}

.review__rating-star {
    max-width: 15px;
}

.review__card-text {
    font-weight: 500;
    font-size: 15px;
    line-height: 140%;
    color: var(--chernyy);
    grid-area: 2 / 1 / 3 / 3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 8;
    overflow: hidden;
}

.review__rating-count {
    font-weight: 500;
    font-size: clamp(15px, 12.86px + 0.36vw, 18px);
    line-height: 140%;
    color: var(--seryy);
}

.review__card-text--full {
    -webkit-line-clamp: 4;
}

.review__plus {
    grid-area: 1 / 1 / 2 / 3;
}
.review__minus {
    grid-area: 2 / 1 / 3 / 3;
}

.review__gallery {
    grid-area: 3 / 1 / 4 / 2;
}

.review__gallery-wr {
    display: flex;
    gap: 5px;
    flex-wrap: nowrap;
    overflow-x: hidden;
}

.review__gallery-wr--full {
    margin: 10px 0 15px;
    overflow-x: auto;
}

.review__attachment {
    width: 55px;
    height: auto;
    flex-shrink: 0;
}

.review__link {
    grid-area: 3 / 2 / 4 / 3;
    align-self: flex-end;
}

@media (min-width: 768px) {
    .review {
        min-width: 440px;
        padding: 20px;
    }
    .reviews__wrapper--full {
        gap: 10px;
    }
    .review__card-text {
        -webkit-line-clamp: 7;
        font-size: 16px;
    }
    .review__card-header {
        row-gap: 5px;
    }
    .review__title {
        line-height: 125%;
        margin-bottom: 5px;
    }
    .review__author {
        font-weight: 600;
        line-height: 130%;
    }
    .review__gallery-wr {
        gap: 10px;
    }
    .scrolling-cards.review__gallery-wr {
        gap: 10px;
        margin: 0 0 20px;
    }
    .review__attachment {
        width: 77px;
    }
    .review__card-text--full {
        -webkit-line-clamp: inherit;
    }
    .review__rating-star {
        max-width: 20px;
    }

    .review__gallery.device__reviews-gallery {
        grid-area: 2 / 1 / 3 / 3;
        min-width: 0;
    }
}

@media (min-width: 1200px) {
    .review {
        min-width: 500px;
    }
    /* Figma "Главная": 500px cards in the scrolling row, they must not stretch to fill it */
    .scrolling-cards > .review--main {
        flex: 0 0 500px;
    }
    .review__card-text {
        -webkit-line-clamp: 6;
        font-size: 18px;
    }
    .review__rating-star {
        width: 26px;
        max-width: none;
    }
}

@media (max-width: 767px) {
    .review--main {
        height: 228px;
        row-gap: 3px;
    }
    .review__rating-wrapper {
        gap: 3px;
    }
    .review__rating-star {
        max-width: 13.74px;
    }
}

/* Real reviews (template-parts/review-card.php): opened card shows the whole text, product link under it */
.review.is-open {
    height: auto;
}

.review.is-open .review__card-text {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

.review__link {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.review__link[hidden] {
    display: none;
}

.review__product {
    grid-column: 1 / -1;
    font: 500 13px/140% var(--font-family);
    color: var(--seryy);
    text-decoration: underline;
}

.reviews__empty {
    margin: 0;
    font: 500 15px/140% var(--font-family);
    color: var(--seryy);
}

.reviews__more {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}
