/* General */
html, body {
    margin: 0;
    height: 100%;
    overflow: hidden;
}

.page-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.scrollable {
    flex: 1;
    overflow-y: auto;
}

.non-scrollable {
    overflow: hidden;
}

/* Sections */
.top {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    height: 130px;
    min-height: 130px;
    max-height: 130px;
}

.divider-line {
    position: absolute;
    width: 100%;
    border: 1px solid var(--gray-gray-0, #E4E9EE);
    border-radius: 5px;
    margin: 0;
}

.main {
    position: relative;
}

.right {
    position: absolute;
    top: 0;
    right: 0;
    width: 30vw;
    max-width: 50vw;
    overflow-y: auto;
    height: 100vh;
}

/* Top Elements */
.title {
    color: var(--gray-gray-50, #415769);
    text-align: center;
    font-family: Quicksand, sans-serif;
    font-size: 24px;
    font-style: normal;
    font-weight: 600;
    line-height: 50px; /* 178.571% */
    margin-bottom: 2px;
}

.steps-container {
    display: flex;
    width: 100%;
    max-width: 600px;
    position: relative;
    justify-content: space-between;
}

.steps-line {
    position: absolute;
    top: 33%;
    transform: translateY(-50%);
    left: 55px;
    right: 55px;
    height: 2px;
    width: auto;
    background-color: #e0e0e0;
    z-index: 1;
}

.steps-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    cursor: pointer;

    color: var(--gray-gray-10, #C3CCD3);
    text-align: center;
    font-family: Quicksand, sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    line-height: 16px; /* 133.333% */
}

.steps-step.active .steps-step-circle {
    width: 44px;
    height: 44px;
    background-color: #30bced;
    border: 5px solid #9fe0f8;
    color: #FFF;
}

.steps-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #FFF;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 3px;

    stroke-width: 2px;
    stroke: var(--gray-gray-10, #C3CCD3);
    border: 2px solid var(--gray-gray-10, #C3CCD3);

    color: var(--gray-gray-10, #C3CCD3);
    text-align: center;
    font-family: Quicksand, sans-serif;
    font-size: 20px;
    font-style: normal;
    font-weight: 500;
    line-height: 50px; /* 250% */
}

.steps-step-label {
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--gray-gray-10, #C3CCD3);
    padding-bottom: 5px;
    margin-top: 2px;
}

.steps-step.active .steps-step-label {
    color: #30bced;
}

/* Product Grid */
.product-grid {
    max-width: 70%;
    border-right: 1px solid var(--gray-gray-0, #E4E9EE);
    max-height: 85vh;
}

.grid-list {
    overflow-y: hidden;
}

.grid-item {
    border-radius: 20px;
    border: 1px solid #DADADA;
    width: 194px;
    aspect-ratio: 97/165;
    height: 100%;
    position: relative;
    overflow: hidden;
    margin: 1rem;
}

.grid-image-container {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    display: block;
    border-radius: 12px 12px 0 0;
}

.grid-image-container.accessory {
    padding: 0;
}

.grid-image.figurine {
    width: auto;
    height: auto;
    max-height: 100%;
    padding: 10px 37px;
    object-fit: contain;
}

.grid-image.accessory {
    width: auto;
    height: auto;
    max-height: 100%;
    padding: 0 16px;
    object-fit: contain;
}

.grid-item-title {
    color: var(--gray-gray-50, #415769);
    text-align: center;
    font-family: Quicksand, sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 19px; /* 125% */
    padding-top: 5px;
    padding-left: 8px;
    padding-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 62px;
}

.grid-item-price {
    color: var(--gray-gray-50, #415769);
    text-align: center;
    font-family: Quicksand, sans-serif;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.grid-item-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-left: 8px;
    padding-right: 8px;
    height: 36px;
    width: 100%;
    margin-bottom: .5rem;
}

.grid-item-add {
    color: #FFF;
    text-align: center;
    font-family: Quicksand, sans-serif;
    font-size: clamp(10px, 4vw, 18px);
    font-style: normal;
    font-weight: 700;
    line-height: 20px; /* 166.667% */
    border: 0;
    border-radius: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grid-item-add:active {
    background: #3FC0F0;
    color: #FFF;
    border: 0;
}

.grid-item-add:hover {
    background: #3FC0F0;
    color: #FFF;
    border: 0;
}

.grid-item-add:focus {
    background: #3FC0F0;
    color: #FFF;
    border: 0;
}

.grid-item-amount {
    color: var(--gray-gray-50, #415769);
    text-align: center;
    font-family: Quicksand, sans-serif;
    font-size: 18px;
    font-style: normal;
    font-weight: 700;
    line-height: 30px; /* 166.667% */
}

.grid-item-plusminus {
    width: 40px;
    height: 40px;
}

.grid-item-owned {
    position: absolute;
    left: 6px;
    top: 4px;
    background-color: white;
    text-align: center;
    border-radius: 100px;
    align-items: center;
    display: flex;
    justify-content: center;
    
    font-size: clamp(10px, 1.75vw, 12px);
    color: var(--gray-gray-50, #415769);
    padding: 1px 8px 1px 4px;

    font-style: normal;
    font-weight: 600;
    letter-spacing: 0.12px;
    text-transform: uppercase;
}

.grid-item-owned > img {
    height: 1rem;
    aspect-ratio: 1 / 1;
    margin-right: clamp(2px, 1vw, 4px);
    margin-top: -2px;
}

/* More figurines Foldout */
.foldout-divider {
    margin: 2rem 0;
}

.foldout-divider button {
    transition: all 0.3s ease;
    background-color: transparent;
    
    color: #415769;
    font-size: clamp(18px, 3vw, 22px);
    font-style: normal;
    font-weight: 600;
    line-height: 2rem;
    
    padding: clamp(4px, 3vw, 8px) 15vw;
    border-top: 1px solid var(--gray-gray-10, #C3CCD3);
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 0;
}

.foldout-divider button:hover {
    border-color: var(--gray-gray-10, #C3CCD3);
    background-color: rgba(0, 123, 255, 0.1);
    transform: translateY(-2px);
}

.foldout-content {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.foldout-arrow-down {
    transform: rotate(180deg);
}

.foldout-arrow-up {
}

#foldout-icon {
    transition: transform 0.3s ease;
    
}

/* Discount Progress */
.discount-progress-row {
    margin-bottom: 14px;
}

.step-container {
    margin: 0 8px;
    flex: 0 0 auto;
    aspect-ratio: 1/1;
}

.discount-progress-label {
    color: var(--gray-gray-10, #C3CCD3);
    text-align: center;
    font-family: Quicksand, sans-serif;
    font-size: 20px;
    font-style: normal;
    font-weight: 600;
    line-height: 40px; /* 208.333% */
}

.discount-progress-box {
    width: 5vw;
    height: 5vw;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    max-width: 80px;
    max-height: 80px;
    position: relative;
    margin: 0 8px;
}

.discount-progress-box.highlighted {
    width: 5vw;
    height: 5vw;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 3px solid var(--accents-orange-50, #FD9100);
    position: relative; /* Needed for absolute positioning of the blob */
    max-width: 80px;
    max-height: 80px;
}

.discount-progress-box.final {
    width: 5vw;
    height: 5vw;
    background-color: var(--accents-orange-50, #FD9100);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 3px solid #EFC480;
    position: relative; /* Needed for absolute positioning of the blob */
    text-align: center;
    max-width: 80px;
    max-height: 80px;
}

.discount-progress-box.final > .discount-progress-label {
    font-size: clamp(12px, 1.4vw, 24px); /* Min, preferred, max */
}

.discount-progress-box.final .discount-progress-label {
    color: white;
    font-family: Cherry Pie, sans-serif;
    font-style: normal;
    line-height: 0.9em;
}

.discount-progress-img-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.discount-progress-img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 4px;
}

.discount-progress-blob {
    position: absolute;
    bottom: -20%;
    right: -20%;
    width: 60%;
    height: 60%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='82' height='81' viewBox='0 0 82 81' fill='none'%3E%3Cpath d='M46.5924 0.527083C70.3663 3.22046 83.9856 18.739 81.4613 40.2629C76.5814 73.906 54.9141 82.5666 31.1585 80.2813C10.6372 78.3067 -2.74944 57.4686 0.479768 32.5182C3.3465 10.3695 21.6117 -2.30167 46.5924 0.527083Z' fill='%23FD9100'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    color: white;
    font-size: clamp(4px, .8vw, 13px);
    overflow: hidden;
    line-height: 1.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: Cherry Pie, sans-serif;
    z-index: 2;
    padding: 0 5%;
    box-sizing: border-box;
}

.has-image .default-index {
    opacity: 0;
}

.bundle-discount-remove {
    position: absolute;
    width: 25%;
    height: 25%;
    right: -7.5%;
    top: -7.5%;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='12' fill='%233FC0F0'/%3E%3Cpath d='M16.5 7.5L7.5 16.5' stroke='white' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M7.5 7.5L16.5 16.5' stroke='white' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
    background-size: contain;
    color: white;
    z-index: 1;
}

.discount-progress-container {
    background: var(--blue-blue-10, #E1F7FF);
    padding: 15px;
    width: 100%;
    height: auto;
}

/* Checkout */
.checkout-summary {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 16px 4px 16px;
    font-family: Quicksand, sans-serif;
}

@media (orientation: landscape) {
    .checkout-numbers {
        font-size: clamp(16px, 2vw, 24px) !important;
        text-align: right;
    }
}

.checkout-row {
    display: flex;
    justify-content: space-between;
}

.checkout-discount > div {
    color: var(--accents-orange-50, #FD9100);
    font-family: Quicksand, sans-serif;
    font-size: 24px;
    font-style: normal;
    font-weight: 600;
    line-height: 40px;
}

.checkout-total {
    color: var(--gray-gray-50, #A3AFB9);
    font-family: Quicksand, sans-serif;
    font-size: 24px;
    font-style: normal;
    font-weight: 600;
    line-height: 40px;
}

.checkout-totalUVP {
    color: var(--gray-gray-20, #A3AFB9);
    text-align: right;
    font-family: Quicksand, sans-serif;
    font-size: 24px;
    font-style: normal;
    font-weight: 600;
    line-height: 40px;
    text-decoration-line: line-through;
    padding-right: 10px;
}

.checkout-button {
    display: flex;
    justify-content: center;
    width: 100%;
    color: var(--white-white, #FFF);
    font-size: 24px;
    border-radius: 12px;
    font-weight: 700;
}

.checkout-button button {
    font-family: Quicksand, sans-serif;
    font-size: 28px;
    font-style: normal;
    font-weight: 700;
    line-height: 30px; /* 107.143% */
    padding-top: 10px;
    padding-bottom: 10px;
}

@media (max-height: 700px) {
    .product-grid {
        max-height: 80vh;
    } 
}

@media (orientation: portrait) {
    /* Sections */
    .top {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        max-width: 100%;
        height: 130px;
        min-height: 130px;
    }

    .main {
        position: static;
        min-width: 100%;
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    .right {
        top: auto;
        bottom: 0;
        min-width: 100%;
        width: 100%;
        height: auto;
        min-height: 20vh;
        align-items: center;
        justify-content: end;
    }

    /* Top Elements */
    .title {
        font-size: 20px;
        line-height: 1.25em;
    }

    .steps-container {
        padding: 0 10px;
    }

    .step-container {
        aspect-ratio: 1/1;
        width: 70px;
        height: 70px;
        margin-left: 2px;
        margin-right: 2px;
    }

    .step-circle {
        aspect-ratio: 1/1;
        width: 100% !important;
        height: 100% !important;
    }

    /* Product Grid */
    .product-grid {
        min-width: 100%;
        width: 100%;
        padding-bottom: 30vh;
    }

    .grid-item {
        margin: 0.5rem;
        max-width: 45%;
        max-height: 45%;

        aspect-ratio: 1/1.85;
    }

    .grid-list {
        min-width: 100%;
        padding: 0;
        width: 100%;
    }
    
    .grid-item-title {
        font-size: min(100%, 16px);
        line-height: min(110%, 18px);
    }

    .grid-item-title {
        padding-top: clamp(1px, .5vw, 4px);
        margin-bottom: clamp(1px, .5vw, 4px);
        line-height: clamp(1.2rem, 2.5vw, 19px);
    }

    /* Discount Progress */
    .discount-progress-container {
        height: auto;
        overflow-y: hidden;
    }

    .discount-progress-box,
    .discount-progress-box.highlighted,
    .discount-progress-box.final {
        min-width: 8vh;
        min-height: 8vh;
    }

    .discount-progress-blob {
        font-size: clamp(4px, 1.4vh, 20px);
    }

    .discount-progress-box.final > .discount-progress-label {
        font-size: clamp(12px, 5vw, 22px); /* Min, preferred, max */
    }

    /* Ensure the mobile scrolling works properly */
    .mobile-discount-progress {
        background: var(--blue-blue-10, #E1F7FF);
        overflow-y: hidden;
        height: auto;
    }

    .mobile-discount-progress .discount-progress-row {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
        height: 100%;
        padding-top: 1vh;
        padding-bottom: 1.75vh;
        margin-bottom: 0;
    }

    /* Checkout Summary */
    .checkout-summary {
        background: white;
        min-width: 100%;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: center;
        margin: -2px 0 0;
    }

    .checkout-button {
        margin-bottom: 1vh;
        max-width: 450px;
    }

    .checkout-row {
        max-width: 450px;
        width: 100%;
        height: 40px;
        font-size: 100px;
    }

    .checkout-button button {
        margin-top: 8px;
        max-width: 250px;
        margin-bottom: 4px; 
    }
}

/* Modal */

/* Contents Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Content */
.modal-builder {
    background: white;
    border-radius: 20px;
    padding: max(15px, 2.5vh) max(15px, 2.5vw);
    
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    
    position: relative;

    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: visible;
    object-fit: contain;
}

@media (max-width: 800px) {
    .modal-builder {
        margin-left: min(4vw, 20px);
        margin-right: min(4vw, 20px);
        max-height: 90vh;
    }
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

/* Close Button */
.close-btn {
    position: absolute;
    width: min(5vh, 50px);
    height: min(5vh, 50px);
    right: -3vh;
    top: -3vh;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='12' fill='%233FC0F0'/%3E%3Cpath d='M16.5 7.5L7.5 16.5' stroke='white' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M7.5 7.5L16.5 16.5' stroke='white' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
    background-size: contain; /* Ensure the SVG fits within the pseudo-element */
    color: white;
    z-index: 2;
}

@media (max-width: 800px) {
    .close-btn {
        right: -2vw;
        top: -3vh;
    }
}

/* Modal Header */
.modal-header {
    display: flex;
    width: 100%;
    flex-direction: column;
    justify-content: center;
    flex-shrink: 0;
}

.modal-title {
    color: var(--gray-gray-50, #415769);
    text-align: center;
    font-style: normal;
    font-weight: 600;
    font-size: clamp(10px, 6vw, 24px);
    line-height: clamp(12px, 8vw, 36px);
}

@media (max-width: 800px) {
    .modal-title {
        font-size: clamp(10px, 3vh, 18px);
        line-height: 1em;
        margin-bottom: 2px;
    }
}

.modal-body {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    max-height: 40%;
}

@media (max-width: 800px) {
    .modal-body {
        align-items: center;
        flex-direction: column;
        padding: 0;
        justify-content: normal;
        width: 100%;
    }
}

.modal-figurine-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 20vh;
    max-height: 300px;
    max-width: 15vw;
}

@media (max-width: 800px) {
    .modal-figurine-container {
        width: 100%;
        max-width: 100%;
        max-height: min(15vh, 300px);
    }
}

.modal-figurine {
    display: flex;
    max-width: 100%;
    max-height: 100%;
}

.modal-body-spacer {
    width: min(5vw, 50px);
}

@media (max-width: 800px) {
    .modal-body-spacer {
        display: none;
    }
}

.modal-learning {
    width: auto; /* 75%; */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 800px) {
    .modal-learning {
        width: 95%;
        padding: 2vh 0 0;
    }
}

.modal-learning h3 {
    color: var(--gray-gray-50, #415769);
    font-size: clamp(8px, 4vw, 20px);
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}

@media (max-width: 800px) {
    .modal-learning h3 {
        font-size: clamp(8px, 2.5vh, 16px);
        line-height: 1em;
        margin-bottom: 2px;
    }
}

.modal-learning ul {
    color: var(--gray-gray-50, #415769);
    font-size: clamp(8px, 4vw, 20px);
    font-style: normal;
    font-weight: 500;
    line-height: 1.5em;
    align-items: start;
}

@media (max-width: 800px) {
    .modal-learning ul {
        margin-bottom: 0;
        font-size: clamp(8px, 2.5vh, 16px);
    }
}

.modal-footer {
    width: 95%;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 1rem;
    padding: 0 10px;
}

@media (max-width: 800px) {
    .modal-footer {
        width: 95%;
        flex-wrap: nowrap;
        gap: 1vw;
        padding: 0;
    }
}

.modal-footer-item {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-footer-item img {
    width: max(80px, 5vw);
    height: max(80px, 5vw);
    object-fit: contain;
}

.modal-footer-item p {
    width: 100%;
    margin: 0;
    padding-top: 10px;
    color: var(--gray-gray-50, #415769);
    text-align: center;
    font-size: clamp(8px, 4vw, 20px);
    font-style: normal;
    font-weight: 500;
    line-height: 1.1em;
    overflow-wrap: break-word;
    hyphens: auto;
    min-height: 3em;
    display: flex;
    justify-content: center;
}

@media (max-width: 800px) {
    .modal-footer-item p {
        font-size: clamp(8px, 2.5vh, 16px);
    }
}