@import url('https://fonts.googleapis.com/css2?family=Commissioner:wght@100..900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Karla:ital,wght@0,200..800;1,200..800&family=Manrope:wght@200..800&family=Noto+Sans:ital,wght@0,100..900;1,100..900&family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&family=Red+Hat+Text:ital,wght@0,300..700;1,300..700&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

/*400 500 700*/
:root {
    --Green-400: hsl(176, 50%, 47%);
    --Green-400-hover: hsl(176, 48%, 37%);
    --Green-700: hsl(176, 72%, 28%);
    --Black: hsl(0, 0%, 0%);
    --Gray-500: hsl(0, 0%, 48%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Commissioner', Arial, Helvetica, sans-serif;
    transition: all.3s ease;
}

.out-of-stock {
    pointer-events: none;
}

button {
    border: none;
    cursor: pointer;

    &.green-btn {
        background: var(--Green-400);
        padding: 1em 2em;
        border-radius: 30px;
        color: white;
        font-weight: 700;
    }
}

header {
    padding: 1.5em;
    background-image: url("./images/image-hero-mobile.jpg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    height: 35dvh;
    display: flex;
    justify-content: space-between;
}

header>img {
    width: 40%;
    height: fit-content;
}


nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 4em;
    list-style-type: none;
    background-color: white;
    width: 90%;
    border-radius: 10px;
    box-shadow: rgba(0, 0, 0, 0.56) 0px 22px 70px 4px;
    z-index: 2;
}

nav ul li {
    font-size: 1.5em;
    font-weight: 500;
    padding: 1em;
    border-bottom: 1px solid var(--Gray-500);

    &last-of-type {
        border: none;
    }
}

nav ul li a {
    text-decoration: none;
    color: inherit;
}

main {
    padding: 1em;
}

main>section {
    background-color: white;
    border-radius: 10px;
    padding: 1em;
    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
}

.info-section {
    position: relative;
    top: -5em;
    padding-top: 4em;
    text-align: center;
}

.info-section .logo {
    width: 4.2em;
    position: absolute;
    left: 50%;
    top: -2.2em;
    transform: translateX(-50%);
}

.info-section p {
    margin-top: 1em;
    color: var(--Gray-500);
    font-weight: 500;
    line-height: 1.8em;
}

.btn-container {
    display: flex;
    gap: 1em;
    margin-top: 1.8em;
}

.info-section .back-btn {
    flex: 1;
    font-size: 18px;
}

.info-section .bookmark-btn {
    background-color: transparent;
}

.stats-section {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 4em;
}

.stats-section p {
    font-size: 2em;
    font-weight: 700;
    color: var(--Black);
}

.stats-section .p-span {
    display: block;
    margin-top: .5em;
    font-size: .5em;
    color: var(--Gray-500);
    font-weight: 500;
}

.stats-section progress {
    width: 100%;
    appearance: none;
    border-radius: 9999px;
    overflow: hidden;
    background-color: var(--Green-700);
}

.stats-section progress[value]::-webkit-progress-bar {
    background-color: #eee;
}

.stats-section progress::-webkit-progress-value {
    background-color: var(--Green-400);
    border-radius: 10px;
}

.about-section h2 {
    font-size: 1.3em;
}

.about-section>p {
    margin-top: 1em;
    color: var(--Gray-500);
    font-weight: 500;
    line-height: 1.4em;
}

.reward-container {
    margin-top: 1em;
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.reward-container article {
    border: 1px solid var(--Gray-500);
    padding: 1.2em;
    font-size: 1em;
    border-radius: 10px;

    &.out-of-stock {
        opacity: .5;
    }
}

.reward-container article h3 {
    font-size: 1em;
}

.reward-container article .pledge {
    color: var(--Green-700);
    margin-top: .4em;
}

.reward-container article .info {
    margin-top: 1em;
    line-height: 1.4em;
    color: var(--Gray-500);
    font-weight: 500;
}

.reward-container article .left {
    margin-top: 1em;
    font-size: 2em;
    font-weight: 700;
    color: var(--Black);
}

.reward-container article .left span {
    font-size: .6em;
    color: var(--Gray-500);
    font-weight: 500;
}

.reward-container article .select-btn {
    margin-top: 2em;

    &.out-of-stock {
        background-color: var(--Gray-500);
    }
}

.background-modal {
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.success-modal {
    position: relative;
    border-radius: 10px;
    top: 20%;
    transform: translateY(-25%);
    left: 50%;
    width: 90%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2em;
    z-index: 1;
    background-color: white;
}

.closemodal-btn {
    position: absolute;
    right: 2em;
    top: 2em;
    display: flex;
    align-content: center;
    justify-content: center;
    padding: 1em;
    background-color: transparent;
}

.success-modal img {
    width: 24%;
}

.success-modal h2 {
    margin-top: 2em;
    color: var(--Black);
    font-weight: 700;
}

.success-modal p {
    text-align: center;
    margin-top: 2em;
    font-size: 1.1em;
    line-height: 1.5em;
    color: var(--Gray-500);
    font-weight: 500;
}

.success-modal button {
    margin-top: 2em;
    font-size: 1.2em;
}

.background-modal.reward {
    display: none;
    overflow-y: scroll;
}

.reward-modal {
    border-radius: 10px;
    top: 5%;
    position: relative;
    background-color: white;
    padding: 2em;
    width: 90%;
    left: 50%;
    transform: translateX(-50%);
}

.reward-modal h2 {
    font-size: 1.3em;
}

.reward-modal input[type="radio"] {
    accent-color: var(--Green-700);
}

.reward-modal>p {
    margin-top: 1em;
    color: var(--Gray-500);
    font-weight: 500;
    line-height: 1.4em;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 1em;
    margin-top: 2em;
}

.options-container article {
    border: 1px solid var(--Gray-500);
    font-size: 1em;
    border-radius: 10px;

    &.out-of-stock {
        opacity: .5;
    }
}

.options-container article:has(input[type="radio"]:checked) {
    border: 1px solid var(--Green-400);

    & .enter-pledge {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

.options-container article>div {
    padding: 1.2em;
}

.article-head {
    display: flex;
    gap: 1em;
}

.options-container article .option-title {
    font-size: 1em;
    font-weight: 700;
    display: inline;
}

.options-container article .pledge {
    color: var(--Green-400);
    margin-top: .4em;
    font-weight: 700;
}

.options-container article .article-info {
    margin-top: 1em;
    line-height: 1.4em;
    color: var(--Gray-500);
    font-weight: 500;
}

.options-container article .left {
    margin-top: 1em;
    font-size: 1.5em;
    font-weight: 700;
    color: var(--Black);
}

.options-container article .left span {
    font-size: .6em;
    color: var(--Gray-500);
    font-weight: 500;
    margin-left: .3em;
}

.options-container .enter-pledge {
    display: none;
    text-align: center;
    margin-top: 1em;
    color: var(--Gray-500);
    font-weight: 500;
    border-top: 1px solid var(--Gray-500);
}

.pledge-input {
    margin-top: 1em;
    padding: 1em;
    display: flex;
    gap: 1em;
    position: relative;
}

.pledge-input label {
    position: absolute;
    top: 28px;
    left: 30px;
    color: var(--Gray-500);
}

.pledge-input input,
.pledge-input button {
    padding: 1em;
    border-radius: 30px;
}

.pledge-input input {
    width: 50%;
    border: 1px solid var(--Gray-500);
    outline: none;
    text-align: center;
}

.pledge-input button {
    flex: 1;
}

@media (min-width: 1000px) {
    header {
        padding: 2em 10em;
        height: 50dvh;
        background-image: url("./images/image-hero-desktop.jpg");
    }

    header>img {
        width: auto;
        height: fit-content;
    }

    header .nav-btn {
        display: none;
    }

    header nav ul {
        position: static;
        display: flex;
        flex-direction: row;
        left: auto;
        top: auto;
        transform: translateX(0%);
        background-color: transparent;
        width: auto;
        border-radius: none;
        box-shadow: none;
        border: none;
        z-index: 1;
        gap: 1em;
    }

    nav ul li {
        font-size: 1em;
        font-weight: 500;
        padding: 0;
        border: none;
        color: white;
        cursor: pointer;
        position: relative;
        padding-bottom: 5px;

        &::after {
            content: "";
            position: absolute;
            left: 0;
            bottom: 0;
            width: 0%;
            height: 3px;
            background: var(--Green-400);
            transition: width 0.3s ease;
        }

        &:hover::after {
            width: 100%;
        }
    }

    main {
        max-width: 60%;
        margin: 0 auto;
    }

    .btn-container {
        justify-content: space-around;
    }

    .btn-container .back-btn {
        flex: 0 1 auto;
        width: 250px;
        border-radius: 30px;

        &:hover {
            background-color: var(--Green-400-hover);
        }
    }

    .btn-container .bookmark-btn {
        width: 200px;
        display: flex;
        align-items: center;
        background-color: #eeee;
        border-radius: 30px;

        &.bookmarked {
            &::after {
                color: var(--Green-700);
            }
        }

        &::after {
            color: var(--Gray-500);
            font-weight: 700;
            padding: 1em;
            font-size: 18px;
            content: "Bookmark";
        }

        &:hover {
            opacity: .8;
        }
    }

    .stats-section {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .stats-section p {
        border-right: 1px solid var(--Gray-500);
        text-align: left;
        flex: 1;

        &:last-of-type {
            border-right: none;
        }
    }

    .reward-container article {
        position: relative;
    }

    .reward-container p.pledge {
        position: absolute;
        right: 1em;
        top: 1em;
    }

    .reward-container .select-btn {
        position: absolute;
        right: 1em;
        bottom: 1.5em;

        &:hover {
            background-color: var(--Green-400-hover);
        }
    }

    .reward-modal {
        width: 50%;
    }

    .reward-modal article {
        position: relative;
    }

    .reward-modal article .pledge {
        display: inline;
        margin-left: .5em;
    }

    /*arreglar top */
    .reward-modal article .left {
        position: absolute;
        top: -10px;
        right: 1em;
    }

    .options-container article:has(input[type="radio"]:checked) {

        & .enter-pledge {
            flex-direction: row;
            justify-content: space-between;
        }
    }

    .pledge-input {
        margin-top: 1em;
        padding: 1em;
        display: flex;
        gap: 1em;
        position: relative;
        justify-content: end;
        cursor: pointer;
    }

    .pledge-input input {
        width: 35%;
        caret-color: var(--Green-400);
    }

    .pledge-input button {
        flex: 0 1 auto;
        width: 35%;

        &:hover {
            background-color: var(--Green-400-hover);
        }
    }

    .pledge-input label {
        left: 32%;
        top: 29px;
        color: var(--Gray-500);
    }

    .option-title {
        cursor: pointer;

        &:hover {
            color: var(--Green-400);
        }
    }

    .background-modal.thanks {
        justify-content: center;
        align-items: center;
    }

    .success-modal {
        position: relative;
        top: auto;
        transform: translateY(0);
        left: auto;
        width: 30%;
        transform: translateX(0);
    }

    .success-modal button {

        &:hover {
            background-color: var(--Green-400-hover);
        }
    }

}