:root {
    --h-menus: 30lvh;
}

* {
    box-sizing: border-box;
}

.screen-reader-text {
    border: 0;
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}


header#top ~ #content {
    padding-block-start: calc(.8 * var(--Hhead));
}
/* body {
    background-color: white;
    font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
    font-weight: 300;
    margin: 0;
    font-size: clamp(1.2rem, 0.8rem + 0.8vw, 2.4rem);
} */

img {
    max-width: 100%;
}

figure {
    margin: 0;
}

.isdragging {
    overflow: hidden;
    touch-action: pinch-zoom;
}


#Customizer p {
    max-width: none;
}


label.simply {
    padding-block: .5em;
    cursor: pointer;

    & input[type] {
        position: absolute;
        left: -1000000%;
    }
}

/* label.linky {
    text-decoration: underline;
    text-decoration-thickness: from-font;
    font-size: 1.3em;
} */

label.simply:not(.linky) {
    display: inline-block;
    text-decoration: line-through;
    text-decoration-thickness: from-font;
    text-transform: uppercase;
}

label.simply:not(.linky):has(:checked) {
    text-decoration: none;
}
label:has(:focus-visible) {
    outline: 2px solid var(--green, rgb(7, 210, 0));
    outline-offset: 2px;
}


[data-product-link] {
    cursor: pointer;

    * {
        pointer-events: none;
    }
}


.btn-variant {
    cursor: pointer;
    display: inline-block;
}

/* .btn-variant[data-type="size"] {
    border: 1px solid #656565;
    border-radius: .3em;
    padding: 0.4em 0.6em;
}

.btn-variant[data-type="size"]:has(input:checked) {
    background-color: hsl(from #009de0 h s calc(l + 35));
} */

.btn-variant[data-type="color"] {
    border-radius: 50%;
    line-height: 0;
    padding: 0;
}

.btn-variant[data-type="color"] img {
    inline-size: 2em;
}

.btn-variant[data-type="color"]:has(input:checked) {
    outline: 2px solid #009de0;
    outline-offset: 3px;
}
.btn-variant[data-type="color"]:focus-within,
.btn-variant[data-type="color"]:has(input:focus-visible) {
    outline-color: var(--green, rgb(7, 210, 0));
}

.img-faces {
    --outline: 1px;

    display: grid;
    inline-size: fit-content;
    block-size: fit-content;
    margin: auto;
    position: relative;

    .Stickers {
        position: absolute;
        inset: 0;
        /* z-index: 1; */
    }

    #imgFront,
    #imgBack {
        width: var(--zoom, 100%);
        height: auto;
        max-block-size: 99.5svh;
        touch-action: none;
        user-select: none;
        pointer-events: none;
        /* scale: var(--zoom, 1); */
    }

    &.drop-active img[id][alt] {
        filter: grayscale(1);
    }
}
.unloadedFaceImage {
    min-block-size: 34em;
}

.face-front,
.face-back {
    display: none;

    &.active {
        display: block;
    }
}

#Drop {
    --linecolor: transparent;
    --linesize: 0px;

    pointer-events: none;
    position: absolute;
    inset: 0;
    transition: background 0.3s;
    mix-blend-mode: multiply;
    opacity: .5;

    background-image: linear-gradient(to bottom, transparent 50%, var(--linecolor) 50%, #000 calc(50% + var(--linesize)), transparent calc(50% + var(--linesize))), linear-gradient(to right, transparent 50%, var(--linecolor) 50%, #000 calc(50% + var(--linesize)), transparent calc(50% + var(--linesize)));
    /* background-size: 1.5em 1.5em; */
    background-repeat: no-repeat;

    &.drop-active {
        --linecolor: rgba(25, 38, 217, 0.7);
        --linesize: 1px;
    }

    &.drop-target {
        background-color: #73F3E3;
    }
}


[data-range] {
    margin-inline: auto;
    display: inline-grid;
    inline-size: 6em;
    grid-template-columns: 1fr 1fr;

    /* font-size: small; */
    input {
        grid-column: span 2;
    }

    span:last-child {
        text-align: end;
    }
}


[data-name="Products"] {
    display: none;

    position: fixed;
    inset: 0;
    z-index: 11;
    padding: 1em 3% 10em;
    background: #d9d9d9;
    overflow: auto;
    overscroll-behavior: contain;

    [data-btn="x"] {
        --borderColor: var(--purple);
        --backColor: var(--yellow);
        --textColor: var(--purple);
        margin-inline: auto 0;
        display: flex;
        position: sticky;
        top: 0;
    }

    >div {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 2em;

        >* {
            flex: 0 11em;
            text-align: center;
            font-size: small;
        }

        a {
            text-decoration: none;
            color: var(--black, #0b06e6);
            display: flex;
            flex-direction: column;
            gap: 0.5em;
        }

        .thumbnail {
            height: auto;
            display: block;
            margin-inline: auto;
            object-fit: contain;
            aspect-ratio: 25 / 31;
            border-radius: 10px;
        }
        a div {
            text-align: start;
        }
    }
    .Best {
        background-color: white;
        border-radius: 2rem;
        padding: 1em;
    }

    hr {
        margin-block: 8em;
    }
}

#Customizer:has([name="opener"][value="Variant"]:checked) [data-name="Variant"],
#Customizer:has([name="opener"][value="Products"]:checked) [data-name="Products"],
#Customizer:has([name="opener"][value="Patchs"]:checked) [data-name="Patchs"] {
    display: block;
}

#variant-type-color,
#variant-type-size {
    display: none;
    flex-wrap: wrap;
    gap: 0.5rem;
}

#Customizer:has([name="opener"][value="color"]:checked) #variant-type-color,
#Customizer:has([name="opener"][value="size"]:checked) #variant-type-size {
    display: flex;
}


/* [data-block="product"] .infos {

} */
#productTitle {
    margin-block: 1em;
    text-align: end;
}
#productTitle a {
    font-size: 1.3em;
}
.product-variant {
    margin-block: .3em 1.5em;
}

[data-face] {
    position: absolute;
    inset: auto 0;
    justify-self: center;
    z-index: 2;
}
[data-face] label {
    padding-inline: 1em;
    color: var(--black, #000);
}




#text-editor {
    display: flex;
    flex-wrap: wrap;
    gap: 1.6em;
    opacity: 0;
    inline-size: clamp(10rem, 90%, 35rem);

    justify-content: space-around;
    background-color: white;
    padding: 1em;
    border-radius: .6rem;
    box-shadow: 0 0 0 10000em rgb(0 0 0 / 50%);

    position: fixed;
    inset: 0;
    z-index: 2;
    align-self: start;
    justify-self: center;
    margin-block-start: 6rem;
    translate: 0 -1000%;
}

#text-editor:focus-within,
#text-editor:has(*:active) {
    opacity: 1;
    translate: 0;
}

#text-editor .box-text {
    inline-size: 100%;
}

#custom-text {
    inline-size: 100%;
    min-block-size: 10ch;
    border: none;
    border-radius: .5em;
    text-align: inherit;
    font-size: 16px;
    padding: .3em 1em;
    field-sizing: content;
}

label:has([name="txtalign"]) {
    background-color: #535352;
    border-radius: .4em;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 66.6%;
    inline-size: 2.6em;
    aspect-ratio: 1;
}

label:has([name="txtalign"][value="start"]) {
    background-image: url(align-start.svg);
}

label:has([name="txtalign"][value="center"]) {
    background-image: url(align-center.svg);
}

label:has([name="txtalign"][value="end"]) {
    background-image: url(align-end.svg);
}

label:has([name="txtalign"][value="justify"]) {
    background-image: url(align-justify.svg);
}

label:has([name="txtalign"]:checked) {
    outline: 3px solid var(--orange);
    outline-offset: 1px;
} 


[data-btn],
.btn {
    --borderColor: white;
    --backColor: #2C2C2C;
    --textColor: white;

    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6em;

    inline-size: fit-content;
    padding: 0;
    padding-inline-start: 0.6em;

    border: 1px solid var(--borderColor);
    border-radius: .3em;
    background-color: var(--backColor);

    text-align: end;
    text-transform: uppercase;
    color: var(--textColor);
    line-height: .9;
    font-size: 1em;

    cursor: pointer;
    user-select: none;

}

[data-btn] small {
    font-size: .7em;
}

[data-btn=""],
.btn {
    padding-inline-end: .6em;
    block-size: 2.4em;
}

[data-btn="plus"]::after,
[data-btn="arrowUp"]::after,
[data-btn="arrowDown"]::after,
[data-btn="arrowLeft"]::after,
[data-btn="x"]::after {
    content: '';
    inline-size: 2.6em;
    aspect-ratio: 1 / 0.9;
    background-color: var(--borderColor);
    background-repeat: no-repeat;
    background-size: 2.2ch;
    background-position: center;
}
[data-btn="plus"] > *,
[data-btn="arrowUp"] > *,
[data-btn="arrowDown"] > *,
[data-btn="arrowLeft"] > *,
[data-btn="x"] > * {
    pointer-events: none;
}

[data-btn="plus"]::after {
    background-image: url(Plus.svg);
}

[data-btn="arrowUp"]::after {
    background-image: url(Arrow.svg);
}

[data-btn="arrowDown"]::after {
    background-image: url(Arrow.svg);
    rotate: .5turn;
}
[data-btn="arrowLeft"]::after {
    background-image: url(Arrow.svg);
}

[data-btn="x"]::after {
    background-image: url(X.svg);
    background-size: 40%;
}

[data-btn]:empty,
.btn:empty {
    padding: 0;
}




.patch-text:has(.custom-text:empty) {
    display: none;
}


[data-block="stickers"] {
    overflow-x: clip;
    inline-size: 100%;
}
[data-name="Patchs"] {
    inline-size: max-content;
    cursor: ew-resize;
    touch-action: pan-y pinch-zoom;
    user-select: none;
}
[data-name="Patchs"]>div {
    inline-size: max-content;
    display: flex;
    align-items: center;
    gap: 7lvw;
    padding-inline: 2rem 60px;
    padding-block: 40px 80px;
}
.fig {
    flex: 0 0 auto;
    /* filter: drop-shadow(0px 0px 1px rgba(255, 255, 255, 0.546)); */
}
.patch-info {
    order: -1;
    font-size: small;
    padding: 1em 1.5em;
    background: var(--yellow, yellow);
    color: #000;
    border-radius: 0.6rem;
    line-height: 1;
    flex: 0 0 auto;
}
.patch-text {
    flex: 0 0 auto;
}









/* .product-variant>div>div {
    display: flex;
    gap: 1em;
    align-items: baseline;
} */

[data-product-link] {
    inline-size: max-content;
}


[data-patch] {
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    line-height: 0;

    img,
    svg {
        height: auto;
        pointer-events: none;
    }

    svg {
        inline-size: 100%;
    }

    >* {
        pointer-events: none;
    }
}


[data-patch="clone"] {
    --rotate: 0deg;
    position: absolute;
    z-index: 1;

    /* &[data-resize="true"] { */
    outline-width: var(--outline, 1px);
    outline-style: dotted;
    outline-color: #2196F3;
    outline-offset: 2px;
    box-shadow: 0px 0px 0px var(--outline, 1px) rgb(255, 255, 255 / 0.5);
    /* } */

    rotate: var(--rotate, 0deg);
    /* transition: rotate .2s; */

    img {
        inline-size: 100%;
    }

    &.drop-active {
        z-index: 1;
    }

    &.drop-target {
        filter: saturate(3);

        &.level-up {
            z-index: 2;
        }

        &.level-down {
            z-index: 0;
        }
    }

}

[data-wrap] {
    position: relative;

    svg+svg {
        position: absolute;
        inset: 0;
        opacity: 0;
    }
}


[data-custom-type="text"] {
    --color-image: none;
    --font-size: 3.5rem;
    --font-family: system-ui;

    font-size: var(--font-size);
    line-height: 1;

    .custom-text {
        font-family: var(--font-family);
        font-size: inherit;

        background-image: var(--color-image);
        background-clip: text;
        background-size: cover;
        color: transparent;
        white-space: pre-wrap;
        margin: 0;

        max-inline-size: none;
        line-height: 1;
    }

    .custom-text[data-align="start"] {
        text-align: start;
    }

    .custom-text[data-align="center"] {
        text-align: center;
    }

    .custom-text[data-align="end"] {
        text-align: end;
    }

    .custom-text[data-align="justify"] {
        text-align: justify;
    }
}

/* [data-custom-type="text"][data-patch="original"] {
    .custom-text {
        padding: .2em .3em;
    }
} */




#text-editor:has([name="txtalign"][value="start"]:checked) .box-text {
    text-align: start;
}

#text-editor:has([name="txtalign"][value="center"]:checked) .box-text {
    text-align: center;
}

#text-editor:has([name="txtalign"][value="end"]:checked) .box-text {
    text-align: end;
}

#text-editor:has([name="txtalign"][value="justify"]:checked) .box-text {
    text-align: justify;
}


input.hide {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
    /* inset: 0; */
}

input.hide:is(:focus, :focus-within)+label {
    outline: thin dotted;
}




#Trash {
    touch-action: pan-y pinch-zoom;
    -webkit-user-select: none;
    user-select: none;
}
#Trash [data-btn] >* {
    pointer-events: none;
}
#Trash {
    opacity: 0;
    transition: background .3s linear, opacity .3s linear;
    text-align: center;

    [data-btn] {
        --borderColor: #656565;
        --backColor: #fff;
        --textColor: #2C2C2C;
        cursor: auto;
    }

    &.drop-active {
        opacity: 1;
        background-color: rgb(255 78 78 / .6);

        [data-btn] {
            --borderColor: #9e0000;
            --backColor: #fff;
            --textColor: #7b0101;
        }
    }

    &.drop-target {
        background-color: rgb(255, 78, 78);

        [data-btn] {
            --borderColor: #9e0000;
            --backColor: #9e000091;
            --textColor: #fff;
        }
    }
}


.asideForm {
    display: none;
}

.asideForm.open {
    display: block;
}

#customizerMine-form-wrapper {
    /* position: fixed; */
    /* inset: 0; */
    /* z-index: 2; */
    display: grid;
    /* background-color: rgb(255 255 255 / 0.5); */
}

#customizerMine-form-wrapper form {
    padding: 5em 3%;
}


#prodSizes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7em;
}

#prodSizes .form-field {
    flex: 0 0 auto;
    display: flex;
    gap: .5em;
    align-items: center;
}

#prodSizes [type="number"] {
    inline-size: 5ch;
}

#infoPrice li {
    margin-block: .5em;
}



/* HTML: <div class="loader"></div> */
/* .loader {
    width: 3rem;
    aspect-ratio: 1;
    display: none;


    position: fixed;
    z-index: 10;
    inset: calc(50% - 1.5rem) calc(50% - 1.5rem) auto auto;
}
.loader.show {
    display: grid;
}
.loader::before,
.loader::after {
    content: "";
    grid-area: 1/1;
    background: #ff7415;
    clip-path: polygon(0 0, 50% 50%, 0 100%);
    animation: l11 2s infinite;
}
.loader::after {
    animation-delay: -1.5s;
    --s: 90deg;
}
@keyframes l11 {

    0%,
    12.5% {
        transform: rotate(var(--s, 0deg)) rotate(0deg)
    }

    37.5%,
    62.5% {
        transform: rotate(var(--s, 0deg)) rotate(-180deg)
    }

    87.5%,
    100% {
        transform: rotate(var(--s, 0deg)) rotate(-360deg)
    }
} */

.loading-txt {
    position: fixed;
    inset: 0;
    place-content: center;
    color: var(--purple);
    font-size: 1.8em;
    z-index: -1;
    padding-inline-start: calc(50% - 4ch);
    text-shadow: 2px 2px var(--blue), -2px -2px var(--black);
    pointer-events: none;
    &.active {
        z-index: 1;
        &::after {
            content: "";
            display: inline;
            animation: loadingT 1.3s linear infinite;
        }
    }
}
.loading {
    animation: spin 2s infinite cubic-bezier(0.65, 0.05, 0.36, 1);
}
@keyframes loadingT {
    0% {
        content: "";
    }
    25% {
        content: ".";
    }
    50% {
        content: "..";
    }
    75% {
        content: "...";
    }
}




pre.Debug {
    line-height: 1;
    font-size: 12px;
    margin: 0;
    position: absolute;
    inset: 100%;
    background-color: #ffffffda;
    width: fit-content;
    height: fit-content;
    padding: .5em;
    rotate: calc(-1 * var(--rotate, 0deg));
    transform-origin: top left;
}



#Customizer.customized {
    display: grid;
    gap: 2rem;
    text-align: center;
}



