/* ===== ОФОРМЛЕНИЕ ЗАКАЗА ===== */

.checkout-modal {
    position: fixed;
    inset: 0;
    z-index: 100150;
    visibility: hidden;
    pointer-events: none;
}

.checkout-modal.is-open {
    visibility: visible;
    pointer-events: auto;
}

.checkout-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(25,25,25,.48);
    opacity: 0;
    transition: .24s ease;
}

.checkout-modal.is-open .checkout-modal__backdrop {
    opacity: 1;
}

.checkout-modal__dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(920px, calc(100vw - 28px));
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    padding: 20px 22px;
    box-sizing: border-box;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(0,0,0,.22);
    opacity: 0;
    transform: translate(-50%, -47%);
    transition: .24s ease;
}

.checkout-modal.is-open .checkout-modal__dialog {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.checkout-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: transparent;
    font-size: 0;
    line-height: 1;
    cursor: pointer;
}

.checkout-modal__close::before {
    content: "×";
    color: #888;
    font-family: Arial, sans-serif;
    font-size: 30px;
    font-weight: 300;
    line-height: 1;
    transform: translateY(-1px);
}

.checkout-modal__close:hover {
    background: #f3f3f3;
}

.checkout-modal__close:hover::before {
    color: #555;
}

.checkout-modal__head {
    padding-right: 40px;
    margin-bottom: 14px;
}

.checkout-modal__eyebrow {
    margin-bottom: 4px;
    color: #659d00;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.checkout-modal__head h2 {
    margin: 0 0 4px;
    color: #303030;
    font-size: 23px;
    font-weight: 600;
}

.checkout-modal__head p {
    margin: 0;
    color: #777;
    font-size: 12.5px;
}

.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 305px;
    gap: 20px;
    align-items: start;
}

.checkout-section {
    padding: 14px 16px;
    margin-bottom: 11px;
    background: #f8f8f8;
    border-radius: 10px;
}

.checkout-section h3,
.checkout-summary h3 {
    margin: 0 0 11px;
    color: #333;
    font-size: 15px;
    font-weight: 700;
}

.checkout-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px 12px;
}

.checkout-field {
    display: block;
    margin: 0;
}

.checkout-field--wide {
    grid-column: 1 / -1;
}

.checkout-field span {
    display: block;
    margin-bottom: 4px;
    color: #555;
    font-size: 11.5px;
    font-weight: 600;
}

.checkout-field input,
.checkout-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #dfe2dd;
    border-radius: 7px;
    background: #fff;
    color: #333;
    font: inherit;
    font-size: 13px;
    outline: none;
    transition: .18s ease;
}

.checkout-field input {
    height: 38px;
    padding: 0 11px;
}

.checkout-field textarea {
    min-height: 64px;
    padding: 9px 11px;
    resize: vertical;
}

.checkout-field input:focus,
.checkout-field textarea:focus {
    border-color: #96ce1a;
    box-shadow: 0 0 0 3px rgba(150,206,26,.12);
}

.checkout-delivery-type {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    margin-bottom: 10px;
    border: 1px solid #e4e7e1;
    border-radius: 8px;
    background: #fff;
}

.checkout-delivery-type i {
    color: #659d00;
    font-size: 18px;
}

.checkout-delivery-type strong,
.checkout-delivery-type span {
    display: block;
}

.checkout-delivery-type strong {
    color: #333;
    font-size: 13px;
}

.checkout-delivery-type span {
    margin-top: 1px;
    color: #777;
    font-size: 11px;
}

.checkout-delivery-note {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 7px;
    background: #fff8ef;
    color: #805323;
    font-size: 11.3px;
    line-height: 1.4;
}

.checkout-max-contact {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 1px;
    padding: 9px 11px;
    border: 1px solid #e4e7e1;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.checkout-max-contact input {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #659d00;
}

.checkout-max-contact > span {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin: 0;
}

.checkout-max-contact strong {
    color: #444;
    font-size: 11.8px;
    font-weight: 600;
}

.checkout-max-contact small {
    color: #888;
    font-size: 10.5px;
    line-height: 1.3;
}

.checkout-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 3px 0 10px;
    color: #777;
    font-size: 10.8px;
    line-height: 1.4;
}

.checkout-consent input {
    margin-top: 2px;
}

.checkout-submit {
    width: 100%;
    min-height: 42px;
    border: 0;
    border-radius: 22px;
    background: #ff8800;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.checkout-submit:hover {
    background: #f17f00;
}

.checkout-submit:disabled {
    opacity: .65;
    cursor: default;
}

.checkout-summary {
    position: sticky;
    top: 0;
    padding: 15px 16px;
    border: 1px solid #e5e8e2;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,.045);
}

.checkout-summary-item {
    padding: 9px 0;
    border-bottom: 1px solid #eceeeb;
}

.checkout-summary-item:first-of-type {
    padding-top: 0;
}

.checkout-summary-item__name {
    color: #333;
    font-size: 12.5px;
    font-weight: 600;
}

.checkout-summary-item__details {
    margin-top: 3px;
    color: #777;
    font-size: 10.5px;
    line-height: 1.35;
}

.checkout-summary-item__row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 5px;
    color: #666;
    font-size: 11px;
}

.checkout-summary-item__row strong {
    color: #444;
    white-space: nowrap;
}

.checkout-summary__total {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    color: #333;
    font-size: 14px;
}

.checkout-summary__total strong {
    color: #5f9800;
    font-size: 18px;
}

.checkout-summary__delivery {
    display: none;
}

.checkout-status {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.45;
}

.checkout-status.is-success,
.checkout-status.is-error {
    padding: 10px 11px;
    border-radius: 8px;
}

.checkout-status.is-success {
    background: #f3f9e9;
    color: #527f08;
}

.checkout-status.is-error {
    background: #fff1ef;
    color: #a64132;
}

.checkout-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

.checkout-summary.is-success {
    border-color: #dcebc7;
    background: #fbfdf7;
}

.checkout-summary.is-success h3 {
    color: #527f08;
}

.checkout-summary.is-success .checkout-summary__total,
.checkout-summary.is-success .checkout-summary__delivery {
    display: none;
}

.checkout-success-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 5px 0 2px;
}

.checkout-success-summary__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-bottom: 2px;
    border-radius: 50%;
    background: #eef7df;
    color: #659d00;
    font-size: 16px;
}

.checkout-success-summary strong {
    color: #3f6506;
    font-size: 13px;
}

.checkout-success-summary span {
    color: #6f765f;
    font-size: 11.5px;
    line-height: 1.45;
}

@media (max-width: 820px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .checkout-summary {
        position: static;
        order: -1;
    }
}

@media (max-width: 560px) {
    .checkout-modal__dialog {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        padding: 18px 14px;
        border-radius: 0;
    }

    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .checkout-field--wide {
        grid-column: auto;
    }

    .checkout-section {
        padding: 13px;
    }

    .checkout-modal__head h2 {
        font-size: 20px;
    }
}