article.product {
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 18px;
    padding-right: 18px;
    display: flex;
    align-items: flex-start;

    @media (max-width: 768px) {
        flex-direction: column;

        > div.images, > div.info {
            width: 100% !important;
        }

        > div.images {
            div.thumbs {
                img {
                    width: 70px !important;
                    border-width: 2px;
                }
            }
        }

        p.scheduled {
            text-align: center !important;
        }

        button[type="submit"] {
            width: 100%;
        }
    }
    
    gap: 44px;

    div.pdp-gallery {
        flex: 1;

        img.stage {
            margin-top: 28px;
            width: 100%;
            aspect-ratio: 1/1;
            object-fit: cover;
        }

        &:not(.overflowing) {
            div.thumbs-row div.arrow {
                display: none;
            }
        }

        div.thumbs-row {
            position: relative;

            div.arrow {
                --size: 30px;
                position: absolute;
                top: calc(50% - var(--size) / 2);
                width: var(--size);
                height: var(--size);
                display: flex;
                justify-content: center;
                align-items: center;
                background-color: var(--colour-secondary);
                border-radius: 50%;
                z-index: 10;
                cursor: pointer;

                &.left {
                    left: calc(0px - var(--size) / 2);
                }

                &.right {
                    right: calc(0px - var(--size) / 2);
                }

                svg {
                    width: 60%;
                    height: 60%;
                    fill: white;
                }

                &:hover {
                    background-color: var(--colour-primary);
                }
            }

            div.thumbs {
                padding: 18px;
                display: flex;
                gap: 18px;
                user-select: none;
                cursor: pointer;
                overflow: hidden;
                touch-action: pan-y;

                &.dragging {
                    cursor: grabbing;
                    user-select: none;
                }

                img {
                    width: 120px;
                    aspect-ratio: 1/1;
                    object-fit: cover;
                    transition: opacity 0.2s;

                    &.active {
                        border: 2px solid var(--colour-primary);
                    }

                    &:hover {
                        opacity: 0.8;
                    }
                }
            }
        }
    }

    > div.info {
        width: 50%;
        padding-top: 22px;
        padding-bottom: 22px;

        &.loading {
            div.loader {
                display: flex;
            }
        }

        div.variants {
            display: flex;
            gap: 22px;
            flex-wrap: wrap;
            margin-top: 11px;

            label.variant {
                background-color: white;
                box-shadow: var(--default-shadow);
                padding: 11px;
                display: flex;
                align-items: center;
                gap: 11px;
                cursor: pointer;
                user-select: none;

                p.title {
                    font-weight: bold;
                }

                p {
                    margin-top: 0;
                }

                @media (max-width: 500px) {
                    width: 100%;
                }
            }
        }

        p.section-title {
            font-weight: bold;
            margin-top: 22px;
            font-family: 'Domine';
            font-size: 1.2rem;
        }

        p.section-description {
            margin-top: 0;
        }

        form[data-basket] {
            &:not(.active) {
                display: none;
            }

            > div.variant-options {
                p:first-of-type {
                    margin-top: 0;
                }

                div.group {
                    width: fit-content;
                    display: flex;
                    flex-direction: column;
                    gap: 11px;
                    margin-top: 22px;
                    width: 100%;
                    
                    div.option {
                        width: 100%;
                        background-color: white;
                        box-shadow: var(--default-shadow);
                        padding: 11px;

                        div.toggle {
                            display: flex;
                            justify-content: flex-start;
                            align-items: center;
                            gap: 22px;

                            &:has(input[type="radio"]), &:has(input[type="checkbox"]) {
                                cursor: pointer;
                            }

                            div.text {
                                flex-grow: 1;
                                p.label {
                                    font-weight: bold;
                                    margin-top: 0;
                                }

                                p.description {
                                    margin-top: 0;
                                }
                            }

                            div.price {
                                text-wrap: nowrap;
                            }

                            div.quantity {
                                flex-shrink: 0;

                                width: 75px;

                                input {
                                    &:not([type="checkbox"]):not([type="radio"]) {
                                        width: 100%;
                                    }

                                    text-align: center;
                                    display: block;
                                    margin: 0 auto;
                                }

                                &:has(input[type="checkbox"]), &:has(input[type="radio"]) {
                                    input[type="number"] {
                                        display: none;
                                    }
                                }

                                &:has(input[data-input-quantity][min="1"]) {
                                    display: none;
                                }
                            }
                        }

                        div.customisations {
                            margin-top: 11px;

                            &:not(.active) {
                                display: none;
                            }

                            div.customisation {
                                &:only-child {
                                    p.label {
                                        display: none;
                                    }
                                }

                                &:not(:first-of-type) {
                                    margin-top: 11px;
                                }

                                p.label {
                                    font-weight: bold;
                                    margin-top: 0;
                                }

                                p.description {
                                    margin-top: 0;
                                    font-size: 0.8rem;
                                }

                                div.single-line-text {
                                    input {
                                        width: 100%;
                                        padding: 9px;
                                    }
                                }

                                div.choices {
                                    display: flex;
                                    flex-wrap: wrap;
                                    justify-content: flex-start;
                                    gap: 11px;

                                    select {
                                        width: 100%;
                                        padding: 9px;
                                    }

                                    &:has(label.choice) {
                                        padding-left: 18px;
                                    }

                                    label.choice {
                                        max-width: 200px;
                                        width: 100%;
                                        display: flex;
                                        align-items: center;
                                        gap: 11px;
                                        cursor: pointer;

                                        input {
                                            flex-shrink: 0;
                                        }

                                        p {
                                            margin-top: 0;
                                            font-size: 0.9rem;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }

            p.scheduled {
                margin-top: 22px;
                font-size: 0.9rem;
                text-align: right;
            }

            div.controls {
                margin-top: 11px;
                display: flex;
                gap: 11px;
                justify-content: flex-end;
                align-items: stretch;

                div[data-quantity] {
                    flex: 0;
                }

                div.input {
                    width: unset;
                    flex-direction: row;
                    display: flex;
                    align-items: center;
                    gap: 11px;

                    select {
                        width: 50px;
                    }
                }

                button[type="submit"] {
                    margin-top: 0;
                    margin-left: 0;
                    padding: 11px 22px;
                    width: 100%;
                    max-width: 300px;
                }
            }
        }

        div.faqs {
            margin-top: 22px;
            
            div.faq {
                background-color: white;

                &:not(:first-of-type) {
                    border-top: 1px solid silver;
                }

                label.title {
                    width: 100%;
                    cursor: pointer;
                    padding: 11px;
                    display: flex;
                    align-items: center;
                    justify-content: space-between;
                    font-weight: bold;

                    svg {
                        width: 24px;
                        height: 24px;
                        fill: var(--colour-primary);
                    }

                    input {
                        display: none;
                    }
                }
                
                div.content {
                    display: none;

                    padding-left: 11px;
                    padding-right: 11px;
                    padding-bottom: 11px;

                    p:first-of-type {
                        margin-top: 0;
                    }
                }

                &:has(input[type="checkbox"]:checked) {
                    div.content {
                        display: block;
                    }

                    label > svg {
                        transform: rotate(180deg);
                    }
                }
            }
        }
    }
}

div.how-it-works {
    background-color: white;

    div.steps {
        max-width: 1200px;
        margin: 0 auto;
        padding: 44px 22px;

        display: flex;
        gap: 22px;
        flex-wrap: wrap;
        justify-content: space-evenly;

        div.step {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 11px;

            div.icon {
                width: 50px;
                height: 50px;
                border-radius: 50%;
                background-color: var(--colour-primary);
                color: white;
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 1.6rem;
                font-family: 'Domine';
            }

            p {
                margin-top: 0;
                text-align: center;

                &.label {
                    font-size: 1.4rem;
                    font-weight: bold;
                    font-family: 'Domine';
                }
            }
        }
    }
}

div.content-blocks {
    display: flex;
    flex-direction: column;
    gap: 22px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 22px;

    div.block {
        max-width: 900px;
        margin-left: 0;
        margin-right: auto;

        &:nth-child(even) {
            margin-left: auto;
            margin-right: 0;
        }

        p.title {
            font-family: 'Domine';
            font-size: 2rem;
        }

        div.copy {
            background-color: white;
            box-shadow: var(--default-shadow);
            padding: 22px;

            p {
                margin-top: 0;
            }
        }
    }
}

div.scheduler-wrapper {
    &:not(.active) {
        display: none;
    }

    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;

    display: flex;
    justify-content: center;
    align-items: center;

    div.backdrop {
        position: fixed;
        z-index: 999;
        background-color: rgba(0,0,0,0.5);
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
    }

    modal {
        z-index: 1001;
        position: relative;
        background-color: white;
        max-width: 650px;
        width: 100%;
        margin-left: 9px;
        margin-right: 9px;
        padding: 22px;
        box-shadow: var(--default-shadow);

        button.close {
            position: absolute;
            top: 22px;
            right: 22px;
            background-color: transparent;
            border: none;
            cursor: pointer;
            color: black;
            display: flex;
            align-items: center;
            gap: 9px;

            &:hover {
                background-color: rgb(228, 228, 228) !important;
                font-weight: bold;
            }

            p {
                margin-top: 0;
            }

            svg {
                fill: black;
                width: 24px;
                height: 24px;
            }

            @media (max-width: 768px) {
                p {
                    display: none;
                }
            }
        }

        p.title {
            font-size: 2rem;
            margin-top: 0;
        }

        div.forms {
            &:has(form.fetching) {
                div.loader {
                    display: flex;
                }
            }

            form {
                margin-top: 18px;

                div.input {
                    > div {
                        display: flex;
                        align-items: center;
                        gap: 9px;

                        button {
                            text-wrap: nowrap;
                            margin-top: 0;
                            max-width: 130px;
                            width: 100%;
                        }
                    }
                }

                &#scheduler_date {
                    div.no-times {
                        p.title {
                            font-size: 1.2rem;
                        }
                    }
                }

                &#scheduler_time {
                    p.label {
                        font-weight: bold;
                    }

                    div.times {
                        margin-top: 9px;
                        display: flex;
                        flex-wrap: wrap;
                        gap: 18px;

                        label {
                            display: flex;
                            align-items: center;
                            gap: 9px;
                            cursor: pointer;

                            background-color: white;
                            box-shadow: var(--default-shadow);
                            padding: 11px;
                        }

                        p {
                            margin-top: 0;
                            font-weight: normal;
                        }
                    }

                    &:not(:has(select > option)) {
                        display: none;
                    }

                    p.disclaimer {
                        text-align: center;
                        font-size: 0.9rem;
                        margin-left: auto;
                        color: silver;
                    }
                }
            }
        }
    }
}