.product-reviews {
    position: relative;
    width: 100%;
    padding: 28px;
    border: 1px solid #e1e5ea;
    border-radius: 12px;
    background: #fff;
    box-sizing: border-box;
}

.product-reviews *,
.review-dialog * {
    box-sizing: border-box;
}

.product-reviews__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.product-reviews__title {
    margin: 0;
    color: #111827;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
}

.product-reviews__write {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border: 0;
    color: var(--bv-color-button);
    background: transparent;
    font: inherit;
    cursor: pointer;
    outline: none;
    font-family: var(--bv-font-family);
}

.product-reviews__write:hover {
    color: var(--bv-color-button-hover);
}

.product-reviews__body {
    display: grid;
    grid-template-columns: 265px minmax(0, 1fr);
    gap: 28px;
    align-items: stretch;
}

.reviews-summary {
    min-width: 0;
}

.reviews-summary__main {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.reviews-summary__value {
    color: #090d14;
    font-size: 52px;
    font-weight: 700;
    line-height: 1;
}

.reviews-summary__rating {
    min-width: 0;
}

.reviews-summary__caption {
    margin-top: 5px;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.4;
}

.review-stars {
    --rating: 0;
    --star-size: 19px;
    position: relative;
    display: inline-block;
    width: calc(var(--star-size) * 5);
    height: var(--star-size);
    overflow: hidden;
    font-size: var(--star-size);
    line-height: 1;
    letter-spacing: 0;
    vertical-align: middle;
}

.review-stars::before {
    display: block;
    content: "★★★★★";
    background: linear-gradient(
        90deg,
        #ff9d00 0%,
        #ff9d00 calc(var(--rating) / 5 * 100%),
        #dfe3e8 calc(var(--rating) / 5 * 100%),
        #dfe3e8 100%
    );
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
}

.review-stars--large {
    --star-size: 22px;
}

.rating-distribution {
    display: grid;
    gap: 11px;
}

.rating-distribution__row {
    display: grid;
    grid-template-columns: 14px 16px minmax(80px, 1fr) 30px;
    gap: 7px;
    align-items: center;
    color: #4b5563;
    font-size: 13px;
}

.rating-distribution__number {
    text-align: right;
}

.rating-distribution__star {
    color: #ff9d00;
    font-size: 15px;
}

.rating-distribution__track {
    display: block;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf0f3;
}

.rating-distribution__progress {
    display: block;
    height: 100%;
    min-width: 0;
    border-radius: inherit;
    background: #ff9d00;
}

.rating-distribution__count {
    text-align: right;
}

.reviews-content {
    position: relative;
    min-width: 0;
}

.reviews-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(270px, 31%);
    gap: 12px;
    min-width: 0;
    overflow-x: auto;
    padding: 1px 2px 12px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.reviews-track::-webkit-scrollbar {
    display: none;
}

.review-card {
    min-width: 0;
    min-height: 230px;
    padding: 18px;
    border: 1px solid #dde2e8;
    border-radius: 9px;
    background: #fff;
    scroll-snap-align: start;
}

.review-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.review-card__author {
    overflow: hidden;
    color: #111827;
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.review-card__date {
    flex: 0 0 auto;
    color: #6b7280;
    font-size: 12px;
    white-space: nowrap;
}

.review-card .review-stars {
    display: block;
    margin-bottom: 16px;
}

.review-card__text {
    margin-bottom: 14px;
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
}

.review-card__property {
    margin-top: 10px;
    color: #374151;
    font-size: 13px;
    line-height: 1.45;
}

.review-card__property-title {
    display: inline;
    color: #111827;
}

.review-card__property-text {
    display: inline;
}

.reviews-arrow {
    position: absolute;
    z-index: 3;
    top: 0;
    bottom: 0;
    margin: auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    padding: 0;
    border: none;
    border-radius: 50%;
    color: #fff;
    background: transparent;
    font-size: 0;
    line-height: 1;
    cursor: pointer;
    outline: none;
}

.reviews-arrow:after {
    content: "";
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #1d1d1f;
    z-index: -1;
    position: absolute;
    margin: auto;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transition-duration: 300ms;
}

.reviews-arrow svg {
    position: relative;
    z-index: 20;
}

.reviews-arrow--previous .icon {
    transform: rotate(180deg);
}

.reviews-arrow:hover:after {
    background: var(--bv-color-button-hover);
}

.reviews-arrow--previous {
    left: -14px;
}

.reviews-arrow--next {
    right: -14px;
}

.reviews-expand {
    margin-top: 24px;
    text-align: center;
}

.product-reviews.is-expanded .reviews-track {
    grid-auto-flow: row;
    grid-auto-columns: initial;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
    scroll-snap-type: none;
}

.product-reviews.is-expanded .reviews-arrow {
    display: none;
}

.reviews-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 230px;
    padding: 30px;
    border: 1px dashed #d6dce3;
    border-radius: 9px;
    color: #6b7280;
    text-align: center;
    outline: none;
}

.review-dialog {
    width: min(620px, calc(100% - 32px));
    max-height: calc(100vh - 40px);
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.review-dialog::backdrop {
    background: rgba(15, 23, 42, 0.58);
}

.review-dialog__inner {
    position: relative;
    max-height: calc(100vh - 40px);
    padding: 30px;
    overflow-y: auto;
}

.review-dialog__title {
    margin: 0 45px 24px 0;
    color: #111827;
    font-size: 24px;
    line-height: 1.3;
}

.review-dialog__close {
    position: absolute;
    top: 14px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    color: #4b5563;
    background: transparent;
    font-size: 31px;
    line-height: 1;
    cursor: pointer;
    outline: none;
}

.review-dialog__close:hover {
    color: #111827;
}

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

.review-form__field {
    margin: 0;
}

.review-form__label {
    display: block;
    margin-bottom: 7px;
    color: #111827;
    font-size: 14px;
    font-weight: 600;
}

.review-form__control {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 10px 13px;
    border: 1px solid #cfd5dc;
    border-radius: 7px;
    outline: none;
    color: #111827;
    background: #fff;
    font: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.review-form__control:focus {
    border-color: #2764ad;
    box-shadow: 0 0 0 3px rgba(39, 100, 173, 0.12);
}

.review-form__textarea {
    min-height: 90px;
    resize: vertical;
}

.review-form__error {
    display: block;
    min-height: 0;
    margin-top: 5px;
    color: #c62828;
    font-size: 12px;
}

.review-form .has-error .review-form__control {
    border-color: #c62828;
}

.review-form__actions {
    padding-top: 2px;
}

.review-form__submit {
    display: inline-flex;
    min-height: 46px;
    padding: 11px 24px;
    border: 0;
    border-radius: 7px;
    color: #fff;
    background: #174b91;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.review-form__submit:hover {
    background: #103b75;
}

.review-form__submit:disabled {
    opacity: 0.6;
    cursor: default;
}

.review-form__success {
    color: #20723b;
}

.ec-antispam {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.review-form .ec-rating {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 32px;
}

.review-form .ec-rating-description {
    font-size: 13px;
    font-weight: 500;
    color: var(--bv-color-button);
}




.review-form .ec-rating {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 32px;
}

.review-form .ec-rating-stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.review-form .ec-rating-stars span {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 30px;
    padding: 0;
    background: none !important;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        color 0.15s ease;
}

.review-form .ec-rating-stars span::before {
    content: "★";
    color: #dfe3e8;
    font-size: 27px;
    line-height: 1;
    transition: color 0.15s ease;
}

.review-form .ec-rating-stars span.active::before,
.review-form .ec-rating-stars span.active2::before {
    color: #ff9d00;
}

.review-form .ec-rating-stars span.active-disabled::before {
    color: #dfe3e8;
}

.review-form .ec-rating-stars span:focus-visible {
    border-radius: 4px;
    outline: 2px solid #2764ad;
    outline-offset: 2px;
}


@media (max-width: 1100px) {
    .reviews-track {
        grid-auto-columns: minmax(270px, 47%);
    }

    .product-reviews.is-expanded .reviews-track {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 850px) {
    .product-reviews__body {
        grid-template-columns: 1fr;
    }

    .reviews-summary {
        max-width: 360px;
    }

    .reviews-track {
        grid-auto-columns: minmax(270px, 76%);
    }
}

@media (max-width: 600px) {
    .product-reviews {
        padding: 18px;
    }

    .product-reviews__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .product-reviews__title {
        font-size: 21px;
    }

    .reviews-summary__value {
        font-size: 46px;
    }

    .reviews-track {
        grid-auto-columns: 92%;
    }

    .product-reviews.is-expanded .reviews-track {
        grid-template-columns: 1fr;
    }

    .reviews-arrow {
        display: none;
    }

    .review-dialog__inner {
        padding: 24px 18px;
    }
}