.customer-reviews {
    position: relative;
}

.customer-reviews:before {
    content: "";
    width: 75px;
    height: 195px;
    border-radius: 24px;
    background: var(--black-color-5);
    position: absolute;
    bottom: 20px;
    right: -24px;
    z-index: -1;
}

.customer-reviews:after {
    content: "";
    width: 75px;
    height: 195px;
    border-radius: 24px;
    background: var(--black-color-5);
    position: absolute;
    left: -24px;
    bottom: 7px;
    z-index: -1;
}

.head-customer-reviews {
    width: 22.5%;
    background: var(--white-color);
    border-radius: 24px;
    padding: 8px;
}

.head-customer-reviews .inner {
    height: 100%;
    border-radius: 16px;
    background: linear-gradient(var(--white-color), var(--white-color)) padding-box,
    linear-gradient(270deg, var(--black-color-10) 0%, transparent 30%) border-box;
    border-top: 1px solid transparent;
    border-right: 1px solid transparent;
    border-bottom: 1px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.head-customer-reviews .inner:before {
    content: "";
    width: 298px;
    aspect-ratio: 1 / 1;
    background: linear-gradient(to top, #303030 0%, rgba(48, 48, 48, .3) 11%, transparent 20%);
    border-radius: 100%;
    position: absolute;
    top: -80%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.1;
    mix-blend-mode: multiply;
}

.head-customer-reviews img {
    margin: 16px auto;
    display: block;
    z-index: 2;
    width: auto;
    height: 96px;
}

.head-customer-reviews .text {
    width: 100%;
    text-align: center;
    padding: 20px 30px 30px;
    position: relative;
}

.head-customer-reviews .inner .text:before {
    content: "";
    width: 16px;
    height: 24px;
    background-color: var(--black-color-10);
    mask-image: url(../img/flower2.svg);
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.head-customer-reviews .inner .text:after {
    content: "";
    width: 16px;
    height: 24px;
    background-color: var(--black-color-10);
    mask-image: url(../img/flower2.svg);
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%) scaleX(-1);
}

.head-customer-reviews .text .title {
    font-size: 20px;
    font-weight: bold;
    line-height: 28px;
    color: var(--black-color);
    display: block;
    margin: 0;
}

.head-customer-reviews .text .subtitle {
    font-size: 14px;
    font-weight: 400;
    line-height: 19px;
    color: var(--black-color-70);
    display: block;
    margin: 0;
}

.head-customer-reviews .text-wrap {
    display: none;
}

.head-customer-reviews-text {
    width: 28.5%;
    padding: 26px 0;
}

.head-customer-reviews-text .text-wrap {
    padding: 36px 24px;
    font-size: 14px;
    font-weight: 300;
    line-height: 21px;
    color: var(--black-color-70);
    border-top: 1px solid var(--black-color-5);
    border-bottom: 1px solid var(--black-color-5);
    height: 100%;
}

.body-customer-reviews {
    width: 49%;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    position: relative;
}

.body-customer-reviews:before {
    content: "";
    width: calc(100% - 26px);
    height: 1px;
    background: var(--black-color-5);
    position: absolute;
    top: 26px;
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
}

.body-customer-reviews:after {
    content: "";
    width: calc(100% - 26px);
    height: 1px;
    background: var(--black-color-5);
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
}

.body-customer-reviews .review-box {
    width: calc(50% - 12px);
    height: 100%;
    background: var(--white-color);
    border-radius: 24px;
    position: relative;
    text-align: center;
    transition: all .3s ease-in-out;
}

.body-customer-reviews .review-box .bg-top:before {
    content: "";
    width: 73px;
    height: 16px;
    border-radius: 16px 16px 0 0;
    position: absolute;
    top: -8px;
    right: 50%;
    background: var(--black-color-5);
    z-index: -1;
}

.body-customer-reviews .review-box .bg-top:after {
    content: "";
    width: 73px;
    height: 16px;
    border-radius: 16px 16px 0 0;
    position: absolute;
    top: -8px;
    left: 50%;
    background: var(--black-color-5);
    z-index: -1;
}

.body-customer-reviews .review-box:hover .bg-top:before {
    background: var(--sec-color);
}

.body-customer-reviews .review-box:hover .bg-top:after {
    background: var(--main-color);
}

.body-customer-reviews .review-box:hover:after {
    content: "";
    width: 80px;
    height: 80px;
    border-radius: 100%;
    background: var(--black-color);
    opacity: 0.4;
    filter: blur(22px);
    position: absolute;
    left: 23px;
    bottom: -7px;
    z-index: -1;
}

.body-customer-reviews .review-box img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 100%;
    border: 4px solid var(--white-color);
    margin: -20px auto 0;
}

.body-customer-reviews .review-box .name-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    margin-bottom: 8px;
}

.body-customer-reviews .review-box .name-box .name {
    display: inline-block;
    font-size: 16px;
    line-height: 21px;
    font-weight: bold;
    color: var(--black-color);
}

.body-customer-reviews .review-box .name-box .title {
    /*display: flex;*/
    /*align-items: center;*/
    /*justify-content: center;*/
    height: 21px;
    font-size: 14px;
    line-height: 16px;
    font-weight: 300;
    color: var(--main-color);
    background: var(--main-color-10);
    padding: 0 10px;
    border-radius: 8px;
}

.body-customer-reviews .review-box .text {
    margin: 0 16px 30px;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 300;
    line-height: 21px;
    color: var(--black-color-70);
    border: 1px solid var(--black-color-5);
    border-radius: 16px;
    text-align: justify;
    position: relative;
}

.body-customer-reviews .review-box .text:before {
    content: "";
    border: 12px solid var(--black-color-10);
    border-top-color: transparent;
    border-left-color: transparent;
    border-bottom-color: transparent;
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    transition: all .3s ease-in-out;
}

.body-customer-reviews .review-box .btn {
    width: 62px;
    height: 43px;
    position: absolute;
    left: 8px;
    bottom: 8px;
}

.body-customer-reviews .review-box .btn.like path {
    fill: var(--sec-color);
}

.body-customer-reviews .review-box .btn.like path[fill=none] {
    fill: transparent;
}

.body-customer-reviews .review-box .btn.like:hover path[fill=none] {
    fill: var(--white-color);
}

.body-customer-reviews .review-box:before {
    content: "";
    width: 21px;
    height: 21px;
    background: var(--black-color-5);
    border-radius: 10px 0;
    position: absolute;
    transform: translateY(-50%) rotate(45deg);
    z-index: -1;
}

/*.body-customer-reviews .swiper-slide:first-child .review-box:before {*/
/*    top: calc(50% - 10px);*/
/*    left: -12px;*/
/*}*/

/*.body-customer-reviews .swiper-slide:last-child .review-box:before {*/
/*    top: calc(50% + 10px);*/
/*    right: -12px;*/
/*}*/



@media (max-width: 1199px) {
    .head-customer-reviews .inner:before {
        top: -65%;
    }

    .head-customer-reviews {
        width: 23%;
    }

    .head-customer-reviews-text {
        width: 27%;
    }

    .head-customer-reviews .text {
        padding: 20px 0 30px;
    }

    .head-customer-reviews .inner .text:after {
        left: 10px;
    }

    .head-customer-reviews .inner .text:before {
        right: 10px;
    }
}

@media (max-width: 991px) {
    .head-customer-reviews .inner:before {
        top: -75%;
    }

    .head-customer-reviews {
        width: 50%;
    }

    .head-customer-reviews-text {
        width: 50%;
    }

    .customer-reviews-no-text .head-customer-reviews{
        width: 100%;
    }

    .body-customer-reviews {
        width: 100%;
        margin-top: 24px;
    }

    .head-customer-reviews-text .text-wrap {
        border-left: 1px solid var(--black-color-5);
        border-radius: 16px;
    }

    .body-customer-reviews:before,
    .body-customer-reviews:after,
    .customer-reviews:before,
    .customer-reviews:after {
        display: none;
    }
}

@media (max-width: 767px) {
    .body-customer-reviews .review-box .bg-top:before,
    .body-customer-reviews .review-box:before,
    .head-customer-reviews .inner .text:before,
    .head-customer-reviews .inner:before,
    .head-customer-reviews-text {
        display: none;
    }

    .head-customer-reviews {
        width: 100%;
        padding: 0;
    }

    .head-customer-reviews .text-wrap {
        width: 100%;
        display: block;
        padding: 9px 42px 36px;
        font-size: 14px;
        font-weight: 300;
        line-height: 21px;
        color: var(--black-color-70);
    }

    .head-customer-reviews .inner {
        padding: 0;
        border: 0;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .head-customer-reviews .inner img {
        margin: -19px 9px 0 0;
        width: 90px;
        height: auto;
    }

    .head-customer-reviews .inner .text {
        width: calc(100% - 99px);
        padding: 21px 15px 25px 32px;
        text-align: right;
    }

    .head-customer-reviews .inner .text:after {
        left: 16px;
    }

    .head-customer-reviews .text .title {
        font-size: 16px;
    }

    .body-customer-reviews {
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 16px;
    }

    .body-customer-reviews .review-box {
        width: 100%;
        height: auto;
    }

    .body-customer-reviews .review-box .text {
        width: 100%;
        border: 0;
    }

    .body-customer-reviews .review-box .bg-top:after {
        transform: translateX(-50%);
        background: var(--main-color);
    }

    .body-customer-reviews .review-box:last-child .bg-top:after {
        background: var(--sec-color);
        top: unset;
        bottom: -8px;
        border-radius: 0 0 16px 16px;
    }

    .body-customer-reviews .review-box {
        padding-top: 8px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .body-customer-reviews .review-box img {
        margin: 0;
    }

    .body-customer-reviews .review-box .name-box {
        margin: 0;
        gap: 8px;
    }
}

/* Optional reviews layout; default spacing matches the original widget. */
.beauty-no-header .head-customer-reviews {
    display: none !important
}

.beauty-no-intro .head-customer-reviews-text, .beauty-no-intro .head-customer-reviews .text-wrap {
    display: none !important
}

.beauty-adaptive-widget .customer-reviews > .d-flex {
    gap: 0;
}

.beauty-adaptive-widget.beauty-no-intro .customer-reviews > .d-flex {
    gap: 16px
}

.beauty-adaptive-widget .body-customer-reviews {
    display: block;
    min-width: 0;
    flex: 1
}

.body-customer-reviews .beauty-items-swiper {
    min-width: 0;
    padding: 24px 0 0;
    margin-top: -24px;
    isolation: isolate;
    height: calc(100% + 24px);
}

.customer-reviews-has-pagination .body-customer-reviews,
.customer-reviews-has-pagination .body-customer-reviews .beauty-items-swiper{
    position: unset;
}

.customer-reviews .swiper-horizontal>.swiper-pagination-bullets,
.customer-reviews .swiper-pagination-bullets.swiper-pagination-horizontal{
    bottom: -34px;
}

.body-customer-reviews .beauty-items-swiper > .swiper-wrapper {
    align-items: stretch
}

.body-customer-reviews .beauty-items-swiper > .swiper-wrapper > .swiper-slide {
    height: auto;
    min-width: 0;
    isolation: isolate
}

.body-customer-reviews .swiper-slide > .review-box {
    width: 100%;
    height: 100%;
    z-index: auto;
    transform: none
}

.body-customer-reviews.beauty-items-grid {
    display: grid;
    grid-template-columns:repeat(var(--beauty-default-columns, 2), minmax(0, 1fr));
    gap: 24px
}

.body-customer-reviews.beauty-items-grid > .review-box {
    width: 100%
}

.beauty-adaptive-widget .review-box:before, .beauty-adaptive-widget .review-box:after {
    content: none !important
}

.beauty-adaptive-widget .review-box.beauty-review-first:before, .beauty-adaptive-widget .review-box.beauty-review-middle:before, .beauty-adaptive-widget .review-box.beauty-review-middle:after, .beauty-adaptive-widget .review-box.beauty-review-last:before {
    content: "" !important;
    position: absolute;
    width: 21px;
    height: 21px;
    background: var(--black-color-5);
    border-radius: 10px 0;
    top: calc(50% - 10px);
    bottom: auto;
    filter: none;
    opacity: 1;
    transform: translateY(-50%) rotate(45deg);
    z-index: -1
}

.beauty-adaptive-widget .review-box.beauty-review-first:before, .beauty-adaptive-widget .review-box.beauty-review-middle:before {
    left: -12px;
    right: auto;
    top: calc(50% + 10px);
}

.beauty-adaptive-widget .review-box.beauty-review-last:before, .beauty-adaptive-widget .review-box.beauty-review-middle:after {
    right: -12px;
    left: auto
}

@media (max-width: 991px) {
    .beauty-adaptive-widget .body-customer-reviews {
        flex-basis: 100%
    }

    .body-customer-reviews.beauty-items-grid {
        grid-template-columns:repeat(2, minmax(0, 1fr))
    }
}

@media (max-width: 767px) {
    .body-customer-reviews.beauty-items-grid {
        grid-template-columns:1fr
    }

    .beauty-adaptive-widget .review-box:before, .beauty-adaptive-widget .review-box:after {
        display: none !important
    }
}
