/* EsigaraHane - Product Editor Layout v4.2 */

*,*::before,*::after{box-sizing:border-box}

.product-editor-form{width:100%}

.product-editor-grid{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(340px,420px);
    gap:24px;
    width:100%;
    align-items:start
}

.product-editor-main,
.product-editor-sidebar{
    min-width:0
}

.product-editor-main{
    display:flex;
    flex-direction:column;
    gap:20px
}

.editor-card{
    width:100%;
    min-width:0;
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:16px;
    padding:22px;
    box-shadow:0 1px 2px rgba(16,24,40,.025)
}

.editor-card-head{
    display:flex;
    justify-content:space-between;
    gap:16px;
    margin-bottom:20px
}

.editor-card-head.compact{margin-bottom:18px}

.editor-card-head h2,
.variation-heading h2{
    margin:3px 0 0;
    font-size:20px;
    line-height:1.25
}

.editor-card-head p,
.variation-heading p{
    margin:6px 0 0;
    color:#737981;
    font-size:13px
}

.editor-kicker{
    display:block;
    color:#8a9099;
    font-size:10px;
    font-weight:800;
    letter-spacing:.14em
}

.editor-fields{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:16px
}

.editor-fields.one-column{
    grid-template-columns:minmax(0,1fr)
}

.editor-fields .field{
    min-width:0;
    margin:0
}

.editor-fields .field.full{
    grid-column:1/-1
}

.product-editor-form .field label,
.edit-variation-panel .field label{
    display:block;
    margin-bottom:7px;
    font-size:12px;
    font-weight:750;
    color:#17191c
}

.product-editor-form .field input:not([type="checkbox"]):not([type="radio"]),
.product-editor-form .field select,
.product-editor-form .field textarea,
.edit-variation-panel .field input:not([type="checkbox"]):not([type="radio"]),
.edit-variation-panel .field select,
.edit-variation-panel .field textarea{
    display:block;
    width:100%;
    max-width:100%;
    min-width:0;
    border:1px solid #dfe3e8;
    border-radius:10px;
    background:#fff;
    color:#181a1d;
    padding:11px 12px;
    outline:none;
    transition:border-color .15s, box-shadow .15s
}

.product-editor-form .field input:not([type="checkbox"]):not([type="radio"]),
.product-editor-form .field select,
.edit-variation-panel .field input:not([type="checkbox"]):not([type="radio"]),
.edit-variation-panel .field select{
    height:44px
}

.product-editor-form .field textarea,
.edit-variation-panel .field textarea{
    resize:vertical;
    min-height:110px;
    line-height:1.55
}

.product-editor-form .field input:focus,
.product-editor-form .field select:focus,
.product-editor-form .field textarea:focus,
.edit-variation-panel .field input:focus{
    border-color:#111827;
    box-shadow:0 0 0 3px rgba(17,24,39,.06)
}

.field small{
    display:block;
    color:#858b93;
    font-size:11px;
    line-height:1.45;
    margin-top:6px
}

.product-editor-sidebar{
    position:relative
}

.sticky-editor-card{
    position:sticky;
    top:24px
}

.sidebar-separator{
    height:1px;
    background:#eceef1;
    margin:2px 0
}

.image-file-input{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    opacity:0!important;
    pointer-events:none!important
}

.image-upload-box{
    display:flex!important;
    min-height:118px;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    gap:7px;
    border:1.5px dashed #cdd2d8;
    border-radius:12px;
    background:#fafafa;
    padding:18px;
    text-align:center;
    cursor:pointer;
    transition:.15s
}

.image-upload-box:hover{
    border-color:#111827;
    background:#f7f7f7
}

.image-upload-box strong{
    font-size:13px
}

.image-upload-box span{
    color:#858b93;
    font-size:11px;
    font-weight:500
}

.image-preview-grid,
.image-admin-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:9px;
    margin-top:10px
}

.image-preview-item,
.image-admin-card{
    min-width:0;
    border:1px solid #e6e8eb;
    border-radius:10px;
    padding:7px;
    background:#fff
}

.image-preview-item img,
.image-admin-card img{
    display:block;
    width:100%;
    aspect-ratio:1/1;
    object-fit:cover;
    border-radius:7px
}

.image-preview-item span{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    margin-top:6px;
    font-size:9px;
    color:#787e86
}

.image-admin-card label{
    margin-top:7px!important;
    margin-bottom:0!important;
    font-size:10px!important;
    display:flex!important;
    align-items:center;
    gap:5px
}

.switch-line{
    display:flex!important;
    justify-content:space-between;
    align-items:center;
    gap:16px;
    margin:0!important;
    padding:4px 0;
    cursor:pointer
}

.switch-line>span{
    min-width:0
}

.switch-line strong{
    display:block;
    font-size:12px
}

.switch-line small{
    display:block;
    color:#858b93;
    font-size:10px;
    font-weight:500;
    margin-top:3px
}

.switch-line input{
    width:18px;
    height:18px;
    flex:0 0 auto
}

.variation-editor-card,
.edit-variation-panel{
    margin-top:24px
}

.variation-heading{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    margin-bottom:18px
}

.variant-create-row,
.variant-existing-card{
    width:100%;
    min-width:0;
    border:1px solid #e5e7eb;
    border-radius:13px;
    padding:16px;
    margin:12px 0;
    background:#fbfbfc
}

.variant-row-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:13px
}

.variant-create-grid{
    display:grid;
    grid-template-columns:minmax(180px,1.5fr) minmax(140px,1fr) minmax(120px,.85fr) minmax(90px,.6fr) minmax(75px,.5fr) minmax(90px,.55fr);
    gap:12px;
    align-items:end;
    width:100%
}

.variant-create-grid .field{
    min-width:0;
    margin:0
}

.variant-active-field .mini-check{
    height:44px;
    display:flex!important;
    align-items:center;
    gap:7px;
    border:1px solid #dfe3e8;
    border-radius:10px;
    background:#fff;
    padding:0 11px;
    margin:0!important;
    font-weight:650!important
}

.mini-check input{
    width:16px;
    height:16px
}

.variant-remove{
    border:0;
    background:transparent;
    color:#b42318;
    font-weight:750;
    cursor:pointer;
    padding:5px
}

.variant-footer{
    display:flex;
    justify-content:flex-end;
    margin-top:12px
}

.new-variation-box{
    border-top:1px solid #eceef1;
    margin-top:22px;
    padding-top:22px
}

.editor-save-bar{
    position:sticky;
    bottom:0;
    z-index:20;
    width:100%;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    margin-top:24px;
    padding:14px 18px;
    border:1px solid #dfe3e8;
    border-radius:14px 14px 0 0;
    background:rgba(255,255,255,.95);
    backdrop-filter:blur(8px);
    box-shadow:0 -8px 24px rgba(16,24,40,.06)
}

.editor-save-bar strong{
    display:block;
    font-size:12px
}

.editor-save-bar span{
    display:block;
    color:#7b8189;
    font-size:10px;
    margin-top:2px
}

.editor-save-button{
    flex:0 0 auto
}

.type-badge{
    display:inline-flex;
    padding:5px 9px;
    border-radius:999px;
    background:#eef0f2;
    font-size:11px;
    font-weight:800
}

.type-badge.variable{
    background:#111;
    color:#fff
}

.store-field{
    display:flex;
    flex-direction:column;
    gap:8px;
    margin:22px 0;
    max-width:500px
}

.store-field span{
    font-size:12px;
    font-weight:800
}

.store-field select{
    height:46px;
    border:1px solid #e5e7e9;
    border-radius:10px;
    padding:0 12px;
    background:#fff
}

.product-buy-form{margin-top:20px}
.product-description-card{margin-top:55px}

.store-alert-error{
    padding:12px 14px;
    border-radius:10px;
    background:#fff1f0;
    color:#a61b16;
    margin:16px 0;
    font-size:14px
}

.admin-order-grid{
    display:grid;
    grid-template-columns:minmax(0,1.5fr) minmax(300px,.7fr);
    gap:20px
}

@media(max-width:1200px){
    .product-editor-grid{
        grid-template-columns:minmax(0,1fr) 340px
    }

    .variant-create-grid{
        grid-template-columns:repeat(3,minmax(0,1fr))
    }
}

@media(max-width:980px){
    .product-editor-grid{
        grid-template-columns:1fr
    }

    .sticky-editor-card{
        position:static
    }

    .product-editor-sidebar{
        order:2
    }

    .variant-create-grid{
        grid-template-columns:repeat(2,minmax(0,1fr))
    }

    .admin-order-grid{
        grid-template-columns:1fr
    }
}

@media(max-width:640px){
    .editor-card{
        padding:16px;
        border-radius:12px
    }

    .editor-fields,
    .variant-create-grid{
        grid-template-columns:1fr
    }

    .variation-heading,
    .editor-save-bar{
        align-items:stretch;
        flex-direction:column
    }

    .editor-save-button{
        width:100%
    }

    .image-preview-grid,
    .image-admin-grid{
        grid-template-columns:repeat(2,minmax(0,1fr))
    }
}
