body:has(#affiliate-page) {
    .faq.section {
        padding: clamp(3.5rem, 1rem + 10.667vw, 5rem) 0 clamp(0rem, -1.667rem + 7.111vw, 1rem);
    }
}

#affiliate-page {
    .affiliate-hero {
        padding-block: clamp(3.5rem, 2rem + 4vw, 5rem) 4.5rem;

        .affiliate-hero-content {
            max-width: 810px;
            margin-inline: auto;
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 20px;

            .affiliate-title {
                font-size: clamp(2rem, 0.333rem + 7.111vw, 3rem);
                font-weight: 500;
                line-height: 1.2;
                color: #2F1D49;
            }

            .affiliate-subtitle {
                font-size: 16px;
                font-weight: 400;
                line-height: 22px;
                color: #2F1D49;
            }

            .btn-affiliate {
                margin-top: 10px;
            }
        }
    }

    .affiliate-benefits {
        .container {
            padding-block: 0 clamp(3.5rem, 1rem + 10.667vw, 5rem);
            border-bottom:  1px solid #F1F0EF;
        }

        .affiliate-cards {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;

            .affiliate-card {
                background-color: #FFF;
                border: 1px solid #EAECF0;
                border-radius: 24px;
                padding: clamp(2rem, 1.167rem + 3.556vw, 2.5rem) 24px;
                box-shadow: 5px 4px 11px 0 rgba(195, 195, 195, 0.15);
                display: flex;
                flex-direction: column;
                gap: 24px;

                .affiliate-card-icon {
                    width: 56px;
                    height: 56px;
                    background-color: rgba(255, 230, 213, 0.65);
                    border-radius: 12px;
                    display: flex;
                    align-items: center;
                    justify-content: center;

                    img {
                        width: 28px;
                        height: 28px;
                    }
                }

                .affiliate-card-text {
                    display: flex;
                    flex-direction: column;
                    gap: 16px;

                    h3 {
                        font-size: 20px;
                        font-weight: 600;
                        line-height: 24px;
                        color: #2F1D49;
                        text-transform: uppercase;
                    }

                    p {
                        font-size: 16px;
                        font-weight: 400;
                        line-height: 1.2;
                        color: #2F1D49;
                    }
                }
            }
        }
    }

    /* Commission Structure */

    .affiliate-commission {
        .container {
            padding-block: clamp(1.5rem, 1rem + 10.667vw, 2.5rem) clamp(3rem, 1rem + 10.667vw, 5rem);
            border-bottom:  1px solid #F1F0EF;
        }

        .affiliate-commission-content {
            display: flex;
            gap: 20px;
            align-items: stretch;

            .commission-table-wrapper {
                display: flex;
                flex-direction: column;
                flex: 1;
                min-width: 0;

                .commission-table {
                    background-color: #FFF;
                    border: 1px solid #F2F4F7;
                    border-radius: 16px;
                    padding: clamp(1rem, 0.167rem + 3.556vw, 2rem) clamp(0.75rem, -0.5rem + 5.333vw, 1.5rem);
                    height: 100%;
                    display: flex;
                    flex-direction: column;
                    flex: 1;
                    gap: 20px;

                    .commission-table-header {
                        display: flex;
                        align-items: center;
                        background-color: #F9FAFB;
                        border-radius: 12px;
                        padding: 16px clamp(0.75rem, -0.5rem + 5.333vw, 1.5rem);

                        span {
                            flex: 1;
                            font-size: 16px;
                            font-weight: 500;
                            line-height: 1.2;
                            color: #2F1D49;

                            &:nth-child(2) {
                                text-align: center;
                            }

                            &:nth-child(3) {
                                text-align: right;
                            }
                        }
                    }

                    .commission-table-body {
                        padding-inline: 16px;

                        .commission-row {
                            display: flex;
                            align-items: center;
                            padding-block: 20px;
                            border-bottom: 1px solid #F2F4F7;

                            &:last-child {
                                border-bottom: none;
                            }

                            span {
                                flex: 1;
                            }

                            .plan-name {
                                font-size: 16px;
                                font-weight: 500;
                                line-height: 1.2;
                                color: #2F1D49;
                            }

                            .plan-price {
                                font-size: 18px;
                                font-weight: 400;
                                line-height: 1.2;
                                color: #475467;
                                text-align: center;
                            }

                            .plan-commission {
                                text-align: right;

                                strong {
                                    font-size: 18px;
                                    font-weight: 700;
                                    color: #F63D68;
                                }

                                small {
                                    font-size: 12px;
                                    font-weight: 400;
                                    color: #475467;
                                    margin-left: 1px;
                                }
                            }
                        }
                    }
                }

                .commission-table-info {
                    display: none;
                }
            }

            .commission-why-card {
                width: 504px;
                flex-shrink: 0;
                border-radius: 12px;
                background: #2F1D49;
                padding: clamp(1.5rem, 0.667rem + 3.556vw, 2rem);
                position: relative;
                overflow: hidden;

                .why-ellipse {
                    position: absolute;
                    width: 1000px;
                    height: 790px;
                    pointer-events: none;

                    top: -300px;
                    left: -215px;
                    transform: rotate(1deg) scaleY(2);
                }

                .commission-why-inner {
                    position: relative;
                    z-index: 1;
                    display: flex;
                    flex-direction: column;
                    gap: 28px;

                    h3 {
                        font-size: clamp(1.2rem, 1.333rem + 1.778vw, 1.6rem);
                        font-weight: 600;
                        line-height: 1.2;
                        color: #FFF;
                        margin-bottom: 4px;
                    }

                    .commission-why-list {
                        display: flex;
                        flex-direction: column;
                        gap: 24px;
                        list-style: none;
                        padding: 0;
                        margin: 0;

                        li {
                            display: flex;
                            align-items: center;
                            gap: 16px;

                            img {
                                width: 24px;
                                height: 24px;
                                flex-shrink: 0;
                                opacity: 0.6;
                            }

                            span {
                                font-size: 16px;
                                font-weight: 500;
                                line-height: 1.2;
                                color: #FFF;
                            }

                            .star-rating {
                                font-size: 14px;
                                letter-spacing: 2px;

                                svg {
                                    width: 16px;
                                    height: 16px;

                                    path {
                                        fill: #FDB022;
                                    }
                                }
                            }
                        }
                    }

                    .commission-why-partners {
                        display: flex;
                        flex-wrap: wrap;
                        align-items: center;
                        gap: 8px 16px;
                        opacity: 0.7;

                        img {
                            height: 16px;
                            width: auto;
                            filter: brightness(0) invert(1);
                        }
                    }

                    .btn-affiliate-white {
                        align-self: flex-start;
                        margin-top: 12px;
                        background: #FFF;
                        color: #2F1D49;
                    }
                }
            }
        }
    }

    /* How It Works */

    .affiliate-section-title {
        font-size: clamp(1.2rem, 0.5rem + 5.333vw, 1.6rem);
        font-weight: 500;
        line-height: 1.2;
        color: #2F1D49;
        text-align: center;
        margin-bottom: clamp(2.5rem, 10.667vw, 4rem);
    }

    .affiliate-how-it-works {
        padding-block: clamp(3.5rem, 1rem + 10.667vw, 5rem);

        .how-it-works-steps {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;

            .how-step {
                display: flex;
                flex-direction: column;
                gap: 20px;

                .how-step-illustration {
                    width: 100%;
                    height: 157px;
                    overflow: hidden;
                    border-radius: 12px;
                    border: 1px solid #F2F4F7;
                    background-color: #FFF;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    position: relative;

                    &::after {
                        content: url("../../../img/affiliate/how-to-shade.svg");
                        position: absolute;
                        width: 211px;
                        height: 211px;
                        border-radius: 50%;
                    }
                }

                &:first-child {
                    .how-step-illustration {
                        &::after {
                            right: 85px;
                            top: -20px;
                        }
                    }
                }

                &:nth-child(2) {
                    .how-step-illustration {
                        &::after {
                            left: -60px;
                            top: -1px;
                        }
                    }
                }

                &:last-child {
                    .how-step-illustration {
                        &::after {
                            right: 27px;
                            top: -10px;
                        }
                    }
                }

                .how-step-text {
                    display: flex;
                    flex-direction: column;
                    gap: 10px;
                    padding-inline: 4px;

                    h3 {
                        font-size: 20px;
                        font-weight: 600;
                        line-height: 1.2;
                        color: #2F1D49;
                    }

                    p {
                        font-size: 16px;
                        font-weight: 400;
                        line-height: 1.2;
                        color: #2F1D49;
                    }
                }
            }
        }
    }

    /* Promo Materials */

    .affiliate-promo {
        .container {
            padding-block: 0 clamp(3.5rem, 2.069rem + 6.107vw, 5rem);
            border-bottom:  1px solid #F1F0EF;
        }

        .promo-banner {
            background-color: #F5F8FF;
            border: 1px solid #F2F4F7;
            padding: clamp(2rem, 1.523rem + 2.036vw, 2.5rem) clamp(1.5rem, 0.546rem + 4.071vw, 2.5rem);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 40px;

            .promo-banner-text {
                max-width: 698px;
                display: flex;
                flex-direction: column;
                gap: 16px;

                h3 {
                    font-size: clamp(1.5rem, 1.261rem + 1.018vw, 1.75rem);
                    font-weight: 600;
                    line-height: 1.2;
                    color: #2F1D49;
                }

                p {
                    font-size: 16px;
                    font-weight: 400;
                    line-height: 1.2;
                    color: #2F1D49;
                }

                .btn-brandbook {
                    align-self: flex-start;
                    display: inline-flex;
                    align-items: center;
                    gap: 8px;
                    border-radius: 20px;
                    border: 1px solid #EAECF0;
                    background: #FFF;
                    color: #2E3A59;
                    margin-top: 8px;
                }
            }

            .promo-banner-visual {
                max-height: 200px;
                padding: 5px 14px 4px 3px;

                img {
                    height: 100%;
                }
            }
        }
    }

    /* Testimonial */

    .affiliate-testimonial {
        padding-block: clamp(3.5rem, 2.667rem + 3.556vw, 4rem);

        .testimonial-slider-wrapper {
            max-width: 1064px;
            margin-inline: auto;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 24px;

            .testimonial-slide {
                box-sizing: border-box;
                width: 100%;
                display: none;
                align-items: flex-start;
                gap: 56px;
                padding: 40px 24px;
                border-radius: 24px;
                border: 0.8px solid rgba(108, 60, 225, 0.1);
                background: linear-gradient(35deg, #FCFCFD 6.38%, #F7F4E3 92.78%);

                &.active {
                    display: flex;
                    animation: affiliateTestimonialFadeIn 0.5s ease;
                }

                .testimonial-author {
                    display: flex;
                    flex-direction: column;
                    gap: 16px;
                    width: 238px;
                    flex-shrink: 0;

                    .testimonial-author-info {
                        display: flex;
                        align-items: center;
                        gap: 12px;

                        .testimonial-avatar {
                            width: 48px;
                            height: 48px;
                            border-radius: 50%;
                            background-color: #F0EAFF;
                            display: flex;
                            align-items: center;
                            justify-content: center;
                            font-size: 18px;
                            font-weight: 600;
                            color: #622AE4;
                            flex-shrink: 0;
                        }

                        .testimonial-meta {
                            display: flex;
                            flex-direction: column;
                            gap: 4px;

                            .testimonial-name {
                                font-size: 16px;
                                font-weight: 600;
                                line-height: 1.2;
                                color: #242424;
                            }

                            .testimonial-role {
                                font-size: 14px;
                                font-weight: 400;
                                line-height: 1.2;
                                color: #4F4F4F;
                            }
                        }
                    }

                    .testimonial-rating {
                        display: flex;
                        align-items: center;
                        gap: 8px;
                    }

                    .testimonial-stars {
                        display: flex;
                        gap: 5px;

                        svg {
                            width: 16px;
                            height: 16px;

                            path {
                                fill: #FDC700;
                            }
                        }
                    }

                    .testimonial-score {
                        font-size: 14px;
                        font-weight: 700;
                        line-height: 1.2;
                        color: #242424;
                    }
                }

                .testimonial-text {
                    font-size: 20px;
                    font-weight: 500;
                    line-height: 1.2;
                    color: #2F1D49;
                    flex: 1;
                }
            }

            .testimonial-dots {
                display: flex;
                align-items: center;
                gap: 8px;

                .dot {
                    width: 10px;
                    height: 10px;
                    border-radius: 100px;
                    background-color: #EBE9FE;
                    cursor: pointer;
                    transition: width 0.3s ease, background-color 0.3s ease;

                    &.active {
                        width: 24px;
                        background-color: #7061EF;
                    }
                }
            }
        }
    }

    #faq {
        padding-block: clamp(3.5rem, 1rem + 10.667vw, 5rem);
    }

    /* CTA Banner */
    .sale-banner {
        background: #FDE272;
        padding: clamp(1.5rem, 1rem + 10.667vw, 2.5rem) clamp(2rem, 1rem + 10.667vw, 3.5rem);

        p {
            color: #2F1D49;
            font-size: 12px;
            font-weight: 600;
            line-height: 18px;
            text-transform: uppercase;
        }
    }
}

@keyframes affiliateTestimonialFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 1200px) {
    #affiliate-page {
        .affiliate-benefits {
            .affiliate-cards {
                grid-template-columns: repeat(2, 1fr);

                .affiliate-card:last-child {
                    grid-column: 1 / -1;
                    justify-self: center;
                    max-width: 470px;
                }
            }
        }

        .affiliate-commission {
            .affiliate-commission-content {
                .commission-why-card {
                    width: 413px;
                }
            }
        }

        .affiliate-how-it-works {
            .how-it-works-steps {
                grid-template-columns: repeat(2, 1fr);

                .how-step:last-child {
                    grid-column: 1 / -1;
                    justify-self: center;
                    max-width: 470px;
                }
            }
        }

        .affiliate-cta {
            .affiliate-cta-banner {
                .cta-ellipse-right {
                    transform: rotate(-63deg);
                }
            }
        }
    }
}

@media (max-width: 1024px) {
    #affiliate-page {
        .affiliate-commission {
            .affiliate-commission-content {
                flex-direction: column;

                .commission-why-card {
                    box-sizing: border-box;
                    width: 100%;

                    .commission-why-inner {
                        .commission-why-list {
                            display: grid;
                            grid-template-columns: 1fr 1fr;

                            li {
                                align-items: flex-start;
                            }
                        }
                    }
                }
            }
        }

        .affiliate-promo {
            .promo-banner {
                gap: 5px;

                .promo-banner-visual {
                    width: 550px;
                }
            }
        }
    }
}

@media (max-width: 991px) {
    #affiliate-page {
        .affiliate-benefits {
            .affiliate-cards {
                .affiliate-card:last-child {
                    max-width: 413px;
                }
            }
        }

        .affiliate-how-it-works {
            .how-it-works-steps {
                .how-step:last-child {
                    max-width: 413px;
                }
            }
        }

        .affiliate-cta {
            .affiliate-cta-banner {
                .cta-ellipse-right {
                    transform: rotate(-74deg);
                }
            }
        }
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    body:has(#affiliate-page) {
        .container {
            max-width: 846px;
        }
    }
}

@media (max-width: 768px) {
    #affiliate-page {
        .affiliate-benefits {
            .affiliate-cards {
                grid-template-columns: 1fr;

                .affiliate-card:last-child {
                    max-width: 100%;
                }
            }
        }

        .affiliate-commission {
            .affiliate-commission-content {
                .commission-why-card {
                    .commission-why-inner {
                        .commission-why-list {
                            display: flex;
                        }
                    }
                }
            }
        }

        .affiliate-how-it-works {
            .how-it-works-steps {
                grid-template-columns: 1fr;

                .how-step:last-child {
                    max-width: 100%;
                }

                .how-step .how-step-illustration {
                    height: 210px;

                    img {
                        height: 80%;
                        width: 80%;
                    }
                }
            }
        }

        .affiliate-promo {
            .promo-banner {
                flex-direction: column;
                gap: 40px;

                .promo-banner-visual {
                    width: auto;
                    padding: 5px 12px 4px 3px;
                }
            }
        }

        .affiliate-testimonial {
            .testimonial-slider-wrapper {
                .testimonial-slide {
                    flex-direction: column;
                    gap: 40px;
                    border-radius: 16px;

                    .testimonial-author {
                        width: 100%;
                    }

                    .testimonial-text {
                        font-size: 18px;
                    }
                }
            }
        }

        .affiliate-cta {
            .affiliate-cta-banner {
                .cta-ellipse-left {
                    top: -310px;
                    left: -250px;
                    transform: rotate(-175deg) scaleY(-1);
                }

                .cta-ellipse-right {
                    display: none;
                }
            }
        }
    }
}

@media (max-width: 600px) {
    #affiliate-page {
        .affiliate-hero {
            .affiliate-hero-content {
                .affiliate-title {
                    font-weight: 500;
                }

                .affiliate-subtitle {
                    font-size: 18px;
                }

                .btn-affiliate {
                    max-width: fit-content;
                }
            }
        }

        .affiliate-benefits {
            .affiliate-cards {
                .affiliate-card {
                    .affiliate-card-icon {
                        width: 48px;
                        height: 48px;
                        border-radius: 10px;

                        img {
                            width: 24px;
                            height: 24px;
                        }
                    }

                    .affiliate-card-text {
                        h3 {
                            font-size: 20px;
                        }
                    }
                }
            }
        }

        .affiliate-commission {
            .affiliate-commission-content {
                gap: 40px;

                .commission-table-wrapper {
                    display: flex;
                    flex-direction: column;
                    gap: 24px;

                    .commission-table {
                        .commission-table-header {
                            span {
                                font-size: 14px;
                                font-weight: var(--font-weight-bold);
                            }
                        }

                        .commission-table-body {
                            .commission-row {
                                padding-block: 16px;

                                .plan-name {
                                    font-size: 14px;
                                    font-weight: var(--font-weight-bold);
                                }

                                .plan-price {
                                    font-size: 14px;
                                }

                                .plan-commission {
                                    strong {
                                        font-size: 14px;
                                    }

                                    small {
                                        display: none;
                                    }
                                }
                            }
                        }
                    }

                    .commission-table-info {
                        display: flex;
                        gap: 10px;
                        padding: 12px 16px;

                        svg {
                            flex-shrink: 0;
                            min-width: 24px;
                            height: 24px;
                        }

                        span {
                            min-width: 0;
                            font-size: 16px;
                            line-height: 1.2;
                            color: #475467;
                        }
                    }
                }

                .commission-why-card {
                    .why-ellipse {
                        position: absolute;
                        width: 1000px;
                        height: 790px;
                        pointer-events: none;

                        top: -276px;
                        left: 56px;
                        transform: rotate(5deg) scaleY(2);
                    }

                    .commission-why-inner {
                        .commission-why-list {
                            li {
                                span {
                                    font-size: 16px;
                                }
                            }
                        }
                    }
                }
            }
        }

        .affiliate-cta {
            .affiliate-cta-banner {
                .affiliate-cta-content {
                    .btn-affiliate-white {
                        margin-top: 0;
                    }
                }
            }
        }
    }
}

@media (max-width: 500px) {
    #affiliate-page {
        .affiliate-how-it-works {
            .how-it-works-steps {
                .how-step {
                    gap: 8px;
                }
            }
        }

        .affiliate-cta {
            .affiliate-cta-banner {
                .cta-ellipse-left {
                    top: -324px;
                    left: -80px;
                    transform: rotate(-175deg) scaleY(-1);
                }
            }
        }
    }
}

@media (max-width: 445px) {
    #affiliate-page {
        .affiliate-how-it-works {
            .how-it-works-steps {
                .how-step .how-step-illustration img {
                    width: 90%;
                }
            }
        }
    }
}
