/* @font-face {
    font-family: "gothic_";
    src: url(fonts/centurygothic.ttf);
}

@font-face {
    font-family: "gothic_bold";
    src: url(fonts/centurygothic_bold.ttf);
} */

* {
    margin: 0;
    padding: 0;
}
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

html body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    touch-action: none;

    /* background-color: #f7f5f6; */
    font-family: "gothic_bold", Helvetica, sans-serif;
    /* height: 77vh; */

    overflow: hidden;
}
html {
    /* background-color: pink;
    border: dashed 2px red; */
}

body {
    /* background: repeating-linear-gradient(
        45deg,
        #686868,
        #ececec 5px,
        #e2e2e3 5px,
        #e2e2e3 10px
    ); */
    background-color: #f7f5f6;
}

b {
    color: #e7962d;
}
.master-wrapper {
    position: absolute;
    left: 0px;
    top: 0px;
    height: 100%;
    width: 100vw;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    transition: all 0.3s ease;
    /* border: 2px solid purple; */
}

.wrapper3d {
    flex: 1;
    /* min-width: 0; */
    width: 100%;
    /* height: 100%; */
    box-sizing: border-box;

    /* transition: width 0.3s ease; */
    background-color: #f7f5f6;
    position: relative;

    /* border: 2px solid green;
    border-radius: 20px; */
    overflow: hidden;
}

#canvas3d {
    display: block;
    box-sizing: border-box;
    background-color: #f7f5f6;

    /* border: 1px solid red; */
}

.site-loading-screen {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 99.99%;
    background-color: #fbf9f9;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: large;
    color: #4041a2;
    z-index: 777;
}

.config-editor-panel {
    /* flex: 0 0 auto; */

    width: 100%;
    height: auto;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    bottom: 30px;

    left: 0;
    box-sizing: border-box;

    /* border: 3px solid red;
    border-radius: 20px; */

    /* border: 1px solid red; */
}

.editor-inner-wrapper {
    /* background-color: #fafefe; */
    background-color: transparent;
    width: 50%;
    /* max-width: 400px; */
    min-width: 250px;
    /* height: 60%; */
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    /* padding: 20px 0; */
    background-color: #f7f5f6;

    box-sizing: border-box;
    gap: 10px;
    position: relative;
    /* border: 1px solid purple; */
}

.editor-canvas-cont {
    /* border: 1px solid green; */
    box-sizing: border-box;
    width: 100%;
    /* height: 40vh; */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transform: translateX(-1px);

    /* display: none; */
}

.product-btn-cont {
    background-color: #ffffff;
    display: flex;
    flex-direction: row;
    /* border: 1px solid red; */
    width: auto;
    border-radius: 6px;
    /* box-shadow: 0px 2px 5px 1px rgba(0, 0, 0, 0.078); */
    border: 1px solid rgba(0, 0, 0, 0.137);
}
.product-btn {
    height: 50px;
    aspect-ratio: 1;
    padding: 4px;
    /* border: 1px solid #4041a2; */
    cursor: pointer;

    border-radius: 6px;
}

.product-btn:hover {
    background-color: #00000009;
}

.product-btn-selected {
    border: 2px solid #7879d7 !important;
    margin-top: 0px !important;
    margin-bottom: 0px !important;
    background-color: #ffffff !important;
}
.product-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.function-btn-cont {
    display: flex;
    justify-content: center;
    gap: 0px;
    width: 100%;
    /* border: 1px solid red; */
    box-sizing: border-box;
    color: #7879d7;
}
.row-btn-cont {
    display: flex;
    justify-content: stretch;
    align-items: stretch;
    gap: 0px;
    width: 100%;
    height: 70px;
    overflow: hidden;
    /* border: 1px solid red; */
    border: none;
    background-color: white;
    border-radius: 10px;
    box-shadow: 3px 3px 11px 1px rgba(0, 0, 0, 0.292);
    transition: all 0.4s;
    opacity: 1;
    max-width: 500px;
}
.row-btn-cont-hidden {
    position: absolute;
    transform: translateY(100px);
    opacity: 0;
}
.row-btn {
    flex: 1;
    border: none;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    gap: 4px;
    cursor: pointer;
    color: #2e2e2e;
    user-select: none;
    padding-top: 6px;
}

.row-btn:active {
    background-color: #f0f0f0;
}
.row-btn i {
    font-size: 1.3em;
}
.row-btn p {
    font-size: 0.8em;
}

.function-btn-cont button,
.function-btn-cont label {
    padding: 10px 15px;
    border: none;

    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    text-wrap: nowrap;
}

.replace-btn {
    display: flex;
    justify-content: center;
    align-items: center;

    background-color: #e7962d;
    color: white;
}
/* .replace-btn:hover {
    background-color: #6868680f;
} */
#add-to-cart-btn {
    background-color: #4041a2;
    color: white;
}

.editor-canvas {
    border: 2px dashed #787ad7;
    border-radius: 4px;

    background-color: transparent;
    pointer-events: all;
}

.text-switch-cont,
.text-color-cont {
    /* border: 1px solid red; */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-align: right;
    flex-direction: row;
}

.text-switch-cont span,
.text-color-cont span {
    color: #7879d7;
    font-size: medium;
    text-wrap: nowrap;
}

#replace-input {
    display: none;
}

.upload-aera {
    user-select: none;
    width: 90%;
    /* position: absolute; */
    height: 68%;
    min-height: 170px;
    background-color: rgb(255, 255, 255);
    box-sizing: border-box;
    border: 2px dashed #7879d7;
    border-radius: 16px;
    color: #7879d7;
    font-size: 1em;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    cursor: pointer;
}

.upload-aera i {
    font-size: 3em;
}

.flex-row {
    display: flex;
    flex-direction: row;
}

.outside-size-label-cont {
    position: absolute;
    left: 0;
    top: 10%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    /* position: absolute;
    left: 0;
    top: 0; */
    height: 20px;
    box-sizing: border-box;
    /* border: 1px solid green; */
}
.outside-size-label {
    border: none;
}
.price-tag-cont {
    /* border: 1px solid red; */
    display: flex;
    justify-content: center;
    align-items: center;
}

.triangle-left {
    width: 0;
    height: 0;
    border-top: 13px solid transparent;
    border-bottom: 13px solid transparent;
    border-right: 12px solid #e7962d;
}

/*
 * Shared yellow pill behind both the "was" and "now" prices. Putting the
 * background, padding, radius and drop shadow on a single parent — rather
 * than duplicating them on each child — guarantees the two prices read as
 * one continuous tag with no visible seam between them.
 */
.price-tag-pill {
    background-color: #e7962d;
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px 3px 6px;
    border-bottom-right-radius: 4px;
    border-top-right-radius: 4px;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

#price-value {
    margin: 0;
    text-align: center;
}

#price-value-was {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: line-through;
    font-size: 0.85em;
    text-align: center;
}

#price-value-was.hidden {
    display: none;
}

/*..................*/

.zoom-input-cont {
    /* border: 1px solid red; */

    position: relative;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    width: 91%;
    height: 40px;
}

/* + / - buttons */
.zoom-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #4041a2;
    color: white;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.zoom-btn:active {
    transform: scale(0.95);
}

/* RANGE RESET */
.zoom-input {
    -webkit-appearance: none;
    appearance: none;
    width: 80%;
    height: 6px;
    background: transparent;
    cursor: pointer;
}

/* TRACK */
.zoom-input::-webkit-slider-runnable-track {
    height: 6px;
    background: #4041a2;
    border-radius: 999px;
}

.zoom-input::-moz-range-track {
    height: 6px;
    background: #cfd2ff;
    border-radius: 999px;
}

/* THUMB */
.zoom-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #ffffff;
    border-radius: 50%;
    /* border: 1px solid rgb(114, 114, 114); */
    margin-top: -9px; /* centers thumb */
    box-shadow: 1px 1px 5px 0px rgba(0, 0, 0, 0.42);
}

.zoom-input::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #ffffff;
    border-radius: 50%;
    border: 2px solid #3f3df4;
}

.promotional-cont {
    color: white;
    /* border: 1px solid red; */
    width: 100%;
    height: 25%;
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
    user-select: none;
    display: flex;
    justify-content: center;
    align-items: end;
    font-weight: bold;
}

.promotional-cont p {
    background-color: #4041a2;
    padding: 10px;
    border-radius: 8px;
    max-width: 180px;
    text-align: center;
}

.intro-text-cont {
    /* border: 1px solid red; */
    width: 100%;
    height: 18%;
    position: absolute;
    left: 0;
    bottom: 0;
    pointer-events: none;
    user-select: none;
    display: flex;
    justify-content: center;
    align-items: start;
    color: rgba(0, 0, 0, 0.906);
    text-align: center;
    text-shadow: 1px 1px 11px #ffffff;
}

@keyframes fadeInOut3 {
    0% {
        opacity: 0.3;
    }
    16.666% {
        opacity: 1;
    }
    33.333% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
    66.666% {
        opacity: 0.3;
    }

    83.333% {
        opacity: 1;
    }
}

.hint-cont {
    width: 100%;
    height: 22%;
    position: absolute;
    left: 0;
    bottom: 0;
    pointer-events: none;
    user-select: none;
    display: flex;
    justify-content: center;
    align-items: start;
    z-index: 0;
    opacity: 1;
    animation: fadeInOut3 4s ease-in-out forwards;
}

.prgs-wrpr {
    width: 90%;
    position: relative;
}
.add-to-cart-progress-bar {
    position: absolute;
    height: 8px;
    width: 0%;
    z-index: 2;
    background-color: #4041a2;
    border-radius: 99px;
    transition: width 1.4s ease;
}

.progress-bar-shadow {
    position: absolute;
    height: 8px;
    width: 100%;
    background-color: #a8a9e9;
    border-radius: 99px;
}

.hint-swipe {
    opacity: 1;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}
.hint-swipe img {
    width: 50px;
    aspect-ratio: 1;
    object-fit: contain;
}

.center-cont {
    position: absolute;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    /* border: 1px solid green; */
}
.center-cont-for-initial {
    position: absolute;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.initial-upload-btn {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100px;
    height: 120px;
    font-size: 38px;

    /* border-radius: 199px; */
    background-color: transparent;
    cursor: pointer;
    user-select: none;
    pointer-events: all !important;
}
.initial-upload-btn-visual {
    width: 80px;
    height: 80px;
    border-radius: 999px;
    background: #c58e46;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
    pointer-events: all;
}
.initial-upload-btn-visual:active {
    background: #4041a2;
    color: white;
}

.canvases-cont-wrapper {
    width: 40%;
    height: 70%;
    top: 0;
    left: 0;
    border: none;
    z-index: 9999;
    background-color: #f7f5f6;
    border-radius: 16px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    gap: 4%;
    box-shadow: 3px 3px 31px 1px rgba(0, 0, 0, 0.203);
    box-sizing: border-box;
    padding: 20px;
    padding-bottom: 0;
    font-weight: bold;

    overflow: hidden;

    pointer-events: all !important;
    position: relative;
    /* border: 1px solid blue; */
}

.canvases-cont-wrapper .row-btn-cont {
    /* position: absolute; */
    /* bottom: 0; */
    border-radius: 0;
    width: 120%;
    height: 80px;
    transition: none;
}

.canvases-cont {
    /* border: 1px solid orange; */
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.image-editor-done-btn {
    border: none;
    padding: 14px 44px;
    background-color: #4041a2;
    color: white;
    border-radius: 0;
    font-size: 1.2rem;

    cursor: pointer;
}

@keyframes pulseAnim {
    0%,
    100% {
        opacity: 0.7;
    }
    50% {
        opacity: 0.2;
    } /* fade out in the middle of each pulse */
}

.upload-loading-screen {
    width: 100%;
    height: 99.99%;
    background-color: #fbf9f9;
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-direction: column;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.03s ease;
    z-index: 600;
}

.upload-loading-screen-visible {
    pointer-events: all;
    opacity: 1;
}
.upload-loading-screen img {
    width: 200px;
}
.upload-loading-screen p {
    color: #f3a350;
    font-size: 1em;
}
.upload-loading-number-value {
    position: absolute;
    /* border: 1px solid red; */
    font-size: 2.1em;
}
.upload-progress {
    /* border: 1px solid red; */
    display: block;
    transform: translateY(-15px) translateX(-5px);
}
#upload-progress {
    transition: stroke-dashoffset 1s ease;
}

.tinted-bg {
    position: absolute;
    z-index: 55;
    background-color: #00000091;
    width: 100vw;
    height: 300vh;
    pointer-events: auto;
    opacity: 1;
    transition: opacity 0.3;
}
.tinted-bg-hidden {
    pointer-events: none;
    opacity: 0;
}
.tinted-bg-opaque {
    background-color: #6b6a6a;
    opacity: 1;
}

.rotate-btn-cont {
    display: flex;
    justify-content: space-between;
    width: 91%;

    /* border: 1px solid red; */
    /* max-width: 200px; */
}

.rotate-btn-cont button {
    background-color: #4041a2;
    font-size: 1rem;
    border-radius: 222px;
    color: white;
    padding: 10px;
    border: none;
    cursor: pointer;
}

.size-edit-cont {
    background-color: #ffffff;

    width: 95%;
    border-radius: 12px;
    padding: 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: absolute;
    z-index: 99;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}
.size-edit-cont section {
    margin-bottom: 12px;
}
.size-edit-cont-hidden {
    opacity: 0;
    pointer-events: none;
}

.size-btn-cont {
    /* display: flex;
    justify-content: space-between; */
    gap: 8px;
    height: 20%;
    display: flex;
    flex-wrap: wrap;
    /* row-gap: 22px; */
}
.size-btn-cont button {
    width: 21%;
    background-color: #e7e8fc;
    border: 1px solid #a8a9e9;
    border-radius: 12px;
    height: 100%;
    color: #4041a2;
    font-size: 1.2em;
    cursor: pointer;
    padding: 8px 0px;
    margin: 4px;
    margin-left: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 22px;
}
.disabled-size-btn {
    user-select: none;
    pointer-events: none;

    background-color: #acacac3e !important;
    color: #0000006b !important;
    border: 1px solid #acacac3e !important;
    position: relative; /* important */
}

.disabled-size-btn::after {
    content: "change layout to set";
    position: absolute;
    top: 100%;
    left: 0;
    font-size: 11px;
    color: #e7962d;
    /* border: 1px solid red; */
    line-height: 0.8;
    white-space: normal;
    height: auto;
    text-wrap: wrap;
    width: 100%;
    opacity: 1 !important;
    margin-top: 4px;
}

.size-btn-cont p {
    /* border: 1px solid blue; */
}
.size-btn-cont span {
    color: black;
    font-size: 0.7rem;
    text-wrap: nowrap;
    /* border: 1px solid red; */
}

.selected-size {
    border: 2px solid #4041a2 !important;
    margin-top: 0px !important;
    margin-bottom: 0px !important;
    background-color: #a2a3f0 !important;
}

.size-type-title {
    color: black;
    margin-top: 10px;
    width: 100%;
}

.layout-edit-cont {
    background-color: #ffffff;
    height: 15vh;
    min-height: 80px;
    max-height: 86px;
    width: 120%;

    left: -10%;
    border-radius: 50% 50% 0 0 / 30px 30px 0 0; /* wide flat dome on top, flat bottom */
    box-shadow: 0px -4px 17px rgba(0, 0, 0, 0.148);

    position: absolute;
    z-index: 99;
    bottom: calc(0px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    display: flex;
    pointer-events: all;
    align-items: end;
    padding-bottom: 2px;

    transition: bottom 0.3s;
}

.layout-edit-cont-hidden {
    bottom: calc(-150px + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
}

.turning-btn-cont {
    width: 96%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.turning-btn-cont button {
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border-radius: 99px;
    color: #4041a2;
    font-size: large;
    cursor: pointer;
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.269);
    pointer-events: all;
}

#add-photos-icon {
    /* border: 1px solid red; */
    width: 100%;
    height: 40%;
    background-image: url(.././images/add-photos.png);
    background-repeat: no-repeat;
    background-size: 25px;
    background-position: center center;
    box-sizing: border-box;
    overflow: visible;
    margin-bottom: -5px;
    transform: translateY(-5px);
}
#add-photos-icon img {
    object-fit: contain;
}

.global-error-overlay {
    position: fixed;
    top: 10px;
    left: 10px;

    width: 80%;
    height: 120px;
    max-height: 20%;
    overflow-x: hidden;
    overflow-y: scroll;
    background-color: rgb(189, 79, 79);
    color: white;

    font-family: monospace;
    font-size: 8px;

    padding: 10px;
    z-index: 999999;

    display: none;
    user-select: none;
    pointer-events: none;
}
.error-overlay-visible {
    display: block;
    pointer-events: all;
    user-select: all;
}

.error-block {
    border: 1px solid rgba(0, 0, 0, 0.311);
    width: 100%;

    white-space: pre-wrap; /* keep line breaks from stack traces */
    overflow-wrap: anywhere; /* allow breaking long words */
    word-break: break-word; /* fallback for older browsers */
}

#error-refresh-btn {
    margin-bottom: 20px;
    color: #001aff;
    font-size: 12px;
}

#copy-error-btn {
    padding: 2px;
    background-color: #37b212;
    color: white;
    border: none;
    cursor: pointer;
    user-select: none;
    font-size: 10px;
}
#copy-error-btn:active {
    background-color: #040fe1;
}

#error-clear-cache-btn {
    padding: 2px;
    background-color: wheat;
    color: red;
    user-select: none;
}

.ellipsis-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 30px;
    height: 30px;
    border-radius: 99px;
    background-color: #ffffffa3;
    border: none;
    color: rgba(0, 0, 0, 0.612);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    rotate: 90deg;
    cursor: pointer;
    box-shadow: 1px -1px 5px rgba(0, 0, 0, 0.269);
}

.ellipsis-menu {
    position: absolute;
    top: 45px;
    right: 10px;
    background-color: white;
    border: 1px solid rgba(0, 0, 0, 0.137);
    border-radius: 6px;
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.269);
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
}

.ellipsis-menu-visible {
    display: flex;
    pointer-events: all;
    z-index: 9999;
}

#ellipsis-clear-btn {
    border: none;
    background-color: transparent;
    color: #dc2d2d;
    cursor: pointer;
    pointer-events: all;
}

#ellipsis-clear-btn:active {
    color: white;
    background-color: #dc2d2d;
}

.back-btn-cont {
    position: absolute;
    left: 12px;
    top: 16px;
    background-color: transparent;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    gap: 8px;
    border: none;
    color: #4041a2;
    flex-wrap: nowrap;
    /* border: 1px solid red; */
    user-select: none;
}
.back-btn-cont:active {
    font-weight: bold;
}

.title-edit-cont {
    background-color: #ffffff;
    height: 20vh;
    width: 100%;
    border-radius: 22px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;

    box-sizing: border-box;

    position: absolute;
    z-index: 99;
    bottom: calc(0px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overflow-x: hidden;
    transition: bottom 0.3s ease;
    pointer-events: all;
    box-shadow: 0px -1px 20px 5px rgba(0, 0, 0, 0.148);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
    box-sizing: border-box;
    gap: 16px;
    /* border: 1px solid green; */
}

.title-edit-cont-hidden {
    bottom: calc(-700px + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
}

.title-btn-cont {
    width: 90%;
    overflow: hidden;
    box-sizing: border-box;
    position: relative;
    gap: 8px;
    height: 150px !important;

    display: block; /* مهم: remove flex */
    /* border: 1px solid yellow; */
}
.title-btn-cont .swiper {
    width: 100%;
    height: 150px !important;
    /* border: 1px dashed rgb(0, 64, 255); */
}

.title-btn-cont .swiper-wrapper {
    align-items: center;
}
.title-btn-cont .swiper-slide {
    height: 48px !important; /* fixed slide height */
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
}

.title-option-btn {
    width: 85%;

    height: auto;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    font-family: "Cookie";
    font-size: 1.6rem;
    max-height: 56px;
    border-radius: 99px;
    padding: 8px 14px;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
    /* border: 1px solid transparent; */
}

.title-swiper::before,
.title-swiper::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 40px;
    pointer-events: none;
    z-index: 10;
    /* border: 1px solid green; */
}
.title-swiper::before {
    top: 0px;

    background: linear-gradient(to bottom, #ffffffa7 20%, transparent);
}
.title-swiper::after {
    bottom: 0px;
    background: linear-gradient(to top, #ffffffa7 20%, transparent);
}

.title-options-done-btn {
    border: none;
    border-radius: 8px;
    background-color: #4041a2;
    color: white;

    font-size: 1rem;
    padding: 12px 52px;
    margin-bottom: 8px;
    display: none;
    cursor: pointer;
    /* display: none; */
}

.color-edit-cont {
    margin-top: 20px;
    width: 100%;
    /* border: 1px dashed green; */
}

/* ── Color swatch row ── */
#color-swatch-cont {
    display: flex;
    flex-direction: row;
    gap: 8px;
    justify-content: center;
    padding: 6px 0;
}
.color-swatch-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    outline: none;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.color-swatch-btn:hover {
    transform: scale(1.15);
}

.font-picker-cont {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    /* flex: 1; */
    height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    /* border: 1px solid red; */
}

.font-picker-cont::before,
.font-picker-cont::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 48px;
    z-index: 2;
    pointer-events: none; /* let swipe events pass through */
}

.font-picker-cont::before {
    left: 0;
    background: linear-gradient(to right, #fff, transparent);
}

.font-picker-cont::after {
    right: 0;
    background: linear-gradient(to left, #fff, transparent);
}
.font-swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto !important; /* let content dictate width */
    
}
.font-option-btn {
    flex-shrink: 0;
    border: 1.5px solid #ddd;
    background: #fff;
    border-radius: 99px;
    padding: 4px 14px;
    font-size: 1.1rem;
    cursor: pointer;
    white-space: nowrap;
    transition:
        border-color 0.18s ease,
        background 0.18s ease;
    color: #444;
    height: 100%;
    user-select: none;
}
.font-option-btn:hover {
    border-color: #aaa;
    background: #f9f9f9;
}
.font-option-btn--active {
    border-color: #888 !important;
    background: #f0f0f0 !important;
    color: #111;
}

/* .swiper {
    width: 100%;
    box-sizing: border-box;
}
.swiper-wrapper {
    background-color: transparent;
} */

.layout-swiper {
    width: 100%;
    overflow: hidden; /* clips the half-visible edge slides */
    /* border: 1px solid green; */
}
.layout-slide {
    border: none;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    box-sizing: border-box;
}

.layout-option-img {
    object-fit: cover;
    background-color: transparent !important;
    /* border: 1px solid #a4a4a46b; */
    max-width: 48px;
    /* padding: 5px; */

    box-shadow: 1px 1px 6px 1px rgba(0, 0, 0, 0.151);
}

.label-left-section {
    /* border: 1px solid red; */
    display: flex;
    background-color: white !important;
    justify-content: center;
    align-items: center;
    border-radius: 999px;
    padding-top: 3px;
    padding-bottom: 2px;
    padding-left: 16px;
    padding-right: 3px;
    gap: 12px;
    box-shadow: 1px 1px 16px rgba(0, 0, 0, 0.078);
}
.quantity-selector-cont {
    display: inline-flex;
    align-items: center;
    gap: 2px;

    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
    border: none;
    background: transparent;
    width: fit-content;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 10px;
    background: #f4f6fa;
    color: #2d2d2d;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: 0.2s ease;
    font-size: 1.1rem;
    text-align: center;
    line-height: 1;
}

.qty-btn:hover {
    background: #e9eef7;
    transform: translateY(-1px);
}
#qty-up {
    border-top-right-radius: 99px;
    border-bottom-right-radius: 99px;
}
#qty-down {
    border-top-left-radius: 99px;
    border-bottom-left-radius: 99px;
}

.qty-btn:active {
    transform: translateY(0);
}

.qty-value {
    min-width: 28px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #111;
    user-select: none;
}

.address-question-cont {
    /* border: 1px solid red; */
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    box-sizing: border-box;
    z-index: 99999;
    background-color: #f7f5f6;
}

.address-icon-cont {
}
.address-icon-cont img {
    width: 100px;
    height: 100px;
}

.address-question-cont i {
    width: 50px;
    height: 100%;

    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    /* box-shadow: -2px 0px 5px rgba(0, 0, 0, 0.1); */
    background-color: #fdfdfd;
    color: #4041a2;
    border-left: 1px solid #efefef;
}

.address-send-choice-panel {
    width: 100%;
    max-width: 320px;

    padding: 14px;
    font-family: Arial, Helvetica, sans-serif;
}

.address-send-choice-panel__title {
    margin: 0 0 12px;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 700;
    color: #2f1d67;
}

.address-send-choice-panel__options {
    display: grid;
    gap: 10px;
    justify-items: center;
}

.address-send-choice-panel__option {
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: 96px;
    flex-direction: row;
    flex-wrap: wrap;
    border: 1px solid #d8d8df;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    /* border: 1px solid green; */
    box-shadow: 1px 1px 15px 1px rgba(0, 0, 0, 0.128);
}

.address-send-choice-panel__content {
    flex: 1;
    display: flex;
    align-items: start;
    flex-direction: column;

    /* border: 1px dashed red; */
    padding: 16px;
}

.address-send-choice-panel__text {
    width: 100%;
    /* border: 1px solid yellow; */
}

.address-send-choice-panel__option-title {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.15;
    font-weight: 700;
    color: #2f1d67;
}

.address-send-choice-panel__option-desc {
    margin: 0;
    font-size: 12px;
    line-height: 1.35;
    color: #66667a;
}

.address-send-choice-panel__radio {
    width: 60px;
    flex: 0 0 60px;
    display: grid;
    place-items: center;
    border-left: 1px solid #ededf3;
    background: linear-gradient(to right, #ffffff 0%, #fafafa 100%);
}

.address-send-choice-panel__radio::before {
    content: "";
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #b9bac7;
    background: #fff;
    box-shadow: inset 0 0 0 3px #fff;
}

.address-send-choice-panel__input:checked
    ~ .address-send-choice-panel__radio::before {
    border-color: #6f63b8;
    background: radial-gradient(circle at center, #6f63b8 0 35%, #fff 36% 100%);
}

.address-question-back-btn {
    text-decoration: underline;
    color: black;
    font-size: 20px;
    position: absolute;
    bottom: 20px;
    text-align: center;
}

#address-form-cont {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px 10px;
    box-sizing: border-box;
}

#address-form-cont,
#address-form-cont * {
    box-sizing: border-box;
}

#address-form-cont .af-delivery-card {
    width: 100%;
    max-width: 320px;
    font-family: Arial, Helvetica, sans-serif;
}

#address-form-cont .af-title {
    margin: 0 0 10px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #111;
}

#address-form-cont .af-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#address-form-cont .af-row {
    display: flex;
    gap: 8px;
}

#address-form-cont .af-field {
    position: relative;
    flex: 1;
}

#address-form-cont .af-input,
#address-form-cont .af-select {
    width: 100%;
    height: 38px;
    border: 1px solid #dcdcdc;
    border-radius: 5px;
    background: #fff;
    padding: 0 12px;
    font-size: 14px;
    color: #333;
    outline: none;
}

#address-form-cont .af-input::placeholder {
    color: #9a9a9a;
}

#address-form-cont .af-input:focus,
#address-form-cont .af-select:focus {
    border-color: #b3b3b3;
}

#address-form-cont .af-required {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #ff6b6b;
    font-size: 16px;
    pointer-events: none;
}

#address-form-cont .af-row--phone .af-phone-code {
    flex: 0 0 80px;
}

#address-form-cont .af-row--phone .af-phone-number {
    flex: 1;
}

#address-form-cont .af-phone-code {
    position: relative;
}

#address-form-cont .af-select {
    appearance: none;
    padding-right: 28px;
    cursor: pointer;
}

#address-form-cont .af-phone-code::after {
    content: "⌄";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-56%);
    font-size: 14px;
    color: #9a9a9a;
    pointer-events: none;
}

#address-form-cont .af-button {
    margin-top: 2px;
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 5px;
    background: #4041a2;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}
#address-form-cont .ca-button {
    margin-top: 2px;
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 5px;
    background: white;
    color: #000;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid #00000027;
}

#address-form-cont .af-button:hover {
    background: #9ea1cb;
}

#address-form-cont .af-button:active,
#address-form-cont .ca-button:active {
    transform: translateY(1px);
}

#address-form-cont .af-button:disabled,
#address-form-cont .af-button--disabled {
    background: #c9cbe6;
    cursor: not-allowed;
    opacity: 0.7;
}

.add-to-cart-progress-cont {
    /* border: 1px solid red; */

    position: absolute;
    z-index: 9999;

    width: 100%;
    height: 100%;

    top: 0;
    left: 0;
    bottom: 10%;

    display: none;
    flex-direction: column;
    justify-content: end;
    align-items: center;

    pointer-events: none;
    user-select: none;

    color: #4041a2;
    text-align: center;

    background-color: transparent;
}

.add-to-cart-progress-cont .progress-div {
    width: 90%;
    height: 10px;
    background-color: #7879d7; /* This is your lighter background track */
    overflow: hidden; /* UNCOMMENTED: Keeps the inner bar rounded */
    margin-bottom: 20px;
    border-radius: 99px;
    position: relative; /* Added: Allows the absolute positioning of the fill */
}

/* The darker color filling bar */
.add-to-cart-progress-cont .progress-div::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%; /* Start at 0 width */
    background-color: #3e3f94; /* A nice, darker shade of your original color */
    border-radius: 99px;

    /* ease-out handles the slowdown at the end */
    /* forwards keeps it at the final keyframe frame (99%) */
    animation: fillProgress 1.3s ease-out forwards;
}

.textarea {
    border: 1px solid orange;
    position: fixed !important;
}

/* The animation timeline */
@keyframes fillProgress {
    from {
        width: 0%;
    }
    to {
        width: 95%; /* Stops and stays right at 99% */
    }
}
@media only screen and (max-width: 700px) {
    .master-wrapper {
        flex-direction: column;
    }
    /* .wrapper3d {
        height: 60%;
        width: 100% !important;
        border: 1px solid red;
    } */
    .config-editor-panel {
        bottom: env(safe-area-inset-bottom, 0px);
        /* border: 1px solid red; */
    }
    .editor-inner-wrapper {
        width: 100%;
        /* border: 1px dashed green; */
    }
    .row-btn-cont {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
    /* #add-to-cart-btn {
        position: absolute;
        right: 20px;
        bottom: 80px;
        font-size: 1.1em;
        padding: 18px;
        border-radius: 199px;
    } */

    /* .product-btn-cont {
        width: 100%;
    } */

    .product-btn {
        width: 40px;
        height: 40px;
    }
    /* #add-to-cart-btn {
        width: 50px;
    } */
    .function-btn-cont button,
    .function-btn-cont label {
        width: 100%;
    }

    .bottom-part-short {
        height: 40% !important;
    }
    .bottom-part-tall {
        height: 60% !important;
    }
    .canvases-cont-wrapper {
        width: 95%;
        height: 90%;
    }
}
.open-card-cont {
    position: absolute;
    pointer-events: none;
    user-select: none;
    /* border: 1px solid red; */
    width: 100%;
    box-sizing: border-box;
    height: 100%;
    display: flex;
    justify-content: right;
    align-items: end;
}

.open-card-cont .open-card-btn {
    background-color: transparent;
    padding: 4px;
    border-radius: 99px;
    border: none;
    color: black;
    margin-right: 18px;
    margin-bottom: 20vh;
    font-size: 1rem;
    pointer-events: all;
    cursor: pointer;
}

.open-card-cont .open-card-btn i {
    padding: 8px;
    background-color: white;
    border: none;
    border-radius: 99px;
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.142);
}

.inside-text-done-btn {
    background-color: transparent;
    padding: 8px;
    border-radius: 99px;

    border: none;
    color: black;

    font-size: 1rem;
    pointer-events: all;
    cursor: pointer;
    background-color: #e7962d;
    color: white;
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.142);

    position: absolute;
    bottom: 24px;
    right: 12px;
}

#insideCanvasWrapper {
    width: 100% !important;
    height: 100% !important;
    transform: none !important; /* Strips the weird scale(0.479) */
    transform-origin: center center !important;
    margin: 0 !important;
    border: 2px dotted yellow !important;
}

/* Ensure the upper and lower canvas elements inside stretch evenly */
#insideCanvasWrapper canvas {
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}
@media only screen and (max-height: 700px) {
    .hint-swipe {
        flex-direction: row;
        gap: 10px;
        font-size: 0.8em;
        transform: translateX(-10px);
    }
    .hint-swipe img {
        width: 40px;
    }
}

.disabled {
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
}
.hidden-flex-el {
    visibility: hidden !important;
    user-select: none !important;
    pointer-events: none !important;
}
.hidden {
    visibility: hidden !important;
    position: absolute !important;
    user-select: none !important;
    pointer-events: none !important;
}

.hidden-weak {
    opacity: 0;
    position: absolute !important;
    transform: translateX(200px);
    pointer-events: none;
}
/* canvas {
    visibility: visible;
    user-select: all;
    pointer-events: all;
    touch-action: auto;
    pointer-events: all !important;
    user-select: all !important;
    position: absolute;
} */
.canvas-container {
    position: absolute !important;
    pointer-events: none;
    opacity: 0;
    border: 4px dashed #787ad7;
    border-radius: 4px;
}
.canvas-container-visible {
    pointer-events: all !important;
    opacity: 1 !important;
}
