/* ═══════════════════════════════════════════
   UPSELL MODAL — 4M Nature  (compact, no-scroll)
   ═══════════════════════════════════════════ */

/* Overlay */
.upsell-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.upsell-modal-overlay.is-active {
    visibility: visible;
    opacity: 1;
}

/* Modal box */
.upsell-modal {
    background: #ffffff;
    width: 100%;
    max-width: 560px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 32px 64px -16px rgba(0, 0, 0, 0.55);
    transform: scale(0.88) translateY(16px);
    opacity: 0;
    transition: transform 0.42s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.32s ease;
    display: flex;
    flex-direction: column;
}

.upsell-modal-overlay.is-active .upsell-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* ── Header ── */
.upsell-header {
    background: linear-gradient(110deg, #6c5ce7 0%, #3a1ecb 100%);
    padding: 1.5rem 1.5rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1rem;
    color: #fff;
    text-align: center;
    position: relative;
}

.upsell-badge {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 800;
    background: #ffcf24;
    /* highlight color to stand out from purple */
    color: #3a1ecb;
    padding: 0.35rem 1.25rem;
    border-radius: 0 0 16px 0;
    border: none;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.15);
    /* optional skew to give it an angled edge */
    /* transform: skewX(-15deg); */
    /* transform-origin: top left; */
}

.upsell-title {
    font-size: 1.65rem;
    font-weight: 900;
    margin: 0;
    line-height: 1.1;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

.upsell-subtitle {
    width: 100%;
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
    font-weight: 500;
}

/* ── Body: single column layout ── */
.upsell-body {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
}

/* ── Carousel ── */
.upsell-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin-bottom: 0.5rem;
    padding: 0 45px;
    /* Spacing for arrows */
}

.upsell-slides {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.upsell-slide {
    flex: 0 0 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.4rem;
    padding: 0 0.5rem;
}

/* Product image */
.upsell-product-img {
    width: 130px;
    height: 130px;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.13));
    margin-bottom: 0.25rem;
}

/* Benefits */
.upsell-product-benefits {
    font-size: 0.85rem;
    color: #4a5568;
    line-height: 1.45;
    margin: 0.25rem 0;
    max-width: 90%;
}

/* Product name & Presentation */
.upsell-product-name {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0;
}

.upsell-product-presentation {
    font-size: 0.8rem;
    color: #7c6eea;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.25rem;
}

/* Pricing */
.upsell-pricing {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
    background: #f8f9ff;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    border: 1px dashed #c7cadf;
    width: 100%;
}

.upsell-discount-tag {
    color: #e53e3e;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.upsell-prices {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.upsell-price-original {
    text-decoration: line-through;
    color: #a0aec0;
    font-size: 1rem;
    font-weight: 600;
}

.upsell-price-current {
    font-size: 1.8rem;
    font-weight: 900;
    color: #1a1a2e;
    line-height: 1;
}

/* Nav arrows */
.upsell-nav {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    z-index: 5;
    background: rgba(255, 255, 255, .97);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .14);
    color: #4a5568;
    font-size: 0.9rem;
    transition: all 0.22s ease;
}

.upsell-nav:hover {
    background: #7c6eea;
    color: #fff;
}

.upsell-prev {
    left: 12px;
}

.upsell-next {
    right: 12px;
}

/* Dots */
.upsell-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: -0.5rem;
    margin-bottom: 0.5rem;
}

.upsell-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dde1f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upsell-dot.active {
    background: #7c6eea;
    width: 24px;
    border-radius: 5px;
}

/* ── Actions ── */
.upsell-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
}

.upsell-choice-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.upsell-choice-label {
    font-size: 0.8rem;
    color: #4a5568;
}

.upsell-selected-name {
    font-size: 0.88rem;
    font-weight: 800;
    color: #7c6eea;
    text-transform: uppercase;
}

.upsell-btn-accept {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    padding: 0.95rem 2rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.28s ease;
    box-shadow: 0 6px 18px -4px rgba(16, 185, 129, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 90%;
    max-width: 360px;
    margin: 0 auto;
}

.upsell-btn-accept:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 8px 20px -4px rgba(5, 150, 105, .55);
}

.upsell-btn-accept:active {
    transform: translateY(1px);
}

.upsell-btn-decline {
    background: transparent;
    color: #94a3b8;
    border: none;
    padding: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.25s ease;
    width: 100%;
    text-decoration: underline;
}

.upsell-btn-decline:hover {
    color: #4a5568;
}

.upsell-guarantee {
    font-size: 0.72rem;
    color: #a0aec0;
    text-align: center;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

/* ── Confirmation modal resets ── */
.conf-modal {
    padding: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.conf-icon {
    font-size: 3.5rem;
    color: #10b981;
    margin-bottom: 0.5rem;
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes popIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.conf-modal h3 {
    font-size: 1.4rem;
    font-weight: 900;
    color: #1a1a2e;
    margin: 0;
}

.conf-modal p {
    font-size: 0.95rem;
    color: #4a5568;
    margin: 0;
    line-height: 1.5;
}

.conf-total {
    font-size: 1.25rem;
    font-weight: 900;
    color: #059669;
    background: #f0fff4;
    border: 1.5px solid #bbf7d0;
    padding: 0.85rem 1.25rem;
    border-radius: 12px;
    width: 100%;
    margin-top: 0.5rem;
}

.conf-close-btn {
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    padding: 0.85rem 1.5rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    width: 100%;
    justify-content: center;
}

.conf-close-btn:hover {
    background: #cbd5e1;
    color: #1e293b;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .upsell-modal-overlay {
        padding: 1rem;
        padding-top: env(safe-area-inset-top, 0);
        padding-bottom: env(safe-area-inset-bottom, 0);
        align-items: center;
        justify-content: center;
    }

    .upsell-modal {
        max-width: 100%;
        width: 100%;
        max-height: calc(100vh - env(safe-area-inset-top, 0) - env(safe-area-inset-bottom, 0) - 2rem);
        height: auto;
        border-radius: 16px;
        overflow-y: auto;
        padding: 0;
        box-sizing: border-box;
        margin: 0;
        left: auto;
        transform: none;
        position: relative;
    }

    .upsell-header {
        background: linear-gradient(110deg, #6c5ce7 0%, #3a1ecb 100%);
        padding: 1.125rem 1.25rem 0.2rem;
        margin: 0;
        border-radius: 16px 16px 0 0;
        position: relative;
        text-align: center;
    }

    .upsell-badge {
        position: absolute;
        top: 0;
        left: 0;
        font-size: 0.5rem;
        padding: 0.25rem 0.875rem;
        border-radius: 0 0 10px 0;
        margin-bottom: 0;
    }

    .upsell-title {
        font-size: 1.375rem;
        margin-bottom: 0.375rem;
        line-height: 1.1;
        margin-top: 0.625rem;
        text-align: center;
        font-weight: 900;
    }

    .upsell-subtitle {
        font-size: 0.8rem;
        line-height: 1.3;
        text-align: center;
        opacity: 0.9;
    }

    .upsell-body {
        padding: 1.25rem;
        gap: 0rem;
    }

    .upsell-carousel {
        padding: 0 36px;
        margin-bottom: 0.625rem;
    }

    .upsell-product-img {
        width: 100px;
        height: 100px;
    }

    .upsell-product-name {
        font-size: 1.125rem;
        margin-bottom: 0.375rem;
        text-align: center;
        font-weight: 800;
    }

    .upsell-product-presentation {
        font-size: 0.75rem;
        margin-bottom: 0.625rem;
        text-align: center;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .upsell-product-benefits {
        font-size: 0.8rem;
        line-height: 1.4;
        max-width: 88%;
        text-align: center;
        margin: 0.1875rem auto;
        color: #4a5568;
    }

    .upsell-pricing {
        padding: 0.625rem 1rem;
        margin-top: 0.625rem;
        text-align: center;
        background: #f8f9ff;
        border: 1px dashed #c7cadf;
        border-radius: 10px;
    }

    .upsell-discount-tag {
        font-size: 0.75rem;
        justify-content: center;
        color: #e53e3e;
        font-weight: 800;
        text-transform: uppercase;
    }

    .upsell-price-original {
        font-size: 0.9rem;
        text-decoration: line-through;
        color: #a0aec0;
    }

    .upsell-price-current {
        font-size: 1.5rem;
        font-weight: 900;
        color: #1a1a2e;
        line-height: 1;
    }

    .upsell-nav {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
        top: 38%;
        background: rgba(255, 255, 255, .97);
        border: none;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(0, 0, 0, .14);
        color: #4a5568;
        transition: all 0.22s ease;
    }

    .upsell-nav:hover {
        background: #7c6eea;
        color: #fff;
    }

    .upsell-prev {
        left: 8px;
    }

    .upsell-next {
        right: 8px;
    }

    .upsell-slide {
        gap: 0.375rem;
        padding: 0 0.375rem;
        align-items: center;
        justify-content: center;
    }

    .upsell-dots {
        margin-top: 0.625rem;
        justify-content: center;
        display: flex;
        gap: 0.375rem;
    }

    .upsell-dot {
        width: 6px;
        height: 6px;
        background: #dde1f0;
        cursor: pointer;
        transition: all 0.3s ease;
        border-radius: 50%;
    }

    .upsell-dot.active {
        background: #7c6eea;
        width: 18px;
        border-radius: 4px;
    }

    .upsell-actions {
        gap: 0.45rem;
        padding-top: 0rem;
        align-items: stretch;
        justify-content: stretch;
    }

    .upsell-choice-wrapper {
        margin-bottom: 0.375rem;
        justify-content: center;
        display: flex;
        align-items: center;
        gap: 0.375rem;
    }

    .upsell-choice-label {
        font-size: 0.8rem;
        text-align: center;
        color: #4a5568;
    }

    .upsell-selected-name {
        font-size: 0.875rem;
        text-align: center;
        font-weight: 800;
        color: #7c6eea;
        text-transform: uppercase;
    }

    .conf-icon {
        font-size: 2.25rem;
        text-align: center;
        color: #7c6eea;
    }

    .conf-total {
        font-size: 1rem;
        text-align: center;
        font-weight: 700;
        color: #1a1a2e;
    }

    .upsell-btn-accept {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
        font-weight: 700;
        border-radius: 10px;
        text-align: center;
        background: linear-gradient(110deg, #6c5ce7 0%, #3a1ecb 100%);
        color: white;
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        white-space: nowrap;
    }

    .upsell-btn-accept:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 20px rgba(108, 92, 231, 0.3);
    }

    .upsell-btn-decline {
        width: 100%;
        padding: 0.625rem;
        font-size: 0.8rem;
        text-align: center;
        background: transparent;
        color: #718096;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .upsell-btn-decline:hover {
        background: #f7fafc;
        color: #4a5568;
    }
}