.thcp-popup-root {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    box-sizing: border-box;
}

.thcp-popup-root.is-visible {
    display: flex;
}

.thcp-popup-overlay {
    position: absolute;
    inset: 0;
    background: #000;
}

.thcp-popup-modal {
    position: relative;
    z-index: 2;
    width: min(92vw, 760px);
    max-height: 92vh;
    overflow: visible;
    animation: thcpPopupIn 0.34s ease both;
}

.thcp-popup-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
    display: grid;
    grid-template-columns: 52% 48%;
    box-sizing: border-box;
}

.thcp-popup-close {
    position: absolute;
    z-index: 5;
    top: -14px;
    right: -14px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #007f79;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 4px;
}

.thcp-popup-close:hover,
.thcp-popup-close:focus {
    background: #007f79;
    color: #fff;
    outline: none;
}

.thcp-popup-content {
    position: relative;
    z-index: 2;
    padding: 42px 34px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    color: #333;
}

.thcp-popup-logo {
    width: min(240px, 76%);
    height: auto;
    margin: 0 auto 24px;
    display: block;
}

.thcp-popup-brand {
    color: #007f79;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 22px;
}

.thcp-popup-copy {
    width: 100%;
}

.thcp-popup-title {
    margin: 0;
    line-height: 0.92;
    letter-spacing: -0.04em;
}

.thcp-popup-discount {
    display: block;
    color: #009f93;
    font-size: clamp(70px, 9.3vw, 116px);
    font-weight: 900;
}

.thcp-popup-headline {
    display: block;
    color: #009f93;
    font-size: clamp(29px, 4.2vw, 46px);
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-top: 4px;
}

.thcp-popup-subheadline {
    display: block;
    color: #333;
    font-size: clamp(21px, 2.8vw, 33px);
    font-weight: 800;
    letter-spacing: 0.01em;
    margin-top: 7px;
}

.thcp-popup-description {
    margin: 24px auto 18px;
    max-width: 360px;
    color: #4f4f4f;
    font-size: 18px;
    line-height: 1.35;
}

.thcp-popup-description strong,
.thcp-popup-description b {
    color: #7b286f;
}

.thcp-popup-coupon {
    width: min(330px, 100%);
    min-height: 58px;
    border: 2px dashed #862a78;
    border-radius: 13px;
    background: #fff;
    color: #862a78;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 10px 16px;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.thcp-popup-coupon:hover,
.thcp-popup-coupon:focus {
    transform: translateY(-1px);
    background: #fff7fd;
    box-shadow: 0 10px 22px rgba(134, 42, 120, 0.13);
    outline: none;
}

.thcp-popup-coupon-icon {
    font-size: 22px;
    line-height: 1;
}

.thcp-popup-coupon-code {
    font-size: 23px;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.thcp-popup-copy-feedback {
    height: 21px;
    margin-top: 7px;
    color: #009f93;
    font-size: 14px;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.thcp-popup-copy-feedback.is-visible {
    opacity: 1;
}

.thcp-popup-cta {
    width: min(330px, 100%);
    min-height: 58px;
    border-radius: 13px;
    background: #862a78;
    color: #fff !important;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin-top: 6px;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.thcp-popup-cta:hover,
.thcp-popup-cta:focus {
    transform: translateY(-1px);
    background: #722064;
    color: #fff !important;
    box-shadow: 0 12px 25px rgba(134, 42, 120, 0.22);
    outline: none;
}

.thcp-popup-legal {
    margin: 22px auto 0;
    padding-top: 18px;
    width: min(350px, 100%);
    border-top: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #555;
}

.thcp-popup-leaf {
    flex: 0 0 auto;
    width: 35px;
    height: 35px;
    border: 2px solid #009f93;
    border-radius: 999px;
    color: #009f93;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
    font-weight: 800;
}

.thcp-popup-legal p {
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
    text-align: left;
}

.thcp-popup-visual {
    position: relative;
    min-width: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #f4f1ed 0%, #ffffff 44%, #e9f6f4 100%);
    background-position: left center;
    background-size: cover;
}

.thcp-popup-visual::before {
    content: "";
    position: absolute;
    top: -14%;
    right: -18%;
    width: 78%;
    aspect-ratio: 1 / 1;
    border-radius: 999px;
    background: #009f93;
    z-index: 1;
}


.thcp-popup-visual.has-image::before,
.thcp-popup-visual.has-image .thcp-popup-shape,
.thcp-popup-visual.has-image .thcp-popup-product {
    display: none;
}

.thcp-popup-visual.has-image::after {
    opacity: 0.82;
}

.thcp-popup-shape {
    position: absolute;
    z-index: 1;
    right: -15%;
    bottom: -6%;
    width: 86%;
    aspect-ratio: 1 / 1;
    border-radius: 999px;
    background: radial-gradient(circle at 40% 35%, rgba(255,255,255,0.8), rgba(255,255,255,0) 40%), linear-gradient(135deg, #f6dfef 0%, #e6f5f1 70%);
}

.thcp-popup-product {
    position: absolute;
    z-index: 3;
    bottom: 16%;
    width: 86px;
    height: 220px;
    border-radius: 16px 16px 10px 10px;
    background: linear-gradient(#fbfbfb, #f4f4f4);
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.17);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #4b4b4b;
    padding: 18px 9px;
    text-align: center;
}

.thcp-popup-product::before {
    content: "";
    position: absolute;
    top: -18px;
    left: 14px;
    right: 14px;
    height: 27px;
    border-radius: 10px 10px 4px 4px;
    background: #f1f1f1;
    box-shadow: inset 0 -8px 0 rgba(0,0,0,0.03);
}

.thcp-popup-product span {
    color: #009f93;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 20px;
}

.thcp-popup-product strong {
    font-size: 14px;
    letter-spacing: 0.03em;
}

.thcp-popup-product small {
    width: 100%;
    margin-top: 28px;
    padding-top: 7px;
    border-top: 9px solid #862a78;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
}

.thcp-popup-product-one {
    left: 26%;
    transform: rotate(-2deg);
}

.thcp-popup-product-two {
    right: 13%;
    height: 235px;
    transform: rotate(2deg);
}

.thcp-popup-product-two small {
    border-top-color: #2c9b54;
}

body.thcp-popup-open {
    overflow: hidden;
}

@keyframes thcpPopupIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 760px) {
    .thcp-popup-root {
        padding: 16px;
    }

    .thcp-popup-modal {
        width: min(94vw, 520px);
    }

    .thcp-popup-card {
        aspect-ratio: auto;
        max-height: 88vh;
        overflow-y: auto;
        grid-template-columns: 1fr;
    }

    .thcp-popup-content {
        padding: 34px 22px 22px;
    }

    .thcp-popup-logo {
        width: min(220px, 72%);
        margin-bottom: 18px;
    }

    .thcp-popup-discount {
        font-size: clamp(62px, 15vw, 92px);
    }

    .thcp-popup-headline {
        font-size: clamp(28px, 8vw, 38px);
    }

    .thcp-popup-subheadline {
        font-size: clamp(20px, 6vw, 28px);
    }

    .thcp-popup-description {
        margin-top: 18px;
        font-size: 16px;
    }

    .thcp-popup-visual {
        min-height: 270px;
        background-position: 45% 82%;
        background-size: 50%;
        background-repeat: no-repeat;
    }

    .thcp-popup-visual::after {
        display: none;
    }

    .thcp-popup-product {
        bottom: 12%;
        width: 70px;
        height: 145px;
        padding: 12px 7px;
    }

    .thcp-popup-product::before {
        top: -13px;
        height: 20px;
        left: 12px;
        right: 12px;
    }

    .thcp-popup-product span {
        font-size: 10px;
        margin-bottom: 12px;
    }

    .thcp-popup-product strong {
        font-size: 12px;
    }

    .thcp-popup-product small {
        margin-top: 15px;
        border-top-width: 7px;
        font-size: 8px;
    }

    .thcp-popup-product-one {
        left: 34%;
    }

    .thcp-popup-product-two {
        right: 26%;
        height: 155px;
    }

    .thcp-popup-close {
        top: 8px;
        right: 8px;
        width: 38px;
        height: 38px;
        font-size: 28px;
    }
}

@media (max-width: 420px) {
    .thcp-popup-content {
        padding: 30px 18px 20px;
    }

    .thcp-popup-coupon,
    .thcp-popup-cta {
        min-height: 52px;
    }

    .thcp-popup-coupon-code {
        font-size: 20px;
    }

    .thcp-popup-legal {
        align-items: flex-start;
    }
}
