.product-modal.modal {
    width: calc(100% - 20px);
    max-width: 900px;
    border-radius: 8px;
    background-color: #ffffff;
    padding: 0;
}

.product-modal.cheaper-modal {
    max-width: 900px;
}

.product-modal-heading {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #F0F0F0;
    padding: 15px 30px;
}

.product-modal-heading__title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    color: #222222;
    margin: 0;
}

.product-modal-heading__close-btn {
    width: 24px;
    height: 24px;
    background-color: transparent;
    padding: 0;
    border: none;
}

.product-modal-heading__close-btn.modal-close {
    position: relative;
    top: 0;
    right: 0;
}

.product-modal-heading__close-btn::before,
.product-modal-heading__close-btn::after {
    position: absolute;
    content: '';
    width: 16px;
    height: 1px;
    top: 15px;
    left: 5px;
    background-color: #222222;
}

.product-modal-heading__close-btn::before {
    transform: rotate(45deg);
}

.product-modal-heading__close-btn::after {
    transform: rotate(-45deg);
}

.product-modal-heading__close-btn:hover::before,
.product-modal-heading__close-btn:hover::after {
    background-color: #00AFFF;
}

/* Content */

.product-modal-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
    background-color: #FAFAFA;
    padding: 15px 30px;
}

.product-modal-column {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-modal-inner-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #F0F0F0;
    padding: 0 0 15px 0;
}

.product-modal-form__btn {
    display: none;
    font-family: var(--font-harmonia);
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    background: transparent;
    border: none;
    color: #00AFFF;
    padding: 0;
}
/* How-work */
.inner-content-block {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    max-width: 550px;
    border-radius: 8px;
    gap: 15px;
    border-radius: 8px;
    padding: 15px;
}

.how-work {
    border-radius: 8px;
    background-color: #ffffff;
    padding: 15px;
    
}

.how-work__title {
    color: #222222;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    margin: 0;
}

.how-work-stages {
    display: flex;
    flex-direction: column;
    gap: 15px;

    list-style: none;
    padding: 15px 0 0;
    margin: 0;
    counter-reset: stage 0;
}

.how-work-stage {
    position: relative;
    counter-increment: stage 1;
    display: flex;
    flex-direction: column;
    gap: 5px;

    border-radius: 8px;
    background-color: #FAFAFA;
    padding: 19px 15px 8px 43px;
}

.how-work-stage::before {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 9px;
    font-weight: 400;
    top: 20px;
    left: 18px;
    width: 14px;
    height: 14px;
    background-color: #222;
    color: white;
    content: counter(stage);
}

.how-work-stage__title {
    color: #222222;    
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    margin: 0;
}

.how-work-stage__descr {
    color: rgba(34,34,34,0.5);  
    font-size: 14px;
    line-height: 21px;
    margin: 0;
}

.cheaper-helper .how-work-stage {
    padding: 15px;
}

.cheaper-helper .how-work-stage::before,
.cheaper-helper .how-work-stage__descr {
    display: none;
}

.product-modal-content--cheaper {
    grid-template-columns: 1fr 380px;
}

/*  .product-modal-content--cheaper .product-modal-info {
    grid-area: item;
}

.product-modal-content--cheaper .product-modal-left-column {
    grid-area: form;
}

.product-modal-content--cheaper .product-modal-right-column {
    grid-area: helper;
} */


/* advantages */

.one-click-advantages {
    grid-area: 3 / 2 / 3 / 3;
    display: grid;
    grid-template-columns: auto auto;
    background-color: #fff;
    border-radius: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.one-click-advantage {
    display: grid;
    grid-template-columns: 20px auto;
    gap: 8px;
    padding: 15px;
}

.one-click-advantage:first-child {
    border-right: 1px solid #F0F0F0;
}

.one-click-advantage:last-child {
    grid-area: 2 / 1 / 3 / -1;
    border-top: 1px solid #F0F0F0;
}

.one-click-advantages__logo {
    width: 20px;
    grid-area: 1 / 1 / 3 / 2;
    margin: auto;
}

.one-click-advantages__title {
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    color: #222222;
    margin: 0;
}

.one-click-advantages__descr {
    font-size: 14px;
    line-height: 1;
    color: rgba(34,34,34,0.5);
    grid-area: 2 / 2 / 3 / 3;
    margin: 0;
}

/* Product */

.product-modal-info {
    display: grid;
    grid-template-columns: 78px auto auto;
    grid-template-areas: "photo info price";
    background-color: #ffffff;
    gap: 15px;
    border-radius: 8px;
    padding: 15px;
}

.product-modal-info__img {
    width: 78px;
    height: 60px;
    grid-area: photo;
    background: white;
}

.product-modal-main-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    grid-area: info;
}

.product-modal-main-info__title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    color: #222222;
    margin: 0;
}

.product-modal-price {
    grid-area: price;
    margin: auto 0 auto auto;
}

/* Form */
.product-modal-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-radius: 8px;
    background-color: #ffffff;
    padding: 15px;
}

.product-modal-form__title {
    color: #222222;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    margin: 0;
}

.product-modal-form__text {
    color: #222222;
    font-size: 16px;
    text-align: center;
    font-weight: 400;
    line-height: 21px;
    margin: 0;
}

.form-buy-one-click,
.cheaper-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-input-group {
    display: grid;
    grid-template-columns: auto auto;
    gap: 10px;
}

.form-input-group--captcha {
    grid-template-columns: 180px auto;
}

.form-input-block {
    width: 100%;
    position: relative;
}

.form-input-block__input,
.form-input-block__textarea {
    width: 100%;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    border-radius: 8px;
    background-color: #ffffff;
    border: 1px solid #F0F0F0;
    color: #222222;
    padding: 14px;
}

.form-input-block__input:focus,
.form-input-block__textarea:focus {
    outline: 1px solid  #00AFFF;
}

.form-input-block__input.captcha-word-field {
    width: 100%;
}

.form-input-block__textarea {
    max-height: 45px;
    resize: none;
    font-family: var(--font-harmonia);
}

.form-input-block__input::placeholder,
.form-input-block__textarea::placeholder {
    font-family: var(--font-harmonia);
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    color: rgba(34,34,34,0.5);
}

.form-buy-one-click button[type="submit"],
.cheaper-form input.button_primary {
    width: 100%;
    font-size: 16px;
    font-weight: 600;
    text-transform: none;
    height: 56px;
    border-radius: 8px;
    background-color: #222222;
    border: 1px solid #222222;
}

.form-buy-one-click button[type="submit"]:hover {
    background-color: #ffffff;
    color: #222222;
}

.form-buy-one-click .check__field:checked+.check__box {
    background-color: #222222;
    border-color: #222222;
}

.form-input-block .js-validate-error-field {
    color: #ed4261 !important;
    border: 1px solid #ed4261 !important;
}

.form-input-block .js-validate-error-label {
    color: #ed4261 !important;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    padding: 10px 0 0;
}

.form-input-block .js-validate-error-label::before {
    position: absolute;
    content: '!';
    width: 20px;
    height: auto;
    background-color: #ed4261;
    border-radius: 50%;
    color: #fff;
    top: 15px;
    right: 15px;
    display: flex;
    justify-content: center;
    padding: 4px 0 2px 0;
}

.cheaper-success {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 10px;
    height: 100%;
}

@media(max-width: 1024px) {
    .product-modal-content {
        grid-template-columns: auto;
    }

    .product-modal-column {
        max-width: 100%;
    }

    .product-modal-left-column {
        max-width: 100%;
    }

    .product-modal-form__btn {
        display: block;
    }

    .column-helper {
        display: none;
    }

    .product-modal-content {
        display: flex;
        flex-direction: column;
    }

    .product-modal-column {
        max-width: 100%;
    }

    .how-work-stages {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow: scroll; 
    }

    .cheaper-helper  .how-work-stages {
        flex-direction: column;
        flex-wrap: wrap;
        overflow: visible;
    }

    .cheaper-helper .how-work-stage {
        max-width: 100%;
    }

    .how-work-stage {
        max-width: 300px;
        flex-shrink: 0;
    }

    .one-click-advantages {
        display: flex;
        flex-direction: column;
    }

    .one-click-advantage {
        padding: 10px;
    }

    .one-click-advantage:first-child,
    .one-click-advantage:last-child {
        border: none;
    }

    .one-click-advantage:nth-child(2) {
        border-top: 1px solid #F0F0F0;
        border-bottom: 1px solid #F0F0F0;;
    }

    #recapturePlace_oneclickbuy,
    #recapturePlace_cheaperDetail {
        transform: scale(0.8);
        margin: -10px auto 0;
    }
    
}

@media(max-width: 767px) {
    .product-modal.modal:not(.individual-production-container) {
        width: calc(100% - 20px);
        height: auto;
        border-radius: 8px;
        padding: 0;
    }

    .product-modal-heading {
        padding: 15px;
    }

    .product-modal-heading__title {
        font-size: 16px;
        font-weight: 600;
    }

    .product-modal-content {
        padding: 10px;
    }

    .product-modal-column {
        gap: 10px;
    }

    .product-modal-info {
        grid-template-columns: 60px auto;
        grid-template-areas:
            "photo info"
            "photo price";
        gap: 4px 8px;
    }

    .product-modal-info__img {
        width: 60px;
        height: 60px;
    }

    .form-buy-one-click {
        gap: 10px;
    }

    .form-buy-one-click button[type="submit"] {
        height: 45px;
    }

    #recapturePlace_oneclickbuy {
        margin: 0 auto;
    }

    .form-buy-one-click .check__label {
        font-size: 12px;
    }

    .form-input-block__input, 
    .form-input-block__textarea {
        padding: 10px;
    }

    .product-modal-heading__close-btn.modal-close {
        width: 24px;
        height: 16px;
    }

    .product-modal-heading__close-btn::before,
    .product-modal-heading__close-btn::after {
        top: 8px;
    }

    .product-modal-main-info__title {
        font-size: 14px;
    }

    .product-modal-price {
        margin: 0;
    }

    .product-modal-price .product-price {
        font-size: 16px;
    }

    .product-main-info-rating {
        display: none;
    }
}