.gspu-upload-wrapper{
    --gspu-pink:#f8abaa;
    --gspu-green:#99cccc;
    --gspu-yellow:#fae08c;
    --gspu-purple:#b3b1d5;
    --gspu-ink:#27343a;
    --gspu-muted:#667078;
    --gspu-border:#eadfe2;
    width:100%;
    max-width:100%;
    min-width:0;
    margin:18px 0;
    color:var(--gspu-ink);
    box-sizing:border-box;
}

.gspu-upload-wrapper *,
.gspu-upload-wrapper *::before,
.gspu-upload-wrapper *::after{
    box-sizing:border-box;
}

.gspu-title{
    display:block;
    margin:0 0 4px;
    color:var(--gspu-ink);
    font-size:19px;
    font-weight:700;
    line-height:1.25;
}

.gspu-description{
    display:block;
    margin:0;
    color:#626c72;
    font-size:13.5px;
    line-height:1.42;
}

.gspu-upload-card{
    width:100%;
    max-width:100%;
    min-width:0;
    overflow:hidden;
    border:2px dashed rgba(248,171,170,.82);
    border-radius:14px;
    background:#fff;
    box-shadow:0 6px 20px rgba(39,52,58,.045);
    text-align:left;
    transition:border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.gspu-upload-card:hover,
.gspu-upload-card.is-dragover{
    border-color:var(--gspu-pink);
    background:#fffafa;
    box-shadow:0 8px 24px rgba(39,52,58,.07);
}

.gspu-upload-main{
    display:grid;
    grid-template-columns:44px minmax(0,1fr) auto;
    align-items:center;
    column-gap:12px;
    row-gap:6px;
    width:100%;
    min-width:0;
    padding:14px 16px 12px;
    color:inherit;
    cursor:pointer;
}

.gspu-hidden-input{
    position:absolute !important;
    width:1px !important;
    height:1px !important;
    padding:0 !important;
    margin:-1px !important;
    overflow:hidden !important;
    clip:rect(0,0,0,0) !important;
    white-space:nowrap !important;
    border:0 !important;
}

.gspu-hidden-input:focus + .gspu-upload-card{
    border-color:var(--gspu-pink);
    box-shadow:0 0 0 3px rgba(248,171,170,.2),0 8px 24px rgba(39,52,58,.06);
}

.gspu-upload-icon{
    display:flex;
    align-items:center;
    justify-content:center;
    width:44px;
    height:44px;
    margin:0;
    border:1px solid rgba(248,171,170,.72);
    border-radius:50%;
    background:#fff8f5;
    color:var(--gspu-ink);
    flex:0 0 44px;
}

.gspu-upload-icon svg{
    display:block;
    width:23px !important;
    height:23px !important;
    max-width:23px !important;
    max-height:23px !important;
}

.gspu-upload-content{
    display:block;
    min-width:0;
}

.gspu-upload-actions{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    min-width:112px;
    text-align:center;
}

.gspu-upload-heading{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:36px;
    padding:0 16px;
    border:1px solid #78baba;
    border-radius:999px;
    background:var(--gspu-green);
    color:#1f393c;
    box-shadow:0 3px 9px rgba(94,151,151,.15);
    font-size:13px;
    font-weight:700;
    line-height:1;
    transition:transform .18s ease,box-shadow .18s ease;
}

.gspu-upload-heading:focus-visible{
    outline:3px solid var(--gspu-yellow);
    outline-offset:2px;
}

.gspu-upload-main:hover .gspu-upload-heading{
    transform:translateY(-1px);
    box-shadow:0 5px 12px rgba(94,151,151,.2);
}

.gspu-upload-subheading{
    display:block;
    margin-top:4px;
    color:#7b8388;
    font-size:10.5px;
    line-height:1.2;
}

.gspu-upload-info{
    grid-column:2 / 4;
    display:block;
    margin:1px 0 0;
    padding-top:5px;
    border-top:1px solid rgba(179,177,213,.35);
    color:#5f686d;
    font-size:11.5px;
    font-weight:500;
    line-height:1.45;
}

.gspu-upload-info strong{
    color:var(--gspu-ink);
    font-weight:700;
}

.gspu-upload-info > span{
    display:inline;
    margin:0 5px;
    color:#b0a5a8;
    font-weight:400;
}

.gspu-privacy-note{
    grid-column:2 / 4;
    display:flex;
    align-items:center;
    gap:5px;
    margin:0;
    color:#6f787c;
    font-size:11px;
    line-height:1.35;
}

.gspu-privacy-note svg{
    display:block;
    flex:0 0 13px;
    width:13px !important;
    height:13px !important;
    max-width:13px !important;
    max-height:13px !important;
    color:#527f7f;
}

.gspu-product-notes{
    display:grid;
    grid-template-columns:1fr;
    gap:9px;
    padding:10px 15px 12px;
    border-top:1px solid var(--gspu-border);
    background:#fff;
}

.gspu-product-note{
    display:block;
    margin:0;
    cursor:default;
}

.gspu-product-note > span{
    display:block;
    margin-bottom:4px;
    color:var(--gspu-ink);
    font-size:13px;
    font-weight:650;
    line-height:1.3;
}

.gspu-product-note textarea{
    display:block;
    width:100%;
    min-height:58px;
    margin:0;
    padding:9px 10px;
    border:1px solid #d8d8d8;
    border-radius:9px;
    background:#fff;
    color:var(--gspu-ink);
    font:inherit;
    font-size:14px;
    line-height:1.35;
    resize:vertical;
}

.gspu-product-note textarea::placeholder{
    color:#92999e;
}

.gspu-product-note textarea:focus{
    border-color:var(--gspu-pink);
    outline:0;
    box-shadow:0 0 0 3px rgba(248,171,170,.2);
}

.gspu-preview-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(140px, 170px));
    gap:16px;
    align-items:start;
    justify-content:start;
    margin-top:20px;
}

.gspu-preview-grid:empty{
    display:none;
}

[hidden]{
    display:none !important;
}

.gspu-preview-item{
    position:relative;
    aspect-ratio:1/1;
    display:block;
    width:100%;
    height:auto !important;
    min-height:140px !important;
    padding:0;
    overflow:hidden;
    border:2px solid #ece5e7;
    border-radius:13px;
    background:#fafafa;
    box-shadow:0 5px 16px rgba(39,52,58,.08);
    cursor:pointer;
    appearance:none;
}

.gspu-preview-crop{
    position:absolute;
    inset:0;
    display:block;
    width:100%;
    height:100%;
    padding:0;
    overflow:hidden;
    border:0;
    border-radius:inherit;
    background:#fafafa;
    cursor:pointer;
    appearance:none;
}

.gspu-preview-crop img{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
}

.gspu-preview-remove{
    position:absolute;
    z-index:3;
    top:7px;
    right:7px;
    display:flex;
    align-items:center;
    justify-content:center;
    width:32px;
    height:32px;
    padding:0;
    border:2px solid #fff;
    border-radius:50%;
    background:#31393d;
    color:#fff;
    cursor:pointer;
    box-shadow:0 2px 8px rgba(0,0,0,.27);
}

.gspu-preview-remove:focus-visible,
.gspu-preview-crop:focus-visible{
    outline:3px solid var(--gspu-yellow);
    outline-offset:2px;
}

.gspu-preview-remove svg{
    width:18px;
    height:18px;
}

.gspu-preview-status{
    position:absolute;
    right:8px;
    bottom:8px;
    left:8px;
    padding:7px 9px;
    border-radius:8px;
    background:rgba(39,52,58,.8);
    color:#fff;
    font-size:12px;
    font-weight:700;
    line-height:1.2;
    text-align:center;
    backdrop-filter:blur(4px);
}

.gspu-preview-item.is-cropped{
    border-color:#6faf8b;
    box-shadow:0 0 0 1px #6faf8b, 0 5px 16px rgba(39,52,58,.08);
}

.gspu-preview-item.is-cropped .gspu-preview-status{
    background:rgba(53,112,80,.9);
}

.gspu-preview-item.is-uploaded{
    border-color:#5c9b78;
}

.gspu-preview-item.is-uploaded .gspu-preview-status{
    background:rgba(44,111,76,.92);
}

.gspu-preview-item.has-upload-error{
    border-color:#bd2c2c;
    box-shadow:0 0 0 1px #bd2c2c;
}

.gspu-preview-item.has-upload-error .gspu-preview-status{
    background:#a52121;
}

.gspu-upload-message{
    margin:14px 0 0;
    padding:12px 14px;
    border:1px solid #e6a3a3;
    border-radius:10px;
    background:#fff4f4;
    color:#8b1f1f;
    font-size:14px;
    line-height:1.45;
}

.gspu-upload-message.is-info{
    border-color:#99cccc;
    background:#f2fbfb;
    color:#356565;
}

.gspu-upload-message.is-notice{
    border-color:#e6c767;
    background:#fff9e8;
    color:#6d5a1e;
}

.gspu-preview-retry{
    position:absolute;
    left:10px;
    right:10px;
    bottom:10px;
    z-index:4;
    min-height:38px;
    padding:7px 10px;
    border:0;
    border-radius:8px;
    background:#b42318;
    color:#fff;
    font:inherit;
    font-size:13px;
    font-weight:700;
    cursor:pointer;
}

.gspu-cart-photos{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin-top:8px;
}

.gspu-cart-photos img{
    display:block;
    width:52px !important;
    height:52px !important;
    margin:0 !important;
    border:2px solid var(--gspu-green);
    border-radius:8px;
    object-fit:cover;
}

body.gspu-modal-open{
    overflow:hidden;
}

.gspu-crop-modal{
    position:fixed;
    z-index:999999;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
    background:rgba(24,31,34,.78);
}

.gspu-crop-dialog{
    display:flex;
    flex-direction:column;
    width:min(760px, 100%);
    max-height:calc(100vh - 40px);
    overflow:hidden;
    border:1px solid rgba(248,171,170,.65);
    border-radius:16px;
    background:#fff;
    box-shadow:0 24px 70px rgba(0,0,0,.38);
}

.gspu-crop-header{
    display:grid;
    grid-template-columns:90px 1fr 90px;
    align-items:center;
    min-height:64px;
    padding:0 14px;
    border-bottom:1px solid #eadfe2;
    background:#fffafa;
}

.gspu-crop-header h3{
    margin:0;
    color:var(--gspu-ink);
    font-size:18px;
    line-height:1.2;
    text-align:center;
}

.gspu-crop-header button{
    min-height:42px;
    padding:0 12px;
    border:0;
    border-radius:999px;
    background:transparent;
    color:var(--gspu-ink);
    font:inherit;
    font-weight:700;
    cursor:pointer;
}

.gspu-crop-cancel:hover{
    background:#f4f1f2;
}

.gspu-crop-save{
    border:1px solid #76b9b9 !important;
    background:var(--gspu-green) !important;
    color:#1f393c !important;
}

.gspu-crop-stage{
    position:relative;
    min-height:300px;
    height:min(60vh, 600px);
    overflow:hidden;
    background:#161b1d;
}

.gspu-safe-area-guide{
    position:absolute;
    z-index:20;
    pointer-events:none;
}

.gspu-bleed-band,
.gspu-safe-area-boundary{
    position:absolute;
    display:block;
    pointer-events:none;
}

.gspu-bleed-band{
    background:rgba(20,24,27,.52);
}

.gspu-bleed-band.is-top{
    top:0;
    right:0;
    left:0;
    height:var(--gspu-bleed-percent);
}

.gspu-bleed-band.is-bottom{
    right:0;
    bottom:0;
    left:0;
    height:var(--gspu-bleed-percent);
}

.gspu-bleed-band.is-left{
    top:var(--gspu-bleed-percent);
    bottom:var(--gspu-bleed-percent);
    left:0;
    width:var(--gspu-bleed-percent);
}

.gspu-bleed-band.is-right{
    top:var(--gspu-bleed-percent);
    right:0;
    bottom:var(--gspu-bleed-percent);
    width:var(--gspu-bleed-percent);
}

.gspu-safe-area-boundary{
    top:var(--gspu-bleed-percent);
    right:var(--gspu-bleed-percent);
    bottom:var(--gspu-bleed-percent);
    left:var(--gspu-bleed-percent);
    border:2px dashed rgba(255,255,255,.95);
    border-radius:4px;
    box-shadow:0 0 0 1px rgba(21,29,32,.45);
}

.gspu-crop-stage img{
    display:block;
    max-width:100%;
}

.gspu-crop-controls{
    padding:17px 20px 19px;
    background:#fff;
}

.gspu-crop-controls label{
    display:grid;
    grid-template-columns:auto 1fr;
    align-items:center;
    gap:14px;
    color:var(--gspu-ink);
    font-weight:700;
}

.gspu-crop-zoom{
    width:100%;
    margin:0;
    accent-color:#6baaaa;
}

.gspu-crop-controls p{
    margin:10px 0 0;
    color:var(--gspu-muted);
    font-size:13px;
    text-align:center;
}

.gspu-crop-controls .gspu-safe-area-help{
    margin-top:7px;
    color:#455a61;
    font-weight:650;
}


@media(max-width:768px){
    .gspu-upload-wrapper{
        margin:15px 0;
    }

    .gspu-upload-main{
        grid-template-columns:40px minmax(0,1fr) auto;
        column-gap:10px;
        row-gap:5px;
        padding:12px 12px 10px;
    }

    .gspu-upload-icon{
        width:40px;
        height:40px;
        flex-basis:40px;
    }

    .gspu-upload-icon svg{
        width:21px !important;
        height:21px !important;
        max-width:21px !important;
        max-height:21px !important;
    }

    .gspu-title{
        font-size:17px;
    }

    .gspu-description{
        font-size:13px;
    }

    .gspu-upload-actions{
        min-width:100px;
    }

    .gspu-upload-heading{
        min-height:34px;
        padding:0 13px;
        font-size:12px;
    }

    .gspu-upload-subheading{
        display:none;
    }

    .gspu-upload-info{
        margin-top:1px;
        font-size:10.8px;
    }

    .gspu-privacy-note{
        font-size:10.5px;
    }

    .gspu-product-notes{
        padding:10px 12px 12px;
    }

    .gspu-product-note textarea{
        min-height:56px;
        font-size:16px;
    }

    .gspu-preview-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:12px;
        margin-top:14px;
    }

    .gspu-preview-item{
        min-height:0 !important;
    }

    .gspu-crop-modal{
        padding:0;
    }

    .gspu-crop-dialog{
        width:100%;
        height:100%;
        max-height:none;
        border:0;
        border-radius:0;
    }

    .gspu-crop-header{
        grid-template-columns:78px 1fr 78px;
        min-height:calc(62px + env(safe-area-inset-top));
        padding:env(safe-area-inset-top) 9px 0;
    }

    .gspu-crop-header button{
        min-height:44px;
        padding:0 9px;
    }

    .gspu-crop-stage{
        flex:1 1 auto;
        min-height:0;
        height:auto;
    }

    .gspu-crop-controls{
        padding:16px 16px max(18px,env(safe-area-inset-bottom));
    }

    .gspu-crop-controls label{
        grid-template-columns:1fr;
        gap:8px;
    }
}

@media(max-width:560px){
    .gspu-upload-main{
        grid-template-columns:40px minmax(0,1fr);
        align-items:start;
    }

    .gspu-upload-actions{
        grid-column:2;
        flex-direction:row;
        justify-content:flex-start;
        gap:8px;
        min-width:0;
        padding-left:0;
    }

    .gspu-upload-info,
    .gspu-privacy-note{
        grid-column:1 / -1;
    }

    .gspu-upload-subheading{
        display:inline;
        margin:0;
        font-size:10.5px;
    }
}

@media(max-width:390px){
    .gspu-upload-main{
        grid-template-columns:36px minmax(0,1fr);
        gap:9px;
        padding:12px 10px 10px;
    }

    .gspu-upload-icon{
        width:36px;
        height:36px;
        flex-basis:36px;
    }

    .gspu-upload-icon svg{
        width:19px !important;
        height:19px !important;
        max-width:19px !important;
        max-height:19px !important;
    }

    .gspu-title{
        font-size:16px;
    }


    .gspu-upload-info{
        font-size:10px;
    }
}

@media(prefers-reduced-motion:reduce){
    .gspu-upload-card,
    .gspu-upload-heading{
        transition:none;
    }
}
