[draggable] { cursor: grab; }
[draggable].dragging { opacity: 0.4; }
[draggable].drag-over {
    outline: 2px solid #3b82f6;
    outline-offset: -1px;
}
.drag-handle {
    position: absolute; left: 8px; top: 50%;
    transform: translateY(-50%);
    color: #94a3b8; font-size: 16px;
    cursor: grab; user-select: none;
}

        
    /* admin_produk.css atau di style tag */
    .bundle-item {
        background: #f8f9fa;
        border: 1px solid #e2e8f0;
        border-radius: 6px;
        padding: 12px;
        margin-bottom: 8px;
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
    }

    .bundle-item-info {
        flex: 1;
        min-width: 150px;
    }

    .bundle-item-name {
        font-weight: 500;
        margin-bottom: 4px;
    }

    .bundle-item-price {
        font-size: 12px;
        color: #666;
    }

    .bundle-item-qty {
        width: 80px;
        padding: 6px;
        border: 1px solid #cbd5e1;
        border-radius: 4px;
        text-align: center;
    }

    .bundle-item-subtotal {
        font-size: 14px;
        font-weight: 500;
        color: #16a34a;
        min-width: 100px;
    }

    .bundle-item-remove {
        background: #ef4444;
        color: white;
        border: none;
        border-radius: 4px;
        padding: 6px 12px;
        cursor: pointer;
    }

    .product-item-modal {
        padding: 10px;
        border-bottom: 1px solid #e2e8f0;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .product-item-modal:hover {
        background: #f8f9fa;
    }

    .btn-add-item {
        color: #3b82f6;
        border: none;
        padding: 8px 12px;
        cursor: pointer;
    }




 /* ═══════════════════════════════════════════════
   VARIANT ITEM
═══════════════════════════════════════════════ */
.variant-item {
    display: block;
    position: relative;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 12px 12px 38px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.variant-item .drag-handle {
    top: 14px;
    transform: none;
}

/* nama varian */
.variant-nama {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 8px;
}

/* grid harga & stok */
.variant-lv2 {
    display: block;
    width: 100%;
    margin-bottom: 4px;
}

.variant-lv2-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.variant-lv2-grid .form-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

.variant-col-label {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 3px;
}

/* divider */
.variant-divider {
    display: block;
    height: 1px;
    background: #f1f5f9;
    margin: 10px 0;
}

/* toggle single stok */
.variant-ss-wrap {
    display: block;
    width: 100%;
}

.variant-ss-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.variant-ss-label span {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
}

.ss-track {
    position: relative;
    flex-shrink: 0;
    width: 34px;
    height: 18px;
    border-radius: 9px;
    background: #cbd5e1;
    transition: background .2s;
}

.ss-track.active {
    background: #3b82f6;
}

.ss-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transition: left .18s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

.ss-track.active .ss-thumb {
    left: 16px;
}

/* level 3 — kode unit */
.variant-lv3 {
    display: none;
    width: 100%;
    box-sizing: border-box;
    margin-top: 10px;
    padding: 10px 12px 8px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.variant-lv3.active {
    display: block;
}

.lv3-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.lv3-title {
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.unit-badge {
    font-size: 11px;
    background: #eff6ff;
    color: #3b82f6;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 500;
}

.unit-list {
    display: block;
    width: 100%;
}

.unit-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    width: 100%;
    box-sizing: border-box;
}

.unit-row .form-input {
    flex: 1;
    min-width: 0;
    margin: 0;
    box-sizing: border-box;
}

.unit-num {
    font-size: 11px;
    color: #94a3b8;
    width: 18px;
    text-align: right;
    flex-shrink: 0;
}

.btn-del-unit {
    flex-shrink: 0;
    background: none;
    border: 1px solid #e2e8f0;
    color: #94a3b8;
    border-radius: 6px;
    width: 30px;
    height: 34px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
}

.btn-del-unit:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #ef4444;
}

.btn-add-unit {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: none;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    border-radius: 6px;
    padding: 6px;
    font-size: 12px;
    cursor: pointer;
    margin-top: 4px;
}

.btn-add-unit:hover {
    background: #f1f5f9;
}

/* tombol tambah varian */
#btnTambahVarian {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: none;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    border-radius: 8px;
    padding: 9px;
    font-size: 13px;
    cursor: pointer;
    margin-top: 4px;
}

#btnTambahVarian:hover {
    background: #f8fafc;
}