.certificate {
    color: var(--chernyy);
}

.certificate span {
    display: block;
}

/* The consent line (.legal-consent) keeps its flex layout: checkbox square left of the text */
.certificate label:not(.legal-consent) {
    display: block;
}

.certificate__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
}

/* Figma "Подарочный сертификат": intro (title + three short paragraphs), "Подробнее" bottom-right */
.certificate__intro {
    max-width: 870px;
}

.certificate__intro .certificate__title {
    margin-bottom: 15px;
}

.certificate__intro-text {
    font-weight: 500;
    font-size: clamp(15px, 13.286px + 0.536vw, 18px);
    line-height: 140%;
    color: var(--chernyy);
}

.certificate__intro-text strong {
    font-weight: 700;
}

.certificate__intro-text p + p {
    margin-top: 8px;
}

.certificate__header {
    margin-bottom: 20px;
}

.certificate__header-link {
    flex-shrink: 0;
}

.certificate__header-link {
    font-weight: 500;
    font-size: clamp(11px, 1.2vw + 8px, 18px);
    line-height: 100%;
    text-decoration: underline;
    text-decoration-skip-ink: none;
    color: var(--chernyy);
}

.certificate__wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.certificate__card {
    background: var(--temno-belyy);
    padding: clamp(15px, 12.86px + 0.36vw, 18px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 170px;
    max-width: 850px;
}

.certificate__logo {
    max-width: 74px;
    height: auto;
    align-self: flex-end;
}

.certificate__denomination {
    font-weight: 400;
    font-size: clamp(20px, 4vw + 5px, 50px);
    line-height: 120%;
    text-transform: uppercase;
}

.certificate__design {
    box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.07);
    background: var(--belyy);
    padding: 15px;
}

.certificate__section-label {
    font-weight: 700;
    font-size: clamp(16px, 2vw, 30px);
    line-height: 150%;
    margin-bottom: 10px;
}

.certificate__design-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}

.certificate__design-option {
    background: var(--temno-belyy);
    aspect-ratio: 2/1;
    max-height: 120px;
    cursor: pointer;
}

.certificate__order {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.07);
    background: var(--belyy);
}

.certificate__order-input {
    height: 40px;
    background: var(--belyy);
    border: 2px solid var(--temno-belyy);
    padding: 10px;
    display: block;
    width: 100%;
    font-size: clamp(15px, 12.86px + 0.36vw, 18px);
    font-weight: 500;
    line-height: 140%;
}

.certificate__value-input {
    margin-bottom: 10px;
}

.certificate__value-options {
    display: flex;
    gap: 5px;
}

.certificate__value-option {
    background: var(--svetlo-seryy);
    font-weight: 500;
    font-size: clamp(15px, 12.86px + 0.36vw, 18px);
    line-height: 140%;
    padding: 10px;
    cursor: pointer;
}

.certificate__customer-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.certificate__input-label {
    font-weight: 500;
    font-size: clamp(15px, 12.86px + 0.36vw, 18px);
    line-height: 140%;
    margin-bottom: 5px;
    display: block;
}

.certificate__num-clue {
    font-size: clamp(15px, 12.86px + 0.36vw, 18px);
    line-height: 140%;
    color: #808080;
    margin-top: 10px;
}

.certificate__timing-straightaway {
    border: 1.5px solid var(--temno-belyy);
    padding: 10px;
    font-weight: 500;
    font-size: clamp(15px, 12.86px + 0.36vw, 18px);
    line-height: 140%;
    width: 100%;
    background: transparent;
    margin-bottom: 15px;
}

.certificate__timing-plan {
    border: 1.5px solid var(--firmennyy);
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
}

.certificate__timing-title {
    font-weight: 500;
    font-size: clamp(15px, 12.86px + 0.36vw, 18px);
    line-height: 140%;
    grid-area: 1 / 1 / 2 / 3;
}

.certificate__timing-label {
    font-weight: 500;
    font-size: clamp(15px, 12.86px + 0.36vw, 18px);
    line-height: 140%;
    color: var(--seryy);
    margin-bottom: 5px;
}

.certificate__timing-date {
    grid-area: 2 / 1 / 3 / 2;
}

.certificate__timing-hours {
    grid-area: 2 / 2 / 3 / 3;
}

.certificate__message-sender {
    margin-bottom: 15px;
}

.certificate__message-content {
    width: 100%;
    border: 2px solid var(--temno-belyy);
    padding: 10px;
    height: 120px;
}

.certificate__payment-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.certificate__payment-options label {
    display: grid;
}

.certificate__payment-option {
    border: 1.5px solid var(--temno-belyy);
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    row-gap: 3px;
    position: relative;
}

.certificate__payment-commission {
    font-weight: 400;
    font-size: clamp(11px, 1vw + 6px, 15px);
    line-height: 100%;
    color: var(--chernyy);
    background: var(--belyy);
    width: max-content;
    top: -5px;
    position: absolute;
    left: 0;
    right: 0;
    margin: 0 auto;
    padding-inline: 10 px;
}

.certificate__payment-icon {
    width: 20px;
    height: 12px;
}

.certificate__payment-icon img {
    width: min-content;
}

.certificate__payment-label {
    font-weight: 500;
    font-size: clamp(15px, 12.86px + 0.36vw, 18px);
    line-height: 140%;
    color: var(--chernyy);
}

.certificate__payment-input {
    width: min-content;
    justify-self: end;
    align-self: flex-start;
    cursor: pointer;
}

.certificate__payment-box {
    display: block;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    position: relative;
    background: var(--temno-belyy);
}

.certificate__payment-box::after {
    content: "";
    position: absolute;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--firmennyy);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s;
}

.certificate__payment-checker:checked + .certificate__payment-box::after {
    transform: translate(-50%, -50%) scale(1);
}

.certificate__payment-checker {
    position: absolute;
    opacity: 0;
}

.certificate__accept-btn {
    background: var(--firmennyy);
    padding: 15px;
    display: flex;
    justify-content: center;
    gap: 4px;
    align-items: center;
    font-weight: 500;
    font-size: clamp(15px, 12.86px + 0.36vw, 18px);
    line-height: 140%;
    color: var(--belyy);
    width: 100%;
}

.certificate__accept-btn:active {
    background-color: var(--seryy);
    transition: transform 0.2s;
}

.certificate__accept-agree {
    font-weight: 500;
    font-size: clamp(15px, 12.86px + 0.36vw, 18px);
    line-height: 140%;
    text-align: center;
    margin-top: 10px;
}

.certificate__agree-link {
    text-decoration: underline;
    text-decoration-skip-ink: none;
}

@media (min-width: 768px) {
    .certificate__wrapper {
        display: grid;
        grid-template-rows: repeat(3, auto);
        grid-template-columns: 4fr 1fr;
    }

    .certificate__card {
        padding: 20px;
        grid-area: 1 / 1 / 2 / 2;
        min-width: 0;
    }

    .certificate__logo {
        max-width: 120px;
    }

    .certificate__design {
        padding: 20px;
        grid-area: 1 / 2 / 2 / 3;
    }

    .certificate__section-label {
        margin-bottom: 20px;
        font-weight: 500;
        line-height: 117%;
    }

    .certificate__design-label {
        width: min-content;
    }

    .certificate__design-options {
        display: flex;
        flex-direction: column;
    }

    .certificate__order {
        padding: 20px;
        gap: 50px;
        grid-area: 2 / 1 / 3 / 3;
        min-width: 0;
    }

    .certificate__order-input {
        padding: 15px;
        border: 3px solid var(--temno-belyy);
        height: 48px;
    }

    .certificate__value-input {
        margin-bottom: 20px;
    }

    .certificate__value-options {
        gap: 15px;
    }

    .certificate__value-option {
        padding: 15px;
    }

    .certificate__customer-form {
        gap: 20px;
    }

    .certificate__input-label {
        margin-bottom: 10px;
    }

    .certificate__timing-straightaway {
        padding: 15px;
        border: 2px solid var(--temno-belyy);
        margin-bottom: 20px;
        max-height: 48px;
    }

    .certificate__timing-plan {
        padding: 20px;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, auto);
        gap: 15px;
    }

    .certificate__timing-label {
        margin-bottom: 10px;
    }

    .certificate__sender-name {
        margin-bottom: 20px;
    }

    .certificate__message-content {
        height: 170px;
    }

    .certificate__payment-options {
        flex-direction: row;
        gap: 15px;
    }

    .certificate__payment-option {
        border: 2px solid var(--temno-belyy);
        padding: 15px;
        flex: 1;
        row-gap: 5px;
    }

    .certificate__payment-commission {
        top: -10px;
    }

    .certificate__payment-icon {
        width: 32px;
        height: 18px;
    }

    .certificate__accept {
        grid-area: 3 / 1 / 4 / 3;
        min-width: 0;
    }

    .certificate__accept-btn {
        padding: 20px;
    }
    .certificate__payment-box {
        width: 20px;
        height: 20px;
    }

    .certificate__payment-box::after {
        width: 14px;
        height: 14px;
    }
}
@media (min-width: 1200px) {
    .certificate__wrapper {
        box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.1);
        background: var(--belyy);
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, auto);
        row-gap: 50px;
        column-gap: 20px;
        padding: 20px;
    }

    .certificate__card {
        grid-area: 1 / 2 / 2 / 3;
        max-height: 400px;
        aspect-ratio: 2.15 / 1;
    }

    .certificate__logo {
        max-width: 174px;
    }

    .certificate__design {
        grid-area: 2 / 2 / 3 / 3;
    }

    .certificate__section-label {
        margin-bottom: 25px;
    }

    .certificate__design-label {
        width: auto;
    }

    .certificate__design-options {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .certificate__order {
        grid-area: 1 / 1 / 4 / 2;
        background: none;
        box-shadow: none;
        padding: 0;
    }

    .certificate__order-input {
        height: 55px;
    }

    .certificate__value-input {
        margin-bottom: 25px;
    }

    .certificate__value-options {
        gap: 20px;
    }

    .certificate__timing-straightaway {
        padding: 20px;
        max-height: 55px;
    }

    .certificate__timing-plan {
        gap: 20px;
    }

    .certificate__message-content {
        height: 200px;
    }

    .certificate__payment-options {
        gap: 20px;
    }

    .certificate__payment-option {
        padding: 20px;
    }

    .certificate__accept {
        grid-area: 4 / 1 / 5 / 2;
    }

    .certificate__accept-btn {
        padding: 20px 25px;
        width: max-content;
    }

    .certificate__accept-agree {
        text-align: start;
    }

    .certificate__payment-box {
        width: 35px;
        height: 35px;
    }

    .certificate__payment-box::after {
        width: 23px;
        height: 23px;
    }
}
