*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:Arial, Helvetica, sans-serif;
}



.container{
    max-width:1200px;
    margin:auto;
    display:grid;
    grid-template-columns:420px 1fr;
    gap:30px;
    background:white;
    border-radius:16px;
    overflow:hidden;
    box-shadow:0 10px 35px rgba(0,0,0,.12);
}

.left{
    background:#fff;
    position:relative;
    padding:20px;
    min-height:700px;
    align-self:start;
}


.right{
    padding:35px;
}

h1{
    margin-bottom:25px;
    color:#1f2937;
}

label{
    display:block;
    margin-top:18px;
    margin-bottom:8px;
    font-weight:bold;
    color:#444;
}

select{
    width:100%;
    padding:12px;
    border:1px solid #d6d6d6;
    border-radius:8px;
    font-size:15px;
}

.checks{
    margin-top:25px;
}

.checks label{
    font-weight:normal;
    margin-bottom:10px;
}

.result{
    margin-top:35px;
    background:#f3f6fb;
    padding:20px;
    border-radius:10px;
    text-align:center;
}

#price{
    font-size:34px;
    font-weight:bold;
    color:#ec1111;
    margin-top:10px;
}

button{
    width:100%;
    margin-top:25px;
    padding:15px;
    border:none;
    border-radius:10px;
    background:#ebfc07;
    color:rgb(0, 0, 0);
    font-size:18px;
    cursor:pointer;
}

button:hover{
    background:#000000;
    color:#ffffff;
}
#imageContainer{
    position:relative;
    width:380px;
    height:700px;
    margin:auto;
}

#backLayers,
#frontLayers{
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    pointer-events:none;
}

#backLayers{
    z-index:1;
}

#workbenchImage{
    position:absolute;
    left:0;
    bottom:0;
    width:100%;
    height:100%;
    object-fit:contain;
    z-index:2;
}

#frontLayers{
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    pointer-events:none;
    z-index:3;
}

#backLayers img,
#frontLayers img{
    position:absolute;
    object-fit:contain;
}
.layerImage{
    position:absolute;
    left:0;
    top:40px;
    width:380px;
    object-fit:contain;
}
/* ===================== MODAL ===================== */

.modal{

    position:fixed;

    left:0;
    top:0;

    width:100%;
    height:100%;

    background:rgba(0,0,0,.45);

    display:none;

    justify-content:center;
    align-items:center;

    z-index:9999;

}

.modalBox{

    width:420px;

    background:white;

    border-radius:18px;

    padding:35px;

    text-align:center;

    box-shadow:0 15px 50px rgba(0,0,0,.25);

    animation:popup .25s ease;

}

@keyframes popup{

    from{

        transform:scale(.85);
        opacity:0;

    }

    to{

        transform:scale(1);
        opacity:1;

    }

}

.modalIcon{

    width:90px;
    height:90px;

    margin:auto;

    border-radius:50%;

    background:#38c172;

    color:white;

    font-size:48px;

    display:flex;

    justify-content:center;
    align-items:center;

    margin-bottom:20px;

}

.modalBox h2{

    margin-bottom:12px;

}

.modalBox p{

    color:#666;

    margin-bottom:25px;

    line-height:1.5;

}

.modalBox button{

    margin-top:12px;

}

.secondaryBtn{

    background:white;

    color:#333;

    border:2px solid #ddd;

}

.secondaryBtn:hover{

    background:#f5f5f5;

}
#orderActions{
    margin-top:25px;
    display:flex;
    flex-direction:column;
    gap:12px;
}

#orderActions button{

    width:100%;
    padding:14px;

    border:none;
    border-radius:10px;

    cursor:pointer;

    font-size:17px;
    font-weight:bold;

}

#downloadPdf{

    background:#ebfc07;
    color:white;

}

#downloadPdf:hover{

    background:#ebfc07;

}

#sendRequest{

    background:#1976d2;
    color:white;

}

#sendRequest:hover{

    background:#1565c0;

}

#printOrder{

    background:#444;
    color:white;

}

#printOrder:hover{

    background:#222;

}
.workbenchPreview{
    position:absolute;

    left:0;
    top:580px;

    width:100%;

    padding-top:120px;
    box-sizing:border-box;
}
#workbenchImage {
    display: block;
    width: 100%;
    max-width: 700px;
    height: auto;
    object-fit: contain;
}
@media (max-width: 600px){

    body{
        width:100%;
        margin:0;
        padding:0;
        overflow-x:hidden;
    }

    .container{
        width:100%;
        max-width:100%;
        margin:0;
        display:grid;
        grid-template-columns:1fr;
        gap:0;
        border-radius:0;
        box-shadow:none;
        overflow:visible;
    }

    /* ОБЛАСТЬ СБОРКИ */
    .left{
        width:100%;
        height:330px;
        min-height:330px;
        padding:0;
        position:relative;
        overflow:visible;
        background:#fff;
    }

    /*
       Координатную систему опций НЕ ТРОГАЕМ.
       JS ниже сам поставит сборку куда нужно.
    */
    #imageContainer{
    position:absolute;
    width:380px;
    height:820px;
    left:50%;
    top:0;
    margin:0;
    transform:translateX(-50%) scale(0.55);
    transform-origin:top center;
}

.workbenchPreview{
    top:700px;
    transform:none !important;
}

#backLayers,
#frontLayers,
#workbenchPreview,
.workbenchPreview{
    overflow:visible !important;
}

    /* КОНФИГУРАТОР */
    .right{
        width:100%;
        max-width:100%;
        padding:20px 16px;
        overflow:hidden;
    }

    .right h1{
        font-size:28px !important;
        line-height:1.15;
        margin-bottom:25px;
    }

    select{
        width:100%;
        max-width:100%;
        height:48px;
        font-size:16px;
    }

    input[type="checkbox"]{
        width:22px !important;
        height:22px !important;
        min-width:22px;
        margin-right:10px;
        flex-shrink:0;
    }

    input[type="number"]{
        width:65px !important;
        max-width:65px;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"]{
        width:100%;
        max-width:100%;
    }

    button{
        width:100%;
        max-width:100%;
        white-space:normal;
        font-size:18px;
    }


    /* ТЕКУЩАЯ КОНФИГУРАЦИЯ */
    #liveOrderPreview{
        width:100%;
        max-width:100%;
        overflow:hidden;
    }

    #liveOrderPreview div{
        max-width:100%;
        min-width:0;
        flex-wrap:wrap !important;
    }

    #liveOrderPreview span,
    #liveOrderPreview b{
        max-width:100%;
        overflow-wrap:anywhere;
        word-break:normal;
    }


    /* ЗАКАЗ */
    #orderList,
    #orderItems{
        width:100%;
        max-width:100%;
        overflow:hidden;
    }
}
@media (min-width: 601px){

    .container{
        overflow:visible;
    }

    .left{
        position:sticky;
        top:20px;
        align-self:start;
    }

}
/* ================= CHECKOUT ================= */

.checkoutBtn{
    background:#e53935;
    color:#fff;
    font-size:18px;
    font-weight:700;
    border:2px solid #e53935;
}

.checkoutBtn:hover{
    background:#c62828;
    color:#fff;
}

.checkoutModalBox{
    width:520px;
    max-width:calc(100% - 30px);
    max-height:90vh;
    overflow-y:auto;
    text-align:left;
}


.checkoutModalBox h2{
    text-align:center;
    margin-bottom:25px;
}


.checkoutModalBox label{
    display:block;
    margin-top:15px;
    margin-bottom:7px;
    font-weight:600;
}


.checkoutModalBox input,
.checkoutModalBox select,
.checkoutModalBox textarea{
    width:100%;
    padding:12px;
    border:1px solid #d6d6d6;
    border-radius:8px;
    font-size:16px;
    font-family:Arial, sans-serif;
}


.checkoutModalBox textarea{
    min-height:100px;
    resize:vertical;
}


#confirmCheckoutBtn{
    margin-top:25px;
    background:#ebfc07;
    color:#000;
    border:2px solid #000;
    font-weight:700;
}


#confirmCheckoutBtn:hover{
    background:#000;
    color:#fff;
}


@media (max-width:600px){

    .checkoutModalBox{
        width:calc(100% - 24px);
        max-height:92vh;
        padding:24px 18px;
    }

}