.ms-reviews {
    padding: 28px 16px 34px;
    margin: 0;
    border-top: none !important;
    background:
        radial-gradient(circle at top left, rgba(152, 232, 59, 0.18), transparent 32%),
        linear-gradient(180deg, #f7fbf4 0%, #ffffff 100%);
    font-family: 'Inter', Arial, sans-serif;
}

.ms-reviews .venzel {
    margin-bottom: 8px;
}

.ms-reviews__top {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
}

.ms-reviews__subtitle {
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
    color: #667085;
    text-align: center;
}

.ms-review-btn {
    width: 100%;
    border: none;
    border-radius: 18px;
    padding: 15px 18px;
    background: linear-gradient(135deg, #4f8023, #98e83b);
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    font-family: 'Inter', Arial, sans-serif;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(79, 128, 35, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ms-review-btn:active {
    transform: scale(0.98);
    box-shadow: 0 6px 15px rgba(79, 128, 35, 0.25);
}

.ms-review-btn_bottom {
    display: block;

    width: 100%;
    max-width: 440px;

    margin: 18px auto 0;

    box-sizing: border-box;
}

.ms-reviews__summary {
    display: grid;
    gap: 16px;
    padding: 18px;
    margin-bottom: 14px;
    background: #ffffff;
    border: 1px solid #e7efdf;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
}

.ms-reviews__rating-box {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ms-reviews__rating {
    width: 74px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    background: #f2ffe8;
    color: #4f8023;
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
}

.ms-stars {
    color: #ffb800;
    font-size: 22px;
    letter-spacing: 1px;
    line-height: 1;
}

.ms-reviews__count {
    margin-top: 6px;
    color: #667085;
    font-size: 14px;
}

.ms-reviews__bars {
    display: grid;
    gap: 8px;
}

.ms-bar {
    display: grid;
    grid-template-columns: 18px 1fr;
    align-items: center;
    gap: 8px;
    color: #667085;
    font-size: 13px;
}

.ms-bar div {
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: #eef2f6;
}

.ms-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ffb800, #ffd76a);
}

.ms-review-tags {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 16px;
    margin-bottom: 2px;
    scrollbar-width: none;
}

.ms-review-tags::-webkit-scrollbar {
    display: none;
}

.ms-review-tags span {
    flex: 0 0 auto;
    padding: 9px 12px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #e4eadf;
    color: #344054;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(16, 24, 40, 0.05);
}

.ms-reviews__list {
    display: grid;
    gap: 14px;
}

.ms-review-card {
    padding: 16px;
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid #edf1e8;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
    text-align: left;
}

.ms-review-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ms-avatar {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(135deg, #4f8023, #98e83b);
    box-shadow: inset 0 -8px 16px rgba(0, 0, 0, 0.12);
}

.ms-review-card__name {
    color: #101828;
    font-size: 16px;
    font-weight: 900;
}

.ms-review-card__meta {
    margin-top: 3px;
    color: #667085;
    font-size: 13px;
}

.ms-review-card__rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.ms-review-card__rating span {
    color: #ffb800;
    font-size: 18px;
    letter-spacing: 1px;
}

.ms-review-card__rating b {
    color: #344054;
    font-size: 14px;
}

.ms-review-card p {
    margin: 0;
    color: #344054;
    font-size: 15px;
    line-height: 1.5;
}

.ms-review-card__footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin-top: 14px;
    color: #98a2b3;
    font-size: 13px;
}

.ms-verified {
    color: #4f8023;
    font-weight: 800;
}

.ms-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    box-sizing: border-box;
}

.ms-modal.is-open {
    display: flex;
}

.ms-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 40, 0.62);
    backdrop-filter: blur(6px);
}

.ms-modal__window {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    padding: 22px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    box-sizing: border-box;
    font-family: 'Inter', Arial, sans-serif;
}

.ms-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    padding: 0;
    margin: 0;

    border: none;
    border-radius: 50%;
    background: #f2f4f7;
    color: #344054;

    font-size: 26px;
    font-weight: 400;
    line-height: 1;
    text-align: center;

    cursor: pointer;
    box-sizing: border-box;

    transition: background 0.2s ease, color 0.2s ease;
}

.ms-modal__close:hover {
    background: #e4e7ec;
    color: #101828;
}

/* Чтобы сам символ × стоял идеально по центру */
.ms-modal__close::before {
    content: "×";
    display: block;
    margin-top: -2px;
}

.ms-modal h3 {
    margin: 0 38px 6px 0;
    color: #101828;
    font-size: 24px;
    font-weight: 900;
}

.ms-modal__text {
    margin: 0 0 18px;
    color: #667085;
    font-size: 14px;
    line-height: 1.4;
}

.ms-review-form {
    display: grid;
    gap: 14px;
}

.ms-review-form label,
.ms-review-form__rating {
    display: grid;
    gap: 7px;
    color: #344054;
    font-size: 14px;
    font-weight: 800;
}

.ms-review-form input,
.ms-review-form textarea {
    width: 100%;
    border: 1px solid #d0d5dd;
    border-radius: 14px;
    padding: 13px 14px;
    color: #101828;
    font-size: 15px;
    font-family: 'Inter', Arial, sans-serif;
    box-sizing: border-box;
    outline: none;
    background: #ffffff;
}

.ms-review-form input:focus,
.ms-review-form textarea:focus {
    border-color: #7fc241;
    box-shadow: 0 0 0 4px rgba(127, 194, 65, 0.14);
}

.ms-review-form textarea {
    min-height: 120px;
    resize: vertical;
}

.ms-rating-input {
    display: flex;
    gap: 4px;
}

.ms-rating-input button {
    border: none;
    background: transparent;
    color: #d0d5dd;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}

.ms-rating-input button.is-active {
    color: #ffb800;
}

.ms-review-submit {
    border: none;
    border-radius: 18px;
    padding: 15px 18px;
    background: linear-gradient(135deg, #4f8023, #98e83b);
    color: #fff;
    font-size: 17px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(79, 128, 35, 0.25);
}

.ms-review-form__note {
    margin: 0;
    color: #98a2b3;
    font-size: 12px;
    line-height: 1.35;
}

body.ms-modal-open {
    overflow: hidden;
}

.ms-review-media {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.ms-review-media img,
.ms-review-media video,
.ms-review-media iframe {
    width: 100%;
    border-radius: 16px;
    background: #f2f4f7;
    object-fit: cover;
    box-shadow: 0 5px 14px rgba(16, 24, 40, 0.10);
}

.ms-review-media img {
    height: 115px;
    cursor: pointer;
}

.ms-review-media video {
    height: 220px;
}

.ms-review-media iframe {
    height: 220px;
    border: none;
}

.ms-review-media__wide {
    grid-column: 1 / -1;
}

@media (max-width: 520px) {
    .ms-review-media {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ms-review-media img {
        height: 125px;
    }

    .ms-review-media video,
    .ms-review-media iframe {
        height: 210px;
    }
}

.ms-photo-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.ms-photo-modal.is-open {
    display: flex;
}

.ms-photo-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 40, 0.72);
    backdrop-filter: blur(6px);
}

.ms-photo-modal__content {
    position: relative;
    z-index: 1;
    max-width: 70vw;
    max-height: 70vh;
    animation: msPhotoZoom 0.2s ease;
}

.ms-photo-modal__content img {
    display: block;
    max-width: 70vw;
    max-height: 70vh;
    width: auto;
    height: auto;
    border-radius: 20px;
    object-fit: contain;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.ms-photo-modal__close {
    position: absolute;
    top: -18px;
    right: -18px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    padding: 0;
    margin: 0;

    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: #101828;

    font-size: 26px;
    font-weight: 400;
    line-height: 1;
    text-align: center;

    cursor: pointer;
    box-sizing: border-box;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    z-index: 2;

    transition: background 0.2s ease, color 0.2s ease;
}

.ms-photo-modal__close:hover {
    background: #f2f4f7;
    color: #000000;
}

/* Идеально центрируем сам символ × */
.ms-photo-modal__close::before {
    content: "×";
    display: block;
    margin-top: -2px;
}

body.ms-photo-open {
    overflow: hidden;
}

@keyframes msPhotoZoom {
    from {
        opacity: 0;
        transform: scale(0.94);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 640px) {
    .ms-photo-modal__content,
    .ms-photo-modal__content img {
        max-width: 92vw;
        max-height: 75vh;
    }

    .ms-photo-modal__close {
        top: -14px;
        right: -10px;
    }
}

.ms-review-upload {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ms-review-upload__label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 700;
    color: #101828;
}

.ms-review-upload__label input {
    display: none;
}

.ms-review-upload__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 11px 16px;
    border-radius: 14px;
    background: #f2f4f7;
    color: #101828;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
}

.ms-review-upload__button:hover {
    background: #e4e7ec;
}

.ms-review-upload__hint {
    color: #667085;
    font-size: 13px;
    line-height: 1.35;
}

.ms-review-upload__error {
    display: none;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff1f3;
    color: #c01048;
    font-size: 13px;
    font-weight: 700;
}

.ms-review-upload__error.is-visible {
    display: block;
}

.ms-review-upload__preview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.ms-review-file {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: #f2f4f7;
    border: 1px solid #eaecf0;
    aspect-ratio: 1 / 1;
    width: 100%;
    height: 0;
    padding-bottom: 100%;   /* квадрат — работает ВЕЗДЕ */
}

.ms-review-file img,
.ms-review-file video {
    position: absolute;      /* ← добавили absolute */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Чтобы видео в превью не было слишком шумным */
.ms-review-file video {
    background: #000;
}

.ms-review-file__remove {
    position: absolute;
    top: 6px;
    right: 6px;

    width: 24px;
    height: 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    margin: 0;

    border: none;
    border-radius: 50%;

    background: rgba(16, 24, 40, 0.82);
    color: #ffffff;

    font-size: 0;
    line-height: 0;

    cursor: pointer;
    z-index: 2;
    box-sizing: border-box;

    appearance: none;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
}

.ms-review-file__remove::before,
.ms-review-file__remove::after {
    content: "";
    position: absolute;

    left: 50%;
    top: 50%;

    width: 12px;
    height: 2px;

    background: #ffffff;
    border-radius: 999px;

    transform-origin: center;
}

.ms-review-file__remove::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.ms-review-file__remove::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.ms-review-file__type {
    display: none !important;
}

@media (max-width: 520px) {
    .ms-review-upload__preview {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
